String normalName = normalize(newObject.getName()); if (normalName != null && forbiddenNames != null && forbiddenNames.contains(normalName)) { throw new ObjectAlreadyExistsException(normalName + " is forbidden to use as an object name"); throw new ObjectAlreadyExistsException(type.getSimpleName()+" with name '"+normalName+"' already exists");
throw new AlreadyExistsException(e.getMessage(),e); } catch (ConnectException e) { throw new ConnectionFailedException(e.getMessage(), e);
throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); } catch (ObjectAlreadyExistsException e) { throw new org.identityconnectors.framework.common.exceptions.AlreadyExistsException(e.getMessage(), e); } catch (SchemaViolationException e) { throw new org.identityconnectors.framework.common.exceptions.InvalidAttributeValueException("Schema exception: " + e.getMessage(), e); throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); } catch (ObjectAlreadyExistsException e) { throw new org.identityconnectors.framework.common.exceptions.AlreadyExistsException(e.getMessage(), e); throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); } catch (ObjectAlreadyExistsException e) { throw new org.identityconnectors.framework.common.exceptions.AlreadyExistsException(e.getMessage(), e); throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); } catch (ObjectAlreadyExistsException e) { throw new org.identityconnectors.framework.common.exceptions.AlreadyExistsException(e.getMessage(), e);
throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); } catch (ObjectAlreadyExistsException e) { throw new org.identityconnectors.framework.common.exceptions.AlreadyExistsException(e.getMessage(), e); } catch (SchemaViolationException e) { throw new org.identityconnectors.framework.common.exceptions.InvalidAttributeValueException("Schema exception: " + e.getMessage(), e); throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); } catch (ObjectAlreadyExistsException e) { throw new org.identityconnectors.framework.common.exceptions.AlreadyExistsException(e.getMessage(), e); throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); } catch (ObjectAlreadyExistsException e) { throw new org.identityconnectors.framework.common.exceptions.AlreadyExistsException(e.getMessage(), e); throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e); } catch (ObjectAlreadyExistsException e) { throw new org.identityconnectors.framework.common.exceptions.AlreadyExistsException(e.getMessage(), e);
private <T extends DummyObject> void renameObject(Class<T> type, Map<String,T> map, String id, String oldName, String newName) throws ObjectDoesNotExistException, ObjectAlreadyExistsException, ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkBlockOperations(); recordWriteOperation("modify"); breakIt(modifyBreakMode, "modify"); delayOperation(); T existingObject; if (enforceUniqueName) { String normalOldName = normalize(oldName); String normalNewName = normalize(newName); existingObject = map.get(normalOldName); if (existingObject == null) { throw new ObjectDoesNotExistException("Cannot rename, "+type.getSimpleName()+" with username '"+normalOldName+"' does not exist"); } if (map.containsKey(normalNewName)) { throw new ObjectAlreadyExistsException("Cannot rename, "+type.getSimpleName()+" with username '"+normalNewName+"' already exists"); } map.put(normalNewName, existingObject); map.remove(normalOldName); } else { existingObject = (T) allObjects.get(id); } existingObject.setName(newName); if (existingObject instanceof DummyAccount) { changeDescriptionIfNeeded((DummyAccount) existingObject); } }