Package io.goobi.viewer.model.security
Interface IPrivilegeHolder
- All Known Implementing Classes:
AbstractPrivilegeHolder,License,LicenseType
public interface IPrivilegeHolder
Interface for entities that carry a set of named access privileges (e.g. a role or a license).
Defines constants for all known privilege names spanning data access, CMS administration, and crowdsourcing,
as well as generic add/remove/check operations and convenience boolean accessors for individual privileges.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstantPREFIX_PRIV="PRIV_".static final StringConstantPREFIX_TICKET="TICKET_".static final StringConstantPRIV_ARCHIVE_DISPLAY_NODE="PRIV_ARCHIVE_DISPLAY_NODE".static final StringConstantPRIV_CMS_ALL_CATEGORIES="CMS_ALL_CATEGORIES".static final StringConstantPRIV_CMS_ALL_SUBTHEMES="CMS_ALL_SUBTHEMES".static final StringConstantPRIV_CMS_ALL_TEMPLATES="CMS_ALL_TEMPLATES".static final StringConstantPRIV_CMS_CATEGORIES="CMS_CATEGORIES".static final StringConstantPRIV_CMS_COLLECTIONS="CMS_COLLECTIONS".static final StringConstantPRIV_CMS_MENU="CMS_MENU".static final StringConstantPRIV_CMS_PAGES="CMS_PAGES".static final StringConstantPRIV_CMS_STATIC_PAGES="CMS_STATIC_PAGES".static final StringConstantPRIV_CROWDSOURCING_ALL_CAMPAIGNS="CROWDSOURCING_ALL_CAMPAIGNS".static final StringConstantPRIV_CROWDSOURCING_ANNOTATE_CAMPAIGN="CROWDSOURCING_ANNOTATE_CAMPAIGN".static final StringConstantPRIV_CROWDSOURCING_REVIEW_CAMPAIGN="CROWDSOURCING_REVIEW_CAMPAIGN".static final StringConstantPRIV_DELETE_OCR_PAGE="DELETE_OCR_PAGE".static final StringConstantPRIV_DOWNLOAD_BORN_DIGITAL_FILES="DOWNLOAD_BORN_DIGITAL_FILES".static final StringConstantPRIV_DOWNLOAD_IMAGES="DOWNLOAD_IMAGES".static final StringConstantPRIV_DOWNLOAD_METADATA="DOWNLOAD_METADATA".static final StringConstantPRIV_DOWNLOAD_ORIGINAL_CONTENT="DOWNLOAD_ORIGINAL_CONTENT".static final StringConstantPRIV_DOWNLOAD_PAGE_PDF="DOWNLOAD_PAGE_PDF".static final StringConstantPRIV_DOWNLOAD_PDF="DOWNLOAD_PDF".static final StringDeprecated.iiif manifests are now always allowed, but individual resources therein may not be, depending on specific privilegesstatic final StringConstantPRIV_CMS_PAGES="PRIV_LEGAL_DISCLAIMER".static final StringConstantPRIV_LIST="LIST".static final StringConstantPRIV_SET_REPRESENTATIVE_IMAGE="SET_REPRESENTATIVE_IMAGE".static final StringConstantPRIV_VIEW_AUDIO="VIEW_AUDIO".static final StringConstantPRIV_VIEW_CMS="PRIV_VIEW_CMS".static final StringConstantPRIV_VIEW_FULLTEXT="VIEW_FULLTEXT".static final StringConstantPRIV_VIEW_IMAGES="VIEW_IMAGES".static final StringConstantPRIV_VIEW_UGC="PRIV_VIEW_METADATA".static final StringConstantPRIV_VIEW_THUMBNAILS="VIEW_THUMBNAILS".static final StringConstantPRIV_VIEW_UGC="PRIV_VIEW_UGC".static final StringConstantPRIV_VIEW_VIDEO="VIEW_VIDEO".static final StringConstantPRIV_ZOOM_IMAGES="ZOOM_IMAGES". -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPrivilege(String privilege) getSortedPrivileges(Set<String> privileges) booleanhasPrivilege(String privilege) hasPrivilege.booleanisPrivCmsAllCategories.booleanisPrivCmsAllSubthemes.booleanisPrivCmsAllTemplates.booleanisPrivCmsCategories.booleanisPrivCmsCollections.booleanisPrivCmsMenu.booleanisPrivCmsPages.booleanisPrivCmsStaticPages.booleanisPrivCrowdsourcingAllCampaigns.booleanisPrivCrowdsourcingAnnotateCampaign.booleanisPrivCrowdsourcingReviewCampaign.booleanisPrivViewUgc.booleanremovePrivilege(String privilege) voidsetPrivCmsAllCategories(boolean priv) setPrivCmsAllCategories.voidsetPrivCmsAllSubthemes(boolean priv) setPrivCmsAllSubthemes.voidsetPrivCmsAllTemplates(boolean priv) setPrivCmsAllTemplates.voidsetPrivCmsCategories(boolean priv) setPrivCmsCategories.voidsetPrivCmsCollections(boolean priv) setPrivCmsCollections.voidsetPrivCmsMenu(boolean priv) setPrivCmsMenu.voidsetPrivCmsPages(boolean priv) setPrivCmsPages.voidsetPrivCmsStaticPages(boolean priv) setPrivCmsStaticPages.voidsetPrivCrowdsourcingAllCampaigns(boolean priv) setPrivCrowdsourcingAllCampaigns.voidsetPrivCrowdsourcingAnnotateCampaign(boolean priv) setPrivCrowdsourcingAnnotateCampaign.voidsetPrivCrowdsourcingReviewCampaign(boolean priv) setPrivCrowdsourcingReviewCampaign.voidsetPrivViewUgc(boolean priv) setPrivViewUgc.
-
Field Details
-
PREFIX_TICKET
ConstantPREFIX_TICKET="TICKET_".- See Also:
-
PREFIX_PRIV
ConstantPREFIX_PRIV="PRIV_".- See Also:
-
PRIV_ARCHIVE_DISPLAY_NODE
ConstantPRIV_ARCHIVE_DISPLAY_NODE="PRIV_ARCHIVE_DISPLAY_NODE".- See Also:
-
PRIV_LIST
ConstantPRIV_LIST="LIST".- See Also:
-
PRIV_VIEW_IMAGES
ConstantPRIV_VIEW_IMAGES="VIEW_IMAGES".- See Also:
-
PRIV_VIEW_THUMBNAILS
ConstantPRIV_VIEW_THUMBNAILS="VIEW_THUMBNAILS".- See Also:
-
PRIV_VIEW_FULLTEXT
ConstantPRIV_VIEW_FULLTEXT="VIEW_FULLTEXT".- See Also:
-
PRIV_VIEW_VIDEO
ConstantPRIV_VIEW_VIDEO="VIEW_VIDEO".- See Also:
-
PRIV_VIEW_AUDIO
ConstantPRIV_VIEW_AUDIO="VIEW_AUDIO".- See Also:
-
PRIV_VIEW_UGC
ConstantPRIV_VIEW_UGC="PRIV_VIEW_UGC".- See Also:
-
PRIV_VIEW_CMS
ConstantPRIV_VIEW_CMS="PRIV_VIEW_CMS".- See Also:
-
PRIV_VIEW_METADATA
ConstantPRIV_VIEW_UGC="PRIV_VIEW_METADATA".- See Also:
-
PRIV_DOWNLOAD_PDF
ConstantPRIV_DOWNLOAD_PDF="DOWNLOAD_PDF".- See Also:
-
PRIV_DOWNLOAD_PAGE_PDF
ConstantPRIV_DOWNLOAD_PAGE_PDF="DOWNLOAD_PAGE_PDF".- See Also:
-
PRIV_DOWNLOAD_ORIGINAL_CONTENT
ConstantPRIV_DOWNLOAD_ORIGINAL_CONTENT="DOWNLOAD_ORIGINAL_CONTENT".- See Also:
-
PRIV_DOWNLOAD_METADATA
ConstantPRIV_DOWNLOAD_METADATA="DOWNLOAD_METADATA".- See Also:
-
PRIV_DOWNLOAD_IMAGES
ConstantPRIV_DOWNLOAD_IMAGES="DOWNLOAD_IMAGES".- See Also:
-
PRIV_GENERATE_IIIF_MANIFEST
Deprecated.iiif manifests are now always allowed, but individual resources therein may not be, depending on specific privilegesConstantPRIV_GENERATE_IIIF_MANIFEST="GENERATE_IIIF_MANIFEST".- See Also:
-
PRIV_ZOOM_IMAGES
ConstantPRIV_ZOOM_IMAGES="ZOOM_IMAGES".- See Also:
-
PRIV_DOWNLOAD_BORN_DIGITAL_FILES
ConstantPRIV_DOWNLOAD_BORN_DIGITAL_FILES="DOWNLOAD_BORN_DIGITAL_FILES".- See Also:
-
PRIV_DELETE_OCR_PAGE
ConstantPRIV_DELETE_OCR_PAGE="DELETE_OCR_PAGE".- See Also:
-
PRIV_SET_REPRESENTATIVE_IMAGE
ConstantPRIV_SET_REPRESENTATIVE_IMAGE="SET_REPRESENTATIVE_IMAGE".- See Also:
-
PRIV_CMS_PAGES
ConstantPRIV_CMS_PAGES="CMS_PAGES".- See Also:
-
PRIV_LEGAL_DISCLAIMER
ConstantPRIV_CMS_PAGES="PRIV_LEGAL_DISCLAIMER".- See Also:
-
PRIV_CMS_ALL_SUBTHEMES
ConstantPRIV_CMS_ALL_SUBTHEMES="CMS_ALL_SUBTHEMES".- See Also:
-
PRIV_CMS_ALL_CATEGORIES
ConstantPRIV_CMS_ALL_CATEGORIES="CMS_ALL_CATEGORIES".- See Also:
-
PRIV_CMS_ALL_TEMPLATES
ConstantPRIV_CMS_ALL_TEMPLATES="CMS_ALL_TEMPLATES".- See Also:
-
PRIV_CMS_MENU
ConstantPRIV_CMS_MENU="CMS_MENU".- See Also:
-
PRIV_CMS_STATIC_PAGES
ConstantPRIV_CMS_STATIC_PAGES="CMS_STATIC_PAGES".- See Also:
-
PRIV_CMS_COLLECTIONS
ConstantPRIV_CMS_COLLECTIONS="CMS_COLLECTIONS".- See Also:
-
PRIV_CMS_CATEGORIES
ConstantPRIV_CMS_CATEGORIES="CMS_CATEGORIES".- See Also:
-
PRIV_CROWDSOURCING_ALL_CAMPAIGNS
ConstantPRIV_CROWDSOURCING_ALL_CAMPAIGNS="CROWDSOURCING_ALL_CAMPAIGNS".- See Also:
-
PRIV_CROWDSOURCING_ANNOTATE_CAMPAIGN
ConstantPRIV_CROWDSOURCING_ANNOTATE_CAMPAIGN="CROWDSOURCING_ANNOTATE_CAMPAIGN".- See Also:
-
PRIV_CROWDSOURCING_REVIEW_CAMPAIGN
ConstantPRIV_CROWDSOURCING_REVIEW_CAMPAIGN="CROWDSOURCING_REVIEW_CAMPAIGN".- See Also:
-
-
Method Details
-
getSortedPrivileges
-
addPrivilege
-
removePrivilege
-
hasPrivilege
hasPrivilege.- Parameters:
privilege- privilege name constant to check- Returns:
- true if this holder has the given privilege, false otherwise
-
isPrivCmsPages
boolean isPrivCmsPages()isPrivCmsPages.- Returns:
- true if this holder has the privilege to manage CMS pages, false otherwise
-
setPrivCmsPages
void setPrivCmsPages(boolean priv) setPrivCmsPages.- Parameters:
priv- true to grant CMS pages privilege
-
isPrivCmsMenu
boolean isPrivCmsMenu()isPrivCmsMenu.- Returns:
- true if this holder has the privilege to manage the CMS navigation menu, false otherwise
-
setPrivCmsMenu
void setPrivCmsMenu(boolean priv) setPrivCmsMenu.- Parameters:
priv- true to grant CMS menu privilege
-
isPrivCmsAllSubthemes
boolean isPrivCmsAllSubthemes()isPrivCmsAllSubthemes.- Returns:
- true if this holder has the privilege to access all CMS subthemes, false otherwise
-
setPrivCmsAllSubthemes
void setPrivCmsAllSubthemes(boolean priv) setPrivCmsAllSubthemes.- Parameters:
priv- true to grant all CMS subthemes privilege
-
isPrivCmsAllCategories
boolean isPrivCmsAllCategories()isPrivCmsAllCategories.- Returns:
- true if this holder has the privilege to access all CMS categories, false otherwise
-
setPrivCmsAllCategories
void setPrivCmsAllCategories(boolean priv) setPrivCmsAllCategories.- Parameters:
priv- true to grant all CMS categories privilege
-
isPrivCmsAllTemplates
boolean isPrivCmsAllTemplates()isPrivCmsAllTemplates.- Returns:
- true if this holder has the privilege to access all CMS page templates, false otherwise
-
setPrivCmsAllTemplates
void setPrivCmsAllTemplates(boolean priv) setPrivCmsAllTemplates.- Parameters:
priv- true to grant all CMS templates privilege
-
isPrivCmsStaticPages
boolean isPrivCmsStaticPages()isPrivCmsStaticPages.- Returns:
- true if this holder has the privilege to manage CMS static pages, false otherwise
-
setPrivCmsStaticPages
void setPrivCmsStaticPages(boolean priv) setPrivCmsStaticPages.- Parameters:
priv- true to grant CMS static pages privilege
-
isPrivCmsCollections
boolean isPrivCmsCollections()isPrivCmsCollections.- Returns:
- true if this holder has the privilege to manage CMS collections, false otherwise
-
setPrivCmsCollections
void setPrivCmsCollections(boolean priv) setPrivCmsCollections.- Parameters:
priv- true to grant CMS collections privilege
-
isPrivCmsCategories
boolean isPrivCmsCategories()isPrivCmsCategories.- Returns:
- true if this holder has the privilege to manage CMS categories, false otherwise
-
setPrivCmsCategories
void setPrivCmsCategories(boolean priv) setPrivCmsCategories.- Parameters:
priv- true to grant CMS categories privilege
-
isPrivCrowdsourcingAllCampaigns
boolean isPrivCrowdsourcingAllCampaigns()isPrivCrowdsourcingAllCampaigns.- Returns:
- true if this holder has the privilege to access all crowdsourcing campaigns, false otherwise
-
setPrivCrowdsourcingAllCampaigns
void setPrivCrowdsourcingAllCampaigns(boolean priv) setPrivCrowdsourcingAllCampaigns.- Parameters:
priv- true to grant all crowdsourcing campaigns privilege
-
isPrivCrowdsourcingAnnotateCampaign
boolean isPrivCrowdsourcingAnnotateCampaign()isPrivCrowdsourcingAnnotateCampaign.- Returns:
- true if this holder has the privilege to annotate in crowdsourcing campaigns, false otherwise
-
setPrivCrowdsourcingAnnotateCampaign
void setPrivCrowdsourcingAnnotateCampaign(boolean priv) setPrivCrowdsourcingAnnotateCampaign.- Parameters:
priv- true to grant crowdsourcing annotate campaign privilege
-
isPrivCrowdsourcingReviewCampaign
boolean isPrivCrowdsourcingReviewCampaign()isPrivCrowdsourcingReviewCampaign.- Returns:
- true if this holder has the privilege to review crowdsourcing campaign contributions, false otherwise
-
setPrivCrowdsourcingReviewCampaign
void setPrivCrowdsourcingReviewCampaign(boolean priv) setPrivCrowdsourcingReviewCampaign.- Parameters:
priv- true to grant crowdsourcing review campaign privilege
-
isPrivViewUgc
boolean isPrivViewUgc()isPrivViewUgc.- Returns:
- true if this holder has the privilege to view user-generated content (UGC), false otherwise
-
setPrivViewUgc
void setPrivViewUgc(boolean priv) setPrivViewUgc.- Parameters:
priv- true to grant view UGC privilege
-