org.alfresco.web.config
Class NavigationConfigElement

java.lang.Object
  extended by org.springframework.extensions.config.element.ConfigElementAdapter
      extended by org.alfresco.web.config.NavigationConfigElement
All Implemented Interfaces:
java.io.Serializable, org.springframework.extensions.config.ConfigElement

public class NavigationConfigElement
extends org.springframework.extensions.config.element.ConfigElementAdapter

Custom config element that represents the config data for navigation

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.extensions.config.element.ConfigElementAdapter
attributes, children, name, value
 
Constructor Summary
NavigationConfigElement()
          Default constructor
NavigationConfigElement(java.lang.String name)
          Constructor
 
Method Summary
 void addOverride(java.lang.String fromViewId, java.lang.String fromOutcome, NavigationResult result)
          Adds an override configuration item
 void addOverride(java.lang.String fromViewId, java.lang.String fromOutcome, java.lang.String toViewId, java.lang.String toOutcome)
          Adds an override configuration item
 org.springframework.extensions.config.ConfigElement combine(org.springframework.extensions.config.ConfigElement configElement)
           
 java.util.List getChildren()
           
 java.util.HashMap getOutcomes()
          Returns the list of outcomes that have overrides defined
 NavigationResult getOverride(java.lang.String fromViewId, java.lang.String fromOutcome)
          Returns the best match navigation override configured for the given current view id and/or outcome.
 java.util.HashMap getViewIds()
          Returns the list of view ids that have overrides defined
 
Methods inherited from class org.springframework.extensions.config.element.ConfigElementAdapter
getAttribute, getAttributeCount, getAttributes, getChild, getChildCount, getChildren, getChildrenMap, getChildValue, getName, getValue, hasAttribute, hasChildren, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NavigationConfigElement

public NavigationConfigElement()
Default constructor


NavigationConfigElement

public NavigationConfigElement(java.lang.String name)
Constructor

Parameters:
name - Name of the element this config element represents
Method Detail

getChildren

public java.util.List getChildren()
Specified by:
getChildren in interface org.springframework.extensions.config.ConfigElement
Overrides:
getChildren in class org.springframework.extensions.config.element.ConfigElementAdapter
See Also:
org.alfresco.config.ConfigElement#getChildren()

combine

public org.springframework.extensions.config.ConfigElement combine(org.springframework.extensions.config.ConfigElement configElement)
Specified by:
combine in interface org.springframework.extensions.config.ConfigElement
Specified by:
combine in class org.springframework.extensions.config.element.ConfigElementAdapter
See Also:
org.alfresco.config.ConfigElement#combine(org.alfresco.config.ConfigElement)

getViewIds

public java.util.HashMap getViewIds()
Returns the list of view ids that have overrides defined

Returns:
Map of view ids and navigation results

getOutcomes

public java.util.HashMap getOutcomes()
Returns the list of outcomes that have overrides defined

Returns:
Map of outcomes and navigation results

addOverride

public void addOverride(java.lang.String fromViewId,
                        java.lang.String fromOutcome,
                        java.lang.String toViewId,
                        java.lang.String toOutcome)
Adds an override configuration item

Parameters:
fromViewId - The from-view-id value from the config
fromOutcome - The from-outcome value from the config
toViewId - The to-view-id value from the config
toOutcome - The to-outcome value from the config

addOverride

public void addOverride(java.lang.String fromViewId,
                        java.lang.String fromOutcome,
                        NavigationResult result)
Adds an override configuration item

Parameters:
fromViewId - The from-view-id value from the config
fromOutcome - The from-outcome value from the config
result - The navigation result object to add

getOverride

public NavigationResult getOverride(java.lang.String fromViewId,
                                    java.lang.String fromOutcome)
Returns the best match navigation override configured for the given current view id and/or outcome. If an outcome is passed it takes precedence, the view id will not be used.

Parameters:
fromViewId - The current view id
fromOutcome - The current outcome
Returns:
The navigation result


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.