Class OrgStructFunctionsImpl
java.lang.Object
com.evolveum.midpoint.model.impl.expr.OrgStructFunctionsImpl
- All Implemented Interfaces:
OrgStructFunctions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetManagers(UserType user, boolean preAuthorized) getManagers(UserType user, String orgType, boolean allowSelf, boolean preAuthorized) getManagersByOrgType(UserType user, String orgType, boolean preAuthorized) getManagersOfOrg(String orgOid, boolean preAuthorized) getManagersOids(UserType user, boolean preAuthorized) Returns a list of user's managers.getManagersOidsExceptUser(@NotNull Collection<ObjectReferenceType> userRefList, boolean preAuthorized) getManagersOidsExceptUser(UserType user, boolean preAuthorized) <T extends ObjectType>
TgetOrgByName(String name, boolean preAuthorized) getOrgByOid(String oid, boolean preAuthorized) getOrgUnits(UserType user, boolean preAuthorized) getOrgUnits(UserType user, QName relation, boolean preAuthorized) getParentOrgByArchetype(ObjectType object, String archetypeOid, boolean preAuthorized) getParentOrgByOrgType(ObjectType object, String orgType, boolean preAuthorized) getParentOrgs(ObjectType object, boolean preAuthorized) getParentOrgs(ObjectType object, String relation, String orgType, boolean preAuthorized) getParentOrgs(ObjectType object, QName relation, @NotNull Predicate<OrgType> predicate, boolean preAuthorized) getParentOrgs(ObjectType object, QName relation, String orgType, boolean preAuthorized) getParentOrgsByRelation(ObjectType object, String relation, boolean preAuthorized) getParentOrgsByRelation(ObjectType object, QName relation, boolean preAuthorized) booleanbooleanisManagerOf(UserType user, String orgOid, boolean preAuthorized) booleanisManagerOfOrgType(UserType user, String orgType, boolean preAuthorized)
-
Constructor Details
-
OrgStructFunctionsImpl
public OrgStructFunctionsImpl()
-
-
Method Details
-
getManagersOids
public Collection<String> getManagersOids(UserType user, boolean preAuthorized) throws SchemaException, SecurityViolationException Returns a list of user's managers. Formally, for each Org O which this user has (any) relation to, all managers of O are added to the result. Some customizations are probably necessary here, e.g. filter out project managers (keep only line managers), or defining who is a manager of a user who is itself a manager in its org.unit. (A parent org unit manager, perhaps.)- Specified by:
getManagersOidsin interfaceOrgStructFunctions- Returns:
- list of oids of the respective managers
- Throws:
SchemaExceptionSecurityViolationException
-
getManagersOidsExceptUser
public Collection<String> getManagersOidsExceptUser(UserType user, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagersOidsExceptUserin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getManagersOidsExceptUser
public Collection<String> getManagersOidsExceptUser(@NotNull @NotNull Collection<ObjectReferenceType> userRefList, boolean preAuthorized) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException -
getManagers
public Collection<UserType> getManagers(UserType user, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagersin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getManagersByOrgType
public Collection<UserType> getManagersByOrgType(UserType user, String orgType, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagersByOrgTypein interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getManagers
public Collection<UserType> getManagers(UserType user, String orgType, boolean allowSelf, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagersin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getOrgUnits
- Specified by:
getOrgUnitsin interfaceOrgStructFunctions
-
getOrgUnits
- Specified by:
getOrgUnitsin interfaceOrgStructFunctions
-
getOrgByOid
- Specified by:
getOrgByOidin interfaceOrgStructFunctions- Throws:
SchemaException
-
getOrgByName
public OrgType getOrgByName(String name, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getOrgByNamein interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgByOrgType
public OrgType getParentOrgByOrgType(ObjectType object, String orgType, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgByOrgTypein interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgByArchetype
public OrgType getParentOrgByArchetype(ObjectType object, String archetypeOid, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgByArchetypein interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgsByRelation
public Collection<OrgType> getParentOrgsByRelation(ObjectType object, QName relation, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgsByRelationin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgsByRelation
public Collection<OrgType> getParentOrgsByRelation(ObjectType object, String relation, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgsByRelationin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgsin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, String relation, String orgType, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgsin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, QName relation, String orgType, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgsin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, QName relation, @NotNull @NotNull Predicate<OrgType> predicate, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgsin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getManagersOfOrg
public Collection<UserType> getManagersOfOrg(String orgOid, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagersOfOrgin interfaceOrgStructFunctions- Throws:
SchemaExceptionSecurityViolationException
-
isManagerOf
- Specified by:
isManagerOfin interfaceOrgStructFunctions
-
isManager
- Specified by:
isManagerin interfaceOrgStructFunctions
-
isManagerOfOrgType
public boolean isManagerOfOrgType(UserType user, String orgType, boolean preAuthorized) throws SchemaException - Specified by:
isManagerOfOrgTypein interfaceOrgStructFunctions- Throws:
SchemaException
-
getObject
public <T extends ObjectType> T getObject(Class<T> type, String oid, boolean preAuthorized) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-