Package io.goobi.viewer.managedbeans
Class ActiveDocumentBean
java.lang.Object
io.goobi.viewer.managedbeans.ActiveDocumentBean
- All Implemented Interfaces:
Serializable
JSF session-scoped backing bean that opens the requested record and provides all data relevant
to it. Owns the
ViewManager for the current record and
coordinates access to its structure elements, physical pages, TOC, and download jobs.
Lifecycle: Created once per HTTP session; a new ViewManager is instantiated
each time a different record PI is requested. The bean is destroyed when the session expires.
Thread safety: Explicitly synchronised. Multiple synchronized(this) and
synchronized(lock) blocks guard concurrent access to shared record state, since JSF
AJAX requests and background threads (PDF/EPUB generation, TOC building) may run concurrently
within the same session.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PageNavigationcalculateCurrentPageNavigation(PageType pageType) Recalculates the visibility of TOC elements and jumps to the active element after a +/- button has been pressed.clearCacheAction.deleteRecordAction(boolean keepTraceDocument) deleteRecordAction.voiddownloadTOCAction.generateGeoMap(String pi) generateGeoMap.Getter for the fieldaction.Getter for the fieldclearCacheMode.getCurrentElement.intgetCurrentThumbnailPage.protected PageNavigationgetDefaultPageNavigation(ViewAttributes viewAttributes) Getter for the fielddeleteRecordKeepTrace.getFirstPageUrl.getFullscreenImageUrl.getFulltextUrl.Get a CMSSidebarElement with a map containing all GeoMarkers for the current PI.getGeomapFilters.intGetter for the fieldimageContainerWidth.Getter for the fieldimageToShow.getImageUrl.Title bar label value escaped for JavaScript.getLastPageUrl.Getter for the fieldlastReceivedIdentifier.getLogid()Getter for the fieldlogid.getMetadataUrl.getNextDocstructUrl.Getter for the fieldnextHit.getNextPageUrl.getNextPageUrl(int step) getNextPageUrl.intgetNumberOfImages.getPageUrl.getPageUrl(int order) getPageUrl.getPageUrl(String pageOrderRange) getPageUrl.getPageUrl(String pageType, String pageOrderRange) Returns the navigation URL for the given page type and number.getPageUrlByType(String pageType) getPageUrl.getPageUrlRelativeToCurrentPage(int step) getNextPageUrl.getPdfSize(String logId) Returns the PI of the currently loaded record.getPIFromFieldValue(String value, String field) getPIFromFieldValue.Getter for the fieldprevHit.getPreviousDocstructUrl.getPreviousPageUrl.getPreviousPageUrl(int step) getPreviousPageUrl.getRecordGeoMap.Getter for the fieldrecordLanguages.getRelatedItems(String identifierField) getRelatedItems.getRelatedItemsQueryString(String identifierField) Returns a query string containing all values of the given identifier field.Returns a string that contains previous and/or next url elements.getSelectedDownloadOption.Getter for the fieldselectedDownloadOptionLabel.Getter for the fieldselectedRecordLanguage.Getter for the fieldselectedRecordLanguage.getTitleBarLabel.getTitleBarLabel(String language) getTitleBarLabel.getTitleBarLabel(Locale locale) getTitleBarLabel.getToc()Getter for the fieldtoc.Getter for the fieldtocCurrentPage.getTopDocument.Getter for the fieldtopDocumentIddoc.Do not call from ActiveDocumentBean.update()!booleanChecks if there is an anchor in this docStruct's hierarchy.booleanisAccessPermissionEpub.booleanisAccessPermissionPdf.booleanIndicates whether user comments are allowed for the current record based on several criteria.booleanisAnchor()isAnchor.booleanisDownloadImageModalVisible.booleanisGroup()isGroup.booleanisHasLanguages.booleanIndicates whether a record is currently properly loaded in this bean.booleanChecks if the current page should initialize a WebSocket.booleanisVolume()isVolume.open()Pretty-URL entry point.openFulltext.Exports the currently loaded for re-indexing.reload.voidreset()Resets the bean state when a record is unloaded: discards the currentViewManager, clears navigation state (logid, action, prev/next hit, docstruct URL caches), and notifies all registered modules.voidresets the access rights for user comments and pdf download stored inViewManager.voidSetter for the fieldaction.voidsetAnchor(boolean anchor) Setter for the fieldanchor.voidsetBookshelfBean(BookmarkBean bookshelfBean) Required setter for ManagedProperty injection.voidsetBreadcrumbBean(BreadcrumbBean breadcrumbBean) Required setter for ManagedProperty injection.voidsetChildrenInvisible(TOCElement element) setChildrenInvisible.voidsetChildrenVisible(TOCElement element) setChildrenVisible.voidsetClearCacheMode(String clearCacheMode) Setter for the fieldclearCacheMode.voidsetCmsBean(CmsBean cmsBean) Required setter for ManagedProperty injection.voidvoidsetCurrentThumbnailPage(int currentThumbnailPage) setCurrentThumbnailPage.voidsetDeleteRecordKeepTrace(Boolean deleteRecordKeepTrace) Setter for the fielddeleteRecordKeepTrace.setDoublePageModeAction(boolean doublePageMode) Augments the setterViewManager.setDoublePageMode(boolean)with URL modifications to reflect the mode.voidsetDownloadOptionLabelFromRequestParameter.voidsetImageToShow(String imageToShow) Setter for the fieldimageToShow.voidsetLastReceivedIdentifier(String lastReceivedIdentifier) Setter for the fieldlastReceivedIdentifier.voidSetter for the fieldlogid.voidsetNavigationHelper(NavigationHelper navigationHelper) Required setter for ManagedProperty injection.voidsetPersistentIdentifier(String persistentIdentifier) setPersistentIdentifier.voidsetRecordLanguages(List<String> recordLanguages) Setter for the fieldrecordLanguages.voidSets imageToShow to the representative page found in the search index, or "1" if none found.voidsetSearchBean(SearchBean searchBean) Required setter for ManagedProperty injection.voidsetSelectedDownloadOptionLabel(String selectedDownloadOptionLabel) Setter for the fieldselectedDownloadOptionLabel.voidsetSelectedRecordLanguage(String selectedRecordLanguageCode) Setter for the fieldselectedRecordLanguage.voidsetSelectedRecordLanguage3(String selectedRecordLanguageCode) Setter to match getSelectedRecordLanguage3() for URL patterns.voidsetTocCurrentPage(String tocCurrentPage) Setter for the fieldtocCurrentPage.voidtoggleDownloadImageModal.voidupdate()Loads the record with the IDDOC set incurrentElementIddoc.voidupdatePageNavigation(PageType pageType)
-
Field Details
-
topDocumentIddoc
-
-
Constructor Details
-
ActiveDocumentBean
public ActiveDocumentBean()Empty constructor.
-
-
Method Details
-
setCmsBean
Required setter for ManagedProperty injection.- Parameters:
cmsBean- the CmsBean instance to inject for testing
-
setSearchBean
Required setter for ManagedProperty injection.- Parameters:
searchBean- the SearchBean instance to inject for testing
-
setBookshelfBean
Required setter for ManagedProperty injection.- Parameters:
bookshelfBean- the BookmarkBean instance to inject for testing
-
setBreadcrumbBean
Required setter for ManagedProperty injection.- Parameters:
breadcrumbBean- the BreadcrumbBean instance to inject for testing
-
reset
Resets the bean state when a record is unloaded: discards the currentViewManager, clears navigation state (logid, action, prev/next hit, docstruct URL caches), and notifies all registered modules.Warning: Although this method is fully
synchronized(this), calling it whileupdate()is running on another thread may still cause NPEs, becauseupdate()holds the lock only in discrete blocks and not for its entire duration.- Throws:
IndexUnreachableException- if a module's cleanup requires Solr and Solr is unavailable
-
getViewManager
Do not call from ActiveDocumentBean.update()!- Returns:
- the current ViewManager, triggering an update if not yet initialized
-
reload
public String reload(String pi) throws PresentationException, RecordNotFoundException, RecordDeletedException, IndexUnreachableException, DAOException, ViewerConfigurationException, RecordLimitExceededException reload.- Parameters:
pi- persistent identifier of the record to reload- Returns:
- output of open()
- Throws:
PresentationExceptionRecordNotFoundExceptionRecordDeletedExceptionIndexUnreachableExceptionDAOExceptionViewerConfigurationExceptionRecordLimitExceededException
-
update
public void update() throws PresentationException, IndexUnreachableException, RecordNotFoundException, RecordDeletedException, DAOException, ViewerConfigurationException, IDDOCNotFoundException, NumberFormatException, RecordLimitExceededExceptionLoads the record with the IDDOC set incurrentElementIddoc.- Throws:
PresentationException- if any.IndexUnreachableException- if any.RecordNotFoundException- if any.RecordDeletedException- if any.DAOException- if any.ViewerConfigurationException- if any.IDDOCNotFoundExceptionRecordLimitExceededExceptionNumberFormatException
-
open
public String open() throws RecordNotFoundException, RecordDeletedException, IndexUnreachableException, DAOException, ViewerConfigurationException, RecordLimitExceededExceptionPretty-URL entry point.- Returns:
- an empty string after initializing the record view for the current URL
- Throws:
RecordNotFoundException- if any.RecordDeletedException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.RecordLimitExceededException
-
openFulltext
public String openFulltext() throws RecordNotFoundException, RecordDeletedException, IndexUnreachableException, DAOException, ViewerConfigurationException, NumberFormatException, RecordLimitExceededExceptionopenFulltext.- Returns:
- the view name for the fulltext view after opening the record
- Throws:
RecordNotFoundException- if any.RecordDeletedException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.RecordLimitExceededExceptionNumberFormatException
-
getPrevHit
public BrowseElement getPrevHit() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionGetter for the fieldprevHit.- Returns:
- the previous search hit browse element, or null if there is none
- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getNextHit
public BrowseElement getNextHit() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionGetter for the fieldnextHit.- Returns:
- the next search hit browse element, or null if there is none
- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getCurrentElement
getCurrentElement.- Returns:
- the
StructElementfor the currently displayed structural unit, or null if no record is loaded - Throws:
IndexUnreachableException- if any.
-
setCurrentImageOrderPerScript
public void setCurrentImageOrderPerScript() throws NumberFormatException, IndexUnreachableException, PresentationException, IDDOCNotFoundException, RecordNotFoundException, RecordDeletedException, DAOException, ViewerConfigurationException, RecordLimitExceededException, IllegalUrlParameterException -
setImageToShow
Setter for the fieldimageToShow.- Parameters:
imageToShow- Single page number (1) or range (2-3)- Throws:
IllegalUrlParameterException
-
setRepresentativeImage
public void setRepresentativeImage() throws PresentationException, IndexUnreachableException, ViewerConfigurationException, IllegalUrlParameterExceptionSets imageToShow to the representative page found in the search index, or "1" if none found. -
getImageToShow
Getter for the fieldimageToShow.- Returns:
- single page number (e.g. "1") or range (e.g. "2-3") of the image(s) currently displayed
-
setLogid
Setter for the fieldlogid.- Parameters:
logid- structural element LOGID to navigate to, or "-" / empty for the top-level document- Throws:
PresentationExceptionIllegalUrlParameterException
-
getLogid
Getter for the fieldlogid.- Returns:
- the LOGID of the current structural element, or "-" if at top-level document
-
isAnchor
public boolean isAnchor()isAnchor.- Returns:
- true if the current record is an anchor document (e.g. a multi-volume work); false otherwise
-
setAnchor
public void setAnchor(boolean anchor) Setter for the fieldanchor.- Parameters:
anchor- true if the current record is an anchor document
-
isVolume
public boolean isVolume()isVolume.- Returns:
- true if the current record is a volume (child of a multi-volume work), false otherwise
-
isGroup
public boolean isGroup()isGroup.- Returns:
- true if the current record is a group document, false otherwise
-
getAction
Getter for the fieldaction.- Returns:
- the navigation action string (e.g. "nextHit", "prevHit"), or null if none set
-
setAction
Setter for the fieldaction.- Parameters:
action- navigation action string (e.g. "nextHit", "prevHit") to execute
-
getPIFromFieldValue
public String getPIFromFieldValue(String value, String field) throws PresentationException, IndexUnreachableException getPIFromFieldValue.- Parameters:
value- field value to search forfield- Solr field name to query- Returns:
- the persistent identifier of the first record matching the field/value query, or empty string if none found
- Throws:
PresentationException- if any.IndexUnreachableException- if any.
-
setPersistentIdentifier
public void setPersistentIdentifier(String persistentIdentifier) throws PresentationException, RecordNotFoundException, IndexUnreachableException setPersistentIdentifier.- Parameters:
persistentIdentifier- persistent identifier of the record to load- Throws:
PresentationException- if any.RecordNotFoundException- if any.IndexUnreachableException- if any.
-
getPersistentIdentifier
Returns the PI of the currently loaded record. Only call this method after the update() method has re-initialized ViewManager, otherwise the previous PI may be returned!- Returns:
- the persistent identifier of the currently loaded record, or "-" if no record is loaded
- Throws:
IndexUnreachableException- if any.
-
getPageUrl
Returns the navigation URL for the given page type and number.- Parameters:
pageType- view page type name, e.g. "viewObject"pageOrderRange- Single page number or range- Returns:
- the absolute URL to the specified page type and order for the current record
- Throws:
IndexUnreachableException- if any.
-
getPageUrl
getPageUrl.- Parameters:
pageOrderRange- Single page number or range- Returns:
- the absolute URL to the current view page type for the given page order range
- Throws:
IndexUnreachableException- if any.
-
getPageUrl
getPageUrl.- Returns:
- the absolute URL to the current page in the preferred or currently active view
- Throws:
IndexUnreachableException- if any.
-
getPageUrlByType
getPageUrl.- Parameters:
pageType- view page type name, e.g. "viewObject"- Returns:
- the absolute URL for the given view page type of the currently loaded record
- Throws:
IndexUnreachableException- if any.
-
getFirstPageUrl
getFirstPageUrl.- Returns:
- the absolute URL to the first page of the current record, or null if no record is loaded
- Throws:
IndexUnreachableException- if any.
-
getLastPageUrl
getLastPageUrl.- Returns:
- the absolute URL to the last page of the current record, or null if no record is loaded
- Throws:
IndexUnreachableException- if any.
-
getPageUrlRelativeToCurrentPage
getNextPageUrl.- Parameters:
step- number of pages to advance (positive or negative)- Returns:
- the absolute URL to the page that is the given number of steps from the current page
- Throws:
IndexUnreachableException- if any.
-
getPageUrl
getPageUrl.- Parameters:
order- physical page order number- Returns:
- Page URL for the given page number
- Throws:
IndexUnreachableException
-
getPreviousPageUrl
getPreviousPageUrl.- Parameters:
step- number of pages to go back- Returns:
- the absolute URL to the page that is the given number of steps before the current page
- Throws:
IndexUnreachableException- if any.
-
getNextPageUrl
getNextPageUrl.- Parameters:
step- number of pages to advance forward- Returns:
- the absolute URL to the page that is the given number of steps after the current page
- Throws:
IndexUnreachableException- if any.
-
getPreviousPageUrl
getPreviousPageUrl.- Returns:
- the absolute URL to the page one step before the current page
- Throws:
IndexUnreachableException- if any.
-
getNextPageUrl
getNextPageUrl.- Returns:
- the absolute URL to the page one step after the current page
- Throws:
IndexUnreachableException- if any.
-
getPreviousDocstructUrl
public String getPreviousDocstructUrl() throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationExceptiongetPreviousDocstructUrl.- Returns:
- URL to the previous docstruct
- Throws:
IndexUnreachableExceptionViewerConfigurationExceptionDAOExceptionPresentationException
-
getNextDocstructUrl
public String getNextDocstructUrl() throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationExceptiongetNextDocstructUrl.- Returns:
- URL to the next docstruct
- Throws:
IndexUnreachableExceptionViewerConfigurationExceptionDAOExceptionPresentationException
-
getImageUrl
getImageUrl.- Returns:
- the absolute URL to the image view for the current page
- Throws:
IndexUnreachableException- if any.
-
getFullscreenImageUrl
getFullscreenImageUrl.- Returns:
- the absolute URL to the fullscreen image view for the current page
- Throws:
IndexUnreachableException- if any.
-
getFulltextUrl
getFulltextUrl.- Returns:
- the absolute URL to the fulltext view for the current page
- Throws:
IndexUnreachableException- if any.
-
getMetadataUrl
getMetadataUrl.- Returns:
- the absolute URL to the metadata view for the current page
- Throws:
IndexUnreachableException- if any.
-
getTopDocument
getTopDocument.- Returns:
- the top-level StructElement of the current record, or null if no record is loaded
-
setChildrenVisible
public void setChildrenVisible(TOCElement element) throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException setChildrenVisible.- Parameters:
element- TOC element whose children to make visible- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
setChildrenInvisible
public void setChildrenInvisible(TOCElement element) throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException setChildrenInvisible.- Parameters:
element- TOC element whose children to hide- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
calculateSidebarToc
public String calculateSidebarToc() throws IOException, PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionRecalculates the visibility of TOC elements and jumps to the active element after a +/- button has been pressed.- Returns:
- the anchor fragment URL of the active TOC element, or null if none is active
- Throws:
IOException- if any.PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getToc
public TOC getToc() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionGetter for the fieldtoc.- Returns:
- the
TOCfor the currently loaded record, or null if no record is loaded - Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getTocCurrentPage
Getter for the fieldtocCurrentPage.- Returns:
- a int.
-
setTocCurrentPage
public void setTocCurrentPage(String tocCurrentPage) throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException, IllegalUrlParameterException Setter for the fieldtocCurrentPage.- Parameters:
tocCurrentPage- desired TOC pagination page number- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.IllegalUrlParameterException- if tocCurrentPage is not a valid integer or range
-
getTitleBarLabel
public String getTitleBarLabel(Locale locale) throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationException getTitleBarLabel.- Parameters:
locale- locale used to select the label language- Returns:
- the title bar label for the current page in the given locale
- Throws:
IndexUnreachableException- if any.PresentationException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getTitleBarLabel
public String getTitleBarLabel() throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationExceptiongetTitleBarLabel.- Returns:
- the title bar label for the current page in the active user locale
- Throws:
IndexUnreachableException- if any.PresentationException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getTitleBarLabel
public String getTitleBarLabel(String language) throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationException getTitleBarLabel.- Parameters:
language- ISO 639 language code for label selection- Returns:
- the title bar label for the current page in the given language, or null if no label could be determined
- Throws:
IndexUnreachableException- if any.PresentationException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getLabelForJS
public String getLabelForJS() throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationExceptionTitle bar label value escaped for JavaScript.- Returns:
- the title bar label with JavaScript special characters escaped, or null if no label is available
- Throws:
IndexUnreachableException- if any.PresentationException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getPdfSize
-
getPdfSize
-
getMetsFilePath
- Throws:
IndexUnreachableException
-
getImageContainerWidth
public int getImageContainerWidth()Getter for the fieldimageContainerWidth.- Returns:
- a int.
-
getNumberOfImages
getNumberOfImages.- Returns:
- a int.
- Throws:
IndexUnreachableException- if any.
-
getTopDocumentIddoc
Getter for the fieldtopDocumentIddoc.- Returns:
- Not this.topDocumentIddoc but ViewManager.topDocumentIddoc
-
isRecordLoaded
public boolean isRecordLoaded()Indicates whether a record is currently properly loaded in this bean. Use to determine whether to display components.- Returns:
- true if a record is currently loaded in this bean, false otherwise
-
hasAnchor
Checks if there is an anchor in this docStruct's hierarchy.- Returns:
- true if the current record has an anchor (i.e. is a child of a multi-volume work), false otherwise
- Throws:
IndexUnreachableException- if any.
-
reIndexRecordAction
public String reIndexRecordAction() throws IndexUnreachableException, DAOException, RecordNotFoundExceptionExports the currently loaded for re-indexing.- Returns:
- an empty string after triggering the re-indexing of the current record
- Throws:
IndexUnreachableException- if any.DAOException- if any.RecordNotFoundException- if any.
-
deleteRecordAction
public String deleteRecordAction(boolean keepTraceDocument) throws IOException, IndexUnreachableException deleteRecordAction.- Parameters:
keepTraceDocument- If true, a .delete file will be created; otherwise a .purge file- Returns:
- outcome
- Throws:
IOException- if any.IndexUnreachableException- if any.
-
clearCacheAction
clearCacheAction.- Returns:
- empty string
- Throws:
IOExceptionIndexUnreachableException
-
getCurrentThumbnailPage
public int getCurrentThumbnailPage()getCurrentThumbnailPage.- Returns:
- a int.
-
setCurrentThumbnailPage
public void setCurrentThumbnailPage(int currentThumbnailPage) setCurrentThumbnailPage.- Parameters:
currentThumbnailPage- thumbnail grid page number to set
-
isHasLanguages
public boolean isHasLanguages()isHasLanguages.- Returns:
- true if the current record is available in multiple languages, false otherwise
-
getLastReceivedIdentifier
Getter for the fieldlastReceivedIdentifier.- Returns:
- the persistent identifier of the last successfully loaded record
-
setLastReceivedIdentifier
Setter for the fieldlastReceivedIdentifier.- Parameters:
lastReceivedIdentifier- the persistent identifier of the last successfully loaded record
-
getRecordLanguages
Getter for the fieldrecordLanguages.- Returns:
- list of ISO 639-1 language codes available for the current record
-
setRecordLanguages
Setter for the fieldrecordLanguages.- Parameters:
recordLanguages- list of ISO 639-1 language codes available for the current record
-
getSelectedRecordLanguage
Getter for the fieldselectedRecordLanguage.- Returns:
- the 639_1 code for selectedRecordLanguage
-
setSelectedRecordLanguage
Setter for the fieldselectedRecordLanguage.- Parameters:
selectedRecordLanguageCode- ISO 639-1 language code of the language to select for this record
-
getSelectedRecordLanguage3
Getter for the fieldselectedRecordLanguage.- Returns:
- the 639_2B code for selectedRecordLanguage
-
setSelectedRecordLanguage3
Setter to match getSelectedRecordLanguage3() for URL patterns.- Parameters:
selectedRecordLanguageCode- ISO 639-2/B language code to set
-
isAccessPermissionEpub
public boolean isAccessPermissionEpub()isAccessPermissionEpub.- Returns:
- true if the current user has permission to download an EPUB of the current record, false otherwise
-
isAccessPermissionPdf
public boolean isAccessPermissionPdf()isAccessPermissionPdf.- Returns:
- true if the current user has permission to download a PDF of the current record, false otherwise
-
downloadTOCAction
public void downloadTOCAction() throws IOException, PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptiondownloadTOCAction.- Throws:
IOException- if any.PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getRelatedItems
public List<SearchHit> getRelatedItems(String identifierField) throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException getRelatedItems.TODO Is this still in use?
- Parameters:
identifierField- Index field containing related item identifiers- Returns:
- List of related items as SearchHit objects.
- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getRelatedItemsQueryString
Returns a query string containing all values of the given identifier field.- Parameters:
identifierField- Index field containing related item identifiers- Returns:
- Query string of the pattern "PI:(a OR b OR c)"
-
getRelativeUrlTags
public String getRelativeUrlTags() throws IndexUnreachableException, DAOException, PresentationExceptionReturns a string that contains previous and/or next url elements.- Returns:
- string containing previous and/or next url elements
- Throws:
IndexUnreachableException- if any.DAOException- if any.PresentationException- if any.
-
resetAccess
public void resetAccess()resets the access rights for user comments and pdf download stored inViewManager. After reset, the access rights will be evaluated again on being called -
getDeleteRecordKeepTrace
Getter for the fielddeleteRecordKeepTrace.- Returns:
- true to keep a deletion trace entry when deleting the record; false to remove completely; null if not yet set
-
setDeleteRecordKeepTrace
Setter for the fielddeleteRecordKeepTrace.- Parameters:
deleteRecordKeepTrace- true to keep a deletion trace entry when deleting the record; false to remove completely
-
getClearCacheMode
Getter for the fieldclearCacheMode.- Returns:
- cache clearing mode string indicating which caches to clear, or null if not set
-
setClearCacheMode
Setter for the fieldclearCacheMode.- Parameters:
clearCacheMode- cache clearing mode string indicating which caches to clear
-
getGeoMap
Get a CMSSidebarElement with a map containing all GeoMarkers for the current PI. The widget is stored in the bean, but refreshed each time the PI changes- Returns:
GeoMap- Throws:
DAOExceptionIndexUnreachableException
-
getRecordGeoMap
getRecordGeoMap.- Returns:
RecordGeoMap- Throws:
DAOExceptionIndexUnreachableException
-
generateGeoMap
generateGeoMap.- Parameters:
pi- persistent identifier of the record to map- Returns:
GeoMap- Throws:
PresentationExceptionDAOException
-
toggleDownloadImageModal
public void toggleDownloadImageModal()toggleDownloadImageModal. -
isDownloadImageModalVisible
public boolean isDownloadImageModalVisible()isDownloadImageModalVisible.- Returns:
- true if the download image modal dialog is currently visible; false otherwise
-
getSelectedDownloadOption
getSelectedDownloadOption.- Returns:
- Selected
DownloadOption
-
getSelectedDownloadOptionOrDefault
public DownloadOption getSelectedDownloadOptionOrDefault() throws IndexUnreachableException, DAOException, ViewerConfigurationException -
getSelectedDownloadOptionLabel
Getter for the fieldselectedDownloadOptionLabel.- Returns:
- the label of the download option currently selected by the user, or null if none selected
-
setSelectedDownloadOptionLabel
Setter for the fieldselectedDownloadOptionLabel.- Parameters:
selectedDownloadOptionLabel- label of the download option selected by the user
-
setDownloadOptionLabelFromRequestParameter
public void setDownloadOptionLabelFromRequestParameter()setDownloadOptionLabelFromRequestParameter. -
setDoublePageModeAction
Augments the setterViewManager.setDoublePageMode(boolean)with URL modifications to reflect the mode.- Parameters:
doublePageMode- The doublePageMode to set- Returns:
- empty string
-
isAllowUserComments
Indicates whether user comments are allowed for the current record based on several criteria.- Returns:
- true if user comments are allowed for the current record, false otherwise
- Throws:
DAOException
-
isRequiresWebSocket
public boolean isRequiresWebSocket()Checks if the current page should initialize a WebSocket.- Returns:
- true if a document is loaded and it contains the field
SolrConstants.ACCESSCONDITION_CONCURRENTUSE
-
getGeomapFilters
getGeomapFilters.- Returns:
- a list of Solr field names used as geo map filter options, formatted as quoted strings