org.kuali.rice.krad.uif.util
Class BreadcrumbOptions

java.lang.Object
  extended by org.kuali.rice.krad.uif.util.BreadcrumbOptions
All Implemented Interfaces:
Serializable, Cloneable, Copyable
Direct Known Subclasses:
PageBreadcrumbOptions

public class BreadcrumbOptions
extends Object
implements Serializable, Copyable

BreadcrumbOptions represents the options for the current view breadcrumbs that are displayed.

This class allows for complete override of all breadcrumbs, and ability to add breadcrumbs before the view and page breadcrumb items. Important note: breadcrumbOptions for preViewBreadcrumbs, prePageBreadcrumbs, and breadcrumbOverrides are inherited from the View if not explicitly set from the PageGroup level's breadcrumbOptions (if they contain a value at the view level and the property is null at the page level - default behavior). Explicitly providing an empty list or setting these properties at the PageGroup level will override this inheritance.

See Also:
Serialized Form

Constructor Summary
BreadcrumbOptions()
           
 
Method Summary
 BreadcrumbOptions clone()
          Override Object.clone() to assign the public modifier.
<T> T
copy()
          Return a copy of the class.
 void finalizeBreadcrumbs(Object model, Container parent, BreadcrumbItem breadcrumbItem)
          Finalize the setup of the BreadcrumbOptions and the BreadcrumbItem for the View.
protected  void finalizeBreadcrumbsUrl(Object model, Container parent, BreadcrumbItem breadcrumbItem)
          Finalize the setup of url for the BreadcrumbItem.
 List<BreadcrumbItem> getBreadcrumbOverrides()
          The breadcrumbOverrides are a complete override for all breadcrumbs shown expect for parent location/path breadcrumbs.
 List<BreadcrumbItem> getHomewardPathBreadcrumbs()
          The homewardPathBreadcrumbs represent the path to "Home" location, these appear before anything else - including parentLocation/path based breadcrumbs.
 List<BreadcrumbItem> getPrePageBreadcrumbs()
          The prePageBreadcrumbs list represents BreadcrumbItems that will be shown before the PageGroup's BreadcrumbItem, but after the View's BreadcrumbItem.
 List<BreadcrumbItem> getPreViewBreadcrumbs()
          The preViewBreadcrumbs list represents BreadcrumbItems that will be shown before the View's BreadcrumbItem, but after any parent location breadcrumbs/path based breadcrumbs (if in use)
 void preventModification()
          Modification is not controlled at this level.
 void setBreadcrumbOverrides(List<BreadcrumbItem> breadcrumbOverrides)
          Set the breadcrumbOverrides list
 void setHomewardPathBreadcrumbs(List<BreadcrumbItem> homewardPathBreadcrumbs)
          Set the homewardPathBreadcrumbs
 void setPrePageBreadcrumbs(List<BreadcrumbItem> prePageBreadcrumbs)
          Set the prePageBreadcrumbs
 void setPreViewBreadcrumbs(List<BreadcrumbItem> preViewBreadcrumbs)
          Set the preViewBreadcrumbs
 void setupBreadcrumbs(Object model)
          Sets up the history and breadcrumb configuration for this View.
 Copyable unwrap()
          Get the innermost copyable instance, if wrapped by a proxy.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreadcrumbOptions

public BreadcrumbOptions()
Method Detail

setupBreadcrumbs

public void setupBreadcrumbs(Object model)
Sets up the history and breadcrumb configuration for this View. Should be called from performInitialization.

Parameters:
model - the model

finalizeBreadcrumbs

public void finalizeBreadcrumbs(Object model,
                                Container parent,
                                BreadcrumbItem breadcrumbItem)
Finalize the setup of the BreadcrumbOptions and the BreadcrumbItem for the View. To be called from the performFinalize method.

Parameters:
model - the model
parent - parent container
breadcrumbItem - breadcrumb item to finalize

finalizeBreadcrumbsUrl

protected void finalizeBreadcrumbsUrl(Object model,
                                      Container parent,
                                      BreadcrumbItem breadcrumbItem)
Finalize the setup of url for the BreadcrumbItem.

Parameters:
model - the model
parent - the parent
breadcrumbItem - the breadcrumb item

getHomewardPathBreadcrumbs

public List<BreadcrumbItem> getHomewardPathBreadcrumbs()
The homewardPathBreadcrumbs represent the path to "Home" location, these appear before anything else - including parentLocation/path based breadcrumbs.

Returns:
the homewardPathBreadcrumbs to render

setHomewardPathBreadcrumbs

public void setHomewardPathBreadcrumbs(List<BreadcrumbItem> homewardPathBreadcrumbs)
Set the homewardPathBreadcrumbs

Parameters:
homewardPathBreadcrumbs -

getPreViewBreadcrumbs

public List<BreadcrumbItem> getPreViewBreadcrumbs()
The preViewBreadcrumbs list represents BreadcrumbItems that will be shown before the View's BreadcrumbItem, but after any parent location breadcrumbs/path based breadcrumbs (if in use)

Returns:
the preViewBreadcrumbs to render

setPreViewBreadcrumbs

public void setPreViewBreadcrumbs(List<BreadcrumbItem> preViewBreadcrumbs)
Set the preViewBreadcrumbs

Parameters:
preViewBreadcrumbs -

getPrePageBreadcrumbs

public List<BreadcrumbItem> getPrePageBreadcrumbs()
The prePageBreadcrumbs list represents BreadcrumbItems that will be shown before the PageGroup's BreadcrumbItem, but after the View's BreadcrumbItem.

Returns:
the preViewBreadcrumbs to render

setPrePageBreadcrumbs

public void setPrePageBreadcrumbs(List<BreadcrumbItem> prePageBreadcrumbs)
Set the prePageBreadcrumbs

Parameters:
prePageBreadcrumbs -

getBreadcrumbOverrides

public List<BreadcrumbItem> getBreadcrumbOverrides()
The breadcrumbOverrides are a complete override for all breadcrumbs shown expect for parent location/path breadcrumbs.

The BreadcrumbItems set in this list will be used instead of any View, PageGroup, preViewBreadcrumbs, or prePageBreadcrumbs BreadcrumbItems already set. Each item can be customized fully. If parent location/path breadcrumbs should also not be shown, set renderParentLocations to false. All other render options set in BreadcrumbOptions will be ignored/not apply as a result of setting this override list.

Returns:
the breadcrumbOverride list

setBreadcrumbOverrides

public void setBreadcrumbOverrides(List<BreadcrumbItem> breadcrumbOverrides)
Set the breadcrumbOverrides list

Parameters:
breadcrumbOverrides -

clone

public BreadcrumbOptions clone()
                        throws CloneNotSupportedException
Description copied from interface: Copyable
Override Object.clone() to assign the public modifier.

Specified by:
clone in interface Copyable
Overrides:
clone in class Object
Returns:
Object.clone()
Throws:
CloneNotSupportedException - If Cloneable is not implemented. This should not be possible when using this interface.
See Also:
Copyable.clone()

preventModification

public void preventModification()
Modification is not controlled at this level.

Specified by:
preventModification in interface Copyable
See Also:
Copyable.preventModification()

copy

public final <T> T copy()
Description copied from interface: Copyable
Return a copy of the class.

Specified by:
copy in interface Copyable
Type Parameters:
T - copyable type
Returns:
the copy
See Also:
Copyable.copy(), CopyUtils.copy(Copyable)

unwrap

public Copyable unwrap()
Get the innermost copyable instance, if wrapped by a proxy. When not wrapped, return this.

Specified by:
unwrap in interface Copyable
Returns:
wrapped instance


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.