Package io.goobi.viewer.managedbeans
Class BreadcrumbBean
java.lang.Object
io.goobi.viewer.managedbeans.BreadcrumbBean
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
ConstantWEIGHT_ACTIVE_COLLECTION=2
static final int
ConstantWEIGHT_BROWSE=1
static final int
ConstantWEIGHT_CROWDSOURCING_CAMPAIGN=2
static final int
ConstantWEIGHT_CROWDSOURCING_CAMPAIGN_ITEM=3
static final int
ConstantWEIGHT_CROWDSOURCING_CAMPAIGN_PARENT=1
static final int
ConstantWEIGHT_CROWDSOURCING_EDIT_OCR_CONTENTS=5
static final int
ConstantWEIGHT_CROWDSOURCING_EDIT_OVERVIEW=4
static final int
ConstantWEIGHT_CROWDSOURCING_OVERVIEW=3
static final int
ConstantWEIGHT_OPEN_DOCUMENT=3
static final int
ConstantWEIGHT_SEARCH=1
static final int
ConstantWEIGHT_SEARCH_RESULTS=2
static final int
ConstantWEIGHT_SEARCH_TERMS=1
static final int
ConstantWEIGHT_SITELINKS=1
static final int
ConstantWEIGHT_TAG_CLOUD=1
static final int
ConstantWEIGHT_TAG_MAIN_MENU=1
static final int
ConstantWEIGHT_USER_ACCOUNT=1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCollectionHierarchyToBreadcrumb
(String collection, String field, String splittingChar) addCollectionHierarchyToBreadcrumb.void
addRecordBreadcrumbs
(ViewManager viewManager, de.intranda.metadata.multilanguage.IMetadataValue name, com.ocpsoft.pretty.faces.url.URL url) void
addStaticLinkToBreadcrumb
(String linkName, int linkWeight) Adds a link to the breadcrumbs using the current PrettyURL.void
addStaticLinkToBreadcrumb
(String linkName, String url, int linkWeight) Adds a link to the breadcrumbs using the given URL.Returns the list of current breadcrumb elements.Returns the bottom breadcrumb.void
updateBreadcrumbs
(CMSPage cmsPage) Updates breadcrumbs from the given CMS page (and any breadcrumb predecessor pages).void
updateBreadcrumbs
(LabeledLink newLink) Attaches a new link to the breadcrumb list at the appropriate position (depending on the link's weight).void
updateBreadcrumbsForSearchHits
(String facetString) This is used for flipping search result pages (so that the breadcrumb always has the last visited result page as its URL).
-
Field Details
-
WEIGHT_TAG_MAIN_MENU
public static final int WEIGHT_TAG_MAIN_MENUConstantWEIGHT_TAG_MAIN_MENU=1
- See Also:
-
WEIGHT_ACTIVE_COLLECTION
public static final int WEIGHT_ACTIVE_COLLECTIONConstantWEIGHT_ACTIVE_COLLECTION=2
- See Also:
-
WEIGHT_OPEN_DOCUMENT
public static final int WEIGHT_OPEN_DOCUMENTConstantWEIGHT_OPEN_DOCUMENT=3
- See Also:
-
WEIGHT_BROWSE
public static final int WEIGHT_BROWSEConstantWEIGHT_BROWSE=1
- See Also:
-
WEIGHT_SEARCH
public static final int WEIGHT_SEARCHConstantWEIGHT_SEARCH=1
- See Also:
-
WEIGHT_SEARCH_RESULTS
public static final int WEIGHT_SEARCH_RESULTSConstantWEIGHT_SEARCH_RESULTS=2
- See Also:
-
WEIGHT_SEARCH_TERMS
public static final int WEIGHT_SEARCH_TERMSConstantWEIGHT_SEARCH_TERMS=1
- See Also:
-
WEIGHT_TAG_CLOUD
public static final int WEIGHT_TAG_CLOUDConstantWEIGHT_TAG_CLOUD=1
- See Also:
-
WEIGHT_SITELINKS
public static final int WEIGHT_SITELINKSConstantWEIGHT_SITELINKS=1
- See Also:
-
WEIGHT_USER_ACCOUNT
public static final int WEIGHT_USER_ACCOUNTConstantWEIGHT_USER_ACCOUNT=1
- See Also:
-
WEIGHT_CROWDSOURCING_OVERVIEW
public static final int WEIGHT_CROWDSOURCING_OVERVIEWConstantWEIGHT_CROWDSOURCING_OVERVIEW=3
- See Also:
-
WEIGHT_CROWDSOURCING_EDIT_OVERVIEW
public static final int WEIGHT_CROWDSOURCING_EDIT_OVERVIEWConstantWEIGHT_CROWDSOURCING_EDIT_OVERVIEW=4
- See Also:
-
WEIGHT_CROWDSOURCING_EDIT_OCR_CONTENTS
public static final int WEIGHT_CROWDSOURCING_EDIT_OCR_CONTENTSConstantWEIGHT_CROWDSOURCING_EDIT_OCR_CONTENTS=5
- See Also:
-
WEIGHT_CROWDSOURCING_CAMPAIGN
public static final int WEIGHT_CROWDSOURCING_CAMPAIGNConstantWEIGHT_CROWDSOURCING_CAMPAIGN=2
- See Also:
-
WEIGHT_CROWDSOURCING_CAMPAIGN_ITEM
public static final int WEIGHT_CROWDSOURCING_CAMPAIGN_ITEMConstantWEIGHT_CROWDSOURCING_CAMPAIGN_ITEM=3
- See Also:
-
WEIGHT_CROWDSOURCING_CAMPAIGN_PARENT
public static final int WEIGHT_CROWDSOURCING_CAMPAIGN_PARENTConstantWEIGHT_CROWDSOURCING_CAMPAIGN_PARENT=1
- See Also:
-
-
Constructor Details
-
BreadcrumbBean
public BreadcrumbBean()
-
-
Method Details
-
updateBreadcrumbs
Attaches a new link to the breadcrumb list at the appropriate position (depending on the link's weight).- Parameters:
newLink
- The breadcrumb link to add.
-
updateBreadcrumbs
public void updateBreadcrumbs(CMSPage cmsPage) throws RecordNotFoundException, RecordDeletedException, DAOException, IndexUnreachableException, ViewerConfigurationException, RecordLimitExceededException Updates breadcrumbs from the given CMS page (and any breadcrumb predecessor pages).- Parameters:
cmsPage
- The CMS page from which to create a breadcrumb- Throws:
RecordNotFoundException
RecordDeletedException
DAOException
IndexUnreachableException
ViewerConfigurationException
RecordLimitExceededException
NumberFormatException
-
updateBreadcrumbsForSearchHits
This is used for flipping search result pages (so that the breadcrumb always has the last visited result page as its URL).- Parameters:
facetString
- aString
object.
-
addStaticLinkToBreadcrumb
Adds a link to the breadcrumbs using the current PrettyURL. Can be called from XHTML.- Parameters:
linkName
- aString
object.linkWeight
- a int.
-
addStaticLinkToBreadcrumb
Adds a link to the breadcrumbs using the given URL. Can be called from XHTML. -
addCollectionHierarchyToBreadcrumb
public void addCollectionHierarchyToBreadcrumb(String collection, String field, String splittingChar) throws PresentationException, DAOException addCollectionHierarchyToBreadcrumb.
- Parameters:
collection
- Full collection string containing all levelsfield
- Solr fieldsplittingChar
- aString
object.- Throws:
PresentationException
- if any.DAOException
- if any.
-
addRecordBreadcrumbs
public void addRecordBreadcrumbs(ViewManager viewManager, de.intranda.metadata.multilanguage.IMetadataValue name, com.ocpsoft.pretty.faces.url.URL url) throws IndexUnreachableException, PresentationException, DAOException - Parameters:
viewManager
-name
-url
-- Throws:
IndexUnreachableException
DAOException
PresentationException
-
getBreadcrumbs
Returns the list of current breadcrumb elements. Note that only the sub-links are used for elements of classCompoundLabeledLink
, not the main link.- Returns:
- the List of flattened breadcrumb links
-
getLastBreadcrumb
Returns the bottom breadcrumb. Used to return to the previous page from the errorGeneral page.- Returns:
- a
LabeledLink
object.
-