org.apache.tiles
Interface ComponentContext

Package class diagram package ComponentContext

public interface ComponentContext

Encapsulation of the current state of execution.

Since:
Tiles 2.0

Method Summary
 void addAll(java.util.Map<java.lang.String,ComponentAttribute> newAttributes)
          Add all attributes to the context.
 void addMissing(java.util.Map<java.lang.String,ComponentAttribute> defaultAttributes)
          Add all attributes to the context
 void clear()
          Clear the attributes
 ComponentAttribute findAttribute(java.lang.String beanName, javax.servlet.jsp.PageContext pageContext)
          Find the attribute
 ComponentAttribute getAttribute(java.lang.String name)
          Retrieve the named attribute.
 ComponentAttribute getAttribute(java.lang.String beanName, int scope, javax.servlet.jsp.PageContext pageContext)
          Find the named attribute.
 java.util.Iterator<java.lang.String> getAttributeNames()
          Iterator of all attribute names.
 void putAttribute(java.lang.String name, ComponentAttribute value)
          Add the specified attribute.
 

Method Detail

addAll

void addAll(java.util.Map<java.lang.String,ComponentAttribute> newAttributes)
Add all attributes to the context.

Parameters:
newAttributes - the attributes to be added.

addMissing

void addMissing(java.util.Map<java.lang.String,ComponentAttribute> defaultAttributes)
Add all attributes to the context

Parameters:
defaultAttributes - attributes which should be present.

getAttribute

ComponentAttribute getAttribute(java.lang.String name)
Retrieve the named attribute.

Parameters:
name - key name for the attribute.
Returns:
ComponentAttribute associated with the given name.

getAttributeNames

java.util.Iterator<java.lang.String> getAttributeNames()
Iterator of all attribute names.

Returns:
iterator of all names.

putAttribute

void putAttribute(java.lang.String name,
                  ComponentAttribute value)
Add the specified attribute.

Parameters:
name - name of the attribute
value - value of the attribute

findAttribute

ComponentAttribute findAttribute(java.lang.String beanName,
                                 javax.servlet.jsp.PageContext pageContext)
Find the attribute

Parameters:
beanName - name of the bean
pageContext - current pageContext.
Returns:
search for the attribute in one of the scopes.

getAttribute

ComponentAttribute getAttribute(java.lang.String beanName,
                                int scope,
                                javax.servlet.jsp.PageContext pageContext)
Find the named attribute.

Parameters:
beanName - name of the bean
scope - scope of the bean
pageContext - current pageContext
Returns:
component attribute - if found.

clear

void clear()
Clear the attributes