|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
,
IContainedComponent
,
IComponentSpecification
,
IPageLoader
Method Summary | |
void |
addAsset(String name,
IAssetSpecification asset)
|
void |
addBeanSpecification(String name,
IBeanSpecification specification)
|
void |
addComponent(String id,
IContainedComponent component)
|
void |
addParameter(String name,
IParameterSpecification spec)
Adds the parameter. |
void |
addPropertySpecification(IPropertySpecification spec)
Adds a new property specification. |
void |
addReservedParameterName(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). |
IAssetSpecification |
getAsset(String name)
Returns the IAssetSpecification with the given name, or null
if no such specification exists. |
List |
getAssetNames()
Returns a List
of the String names of all assets, in alphabetical
order |
Collection |
getBeanNames()
Returns an unmodifiable collection of the names of all beans. |
IBeanSpecification |
getBeanSpecification(String name)
Returns the IBeanSpecification for the given name, or null
if not such specification exists. |
IContainedComponent |
getComponent(String id)
Returns the specification of a contained component with the given id, or null if no such contained component exists. |
String |
getComponentClassName()
|
List |
getComponentIds()
Returns an List
of the String names of the IContainedComponent s
for this component. |
String |
getDescription()
Returns the documentation for this component. |
IParameterSpecification |
getParameter(String name)
Returns the specification of a parameter with the given name, or null if no such parameter exists. |
List |
getParameterNames()
Returns a List of of String names of all parameters. |
IPropertySpecification |
getPropertySpecification(String name)
Returns the named IPropertySpecification ,
or null if no such specification exist. |
List |
getPropertySpecificationNames()
Returns a sorted, immutable list of the names of all IPropertySpecification s. |
String |
getPublicId()
Returns the XML Public Id for the specification file, or null if not applicable. |
IResourceLocation |
getSpecificationLocation()
|
boolean |
isPageSpecification()
Returns true if the specification is known to be a page specification and not a component specification. |
boolean |
isReservedParameterName(String value)
Returns true if the value specified is in the reserved name list. |
void |
setAllowBody(boolean value)
|
void |
setAllowInformalParameters(boolean value)
|
void |
setComponentClassName(String value)
|
void |
setDescription(String description)
Sets the documentation for this component. |
void |
setPageSpecification(boolean pageSpecification)
|
void |
setPublicId(String publicId)
|
void |
setSpecificationLocation(IResourceLocation specificationLocation)
|
Methods inherited from interface org.apache.tapestry.util.IPropertyHolder |
getProperty, getPropertyNames, removeProperty, setProperty |
Methods inherited from interface org.apache.tapestry.ILocationHolder |
setLocation |
Methods inherited from interface org.apache.tapestry.ILocatable |
getLocation |
Method Detail |
public void addAsset(String name, IAssetSpecification asset)
IllegalArgumentException
- if the name already exists.public void addComponent(String id, IContainedComponent component)
IllegalArgumentException
- if the id is already defined.public void addParameter(String name, IParameterSpecification spec)
IllegalArgumentException
- if the name already exists.public boolean getAllowBody()
setAllowBody(boolean)
public boolean getAllowInformalParameters()
The default value is true.
setAllowInformalParameters(boolean)
public IAssetSpecification getAsset(String name)
IAssetSpecification
with the given name, or null
if no such specification exists.
addAsset(String,IAssetSpecification)
public List getAssetNames()
List
of the String names of all assets, in alphabetical
order
public IContainedComponent getComponent(String id)
addComponent(String, IContainedComponent)
public String getComponentClassName()
public List getComponentIds()
List
of the String names of the IContainedComponent
s
for this component.
addComponent(String, IContainedComponent)
public IParameterSpecification getParameter(String name)
addParameter(String, IParameterSpecification)
public List getParameterNames()
addParameter(String, IParameterSpecification)
public void setAllowBody(boolean value)
public void setAllowInformalParameters(boolean value)
public void setComponentClassName(String value)
public void addBeanSpecification(String name, IBeanSpecification specification)
IllegalArgumentException
- if the bean already has a specification.public IBeanSpecification getBeanSpecification(String name)
IBeanSpecification
for the given name, or null
if not such specification exists.
public Collection getBeanNames()
public void addReservedParameterName(String value)
public boolean isReservedParameterName(String value)
public String getDescription()
public void setDescription(String description)
public String getPublicId()
This method exists as a convienience for the Spindle plugin. A previous method used an arbitrary version string, the public id is more useful and less ambiguous.
public void setPublicId(String publicId)
public boolean isPageSpecification()
public void setPageSpecification(boolean pageSpecification)
public IResourceLocation getSpecificationLocation()
public void setSpecificationLocation(IResourceLocation specificationLocation)
public void addPropertySpecification(IPropertySpecification spec)
public List getPropertySpecificationNames()
IPropertySpecification
s.
public IPropertySpecification getPropertySpecification(String name)
IPropertySpecification
,
or null if no such specification exist.
addPropertySpecification(IPropertySpecification)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |