com.bowstreet.builders.webapp.methods
Interface BreadcrumbsDataProvider


public interface BreadcrumbsDataProvider

Interface which defines a DataProvider class for use with the Breadcrumbs Builder. For advanced use of the Builder, the developer should create a class which implements this interface, and name the class in the advanced inputs section of the Breadcrumbs Builder.

Author:
szagiebo

Method Summary
 java.lang.String getText(WebAppAccess webAppAccess, java.lang.Object key)
          This optional method should get the display text associated with this key, to be used in the breadcrumbs.
 java.lang.String keyToSelector(WebAppAccess webAppAccess, java.lang.Object key)
          Converts a key to a selector string.
 java.lang.String preparePage(WebAppAccess webAppAccess, java.lang.Object key)
          This method should prepare any internal data structures which might be needed to display the page represented by this key.
 java.lang.Object selectorToKey(WebAppAccess webAppAccess, java.lang.String selector)
          Converts a selector string to a key.
 

Method Detail

getText

java.lang.String getText(WebAppAccess webAppAccess,
                         java.lang.Object key)
This optional method should get the display text associated with this key, to be used in the breadcrumbs. If this method isn't available, there will be no text associated with the item. (Presumably, then, there will be an image.)

Parameters:
webAppAccess -
key - selects a page (of data or an actual page)
Returns:
Text for display

keyToSelector

java.lang.String keyToSelector(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.

preparePage

java.lang.String preparePage(WebAppAccess webAppAccess,
                             java.lang.Object key)
This method should prepare any internal data structures which might be needed to display the page represented by this key. Then the method should return the name of the action in the Model (Method or Page) that the system should invoke.

Parameters:
webAppAccess -
key - selects a page (of data or an actual page)
Returns:
model action name

selectorToKey

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

Parameters:
webAppAccess -
selector - String which corresponds to a key -- will be encoded into URL of link
Returns:
the corresponding key


Copyright © 2009 IBM. All Rights Reserved.