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
 boolean getCache()
          Returns true if the parameter proeprty should cache the result of the binding.
 java.lang.String getDefaultBindingType()
           
 java.lang.String getDefaultValue()
          Returns the default value for the parameter (or null if the parameter has no default value).
 java.lang.String getDescription()
          Returns the documentation for this parameter.
 java.lang.String getPropertyName()
          Returns the name of the JavaBeans property to connect the parameter to.
 java.lang.String getType()
          Returns the class name of the expected type of the parameter.
 boolean isRequired()
          Returns true if the parameter is required by the component.
 void setCache(boolean cache)
           
 void setDefaultBindingType(java.lang.String bindingType)
          Sets the default binding type, used when a parameter is bound without specifying an explicit binding prefix.
 void setDefaultValue(java.lang.String defaultValue)
          Sets the default value of the JavaBeans property if no binding is provided
 void setDescription(java.lang.String description)
          Sets the documentation for this parameter.
 void setPropertyName(java.lang.String propertyName)
          Sets the property name (of the component class) to connect the parameter to.
 void setRequired(boolean value)
           
 void setType(java.lang.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

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


isRequired

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


setRequired

public void setRequired(boolean value)

setType

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


getDescription

public java.lang.String getDescription()
Returns the documentation for this parameter.

Since:
1.0.9

setDescription

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

Since:
1.0.9

setPropertyName

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


getPropertyName

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


getDefaultValue

public java.lang.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

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


setDefaultBindingType

public void setDefaultBindingType(java.lang.String bindingType)
Sets the default binding type, used when a parameter is bound without specifying an explicit binding prefix. May be null, in which case the default binding type is determined by whether the parameter is bound in an HTML template or in a page or component specification.

Since:
4.0
See Also:
BindingConstants, BindingUtils.getDefaultBindingType(IComponentSpecification, String, String)

getDefaultBindingType

public java.lang.String getDefaultBindingType()
Since:
4.0

getCache

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

Since:
4.0

setCache

public void setCache(boolean cache)
Since:
4.0