org.apache.tapestry.spec
Class ParameterSpecification
java.lang.Object
|
+--org.apache.tapestry.spec.BaseLocatable
|
+--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,v 1.3 2003/04/15 18:14:11 glongman Exp $
- Author:
- Howard Lewis Ship
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParameterSpecification
public ParameterSpecification()
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