Class OrgStructFunctionsImpl
java.lang.Object
com.evolveum.midpoint.model.impl.expr.OrgStructFunctionsImpl
- All Implemented Interfaces:
OrgStructFunctions
-
Constructor Summary
-
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) boolean
boolean
isManagerOf
(UserType user, String orgOid, boolean preAuthorized) boolean
isManagerOfOrgType
(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:
getManagersOids
in interfaceOrgStructFunctions
- Returns:
- list of oids of the respective managers
- Throws:
SchemaException
SecurityViolationException
-
getManagersOidsExceptUser
public Collection<String> getManagersOidsExceptUser(UserType user, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagersOidsExceptUser
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
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:
getManagers
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getManagersByOrgType
public Collection<UserType> getManagersByOrgType(UserType user, String orgType, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagersByOrgType
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getManagers
public Collection<UserType> getManagers(UserType user, String orgType, boolean allowSelf, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagers
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getOrgUnits
- Specified by:
getOrgUnits
in interfaceOrgStructFunctions
-
getOrgUnits
- Specified by:
getOrgUnits
in interfaceOrgStructFunctions
-
getOrgByOid
- Specified by:
getOrgByOid
in interfaceOrgStructFunctions
- Throws:
SchemaException
-
getOrgByName
public OrgType getOrgByName(String name, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getOrgByName
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getParentOrgByOrgType
public OrgType getParentOrgByOrgType(ObjectType object, String orgType, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgByOrgType
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getParentOrgByArchetype
public OrgType getParentOrgByArchetype(ObjectType object, String archetypeOid, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgByArchetype
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getParentOrgsByRelation
public Collection<OrgType> getParentOrgsByRelation(ObjectType object, QName relation, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgsByRelation
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getParentOrgsByRelation
public Collection<OrgType> getParentOrgsByRelation(ObjectType object, String relation, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgsByRelation
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgs
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, String relation, String orgType, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgs
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, QName relation, String orgType, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgs
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, QName relation, @NotNull @NotNull Predicate<OrgType> predicate, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getParentOrgs
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
getManagersOfOrg
public Collection<UserType> getManagersOfOrg(String orgOid, boolean preAuthorized) throws SchemaException, SecurityViolationException - Specified by:
getManagersOfOrg
in interfaceOrgStructFunctions
- Throws:
SchemaException
SecurityViolationException
-
isManagerOf
- Specified by:
isManagerOf
in interfaceOrgStructFunctions
-
isManager
- Specified by:
isManager
in interfaceOrgStructFunctions
-
isManagerOfOrgType
public boolean isManagerOfOrgType(UserType user, String orgType, boolean preAuthorized) throws SchemaException - Specified by:
isManagerOfOrgType
in interfaceOrgStructFunctions
- Throws:
SchemaException
-
getObject
public <T extends ObjectType> T getObject(Class<T> type, String oid, boolean preAuthorized) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-