com.bowstreet.builders.webapp.methods
Class BreadcrumbsAssistant

java.lang.Object
  extended by com.bowstreet.builders.webapp.methods.BreadcrumbsAssistant

public class BreadcrumbsAssistant
extends java.lang.Object

A Linked Java Object to an instance of this class will be put in your WebApp when you use the Breadcrumbs Builder. The primary method that should be called by the developer is the select method, which is used to select a "page."

Author:
szagiebo

Constructor Summary
BreadcrumbsAssistant(BreadcrumbsDataProvider provider)
           
 
Method Summary
 void clear()
          Clear out the remembered breadcrumbs
 java.lang.String getCurrentText(WebAppAccess webAppAccess)
           
 java.util.Iterator getLinksIterator()
           
 IXml getLocalizedResource()
           
 java.lang.String getSelectorFromKey(WebAppAccess webAppAccess, java.lang.Object key)
          Converts a key to a selector string.
 java.lang.String getText(WebAppAccess webAppAccess, java.lang.Object key)
           
 java.lang.String getTextFromResource(java.lang.Object key)
          This will be called if there is no getText method provided.
 void select(WebAppAccess webAppAccess, java.lang.String selector)
          Select an item.
 java.lang.String selectWithoutNav(WebAppAccess webAppAccess, java.lang.String selector)
          Select an item.
 void setLocalizedResource(IXml localizedResource)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreadcrumbsAssistant

public BreadcrumbsAssistant(BreadcrumbsDataProvider provider)
Parameters:
provider -
Method Detail

clear

public void clear()
Clear out the remembered breadcrumbs


getCurrentText

public java.lang.String getCurrentText(WebAppAccess webAppAccess)
Parameters:
webAppAccess -
Returns:
the text to display for the current page

getLinksIterator

public java.util.Iterator getLinksIterator()
Returns:
an iterator over all the Links keys

getLocalizedResource

public final IXml getLocalizedResource()
Returns:
the localizedResource

getSelectorFromKey

public java.lang.String getSelectorFromKey(WebAppAccess webAppAccess,
                                           java.lang.Object key)
Converts a key to a selector string. Default is that they are the same thing.

Parameters:
webAppAccess -
key - selects a page (of data or an actual page)
Returns:
Selector string suitable for adding to a link.

getText

public java.lang.String getText(WebAppAccess webAppAccess,
                                java.lang.Object key)
Parameters:
webAppAccess -
key - selects a page (of data or an actual page)
Returns:
The text to display which represents the page selected by the key

getTextFromResource

public java.lang.String getTextFromResource(java.lang.Object key)
This will be called if there is no getText method provided.

Parameters:
key - selects a page (of data or an actual page)
Returns:
The text to display which represents the page selected by the key

select

public void select(WebAppAccess webAppAccess,
                   java.lang.String selector)
Select an item. This will add the item to the stack if it isn't already on it. If it is, it will unwind the stack to that item. This will also navigate to the action specified by the preparePage method.

Parameters:
webAppAccess - The current WebAppAccess
selector - selects a page (of data or an actual page)

selectWithoutNav

public java.lang.String selectWithoutNav(WebAppAccess webAppAccess,
                                         java.lang.String selector)
Select an item. This will add the item to the stack if it isn't already on it. If it is, it will unwind the stack to that item.

Parameters:
webAppAccess - The current WebAppAccess
selector - selects a page (of data or an actual page)
Returns:
the result of the provider's preparePage method

setLocalizedResource

public final void setLocalizedResource(IXml localizedResource)
Parameters:
localizedResource - the localizedResource to set


Copyright © 2009 IBM. All Rights Reserved.