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 Details

    • PREFIX_TICKET

      static final String PREFIX_TICKET
      Constant PREFIX_TICKET="TICKET_".
      See Also:
    • PREFIX_PRIV

      static final String PREFIX_PRIV
      Constant PREFIX_PRIV="PRIV_".
      See Also:
    • PRIV_ARCHIVE_DISPLAY_NODE

      static final String PRIV_ARCHIVE_DISPLAY_NODE
      Constant PRIV_ARCHIVE_DISPLAY_NODE="PRIV_ARCHIVE_DISPLAY_NODE".
      See Also:
    • PRIV_LIST

      static final String PRIV_LIST
      Constant PRIV_LIST="LIST".
      See Also:
    • PRIV_VIEW_IMAGES

      static final String PRIV_VIEW_IMAGES
      Constant PRIV_VIEW_IMAGES="VIEW_IMAGES".
      See Also:
    • PRIV_VIEW_THUMBNAILS

      static final String PRIV_VIEW_THUMBNAILS
      Constant PRIV_VIEW_THUMBNAILS="VIEW_THUMBNAILS".
      See Also:
    • PRIV_VIEW_FULLTEXT

      static final String PRIV_VIEW_FULLTEXT
      Constant PRIV_VIEW_FULLTEXT="VIEW_FULLTEXT".
      See Also:
    • PRIV_VIEW_VIDEO

      static final String PRIV_VIEW_VIDEO
      Constant PRIV_VIEW_VIDEO="VIEW_VIDEO".
      See Also:
    • PRIV_VIEW_AUDIO

      static final String PRIV_VIEW_AUDIO
      Constant PRIV_VIEW_AUDIO="VIEW_AUDIO".
      See Also:
    • PRIV_VIEW_UGC

      static final String PRIV_VIEW_UGC
      Constant PRIV_VIEW_UGC="PRIV_VIEW_UGC".
      See Also:
    • PRIV_VIEW_CMS

      static final String PRIV_VIEW_CMS
      Constant PRIV_VIEW_CMS="PRIV_VIEW_CMS".
      See Also:
    • PRIV_VIEW_METADATA

      static final String PRIV_VIEW_METADATA
      Constant PRIV_VIEW_UGC="PRIV_VIEW_METADATA".
      See Also:
    • PRIV_DOWNLOAD_PDF

      static final String PRIV_DOWNLOAD_PDF
      Constant PRIV_DOWNLOAD_PDF="DOWNLOAD_PDF".
      See Also:
    • PRIV_DOWNLOAD_PAGE_PDF

      static final String PRIV_DOWNLOAD_PAGE_PDF
      Constant PRIV_DOWNLOAD_PAGE_PDF="DOWNLOAD_PAGE_PDF".
      See Also:
    • PRIV_DOWNLOAD_ORIGINAL_CONTENT

      static final String PRIV_DOWNLOAD_ORIGINAL_CONTENT
      Constant PRIV_DOWNLOAD_ORIGINAL_CONTENT="DOWNLOAD_ORIGINAL_CONTENT".
      See Also:
    • PRIV_DOWNLOAD_METADATA

      static final String PRIV_DOWNLOAD_METADATA
      Constant PRIV_DOWNLOAD_METADATA="DOWNLOAD_METADATA".
      See Also:
    • PRIV_DOWNLOAD_IMAGES

      static final String PRIV_DOWNLOAD_IMAGES
      Constant PRIV_DOWNLOAD_IMAGES="DOWNLOAD_IMAGES".
      See Also:
    • PRIV_GENERATE_IIIF_MANIFEST

      @Deprecated(since="25.11") static final String PRIV_GENERATE_IIIF_MANIFEST
      Deprecated.
      iiif manifests are now always allowed, but individual resources therein may not be, depending on specific privileges
      Constant PRIV_GENERATE_IIIF_MANIFEST="GENERATE_IIIF_MANIFEST".
      See Also:
    • PRIV_ZOOM_IMAGES

      static final String PRIV_ZOOM_IMAGES
      Constant PRIV_ZOOM_IMAGES="ZOOM_IMAGES".
      See Also:
    • PRIV_DOWNLOAD_BORN_DIGITAL_FILES

      static final String PRIV_DOWNLOAD_BORN_DIGITAL_FILES
      Constant PRIV_DOWNLOAD_BORN_DIGITAL_FILES="DOWNLOAD_BORN_DIGITAL_FILES".
      See Also:
    • PRIV_DELETE_OCR_PAGE

      static final String PRIV_DELETE_OCR_PAGE
      Constant PRIV_DELETE_OCR_PAGE="DELETE_OCR_PAGE".
      See Also:
    • PRIV_SET_REPRESENTATIVE_IMAGE

      static final String PRIV_SET_REPRESENTATIVE_IMAGE
      Constant PRIV_SET_REPRESENTATIVE_IMAGE="SET_REPRESENTATIVE_IMAGE".
      See Also:
    • PRIV_CMS_PAGES

      static final String PRIV_CMS_PAGES
      Constant PRIV_CMS_PAGES="CMS_PAGES".
      See Also:
    • PRIV_CMS_ALL_SUBTHEMES

      static final String PRIV_CMS_ALL_SUBTHEMES
      Constant PRIV_CMS_ALL_SUBTHEMES="CMS_ALL_SUBTHEMES".
      See Also:
    • PRIV_CMS_ALL_CATEGORIES

      static final String PRIV_CMS_ALL_CATEGORIES
      Constant PRIV_CMS_ALL_CATEGORIES="CMS_ALL_CATEGORIES".
      See Also:
    • PRIV_CMS_ALL_TEMPLATES

      static final String PRIV_CMS_ALL_TEMPLATES
      Constant PRIV_CMS_ALL_TEMPLATES="CMS_ALL_TEMPLATES".
      See Also:
    • PRIV_CMS_MENU

      static final String PRIV_CMS_MENU
      Constant PRIV_CMS_MENU="CMS_MENU".
      See Also:
    • PRIV_CMS_STATIC_PAGES

      static final String PRIV_CMS_STATIC_PAGES
      Constant PRIV_CMS_STATIC_PAGES="CMS_STATIC_PAGES".
      See Also:
    • PRIV_CMS_COLLECTIONS

      static final String PRIV_CMS_COLLECTIONS
      Constant PRIV_CMS_COLLECTIONS="CMS_COLLECTIONS".
      See Also:
    • PRIV_CMS_CATEGORIES

      static final String PRIV_CMS_CATEGORIES
      Constant PRIV_CMS_CATEGORIES="CMS_CATEGORIES".
      See Also:
    • PRIV_CROWDSOURCING_ALL_CAMPAIGNS

      static final String PRIV_CROWDSOURCING_ALL_CAMPAIGNS
      Constant PRIV_CROWDSOURCING_ALL_CAMPAIGNS="CROWDSOURCING_ALL_CAMPAIGNS".
      See Also:
    • PRIV_CROWDSOURCING_ANNOTATE_CAMPAIGN

      static final String PRIV_CROWDSOURCING_ANNOTATE_CAMPAIGN
      Constant PRIV_CROWDSOURCING_ANNOTATE_CAMPAIGN="CROWDSOURCING_ANNOTATE_CAMPAIGN".
      See Also:
    • PRIV_CROWDSOURCING_REVIEW_CAMPAIGN

      static final String PRIV_CROWDSOURCING_REVIEW_CAMPAIGN
      Constant PRIV_CROWDSOURCING_REVIEW_CAMPAIGN="CROWDSOURCING_REVIEW_CAMPAIGN".
      See Also:
  • Method Details

    • getSortedPrivileges

      List<String> getSortedPrivileges(Set<String> privileges)
    • addPrivilege

      boolean addPrivilege(String privilege)
    • removePrivilege

      boolean removePrivilege(String privilege)
    • hasPrivilege

      boolean hasPrivilege(String privilege)
      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