org.apache.shale.clay.component.chain
Class ClayContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by org.apache.commons.chain.impl.ContextBase
              extended by org.apache.shale.clay.component.chain.ClayContext
All Implemented Interfaces:
Serializable, Cloneable, Map, Context

public class ClayContext
extends ContextBase

This context is passed to all the commands in this package used to create the sub component tree for the clay component. The use of the context object promotes a reusable logic fragments that are loosely coupled and kind of snap togather.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ClayContext()
           
 
Method Summary
 AttributeBean getAttribute()
          Gets the current attribute for each in AssignPropertiesCommand.
 Object getChild()
          Returns a child component that can be a UIComponent, Validator, Listener or Converter.
 int getChildIndex()
          Returns the index at which a new component must be added in the list of childs.
 ComponentBean getDisplayElement()
          Returns the current component metadata used to build a JSF resource.
 javax.faces.context.FacesContext getFacesContext()
          Returns the current faces Context.
 String getJsfid()
          Returns the unique identifier for a component metadata definition.
 TreeSet getJspIds()
           
 javax.faces.component.UIComponent getParent()
          Returns the parent of the child.
 ComponentBean getRootElement()
          Returns the root config object used to construct the Clay component subtree.
 Map getSymbols()
          Returns a Map containing replacement symbols within meta-component attributes.
 void setAttribute(AttributeBean attribute)
          Sets the current attribute for each in AssignPropertiesCommand.
 void setChild(Object child)
          Sets a child component that can be a UIComponent, Validator, Listener or Converter.
 void setChildIndex(int index)
          Sets the index at which a new component must be added in the list of childs.
 void setDisplayElement(ComponentBean displayElement)
          Sets the current component metadata used to build a JSF resource.
 void setFacesContext(javax.faces.context.FacesContext facesContext)
          Sets the current faces Context.
 void setJsfid(String jsfid)
          Sets the unique identifier for a component metadata definition.
 void setJspIds(TreeSet graph)
           
 void setParent(javax.faces.component.UIComponent parent)
          Sets the parent of the child.
 void setRootElement(ComponentBean rootElement)
          Sets the root config object used to construct the Clay component subtree.
 void setSymbols(Map symbols)
          Sets a Map containing replacement symbols within meta-component attributes.
 
Methods inherited from class org.apache.commons.chain.impl.ContextBase
clear, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, values
 
Methods inherited from class java.util.HashMap
clone, containsKey, size
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, equals, hashCode, size
 

Constructor Detail

ClayContext

public ClayContext()
Method Detail

getSymbols

public Map getSymbols()

Returns a Map containing replacement symbols within meta-component attributes.

Returns:
map of SymbolBean

setSymbols

public void setSymbols(Map symbols)

Sets a Map containing replacement symbols within meta-component attributes.

Parameters:
symbols - map of SymbolBean

getJsfid

public String getJsfid()

Returns the unique identifier for a component metadata definition.

Returns:
jsfid

setJsfid

public void setJsfid(String jsfid)

Sets the unique identifier for a component metadata definition.

Parameters:
jsfid - unique component identifier

getChild

public Object getChild()
Returns a child component that can be a UIComponent, Validator, Listener or Converter.

Returns:
child component

setChild

public void setChild(Object child)

Sets a child component that can be a UIComponent, Validator, Listener or Converter.

Parameters:
child - component

getRootElement

public ComponentBean getRootElement()

Returns the root config object used to construct the Clay component subtree.

Returns:
config bean

setRootElement

public void setRootElement(ComponentBean rootElement)

Sets the root config object used to construct the Clay component subtree.

Parameters:
rootElement - parent config bean

setAttribute

public void setAttribute(AttributeBean attribute)

Sets the current attribute for each in AssignPropertiesCommand.

Parameters:
attribute - current attribute bean

getAttribute

public AttributeBean getAttribute()

Gets the current attribute for each in AssignPropertiesCommand.

Returns:
current attribute bean

getDisplayElement

public ComponentBean getDisplayElement()

Returns the current component metadata used to build a JSF resource.

Returns:
current config bean

setDisplayElement

public void setDisplayElement(ComponentBean displayElement)

Sets the current component metadata used to build a JSF resource.

Parameters:
displayElement - config bean

getFacesContext

public javax.faces.context.FacesContext getFacesContext()

Returns the current faces Context.

Returns:
faces context

setFacesContext

public void setFacesContext(javax.faces.context.FacesContext facesContext)

Sets the current faces Context.

Parameters:
facesContext - jsf context

getParent

public javax.faces.component.UIComponent getParent()

Returns the parent of the child.

Returns:
current parent component

setParent

public void setParent(javax.faces.component.UIComponent parent)

Sets the parent of the child.

Parameters:
parent - current

getChildIndex

public int getChildIndex()

Returns the index at which a new component must be added in the list of childs.

Returns:
current child index

setChildIndex

public void setChildIndex(int index)

Sets the index at which a new component must be added in the list of childs.

Parameters:
index - current child index

getJspIds

public TreeSet getJspIds()
Returns:
the set that represents each displayElement used to build the target JSF sub componennt tree

setJspIds

public void setJspIds(TreeSet graph)
Parameters:
graph - the set that represents each displayElement used to build the target JSF sub componennt tree


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.