com.atlassian.breadcrumbs
Interface BreadCrumb

All Known Implementing Classes:
BaseCrumb, BuildCrumb, BuildResultSummaryCrumb, ChainBranchesCrumb, ChainConfigCrumb, ChainCrumb, ChainResultSummaryCrumb, JobConfigCrumb, JobResultCrumb, ProjectCrumb

public interface BreadCrumb

An interface that represents a single item in a series of breadcrumbs


Method Summary
 java.lang.String getAccessKey()
          Returns a key as an access key
 java.util.Collection<BreadCrumb> getChildCrumbs()
          Returns the children crumbs.
 java.lang.String getLabel()
          Returns the visible label for the bread crumb
 java.lang.String getUrl()
          Returns the URL for the given label
 boolean isCurrentPage()
          Returns true if the curren BreadCrumb should be selected
 boolean isShown()
          Should the BreadCrumb be shown?
 

Method Detail

isShown

boolean isShown()
Should the BreadCrumb be shown?

Returns:
true if it should be displayed

isCurrentPage

boolean isCurrentPage()
Returns true if the curren BreadCrumb should be selected

Returns:
true or false

getLabel

@Nullable
java.lang.String getLabel()
Returns the visible label for the bread crumb

Returns:
string, cannot be null
Throws:
java.lang.ClassCastException - possible if isShown() doesn't hold true

getUrl

@Nullable
java.lang.String getUrl()
Returns the URL for the given label

Returns:
URL of label. No context is added
Throws:
java.lang.ClassCastException - possible if isShown() doesn't hold true

getChildCrumbs

java.util.Collection<BreadCrumb> getChildCrumbs()
Returns the children crumbs. This is not as sinister as it sounds! The bread crumb will iterate throught each chil crumb until one returns true for isShown() and then it'll follow down that crumb tree

Returns:
Collection of BreadCrumb objects. Collections.emptyList() if no child crumbs

getAccessKey

java.lang.String getAccessKey()
Returns a key as an access key

Returns:
null if doesn't exist


Copyright © 2012 Atlassian. All Rights Reserved.