Interface BreadcrumbGenerator
- All Known Implementing Classes:
DefaultBreadcrumbGenerator
-
Method Summary
Modifier and TypeMethodDescriptiongetAdvancedBreadcrumb
(Space space) Returns the advanced breadcrumb in a space.getBlogCollectorBreadcrumb
(Space space) getContentActionBreadcrumb
(ConfluenceActionSupport action, Space space, AbstractPage page, DisplayableLabel label) Returns an appropriate breadcrumb for the given action, space, page and label.getContentBreadcrumb
(Space space, AbstractPage page) Returns an appropriate breadcrumb for a page or blogpostgetContentCollectorBreadcrumb
(Space space, Class contentClass) Returns an appropriate collector page breadcrumb to represent content at the root level of a space conforming to the new space information architecture.getContentDetailActionBreadcrumb
(ConfluenceActionSupport action, Space space, AbstractPage page) Breadcrumb for the "detail" pages of a Page/Blog, like Info, Attachments or History.getFilteredBreadcrumbTrail
(ConfluenceActionSupport action, javax.servlet.http.HttpServletRequest request) Returns the breadcrumb trail after filtering.getFilteredBreadcrumbTrail
(Space space, Breadcrumb breadcrumb) Returns the breadcrumb trail after filtering.getSpaceAdminBreadcrumb
(ConfluenceActionSupport action, Space space) Returns the breadcrumb for a space admin action in a space.Returns the space operations breadcrumb (i.e.
-
Method Details
-
getFilteredBreadcrumbTrail
List<Breadcrumb> getFilteredBreadcrumbTrail(ConfluenceActionSupport action, javax.servlet.http.HttpServletRequest request) Returns the breadcrumb trail after filtering.Since the new header (published in Confluence 5.0), we filter out the Dashboard from the breadcrumbs. We also filter out the last breadcrumb in the trail (usually the page name), unless the breadcrumb's filterTrailingBreadcrumb method returns false.
- Parameters:
action
- the action to build breadcrumbs forrequest
- the request to build breadcrumbs for- Returns:
- the filtered trail of breadcrumbs
-
getFilteredBreadcrumbTrail
Returns the breadcrumb trail after filtering.This method should be used when a breadcrumb is generated independently of an action - E.g. when showing the new location of a page in the move page dialog.
- Parameters:
space
- the space in which the breadcrumb belongs, or null when this is not applicablebreadcrumb
- the breadcrumb to retrieve a filtered trail for- Returns:
- the filtered trail of breadcrumbs
-
getContentActionBreadcrumb
Breadcrumb getContentActionBreadcrumb(ConfluenceActionSupport action, Space space, AbstractPage page, DisplayableLabel label) Returns an appropriate breadcrumb for the given action, space, page and label.- Parameters:
action
- the action to retrieve the breadcrumb forspace
- the space to retrieve the breadcrumb for, can be null for global labelspage
- the page to retrieve the breadcrumb for, can be null when retrieving breadcrumb for a labellabel
- the label to retrieve the breadcrumb for, can be null when retrieving breadcrumb for a page- Returns:
- the appropriate content breadcrumb for the given action, space, page and label.
-
getContentDetailActionBreadcrumb
Breadcrumb getContentDetailActionBreadcrumb(ConfluenceActionSupport action, Space space, AbstractPage page) Breadcrumb for the "detail" pages of a Page/Blog, like Info, Attachments or History. It displays "Collector > Parent > Page Name".This breadcrumb is not to be used for actions on content itself, like ViewPageAction, which should use
getContentActionBreadcrumb(ConfluenceActionSupport, Space, AbstractPage, DisplayableLabel)
.- Parameters:
action
- the action to retrieve the breadcrumb forspace
- the space to retrieve the breadcrumb forpage
- the page to retrieve the breadcrumb for- Returns:
- the breadcrumb for the Content Details.
-
getContentBreadcrumb
Returns an appropriate breadcrumb for a page or blogpost- Parameters:
space
- the space to retrieve the breadcrumb forpage
- the page or blogpost to retrieve the breadcrumb for- Returns:
- the breadcrumb for the content
-
getContentCollectorBreadcrumb
Returns an appropriate collector page breadcrumb to represent content at the root level of a space conforming to the new space information architecture.This should only be used for retrieving a breadcrumb for content creation at the root level of a space - once the content exists, the breadcrumb for that content should be used instead.
- Parameters:
space
- the space to retrieve a collector breadcrumb for.contentClass
- the type of content to retrieve a collector breadcrumb for.- Returns:
- the breadcrumb for an appropriate collector page, or null when there is nothing applicable.
-
getSpaceAdminBreadcrumb
Returns the breadcrumb for a space admin action in a space.- Parameters:
action
- the action to retrieve a space admin breadcrumb for.space
- the space to retrieve a space admin breadcrumb for.- Returns:
- a space admin breadcrumb.
-
getSpaceOperationsBreadcrumb
Returns the space operations breadcrumb (i.e. Browse Space for spaces that don't conform to the new space information architecture) in a space.- Parameters:
space
- the space to retrieve a space operations breadcrumb for.- Returns:
- a space operations breadcrumb.
-
getAdvancedBreadcrumb
Returns the advanced breadcrumb in a space. This falls back to the Browse Space breadcrumb for spaces that don't conform to the new space information architecture. This is the same fallback as for Space Operations, but we shouldn't run into a scenario where both breadcrumbs are requested.- Parameters:
space
- the space to retrieve an advanced breadcrumb for.- Returns:
- the advanced breadcrumb
-
getBlogCollectorBreadcrumb
-