Class LicenseType
- All Implemented Interfaces:
ILicenseType
,IPrivilegeHolder
,Serializable
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
ConstantLICENSE_TYPE_CMS="licenseType_cms"
static final String
ConstantLICENSE_TYPE_DELETE_OCR_PAGE="licenseType_deleteOcrPage"
static final String
static final String
ConstantLICENSE_TYPE_SET_REPRESENTATIVE_IMAGE="licenseType_setRepresentativeImage"
Fields inherited from class io.goobi.viewer.model.security.AbstractPrivilegeHolder
PRIVS_CMS, PRIVS_RECORD
Fields inherited from interface io.goobi.viewer.model.security.IPrivilegeHolder
PREFIX_PRIV, PREFIX_TICKET, PRIV_CMS_ALL_CATEGORIES, PRIV_CMS_ALL_SUBTHEMES, PRIV_CMS_ALL_TEMPLATES, PRIV_CMS_CATEGORIES, PRIV_CMS_COLLECTIONS, PRIV_CMS_MENU, PRIV_CMS_PAGES, PRIV_CMS_STATIC_PAGES, PRIV_CROWDSOURCING_ALL_CAMPAIGNS, PRIV_CROWDSOURCING_ANNOTATE_CAMPAIGN, PRIV_CROWDSOURCING_REVIEW_CAMPAIGN, PRIV_DELETE_OCR_PAGE, PRIV_DOWNLOAD_BORN_DIGITAL_FILES, PRIV_DOWNLOAD_IMAGES, PRIV_DOWNLOAD_METADATA, PRIV_DOWNLOAD_ORIGINAL_CONTENT, PRIV_DOWNLOAD_PAGE_PDF, PRIV_DOWNLOAD_PDF, PRIV_GENERATE_IIIF_MANIFEST, PRIV_LEGAL_DISCLAIMER, PRIV_LIST, PRIV_SET_REPRESENTATIVE_IMAGE, PRIV_VIEW_AUDIO, PRIV_VIEW_FULLTEXT, PRIV_VIEW_IMAGES, PRIV_VIEW_THUMBNAILS, PRIV_VIEW_UGC, PRIV_VIEW_VIDEO, PRIV_ZOOM_IMAGES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCoreLicenseTypesToDB.boolean
addPrivilege
(String privilege) Adds the given privilege to the working set.boolean
Returns the list of available privileges for adding to this license (using the working copy while editing).getAvailablePrivileges
(Set<String> privileges) Returns the list of available privileges for adding to this license (using the given privileges list).Getter for the fielddescription
.getId()
Getter for the fieldid
.Returns list ofLicenseType
s that contain this object in their overridden LicenseTypes.getMatch.getName()
Getter for the fieldname
.Getter for the fieldoverridingLicenseTypes
.Getter for the fieldprivileges
.getSortedPrivileges
(Set<String> privileges) Returns a sorted list (according to PRIVS_RECORD) based on the given set of privileges.int
hashCode()
boolean
hasPrivilege
(String privilege) hasPrivilege.boolean
hasPrivilegeCopy
(String privilege) Checks whether this license type has the given privilege in the working copy of the privilege list.boolean
isCmsType.boolean
boolean
isCore()
isCore.boolean
isCmsType.boolean
boolean
isOpenAccess.boolean
boolean
isPrivCmsAllCategories.boolean
isPrivCmsAllSubthemes.boolean
isPrivCmsAllTemplates.boolean
isPrivCmsCategories.boolean
isPrivCmsCollections.boolean
isPrivCmsMenu.boolean
isPrivCmsPages.boolean
isPrivCmsStaticPages.boolean
isPrivCrowdsourcingAllCampaigns.boolean
isPrivCrowdsourcingAnnotateCampaign.boolean
isPrivCrowdsourcingReviewCampaign.boolean
isPrivViewUgc.boolean
boolean
isRestrictionsExpired
(String query) boolean
Checks whether only Solr documents of the UGC type have the access condition upon which this license type is based.boolean
removePrivilege
(String privilege) Removes the given privilege from the working set.void
setConcurrentViewsLimit
(boolean concurrentViewsLimit) void
setCore
(boolean core) Setter for the fieldcore
.void
setDescription
(String description) Setter for the fielddescription
.void
Setter for the fieldid
.void
setMovingWall
(boolean movingWall) void
Setter for the fieldname
.void
setOpenAccess
(boolean openAccess) Setter for the fieldopenAccess
.void
setOverriddenLicenseTypes
(Set<LicenseType> overriddenLicenseTypes) Setter for the fieldoverriddenLicenseTypes
.void
setPdfDownloadQuota
(boolean pdfDownloadQuota) void
setPrivCmsAllCategories
(boolean priv) setPrivCmsAllCategories.void
setPrivCmsAllSubthemes
(boolean priv) setPrivCmsAllSubthemes.void
setPrivCmsAllTemplates
(boolean priv) setPrivCmsAllTemplates.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
setPrivCrowdsourcingAllCampaigns
(boolean priv) setPrivCrowdsourcingAllCampaigns.void
setPrivCrowdsourcingAnnotateCampaign
(boolean priv) setPrivCrowdsourcingAnnotateCampaign.void
setPrivCrowdsourcingReviewCampaign
(boolean priv) setPrivCrowdsourcingReviewCampaign.void
setPrivileges
(Set<String> privileges) Setter for the fieldprivileges
.void
setPrivilegesCopy
(Set<String> privilegesCopy) void
setPrivViewUgc
(boolean priv) setPrivViewUgc.void
setRedirect
(boolean redirect) void
setRedirectUrl
(String redirectUrl) void
setRestrictionsExpired
(Map<String, Boolean> restrictionsExpired) toString()
-
Field Details
-
LICENSE_TYPE_SET_REPRESENTATIVE_IMAGE
ConstantLICENSE_TYPE_SET_REPRESENTATIVE_IMAGE="licenseType_setRepresentativeImage"
- See Also:
-
LICENSE_TYPE_DELETE_OCR_PAGE
ConstantLICENSE_TYPE_DELETE_OCR_PAGE="licenseType_deleteOcrPage"
- See Also:
-
LICENSE_TYPE_CMS
ConstantLICENSE_TYPE_CMS="licenseType_cms"
- See Also:
-
LICENSE_TYPE_LEGAL_DISCLAIMER
- See Also:
-
-
Constructor Details
-
LicenseType
public LicenseType()Empty constructor. -
LicenseType
- Parameters:
name
- License type name
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
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
.- Specified by:
getName
in interfaceILicenseType
- 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
-
getMatch
getMatch.
-
isCmsType
public boolean isCmsType()isCmsType.
- Returns:
- true if this license type has one of the static CMS type names; false otherwise
-
isLegalDisclaimerType
public boolean isLegalDisclaimerType()isCmsType.
- Returns:
- true if this license type has one of the static CMS type names; false otherwise
-
isUgcType
public boolean isUgcType()Checks whether only Solr documents of the UGC type have the access condition upon which this license type is based.- Returns:
- the ugcType
- Throws:
IndexUnreachableException
PresentationException
-
isOpenAccess
public boolean isOpenAccess()isOpenAccess.
- Returns:
- the openAccess
-
setOpenAccess
public void setOpenAccess(boolean openAccess) Setter for the field
openAccess
.- Parameters:
openAccess
- the openAccess to set
-
isCore
public boolean isCore()isCore.
- Returns:
- the core
-
setCore
public void setCore(boolean core) Setter for the field
core
.- Parameters:
core
- the core to set
-
isMovingWall
public boolean isMovingWall()- Returns:
- the movingWall
-
setMovingWall
public void setMovingWall(boolean movingWall) - Parameters:
movingWall
- the movingWall to set
-
isPdfDownloadQuota
public boolean isPdfDownloadQuota()- Returns:
- the pdfDownloadQuota
-
setPdfDownloadQuota
public void setPdfDownloadQuota(boolean pdfDownloadQuota) - Parameters:
pdfDownloadQuota
- the pdfDownloadQuota to set
-
isConcurrentViewsLimit
public boolean isConcurrentViewsLimit()- Returns:
- the concurrentViewsLimit
-
setConcurrentViewsLimit
public void setConcurrentViewsLimit(boolean concurrentViewsLimit) - Parameters:
concurrentViewsLimit
- the concurrentViewsLimit to set
-
isRedirect
public boolean isRedirect()- Returns:
- the redirect
-
setRedirect
public void setRedirect(boolean redirect) - Parameters:
redirect
- the redirect to set
-
getRedirectUrl
- Returns:
- the redirectUrl
-
setRedirectUrl
- Parameters:
redirectUrl
- the redirectUrl to set
-
getPrivileges
Getter for the field
privileges
.- Returns:
- the privileges
-
getAvailablePrivileges
Returns the list of available privileges for adding to this license (using the working copy while editing).- Returns:
- Values in IPrivilegeHolder.PRIVS_RECORD minus the privileges already added
-
getAvailablePrivileges
Returns the list of available privileges for adding to this license (using the given privileges list).- Parameters:
privileges
- Privileges to be removed from the returned list- Returns:
- Values in IPrivilegeHolder.PRIVS_RECORD minus the privileges already added
-
getSortedPrivileges
Returns a sorted list (according to PRIVS_RECORD) based on the given set of privileges.- Specified by:
getSortedPrivileges
in interfaceIPrivilegeHolder
- Returns:
- Sorted list of privileges contained in
privileges
-
setPrivileges
Setter for the field
privileges
.- Parameters:
privileges
- the privileges to set
-
addPrivilege
Adds the given privilege to the working set.- Specified by:
addPrivilege
in interfaceIPrivilegeHolder
- Parameters:
privilege
-- Returns:
- true if successful; false otherwise
-
removePrivilege
Removes the given privilege from the working set.- Specified by:
removePrivilege
in interfaceIPrivilegeHolder
- Parameters:
privilege
-- Returns:
- true if successful; false otherwise
-
hasPrivilege
hasPrivilege.
- Specified by:
hasPrivilege
in interfaceIPrivilegeHolder
- Parameters:
privilege
- aString
object.- Returns:
- a boolean.
-
hasPrivilegeCopy
Checks whether this license type has the given privilege in the working copy of the privilege list.- Parameters:
privilege
- Privilege name to check- Returns:
- true if copy contains privilege; false otherwise
-
isPrivCmsPages
public boolean isPrivCmsPages()isPrivCmsPages.
- Specified by:
isPrivCmsPages
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCmsPages
public void setPrivCmsPages(boolean priv) setPrivCmsPages.
- Specified by:
setPrivCmsPages
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCmsAllSubthemes
public boolean isPrivCmsAllSubthemes()isPrivCmsAllSubthemes.
- Specified by:
isPrivCmsAllSubthemes
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCmsAllSubthemes
public void setPrivCmsAllSubthemes(boolean priv) setPrivCmsAllSubthemes.
- Specified by:
setPrivCmsAllSubthemes
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCmsAllCategories
public boolean isPrivCmsAllCategories()isPrivCmsAllCategories.
- Specified by:
isPrivCmsAllCategories
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCmsAllCategories
public void setPrivCmsAllCategories(boolean priv) setPrivCmsAllCategories.
- Specified by:
setPrivCmsAllCategories
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCmsAllTemplates
public boolean isPrivCmsAllTemplates()isPrivCmsAllTemplates.
- Specified by:
isPrivCmsAllTemplates
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCmsAllTemplates
public void setPrivCmsAllTemplates(boolean priv) setPrivCmsAllTemplates.
- Specified by:
setPrivCmsAllTemplates
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCmsMenu
public boolean isPrivCmsMenu()isPrivCmsMenu.
- Specified by:
isPrivCmsMenu
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCmsMenu
public void setPrivCmsMenu(boolean priv) setPrivCmsMenu.
- Specified by:
setPrivCmsMenu
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCmsStaticPages
public boolean isPrivCmsStaticPages()isPrivCmsStaticPages.
- Specified by:
isPrivCmsStaticPages
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCmsStaticPages
public void setPrivCmsStaticPages(boolean priv) setPrivCmsStaticPages.
- Specified by:
setPrivCmsStaticPages
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCmsCollections
public boolean isPrivCmsCollections()isPrivCmsCollections.
- Specified by:
isPrivCmsCollections
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCmsCollections
public void setPrivCmsCollections(boolean priv) setPrivCmsCollections.
- Specified by:
setPrivCmsCollections
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCmsCategories
public boolean isPrivCmsCategories()isPrivCmsCategories.
- Specified by:
isPrivCmsCategories
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCmsCategories
public void setPrivCmsCategories(boolean priv) setPrivCmsCategories.
- Specified by:
setPrivCmsCategories
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCrowdsourcingAllCampaigns
public boolean isPrivCrowdsourcingAllCampaigns()isPrivCrowdsourcingAllCampaigns.
- Specified by:
isPrivCrowdsourcingAllCampaigns
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCrowdsourcingAllCampaigns
public void setPrivCrowdsourcingAllCampaigns(boolean priv) setPrivCrowdsourcingAllCampaigns.
- Specified by:
setPrivCrowdsourcingAllCampaigns
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCrowdsourcingAnnotateCampaign
public boolean isPrivCrowdsourcingAnnotateCampaign()isPrivCrowdsourcingAnnotateCampaign.
- Specified by:
isPrivCrowdsourcingAnnotateCampaign
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCrowdsourcingAnnotateCampaign
public void setPrivCrowdsourcingAnnotateCampaign(boolean priv) setPrivCrowdsourcingAnnotateCampaign.
- Specified by:
setPrivCrowdsourcingAnnotateCampaign
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivCrowdsourcingReviewCampaign
public boolean isPrivCrowdsourcingReviewCampaign()isPrivCrowdsourcingReviewCampaign.
- Specified by:
isPrivCrowdsourcingReviewCampaign
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivCrowdsourcingReviewCampaign
public void setPrivCrowdsourcingReviewCampaign(boolean priv) setPrivCrowdsourcingReviewCampaign.
- Specified by:
setPrivCrowdsourcingReviewCampaign
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
isPrivViewUgc
public boolean isPrivViewUgc()Description copied from interface:IPrivilegeHolder
isPrivViewUgc.
- Specified by:
isPrivViewUgc
in interfaceIPrivilegeHolder
- Returns:
- a boolean.
-
setPrivViewUgc
public void setPrivViewUgc(boolean priv) Description copied from interface:IPrivilegeHolder
setPrivViewUgc.
- Specified by:
setPrivViewUgc
in interfaceIPrivilegeHolder
- Parameters:
priv
- a boolean.
-
getOverriddenLicenseTypes
Getter for the field
overridingLicenseTypes
.- Returns:
- the overridsenLicenseTypes
-
setOverriddenLicenseTypes
Setter for the field
overriddenLicenseTypes
.- Parameters:
overriddenLicenseTypes
- the overriddenLicenseTypes to set
-
getLicenseTypesOverridingThis
Returns list ofLicenseType
s that contain this object in their overridden LicenseTypes.- Returns:
- List
- Throws:
DAOException
-
getPrivilegesCopy
- Returns:
- the privilegesCopy
-
setPrivilegesCopy
- Parameters:
privilegesCopy
- the privilegesCopy to set
-
isRestrictionsExpired
- Parameters:
query
-- Returns:
- true if the configured restriction query is expired; false otherwise
-
getRestrictionsExpired
- Returns:
- the restrictionsExpired
-
setRestrictionsExpired
- Parameters:
restrictionsExpired
- the restrictionsExpired to set
-
addCoreLicenseTypesToDB
addCoreLicenseTypesToDB.
- Throws:
DAOException
- if any.
-
getFilterQueryPart
- Returns:
- Solr query for the access condition name
-
getMovingWallFilterQueryPart
- Returns:
- Solr query for the moving wall
-
toString
-