Class AbstractBreadcrumb
java.lang.Object
com.atlassian.confluence.util.breadcrumbs.AbstractBreadcrumb
- All Implemented Interfaces:
Breadcrumb
- Direct Known Subclasses:
AbstractActionBreadcrumb,AbstractSpaceBreadcrumb,AdminBreadcrumb,AttachmentBreadcrumb,BlogCollectorBreadcrumb,BlogPostBreadcrumb,BlogPostBreadcrumb,BlogPostDateBreadcrumb,BlogPostDateBreadcrumb,BrowseSpaceBreadcrumb,CompositeBreadcrumb,CustomContentBreadcrumb,DashboardBreadcrumb,ListPageTemplatesBreadcrumb,LongRunningTaskBreadcrumb,PageBreadcrumb,PageBreadcrumb,PagesCollectorBreadcrumb,PeopleBreadcrumb,SimpleBreadcrumb,UserBreadcrumb
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractBreadcrumb(String title, String target) protectedAbstractBreadcrumb(String title, String target, String tooltip) -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether or not the last breadcrumb in the breadcrumbs trail should be filtered out.Gets all the breadcrumbs required for displaying this breadcrumb.CSS class to apply to the breadcrumbGets the display title of the breadcrumb for user display.protected List<Breadcrumb> Returns a list of breadcrumbs for the current breadcrumb.protected abstract BreadcrumbGets the parent breadcrumb.Gets the relative url for the target which a breadcrumb points to.getTitle()Gets the i18n key for the title of the breadcrumb.Gets the breadcrumb's tooltip.voidsetCssClass(String cssClass) Override the default CSS class of the breadcrumbvoidsetFilterTrailingBreadcrumb(boolean filterTrailingBreadcrumb) Override the breadcrumb's default value for whether or not the last breadcrumb in the trail should be filtered out.toString()
-
Field Details
-
title
-
target
-
tooltip
-
displayTitle
-
cssClass
-
filterTrailingBreadcrumb
protected boolean filterTrailingBreadcrumb -
MAX_BREADCRUMBS
protected static final int MAX_BREADCRUMBS- See Also:
-
-
Constructor Details
-
AbstractBreadcrumb
protected AbstractBreadcrumb() -
AbstractBreadcrumb
-
AbstractBreadcrumb
-
-
Method Details
-
getTarget
Description copied from interface:BreadcrumbGets the relative url for the target which a breadcrumb points to.- Specified by:
getTargetin interfaceBreadcrumb- Returns:
- the relative url for the breadcrumb, or null if the breadcrumb has no link
-
getTitle
Description copied from interface:BreadcrumbGets the i18n key for the title of the breadcrumb. SeeBreadcrumb.getDisplayTitle()for titles that don't need to be translated.- Specified by:
getTitlein interfaceBreadcrumb- Returns:
- the i18n key for the breadcrumb title
-
getTooltip
Description copied from interface:BreadcrumbGets the breadcrumb's tooltip.- Specified by:
getTooltipin interfaceBreadcrumb- Returns:
- the tooltip to display for the breadcrumb
-
getDisplayTitle
Description copied from interface:BreadcrumbGets the display title of the breadcrumb for user display.- Specified by:
getDisplayTitlein interfaceBreadcrumb- Returns:
- display title of the breadcrumb or null if not defined
-
getBreadcrumbsTrail
Gets all the breadcrumbs required for displaying this breadcrumb.By using the power of a while loop, we retrieve all the parent breadcrumbs and add the crumbs from itself as we go along (by calling
getMyCrumbs()).- Specified by:
getBreadcrumbsTrailin interfaceBreadcrumb- Returns:
- a
Listof breadcrumbs for display
-
getMyCrumbs
Returns a list of breadcrumbs for the current breadcrumb. For example, theBlogPostBreadcrumboverrides this method and returns 4 crumbs altogether to represent itself: 2007 > 11 > 28 > BlogTitle.By default my crumbs will be a list with size 1, containing itself, unless the current breadcrumb has no title.
-
getParent
Gets the parent breadcrumb. By default the dashboard breadcrumb is returned.- Returns:
- the parent breadcrumb.
-
setCssClass
Description copied from interface:BreadcrumbOverride the default CSS class of the breadcrumb- Specified by:
setCssClassin interfaceBreadcrumb- Parameters:
cssClass- the default string to write in the class attribute
-
getCssClass
Description copied from interface:BreadcrumbCSS class to apply to the breadcrumb- Specified by:
getCssClassin interfaceBreadcrumb- Returns:
- a String or null
-
toString
-
setFilterTrailingBreadcrumb
public void setFilterTrailingBreadcrumb(boolean filterTrailingBreadcrumb) Description copied from interface:BreadcrumbOverride the breadcrumb's default value for whether or not the last breadcrumb in the trail should be filtered out.- Specified by:
setFilterTrailingBreadcrumbin interfaceBreadcrumb- Parameters:
filterTrailingBreadcrumb- true if the last breadcrumb in the trail should be filtered out.
-
filterTrailingBreadcrumb
public boolean filterTrailingBreadcrumb()Description copied from interface:BreadcrumbWhether or not the last breadcrumb in the breadcrumbs trail should be filtered out. For example, we don't want to duplicate the page title in the breadcrumbs trail when it's already displayed on the page.- Specified by:
filterTrailingBreadcrumbin interfaceBreadcrumb
-