private DummyOrg convertToOrg(Set<Attribute> createAttributes) throws ConnectException, FileNotFoundException, ConflictException { String icfName = Utils.getMandatoryStringAttribute(createAttributes,Name.NAME); if (configuration.getUpCaseName()) { icfName = StringUtils.upperCase(icfName); } final DummyOrg newOrg = new DummyOrg(icfName); for (Attribute attr : createAttributes) { if (attr.is(Uid.NAME)) { throw new IllegalArgumentException("UID explicitly specified in the org attributes"); } else if (attr.is(Name.NAME)) { // Skip, already processed } else if (attr.is(OperationalAttributeInfos.PASSWORD.getName())) { throw new IllegalArgumentException("Password specified for a org"); } else if (attr.is(OperationalAttributeInfos.ENABLE.getName())) { throw new IllegalArgumentException("Unsupported ENABLE attribute in org"); } else { String name = attr.getName(); try { newOrg.replaceAttributeValues(name,attr.getValue()); } catch (SchemaViolationException e) { throw new IllegalArgumentException(e.getMessage(),e); } catch (InterruptedException e) { throw new OperationTimeoutException(e.getMessage(),e); } } } return newOrg; }
String newName = (String)attr.getValue().get(0); try { resource.renameOrg(org.getId(), org.getName(), newName); } catch (ObjectDoesNotExistException e) { throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); String name = attr.getName(); try { org.replaceAttributeValues(name, attr.getValue()); } catch (SchemaViolationException e) { throw new InvalidAttributeValueException(e.getMessage(),e);
public DummyOrg addOrgTop() throws ConnectException, FileNotFoundException, ObjectAlreadyExistsException, SchemaViolationException, ConflictException, InterruptedException { DummyOrg org = new DummyOrg(ORG_TOP_NAME); dummyResource.addOrg(org); return org; }
String name = attr.getName(); try { org.removeAttributeValues(name, attr.getValue()); log.ok("Removed attribute {0} values {1} from {2}, resulting values: {3}", name, attr.getValue(), org, org.getAttributeValues(name, Object.class)); } catch (SchemaViolationException e) {
String name = attr.getName(); try { org.addAttributeValues(name, attr.getValue()); log.ok("Added attribute {0} values {1} from {2}, resulting values: {3}", name, attr.getValue(), org, org.getAttributeValues(name, Object.class)); } catch (SchemaViolationException e) {
DummyOrg newOrg = convertToOrg(createAttributes); log.ok("Adding dummy org:\n{0}", newOrg.debugDump());