Package io.goobi.viewer.model.security
Class Role
java.lang.Object
io.goobi.viewer.model.security.Role
- All Implemented Interfaces:
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Getter for the fielddescription
.getId()
Getter for the fieldid
.Getter for the fieldinheritedRoles
.getName()
Getter for the fieldname
.Getter for the fieldprivileges
.int
hashCode()
boolean
hasPrivilege
(String privilegeName) Checks whether this role or any role from which this role inherits has the privilege with the given name.boolean
isPrivCmsCategories.boolean
isPrivCmsCollections.boolean
isPrivCmsMenu.boolean
isPrivCmsPages.boolean
isPrivCmsStaticPages.boolean
isPrivDeleteOcrPage.boolean
isPrivSetRepresentativeImage.void
setDescription
(String description) Setter for the fielddescription
.void
Setter for the fieldid
.void
setInheritedRoles
(Set<Role> inheritedRoles) Setter for the fieldinheritedRoles
.void
Setter for the fieldname
.void
setPrivCmsCategories
(boolean priv) setPrivCmsCategories.void
setPrivCmsCollections
(boolean priv) setPrivCmsCollections.void
setPrivCmsMenu
(boolean priv) setPrivCmsMenu.void
setPrivCmsPages
(boolean priv) setPrivCmsPages.void
setPrivCmsStaticPages
(boolean priv) setPrivCmsStaticPages.void
setPrivDeleteOcrPage
(boolean priv) setPrivDeleteOcrPage.void
setPrivileges
(Set<String> privileges) Setter for the fieldprivileges
.void
setPrivSetRepresentativeImage
(boolean priv) setPrivSetRepresentativeImage.toString()
-
Field Details
-
SUPERUSER_ROLE
ConstantSUPERUSER_ROLE="admin"
- See Also:
-
-
Constructor Details
-
Role
public Role()Empty constructor. -
Role
Constructor for Role.
- Parameters:
name
- aString
object.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
hasPrivilege
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
Getter for the field
id
.- Returns:
- the id
-
setId
Setter for the field
id
.- Parameters:
id
- the id to set
-
getName
Getter for the field
name
.- Returns:
- the name
-
setName
Setter for the field
name
.- Parameters:
name
- the name to set
-
getDescription
Getter for the field
description
.- Returns:
- the description
-
setDescription
Setter for the field
description
.- Parameters:
description
- the description to set
-
getPrivileges
Getter for the field
privileges
.- Returns:
- the privileges
-
setPrivileges
Setter for the field
privileges
.- Parameters:
privileges
- the privileges to set
-
getInheritedRoles
Getter for the field
inheritedRoles
.- Returns:
- the inheritedRoles
-
setInheritedRoles
Setter for the field
inheritedRoles
.- Parameters:
inheritedRoles
- the inheritedRoles to set
-
toString
-