throw new ObjectDoesNotExistException(type.getSimpleName()+" with id '"+id+"' does not exist"); map.remove(mapKey); } else { throw new ObjectDoesNotExistException(type.getSimpleName()+" with name '"+normalName+"' does not exist");
throw new UnknownUidException(e.getMessage(),e); } catch (ConnectException e) { log.info("delete::exception "+e);
resource.renameAccount(account.getId(), account.getName(), newName); } catch (ObjectDoesNotExistException 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); resource.renameGroup(group.getId(), group.getName(), newName); } catch (ObjectDoesNotExistException 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); resource.renamePrivilege(priv.getId(), priv.getName(), newName); } catch (ObjectDoesNotExistException 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); resource.renameOrg(org.getId(), org.getName(), newName); } catch (ObjectDoesNotExistException 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 synchronized <T extends DummyObject> void deleteObjectByName(Class<T> type, Map<String,T> map, String name) throws ObjectDoesNotExistException, ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { checkBlockOperations(); recordWriteOperation("delete"); breakIt(deleteBreakMode, "delete"); delayOperation(); String normalName = normalize(name); T existingObject; if (!enforceUniqueName) { throw new IllegalStateException("Whoops! got into deleteObjectByName without enforceUniqueName"); } if (map.containsKey(normalName)) { existingObject = map.get(normalName); map.remove(normalName); allObjects.remove(existingObject.getId()); } else { throw new ObjectDoesNotExistException(type.getSimpleName()+" with name '"+normalName+"' does not exist"); } if (syncStyle != DummySyncStyle.NONE) { int syncToken = nextSyncToken(); DummyDelta delta = new DummyDelta(syncToken, type, existingObject.getId(), name, DummyDeltaType.DELETE); deltas.add(delta); } }
resource.renameAccount(account.getId(), account.getName(), newName); } catch (ObjectDoesNotExistException 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); resource.renameGroup(group.getId(), group.getName(), newName); } catch (ObjectDoesNotExistException 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); resource.renamePrivilege(priv.getId(), priv.getName(), newName); } catch (ObjectDoesNotExistException 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); resource.renameOrg(org.getId(), org.getName(), newName); } catch (ObjectDoesNotExistException 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); } }