|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.clay.config.beans.AbstractBean org.apache.shale.clay.config.beans.ComponentBean
public class ComponentBean
This is the base class of most of the metadata that is used by the
Clay
component to build
a component subtree.
ClayXmlParser
- from XML config files
Builder
- extending classes
Clay
- shapeValidator
a validator
style of event method binding
Constructor Summary | |
---|---|
ComponentBean()
|
Method Summary | |
---|---|
void |
addActionListener(ActionListenerBean bean)
Adds an ActionListenerBean to the actionListeners set. |
void |
addAttribute(AttributeBean obj)
Adds a AttributeBean to the attributes Map collection where
the name property is the key identifier in the value pair relationship. |
void |
addChild(ElementBean obj)
Adds a child ElementBean to the children set and
fixes up the composition parent relationship. |
void |
addConverter(ConverterBean bean)
Adds a ConverterBean and assigns the composition parent. |
void |
addSymbol(SymbolBean symbol)
Adds a symbol identified by the SymbolBean to the symbols collection. |
void |
addValidator(ValidatorBean bean)
Adds a ValidatorBean and assigns the composition parent. |
void |
addValueChangeListener(ValueChangeListenerBean bean)
Adds a ValueChangeListenerBean to the set where each instance is
uniquely identified by jsfid . |
int |
compareTo(Object obj)
This Comparable implementation makes the
jsfid attribute the unique identifier for the object in a
set. |
Iterator |
getActionListenerIterator()
Returns an Iterator for the actionListeners set of
ActionListenerBean . |
Collection |
getActionListeners()
Returns a Collection of ActionListenerBean . |
String |
getAllowBody()
This property only applies when using the Clay
template features. |
AttributeBean |
getAttribute(String key)
Returns a AttributeBean by the classes name property. |
Iterator |
getAttributeIterator()
This inner class provides implementation for an Iterator handeling
AttributeBean objects in the attributes collection. |
Map |
getAttributes()
Returns the a Map collection of AttributeBean objects. |
Collection |
getChildren()
Returns a set of children that are instances of ElementBean . |
Iterator |
getChildrenIterator()
Returns a Iterator to the children set. |
String |
getComponentType()
Returns the component type that is used to instantiate the associated JSF component. |
ComponentBean |
getConverter()
Gets a meta converter bean used to instantiate a jsf Converter . |
String |
getExtends()
Returns the jsfid of the meta component that this
instance inherits from. |
String |
getFacetName()
Returns the facet name that will be used as the identifier when adding the component to the parent facets collection. |
StringBuffer |
getHasAClientId()
Returns a xpath like string describing how this component fits into the overall composition. |
ComponentBean |
getHasAParent()
Returns the parent component that aggregates this object. |
String |
getId()
Returns the identifier that will populate the JSF UIComponent.id
property and is used to name the component within the tree. |
StringBuffer |
getIsAClientId()
Returns an xpath like string that describes the heritage of this component. |
ComponentBean |
getIsAParent()
Returns the parent component that generalizes this object. |
boolean |
getIsBodyAllowed()
Returns a boolean representation of the allowBody property. |
String |
getJsfid()
Returns the unique meta component identifier. |
long |
getJspId()
Returns a unique id that will stick to the config bean. |
SymbolBean |
getSymbol(String name)
Returns a SymbolBean from the symbols
Map by name . |
Map |
getSymbols()
Returns the replacement symbols assigned to the component. |
Iterator |
getValidatorIterator()
Returns a Iterator to the validator set. |
Collection |
getValidators()
Returns a Collection of meta validators used to create jsf Validator
object instances. |
Iterator |
getValueChangeListenerIterator()
Returns a Iterator for the valueChangeListener set
of ValueChangeListenerBean . |
Collection |
getValueChangeListeners()
Returns a Iterator to the valueChangeListeners set. |
boolean |
isInheritanceFinal()
Returns a boolean flag indicating that the meta inheritances has been resolved. |
void |
setActionListeners(Collection collection)
Merges two collections where items in the source collection will override those in the target collection of ActionListenerBean by the jsfid
property. |
void |
setAllowBody(String allowBody)
This property only applies when using the Clay
template features. |
void |
setAttributes(Map map)
Merges a set of AttributeBean where items in the source
collection override items in the target collection by the object's
jsfid property. |
void |
setChildren(Collection collection)
Merges two sets of children ElementBean . |
void |
setComponentType(String componentType)
Sets the component type uses by abstract factories to instantiate associated JSF resources. |
void |
setExtends(String extendsElementId)
Sets the jsfid of the meta component that this meta
component inherits from. |
void |
setFacetName(String facetName)
Sets the facet name that will be used as the identifier when adding the component to the parent facets collection. |
void |
setHasAParent(ComponentBean bean)
Sets the parent that owns this component. |
void |
setId(String id)
Sets the identifier that is used to populate the JSF UIComponent.id
property. |
void |
setInheritanceFinal(boolean b)
Sets a boolean flag indicating that the meta inheritances have been resolved. |
void |
setIsAParent(ComponentBean bean)
Sets the component that this instance extends. |
void |
setJsfid(String jsfid)
Sets the unique meta component identifier. |
void |
setValidators(Collection collection)
Adds a collection of ValidatorBean to the validator set. |
void |
setValueChangeListeners(Collection collection)
Merges a collection of ValueChangeListenerBean where items in the
source collection with the same jsfid will override items
in the target set with the same identifier. |
String |
toString()
|
Methods inherited from class org.apache.shale.clay.config.beans.AbstractBean |
---|
getDescription, setDescription |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ComponentBean()
Method Detail |
---|
public long getJspId()
Returns a unique id that will stick to the config bean.
It represents its compositional relationship within the subtree.
This is clay's version of the JspIdConsumer
in JSP 2.1.
public String getAllowBody()
This property only applies when using the Clay
template features. A true
value is returned if the HTML child nodes under
the node that this meta component is bound to should be rendered; otherwise, a "false"
value is returned indicating the child nodes should be ignored.
public void setAllowBody(String allowBody)
This property only applies when using the Clay
template features. Sets a Boolean string value that indicating if the child HTML nodes
under the node that this component is bound to should render or ignore its child nodes.
allowBody
- indicates how the child markup nodes are processedpublic boolean getIsBodyAllowed()
Returns a boolean representation of the allowBody
property.
The default is true
true
if allowBody has a literal string value of "true"public String getFacetName()
Returns the facet name that will be used as the identifier when adding the component to the parent facets collection.
public void setFacetName(String facetName)
Sets the facet name that will be used as the identifier when adding the component to the parent facets collection.
facetName
- component groupingpublic String toString()
toString
in class Object
public String getComponentType()
Returns the component type that is used to instantiate the associated JSF component.
public String getExtends()
Returns the jsfid
of the meta component that this
instance inherits from.
public void setComponentType(String componentType)
Sets the component type uses by abstract factories to instantiate associated JSF resources.
componentType
- used to create a JSF resourcepublic void setExtends(String extendsElementId)
Sets the jsfid
of the meta component that this meta
component inherits from.
extendsElementId
- extending jsfidpublic Iterator getChildrenIterator()
Returns a Iterator
to the children
set.
Each item in the set is uniquely identified by its
renderId
property and an instance of ElementBean
.
public Collection getChildren()
Returns a set of children that are instances of ElementBean
.
public void setChildren(Collection collection)
Merges two sets of children ElementBean
. Items in the source
collection will replace those in the target with the same renderId
collection
- of child componentspublic void addChild(ElementBean obj)
Adds a child ElementBean
to the children
set and
fixes up the composition parent relationship.
obj
- element bean added as a childpublic int compareTo(Object obj)
This Comparable
implementation makes the
jsfid
attribute the unique identifier for the object in a
set.
compareTo
in interface Comparable
obj
- target object to compare to
public ComponentBean getConverter()
Gets a meta converter bean used to instantiate a jsf Converter
.
public void addConverter(ConverterBean bean)
Adds a ConverterBean
and assigns the composition parent.
bean
- converter assigned to this componentpublic Collection getValidators()
Returns a Collection
of meta validators used to create jsf Validator
object instances.
public void setValidators(Collection collection)
Adds a collection of ValidatorBean
to the validator
set. Each
instance is uniquely identified in the collection by the jsfid
.
collection
- of validators added to the componentpublic Iterator getValidatorIterator()
Returns a Iterator
to the validator
set. Each
object will be an instance of ValidatorBean
.
public void addValidator(ValidatorBean bean)
Adds a ValidatorBean
and assigns the composition parent.
bean
- validator to add to the componentpublic Collection getValueChangeListeners()
Returns a Iterator
to the valueChangeListeners
set.
Each ValueChangeListenerBean
in the collection is uniquely identified
by jsfid
.
public void setValueChangeListeners(Collection collection)
Merges a collection of ValueChangeListenerBean
where items in the
source collection with the same jsfid
will override items
in the target set with the same identifier.
collection
- of value change listeners added to the componentpublic Iterator getValueChangeListenerIterator()
Returns a Iterator
for the valueChangeListener
set
of ValueChangeListenerBean
.
public void addValueChangeListener(ValueChangeListenerBean bean)
Adds a ValueChangeListenerBean
to the set where each instance is
uniquely identified by jsfid
.
bean
- value change listener added to the components collection of listenerspublic Collection getActionListeners()
Returns a Collection
of ActionListenerBean
.
public void setActionListeners(Collection collection)
Merges two collections where items in the source collection will override
those in the target collection of ActionListenerBean
by the jsfid
property.
collection
- of action listeners added to the components setpublic Iterator getActionListenerIterator()
Returns an Iterator
for the actionListeners
set of
ActionListenerBean
.
public void addActionListener(ActionListenerBean bean)
Adds an ActionListenerBean
to the actionListeners
set. Each
instance is uniquely identified by the jsfid
property.
bean
- action listener added to the componentpublic Iterator getAttributeIterator()
This inner class provides implementation for an Iterator
handeling
AttributeBean
objects in the attributes
collection.
public AttributeBean getAttribute(String key)
Returns a AttributeBean
by the classes name
property.
key
- attribute name
public void addAttribute(AttributeBean obj)
Adds a AttributeBean
to the attributes
Map collection where
the name
property is the key identifier in the value pair relationship.
obj
- attribute bean added to the attributes Mappublic Map getAttributes()
Returns the a Map
collection of AttributeBean
objects.
public String getJsfid()
Returns the unique meta component identifier.
public void setAttributes(Map map)
Merges a set of AttributeBean
where items in the source
collection override items in the target collection by the object's
jsfid
property.
map
- of attributes to be mergedpublic void setJsfid(String jsfid)
Sets the unique meta component identifier.
jsfid
- identifierpublic ComponentBean getHasAParent()
Returns the parent component that aggregates this object.
public ComponentBean getIsAParent()
Returns the parent component that generalizes this object.
public void setHasAParent(ComponentBean bean)
Sets the parent that owns this component.
bean
- composition parentpublic void setIsAParent(ComponentBean bean)
Sets the component that this instance extends.
bean
- inheritance parentpublic StringBuffer getHasAClientId()
Returns a xpath like string describing how this component fits into the overall composition.
public StringBuffer getIsAClientId()
Returns an xpath like string that describes the heritage of this component.
public boolean isInheritanceFinal()
Returns a boolean flag indicating that the meta inheritances has been resolved.
true
if inheritance has been resolvedpublic void setInheritanceFinal(boolean b)
Sets a boolean flag indicating that the meta inheritances have been resolved.
b
- true
if inheritance has been resolvedpublic String getId()
Returns the identifier that will populate the JSF UIComponent.id
property and is used to name the component within the tree.
public void setId(String id)
Sets the identifier that is used to populate the JSF UIComponent.id
property.
id
- component's identifierpublic void addSymbol(SymbolBean symbol)
Adds a symbol identified by the
SymbolBean
to the symbols collection.
symbol
- added to the symbols Mappublic Map getSymbols()
Returns the replacement symbols assigned to the component.
The key value represents the literal replacement string.
The value Map property represents target SymbolBean
.
public SymbolBean getSymbol(String name)
Returns a SymbolBean
from the symbols
Map by name
. Prepends a '@' character to the
name
if it doesn't exist.
name
- of the symbol
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |