java.lang.Object
de.hybris.platform.commerceservices.organization.utils.OrgUtils

public final class OrgUtils extends Object
Organization utils class.
  • Method Details

    • getRoleUids

      public static List<String> getRoleUids()
      Gets the role uids that are configured in project.properties file.
      Returns:
      a list of role uids
    • isAdmin

      public static boolean isAdmin(EmployeeModel employee)
      Checks whether the given employee is the admin of an organizational unit.
      Parameters:
      employee - the employee to check
      Returns:
      true if the employee is an admin, false otherwise
    • containsOrgAdminGroup

      public static boolean containsOrgAdminGroup(Collection<? extends PrincipalGroupModel> groups)
      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:
      true if the collection contains an admin group, false otherwise
    • isAdminRole

      protected static boolean isAdminRole(String roleUid)
    • 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 uid
      members - the members
      type - the type
      pageableData - the pageable data
      Returns:
      the org unit member parameter