org.apache.tapestry.spec
Class ParameterSpecification

java.lang.Object
  extended by org.apache.tapestry.spec.BaseLocatable
      extended by org.apache.tapestry.spec.ParameterSpecification
All Implemented Interfaces:
ILocatable, ILocationHolder, IParameterSpecification

public class ParameterSpecification
extends BaseLocatable
implements IParameterSpecification

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

TBD: Identify arrays in some way.

Version:
$Id: ParameterSpecification.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
ParameterSpecification()
           
 
Method Summary
 String getDefaultValue()
          Returns the default value of the JavaBeans property if no binding is provided or null if it has not been specified
 String getDescription()
          Returns the documentation for this parameter.
 Direction getDirection()
          Returns the parameter value direction, defaulting to Direction.CUSTOM if not otherwise specified.
 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 isRequired()
          Returns true if the parameter is required by the component.
 void setDefaultValue(String defaultValue)
          Sets the default value of the JavaBeans property if no binding is provided
 void setDescription(String description)
          Sets the documentation for this parameter.
 void setDirection(Direction direction)
           
 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 class org.apache.tapestry.spec.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Constructor Detail

ParameterSpecification

public ParameterSpecification()
Method Detail

getType

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

Specified by:
getType in interface IParameterSpecification

isRequired

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

Specified by:
isRequired in interface IParameterSpecification

setRequired

public void setRequired(boolean value)
Specified by:
setRequired in interface IParameterSpecification

setType

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

Specified by:
setType in interface IParameterSpecification

getDescription

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

Specified by:
getDescription in interface IParameterSpecification
Since:
1.0.9

setDescription

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

Specified by:
setDescription in interface IParameterSpecification
Since:
1.0.9

setPropertyName

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

Specified by:
setPropertyName in interface IParameterSpecification

getPropertyName

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

Specified by:
getPropertyName in interface IParameterSpecification

getDirection

public Direction getDirection()
Returns the parameter value direction, defaulting to Direction.CUSTOM if not otherwise specified.

Specified by:
getDirection in interface IParameterSpecification

setDirection

public void setDirection(Direction direction)
Specified by:
setDirection in interface IParameterSpecification

getDefaultValue

public String getDefaultValue()
Description copied from interface: IParameterSpecification
Returns the default value of the JavaBeans property if no binding is provided or null if it has not been specified

Specified by:
getDefaultValue in interface IParameterSpecification
See Also:
IParameterSpecification.getDefaultValue()

setDefaultValue

public void setDefaultValue(String defaultValue)
Description copied from interface: IParameterSpecification
Sets the default value of the JavaBeans property if no binding is provided

Specified by:
setDefaultValue in interface IParameterSpecification
See Also:
IParameterSpecification.setDefaultValue(java.lang.String)