org.apache.tapestry.spec
Class ParameterSpecification

java.lang.Object
  |
  +--org.apache.hivemind.impl.BaseLocatable
        |
        +--org.apache.tapestry.spec.ParameterSpecification
All Implemented Interfaces:
IParameterSpecification, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder

public class ParameterSpecification
extends org.apache.hivemind.impl.BaseLocatable
implements IParameterSpecification

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

TBD: Identify arrays in some way.

Author:
Howard Lewis Ship

Constructor Summary
ParameterSpecification()
           
 
Method Summary
 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 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 class org.apache.hivemind.impl.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.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

ParameterSpecification

public ParameterSpecification()
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.

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(java.lang.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 java.lang.String getDescription()
Returns the documentation for this parameter.

Specified by:
getDescription in interface IParameterSpecification
Since:
1.0.9

setDescription

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

Specified by:
setDescription in interface IParameterSpecification
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.

Specified by:
setPropertyName in interface IParameterSpecification

getPropertyName

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

Specified by:
getPropertyName in interface IParameterSpecification

getDefaultValue

public java.lang.String getDefaultValue()
Description copied from interface: IParameterSpecification
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).

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

setDefaultValue

public void setDefaultValue(java.lang.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)