Class Role

java.lang.Object
io.goobi.viewer.model.security.Role
All Implemented Interfaces:
Serializable

@Entity public class Role extends Object implements Serializable
Represents a role a user can have within a user group. Contains a set of privileges. A role can also inherit from other roles. The full potential of this class is not in use at the moment.
See Also:
  • Field Details

  • Constructor Details

    • Role

      public Role()
      Empty constructor.
    • Role

      public Role(String name)

      Constructor for Role.

      Parameters:
      name - a String object.
  • Method Details

    • hashCode

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

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

      public boolean hasPrivilege(String privilegeName)
      Checks whether this role or any role from which this role inherits has the privilege with the given name.
      Parameters:
      privilegeName - The name of the priv to check for.
      Returns:
      true if any of the roles has this privilege; false otherwise.
    • isPrivDeleteOcrPage

      public boolean isPrivDeleteOcrPage()

      isPrivDeleteOcrPage.

      Returns:
      a boolean.
    • setPrivDeleteOcrPage

      public void setPrivDeleteOcrPage(boolean priv)

      setPrivDeleteOcrPage.

      Parameters:
      priv - a boolean.
    • isPrivSetRepresentativeImage

      public boolean isPrivSetRepresentativeImage()

      isPrivSetRepresentativeImage.

      Returns:
      a boolean.
    • setPrivSetRepresentativeImage

      public void setPrivSetRepresentativeImage(boolean priv)

      setPrivSetRepresentativeImage.

      Parameters:
      priv - a boolean.
    • isPrivCmsPages

      public boolean isPrivCmsPages()

      isPrivCmsPages.

      Returns:
      a boolean.
    • setPrivCmsPages

      public void setPrivCmsPages(boolean priv)

      setPrivCmsPages.

      Parameters:
      priv - a boolean.
    • isPrivCmsMenu

      public boolean isPrivCmsMenu()

      isPrivCmsMenu.

      Returns:
      a boolean.
    • setPrivCmsMenu

      public void setPrivCmsMenu(boolean priv)

      setPrivCmsMenu.

      Parameters:
      priv - a boolean.
    • isPrivCmsStaticPages

      public boolean isPrivCmsStaticPages()

      isPrivCmsStaticPages.

      Returns:
      a boolean.
    • setPrivCmsStaticPages

      public void setPrivCmsStaticPages(boolean priv)

      setPrivCmsStaticPages.

      Parameters:
      priv - a boolean.
    • isPrivCmsCollections

      public boolean isPrivCmsCollections()

      isPrivCmsCollections.

      Returns:
      a boolean.
    • setPrivCmsCollections

      public void setPrivCmsCollections(boolean priv)

      setPrivCmsCollections.

      Parameters:
      priv - a boolean.
    • isPrivCmsCategories

      public boolean isPrivCmsCategories()

      isPrivCmsCategories.

      Returns:
      a boolean.
    • setPrivCmsCategories

      public void setPrivCmsCategories(boolean priv)

      setPrivCmsCategories.

      Parameters:
      priv - a boolean.
    • getId

      public Long getId()

      Getter for the field id.

      Returns:
      the id
    • setId

      public void setId(Long id)

      Setter for the field id.

      Parameters:
      id - the id to set
    • getName

      public String getName()

      Getter for the field name.

      Returns:
      the name
    • setName

      public void setName(String name)

      Setter for the field name.

      Parameters:
      name - the name to set
    • getDescription

      public String getDescription()

      Getter for the field description.

      Returns:
      the description
    • setDescription

      public void setDescription(String description)

      Setter for the field description.

      Parameters:
      description - the description to set
    • getPrivileges

      public Set<String> getPrivileges()

      Getter for the field privileges.

      Returns:
      the privileges
    • setPrivileges

      public void setPrivileges(Set<String> privileges)

      Setter for the field privileges.

      Parameters:
      privileges - the privileges to set
    • getInheritedRoles

      public Set<Role> getInheritedRoles()

      Getter for the field inheritedRoles.

      Returns:
      the inheritedRoles
    • setInheritedRoles

      public void setInheritedRoles(Set<Role> inheritedRoles)

      Setter for the field inheritedRoles.

      Parameters:
      inheritedRoles - the inheritedRoles to set
    • toString

      public String toString()
      Overrides:
      toString in class Object