Class MCRRole

java.lang.Object
org.mycore.user2.MCRRole

public class MCRRole extends Object
Represents a role of users. Roles are MCRCategory instances and every category from MCRUser2Constants.ROLE_CLASSID isSystemRole().
Author:
Thomas Scheffler (yagee)
  • Constructor Details

    • MCRRole

      public MCRRole(String name, Set<MCRLabel> labels)
      Creates a new role instance.
      Parameters:
      name - the unique role ID
      labels - a set of MCRLabel in different languages
  • Method Details

    • getName

      public String getName()
      Returns the roles's name
      Returns:
      the roles's name
    • getLabel

      public MCRLabel getLabel()
      Returns the label in the current language.
    • getLabels

      public Collection<MCRLabel> getLabels()
      Returns all labels available for this role.
    • isSystemRole

      public boolean isSystemRole()
      Returns true if this role is a system role. A system role is every category in MCRUser2Constants.ROLE_CLASSID.
      Returns:
      false if category has not the same root ID as the system role classification.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object