Class OrgUtils
java.lang.Object
de.hybris.platform.commerceservices.organization.utils.OrgUtils
Organization utils class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsOrgAdminGroup(Collection<? extends PrincipalGroupModel> groups) Checks whether the a collection of principal groups contains a group that has the organizational admin role assigned.static <T extends PrincipalModel>
OrgUnitMemberParameter<T>createOrgUnitMemberParameter(String uid, Set<T> members, Class<T> type, PageableData pageableData) Creates the org unit member parameter.Gets the role uids that are configured in project.properties file.static booleanisAdmin(EmployeeModel employee) Checks whether the given employee is the admin of an organizational unit.protected static booleanisAdminRole(String roleUid)
-
Method Details
-
getRoleUids
Gets the role uids that are configured in project.properties file.- Returns:
- a list of role uids
-
isAdmin
Checks whether the given employee is the admin of an organizational unit.- Parameters:
employee- the employee to check- Returns:
trueif the employee is an admin,falseotherwise
-
containsOrgAdminGroup
Checks whether the a collection of principal groups contains a group that has the organizational admin role assigned.- Parameters:
groups- the collection of groups to check- Returns:
trueif the collection contains an admin group,falseotherwise
-
isAdminRole
-
createOrgUnitMemberParameter
public static <T extends PrincipalModel> OrgUnitMemberParameter<T> createOrgUnitMemberParameter(String uid, Set<T> members, Class<T> type, PageableData pageableData) Creates the org unit member parameter.- Type Parameters:
T- the generic type- Parameters:
uid- the uidmembers- the memberstype- the typepageableData- the pageable data- Returns:
- the org unit member parameter
-