Package org.apache.tiles.api
Interface AttributeContext
- All Known Implementing Classes:
- BasicAttributeContext,- Definition
public interface AttributeContext
Encapsulation of the current state of execution.
- Since:
- Tiles 2.0
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd all attributes to the context.voidclear()Clear the attributes.getAttribute(String name) Retrieve the named attribute, either cascaded or not.getCascadedAttribute(String name) Retrieve the attribute that has been cascaded at upper levels.Returns the names of the cascaded attributes.getLocalAttribute(String name) Retrieve the attribute that has been defined in this context (i.e.Returns the names of the local attributes, i.e.Get associated preparer instance.Returns the attribute that will be used to render a template.voidinherit(AttributeContext parent) Copies all missing attributes from theparentattribute context to this one.voidCopies the cascaded attributes to this attribute context.voidputAttribute(String name, Attribute value) Add the specified attribute.voidputAttribute(String name, Attribute value, boolean cascade) Add the specified attribute.voidsetPreparer(String url) Set associated preparer instance.voidsetTemplateAttribute(Attribute templateAttribute) Sets the template attribute, that will be used to render the template page.
- 
Method Details- 
getTemplateAttributeAttribute getTemplateAttribute()Returns the attribute that will be used to render a template.- Returns:
- The template attribute.
- Since:
- 2.1.2
 
- 
setTemplateAttributeSets the template attribute, that will be used to render the template page.- Parameters:
- templateAttribute- The template attribute.
- Since:
- 2.1.2
 
- 
getPreparerString getPreparer()Get associated preparer instance.- Returns:
- The preparer name.
- Since:
- 2.1.0
 
- 
setPreparerSet associated preparer instance.- Parameters:
- url- The preparer name.
- Since:
- 2.1.0
 
- 
addAllAdd all attributes to the context.- Parameters:
- newAttributes- the attributes to be added.
 
- 
inheritCascadedAttributesCopies the cascaded attributes to this attribute context.- Parameters:
- parent- The parent context to be used.
- Since:
- 2.1.0
 
- 
inheritCopies all missing attributes from theparentattribute context to this one.- Parameters:
- parent- The attribute context to copy attributes from.
- Since:
- 2.1.0
 
- 
getAttributeRetrieve the named attribute, either cascaded or not.- Parameters:
- name- key name for the attribute.
- Returns:
- Attribute associated with the given name.
 
- 
getLocalAttributeRetrieve the attribute that has been defined in this context (i.e. not cascaded).- Parameters:
- name- key name for the attribute.
- Returns:
- Attribute The local attribute associated with the given name, if
 present, or nullotherwise.
- Since:
- 2.1.0
 
- 
getCascadedAttributeRetrieve the attribute that has been cascaded at upper levels.- Parameters:
- name- key name for the attribute.
- Returns:
- Attribute The cascaded attribute associated with the given name,
 if present, or nullotherwise.
- Since:
- 2.1.0
 
- 
getLocalAttributeNamesReturns the names of the local attributes, i.e. the one that have not been cascaded.- Returns:
- The local attribute names.
- Since:
- 2.1.0
 
- 
getCascadedAttributeNamesReturns the names of the cascaded attributes.- Returns:
- The cascaded attribute names.
- Since:
- 2.1.0
 
- 
putAttributeAdd the specified attribute. The attribute value will be available only in the current context, i.e. it is like callingputAttribute(String, Attribute, boolean)withcascade = false.- Parameters:
- name- name of the attribute
- value- value of the attribute
 
- 
putAttributeAdd the specified attribute.- Parameters:
- name- name of the attribute
- value- value of the attribute
- cascade- If- true, the attribute value will be available in all nested contexts. If- false, it will be available only in the current context.
- Since:
- 2.1.0
 
- 
clearvoid clear()Clear the attributes.
 
-