Class BreadcrumbBean

java.lang.Object
io.goobi.viewer.managedbeans.BreadcrumbBean
All Implemented Interfaces:
Serializable

@Named @SessionScoped public class BreadcrumbBean extends Object implements Serializable
JSF session-scoped backing bean that manages the breadcrumb navigation trail. Builds and maintains the ordered list of labeled links representing the user's current navigation path through collections, records, and CMS pages.
See Also:
  • Field Details

    • WEIGHT_TAG_MAIN_MENU

      public static final int WEIGHT_TAG_MAIN_MENU
      Constant WEIGHT_TAG_MAIN_MENU=1.
      See Also:
    • WEIGHT_ACTIVE_COLLECTION

      public static final int WEIGHT_ACTIVE_COLLECTION
      Constant WEIGHT_ACTIVE_COLLECTION=2.
      See Also:
    • WEIGHT_OPEN_DOCUMENT

      public static final int WEIGHT_OPEN_DOCUMENT
      Constant WEIGHT_OPEN_DOCUMENT=3.
      See Also:
    • WEIGHT_BROWSE

      public static final int WEIGHT_BROWSE
      Constant WEIGHT_BROWSE=1.
      See Also:
    • WEIGHT_SEARCH_RESULTS

      public static final int WEIGHT_SEARCH_RESULTS
      Constant WEIGHT_SEARCH_RESULTS=2.
      See Also:
    • WEIGHT_SEARCH_TERMS

      public static final int WEIGHT_SEARCH_TERMS
      Constant WEIGHT_SEARCH_TERMS=1.
      See Also:
    • WEIGHT_TAG_CLOUD

      public static final int WEIGHT_TAG_CLOUD
      Constant WEIGHT_TAG_CLOUD=1.
      See Also:
    • WEIGHT_USER_ACCOUNT

      public static final int WEIGHT_USER_ACCOUNT
      Constant WEIGHT_USER_ACCOUNT=1.
      See Also:
    • WEIGHT_CROWDSOURCING_OVERVIEW

      public static final int WEIGHT_CROWDSOURCING_OVERVIEW
      Constant WEIGHT_CROWDSOURCING_OVERVIEW=3.
      See Also:
    • WEIGHT_CROWDSOURCING_EDIT_OVERVIEW

      public static final int WEIGHT_CROWDSOURCING_EDIT_OVERVIEW
      Constant WEIGHT_CROWDSOURCING_EDIT_OVERVIEW=4.
      See Also:
    • WEIGHT_CROWDSOURCING_EDIT_OCR_CONTENTS

      public static final int WEIGHT_CROWDSOURCING_EDIT_OCR_CONTENTS
      Constant WEIGHT_CROWDSOURCING_EDIT_OCR_CONTENTS=5.
      See Also:
    • WEIGHT_CROWDSOURCING_CAMPAIGN

      public static final int WEIGHT_CROWDSOURCING_CAMPAIGN
      Constant WEIGHT_CROWDSOURCING_CAMPAIGN=2.
      See Also:
    • WEIGHT_CROWDSOURCING_CAMPAIGN_ITEM

      public static final int WEIGHT_CROWDSOURCING_CAMPAIGN_ITEM
      Constant WEIGHT_CROWDSOURCING_CAMPAIGN_ITEM=3.
      See Also:
    • WEIGHT_CROWDSOURCING_CAMPAIGN_PARENT

      public static final int WEIGHT_CROWDSOURCING_CAMPAIGN_PARENT
      Constant WEIGHT_CROWDSOURCING_CAMPAIGN_PARENT=1.
      See Also:
  • Constructor Details

    • BreadcrumbBean

      public BreadcrumbBean()
  • Method Details

    • updateBreadcrumbs

      public void updateBreadcrumbs(LabeledLink newLink)
      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

      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

      public 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).
      Parameters:
      facetString - URL-encoded active facet filter string
    • addStaticLinkToBreadcrumb

      public void addStaticLinkToBreadcrumb(String linkName, int linkWeight)
      Adds a link to the breadcrumbs using the current PrettyURL. Can be called from XHTML.
      Parameters:
      linkName - display label for the breadcrumb entry
      linkWeight - position weight determining order in the breadcrumb trail
    • addStaticLinkToBreadcrumb

      public void addStaticLinkToBreadcrumb(String linkName, String url, int linkWeight)
      Adds a link to the breadcrumbs using the given URL. Can be called from XHTML.
      Parameters:
      linkName - display label for the breadcrumb entry
      url - target URL for the breadcrumb link
      linkWeight - position weight determining order in the breadcrumb trail
    • addCollectionHierarchyToBreadcrumb

      public void addCollectionHierarchyToBreadcrumb(String collection, String field, String splittingChar) throws PresentationException, DAOException
      addCollectionHierarchyToBreadcrumb.
      Parameters:
      collection - Full collection string containing all levels
      field - Solr field
      splittingChar - character used to split collection hierarchy levels
      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 - ViewManager for the current record
      name - display name for the breadcrumb entry
      url - URL to associate with the breadcrumb entry
      Throws:
      IndexUnreachableException
      DAOException
      PresentationException
    • getBreadcrumbs

      public List<LabeledLink> getBreadcrumbs()
      Returns the list of current breadcrumb elements. Note that only the sub-links are used for elements of class CompoundLabeledLink, not the main link.
      Returns:
      the List of flattened breadcrumb links
    • getLastBreadcrumb

      public LabeledLink getLastBreadcrumb()
      Returns the bottom breadcrumb. Used to return to the previous page from the errorGeneral page.
      Returns:
      the last (deepest) breadcrumb link, or null if the breadcrumb list is empty