|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.primix.tapestry.util.BasePropertyHolder | +--com.primix.tapestry.spec.ComponentSpecification
A specification for a component, as read from an XML specification file.
A specification consists of
From this information, an actual component may be instantiated and initialized. Instantiating a component is usually a recursive process, since to initialize a container component, it is necessary to instantiate and initialize its contained components as well.
IComponent
,
ContainedComponent
,
IPageLoader
Constructor Summary | |
ComponentSpecification()
|
Method Summary | |
void |
addAsset(java.lang.String name,
AssetSpecification asset)
|
void |
addBeanSpecification(java.lang.String name,
BeanSpecification specification)
|
void |
addComponent(java.lang.String id,
ContainedComponent component)
|
void |
addParameter(java.lang.String name,
ParameterSpecification spec)
Adds the parameter. |
void |
addReservedParameterName(java.lang.String value)
Adds the value as a reserved name. |
boolean |
getAllowBody()
Returns true if the component is allowed to wrap other elements (static HTML or other components). |
boolean |
getAllowInformalParameters()
Returns true if the component allows informal parameters (parameters not formally defined). |
AssetSpecification |
getAsset(java.lang.String name)
Returns the AssetSpecification with the given name, or null
if no such specification exists. |
java.util.Collection |
getAssetNames()
Returns an unmodifiable Collection
of the String names of all assets. |
java.util.Collection |
getBeanNames()
Returns an unmodifiable collection of the names of all beans. |
BeanSpecification |
getBeanSpecification(java.lang.String name)
Returns the BeanSpecification for the given name, or null
if not such specification exists. |
ContainedComponent |
getComponent(java.lang.String id)
Returns the specification of a contained component with the given id, or null if no such contained component exists. |
java.lang.String |
getComponentClassName()
|
java.util.Collection |
getComponentIds()
Returns an umodifiable Collection
of the String names of the ContainedComponent s
for this component. |
ParameterSpecification |
getParameter(java.lang.String name)
Returns the specification of a parameter with the given name, or null if no such parameter exists. |
java.util.Collection |
getParameterNames()
Returns an umodifiable Collection
of String names of all parameters. |
java.lang.String |
getSpecificationResourcePath()
Returns the String used to identify the resource parsed to form this ComponentSpecification . |
boolean |
isReservedParameterName(java.lang.String value)
Returns true if the value specified is in the reserved name list. |
void |
setAllowBody(boolean value)
|
void |
setAllowInformalParameters(boolean value)
|
void |
setComponentClassName(java.lang.String value)
|
void |
setSpecificationResourcePath(java.lang.String value)
|
java.lang.String |
toString()
|
Methods inherited from class com.primix.tapestry.util.BasePropertyHolder |
getProperty, getPropertyNames, removeProperty, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ComponentSpecification()
Method Detail |
public void addAsset(java.lang.String name, AssetSpecification asset)
java.lang.IllegalArgumentException
- if the name already exists.public void addComponent(java.lang.String id, ContainedComponent component)
java.lang.IllegalArgumentException
- if the id is already defined.public void addParameter(java.lang.String name, ParameterSpecification spec)
java.lang.IllegalArgumentException
- if the name already exists.public boolean getAllowBody()
setAllowBody(boolean)
public boolean getAllowInformalParameters()
The default value is true.
setAllowInformalParameters(boolean)
public AssetSpecification getAsset(java.lang.String name)
AssetSpecification
with the given name, or null
if no such specification exists.addAsset(String,AssetSpecification)
public java.util.Collection getAssetNames()
Collection
of the String names of all assets.public ContainedComponent getComponent(java.lang.String id)
addComponent(String, ContainedComponent)
public java.lang.String getComponentClassName()
public java.util.Collection getComponentIds()
Collection
of the String names of the ContainedComponent
s
for this component.addComponent(String, ContainedComponent)
public ParameterSpecification getParameter(java.lang.String name)
addParameter(String, ParameterSpecification)
public java.util.Collection getParameterNames()
Collection
of String names of all parameters.addParameter(String, ParameterSpecification)
public java.lang.String getSpecificationResourcePath()
ComponentSpecification
.public void setAllowBody(boolean value)
public void setAllowInformalParameters(boolean value)
public void setComponentClassName(java.lang.String value)
public void setSpecificationResourcePath(java.lang.String value)
public void addBeanSpecification(java.lang.String name, BeanSpecification specification)
java.lang.IllegalArgumentException
- if the bean already has a specification.public BeanSpecification getBeanSpecification(java.lang.String name)
BeanSpecification
for the given name, or null
if not such specification exists.public java.util.Collection getBeanNames()
public void addReservedParameterName(java.lang.String value)
public boolean isReservedParameterName(java.lang.String value)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |