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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGetter for the fielddescription.getId()Getter for the fieldid.Getter for the fieldinheritedRoles.getName()Getter for the fieldname.Getter for the fieldprivileges.inthashCode()booleanhasPrivilege(String privilegeName) Checks whether this role or any role from which this role inherits has the privilege with the given name.booleanisPrivCmsCategories.booleanisPrivCmsCollections.booleanisPrivCmsMenu.booleanisPrivCmsPages.booleanisPrivCmsStaticPages.booleanisPrivDeleteOcrPage.booleanisPrivSetRepresentativeImage.voidsetDescription(String description) Setter for the fielddescription.voidSetter for the fieldid.voidsetInheritedRoles(Set<Role> inheritedRoles) Setter for the fieldinheritedRoles.voidSetter for the fieldname.voidsetPrivCmsCategories(boolean priv) setPrivCmsCategories.voidsetPrivCmsCollections(boolean priv) setPrivCmsCollections.voidsetPrivCmsMenu(boolean priv) setPrivCmsMenu.voidsetPrivCmsPages(boolean priv) setPrivCmsPages.voidsetPrivCmsStaticPages(boolean priv) setPrivCmsStaticPages.voidsetPrivDeleteOcrPage(boolean priv) setPrivDeleteOcrPage.voidsetPrivileges(Set<String> privileges) Setter for the fieldprivileges.voidsetPrivSetRepresentativeImage(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- aStringobject.
-
-
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
-