org.apache.tapestry.spec
Interface IParameterSpecification

All Superinterfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder
All Known Implementing Classes:
ParameterSpecification

public interface IParameterSpecification
extends org.apache.hivemind.LocationHolder

Defines a formal parameter to a component. An IParameterSpecification is contained by a IComponentSpecification.

TBD: Identify arrays in some way.

Author:
glongman@intelligentworks.com

Method Summary
 Collection getAliasNames()
          Returns a non-null collection of strings for the aliases of the parameter.
 boolean getCache()
          Returns true if the parameter property should cache the result of the binding.
 String getDefaultValue()
          Returns the default value for the parameter (or null if the parameter has no default value).
 String getDescription()
          Returns the documentation for this parameter.
 String getParameterName()
          Returns the (primary) name of the parameter.
 String getPropertyName()
          Returns the name of the JavaBeans property to connect the parameter to.
 String getType()
          Returns the class name of the expected type of the parameter.
 boolean isDeprecated()
          Returns true if the parameter is deprecated.
 boolean isRequired()
          Returns true if the parameter is required by the component.
 void setAliases(String nameList)
          Sets the list of aliases as a comma-seperated list.
 void setCache(boolean cache)
           
 void setDefaultValue(String defaultValue)
          Sets the default value of the JavaBeans property if no binding is provided.
 void setDeprecated(boolean deprecated)
           
 void setDescription(String description)
          Sets the documentation for this parameter.
 void setParameterName(String name)
           
 void setPropertyName(String propertyName)
          Sets the property name (of the component class) to connect the parameter to.
 void setRequired(boolean value)
           
 void setType(String value)
          Sets the type of value expected for the parameter.
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Method Detail

getType

String getType()
Returns the class name of the expected type of the parameter. The default value is java.lang.Object which matches anything.


isRequired

boolean isRequired()
Returns true if the parameter is required by the component. The default is false, meaning the parameter is optional.


setRequired

void setRequired(boolean value)

setType

void setType(String value)
Sets the type of value expected for the parameter. This can be left blank to indicate any type.


getDescription

String getDescription()
Returns the documentation for this parameter.

Since:
1.0.9

setDescription

void setDescription(String description)
Sets the documentation for this parameter.

Since:
1.0.9

setPropertyName

void setPropertyName(String propertyName)
Sets the property name (of the component class) to connect the parameter to.


getPropertyName

String getPropertyName()
Returns the name of the JavaBeans property to connect the parameter to.


getDefaultValue

String getDefaultValue()
Returns the default value for the parameter (or null if the parameter has no default value). Required parameters may not have a default value. The default value is a binding locator (a prefixed value, as with a binding element).


setDefaultValue

void setDefaultValue(String defaultValue)
Sets the default value of the JavaBeans property if no binding is provided.


getCache

boolean getCache()
Returns true if the parameter property should cache the result of the binding.

Since:
4.0

setCache

void setCache(boolean cache)
Since:
4.0

getParameterName

String getParameterName()
Returns the (primary) name of the parameter.

Since:
4.0

setParameterName

void setParameterName(String name)
Since:
4.0

getAliasNames

Collection getAliasNames()
Returns a non-null collection of strings for the aliases of the parameter. This is usually an empty list.

Since:
4.0

setAliases

void setAliases(String nameList)
Sets the list of aliases as a comma-seperated list.

Parameters:
nameList - a comma seperated list of names, which may be null or empty
Since:
4.0

isDeprecated

boolean isDeprecated()
Returns true if the parameter is deprecated. Deprecated parameter generate a warning when bound.

Since:
4.0

setDeprecated

void setDeprecated(boolean deprecated)
Since:
4.0


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.