com.atlassian.breadcrumbs.build
Class AbstractBuildCrumb

java.lang.Object
  extended by com.atlassian.breadcrumbs.BaseCrumb
      extended by com.atlassian.breadcrumbs.build.AbstractBuildCrumb
All Implemented Interfaces:
BreadCrumb
Direct Known Subclasses:
AllBuildResultsCrumb, AllTestsCrumb, BuildFilesCrumb

public abstract class AbstractBuildCrumb
extends BaseCrumb

Abstract class for Build level crumbs


Field Summary
 
Fields inherited from class com.atlassian.breadcrumbs.BaseCrumb
action, BROWSE_PREFIX, request
 
Constructor Summary
protected AbstractBuildCrumb(javax.servlet.http.HttpServletRequest request, com.opensymphony.xwork.Action action)
           
 
Method Summary
protected abstract  java.lang.String getActionName()
          The action name represented by the crumb.
 java.util.Collection getChildCrumbs()
          Returns the children crumbs.
 java.lang.String getLabel()
          Returns the visible label for the bread crumb
protected abstract  java.lang.String getLabelKey()
          Gets the internationalised key for the label
 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 showm?
 
Methods inherited from class com.atlassian.breadcrumbs.BaseCrumb
createUrl, createUrl, getAccessKey, getLabelWithAccessKeyUnderlined, getText, isAnyChildShown, isInCurrentPath, setAction, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBuildCrumb

protected AbstractBuildCrumb(javax.servlet.http.HttpServletRequest request,
                             com.opensymphony.xwork.Action action)
Method Detail

isShown

public boolean isShown()
Description copied from interface: BreadCrumb
Should the BreadCrumb be showm?

Returns:
true if it shou;d be displayed

getActionName

protected abstract java.lang.String getActionName()
The action name represented by the crumb. No .action suffix should be added

Returns:
must not be null. Must not contain ".action" suffix

getLabelKey

protected abstract java.lang.String getLabelKey()
Gets the internationalised key for the label

Returns:
must not be null

getUrl

public java.lang.String getUrl()
Description copied from interface: BreadCrumb
Returns the URL for the given label

Returns:
URL of label. No context is added

isCurrentPage

public boolean isCurrentPage()
Description copied from interface: BreadCrumb
Returns true if the curren BreadCrumb should be selected

Returns:
true or false

getChildCrumbs

public java.util.Collection getChildCrumbs()
Description copied from interface: BreadCrumb
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 BreadCrumb.isShown() and then it'll follow down that crumb tree

Returns:
Collection of BreadCrumb objects. Collections.EMPTY_LIST if no child crumbs

getLabel

public java.lang.String getLabel()
Description copied from interface: BreadCrumb
Returns the visible label for the bread crumb

Returns:
string, cannot be null


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.