} else if (!application.equals(privilege.getApplication())) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidPrivilege); sce.getElements().add( "Privilege " + privilege.getKey() + " already owned by " + privilege.getApplication()); throw sce;
@Override public PrivilegeTO getPrivilegeTO(final Privilege privilege) { PrivilegeTO privilegeTO = new PrivilegeTO(); privilegeTO.setKey(privilege.getKey()); privilegeTO.setDescription(privilege.getDescription()); privilegeTO.setApplication(privilege.getApplication().getKey()); privilegeTO.setSpec(privilege.getSpec()); return privilegeTO; }