org.apache.tapestry.spec
Class PropertySpecification

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.spec.PropertySpecification
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IPropertySpecification

public class PropertySpecification
extends org.apache.hivemind.impl.BaseLocatable
implements IPropertySpecification

Defines a transient or persistant property of a component or page. A IComponentClassEnhanceruses this information to create a subclass with the necessary instance variables and methods.

Since:
3.0
Author:
Howard Lewis Ship

Constructor Summary
PropertySpecification()
           
 
Method Summary
 java.lang.String getInitialValue()
          Returns the initial value for this property, as a binding reference.
 java.lang.String getName()
           
 java.lang.String getPersistence()
          If null, then the property is not persistent.
 java.lang.String getType()
          The type of property to create, or null if no type was specified.
 boolean isPersistent()
          Returns true if IPropertySpecification.getPersistence()is null.
 void setInitialValue(java.lang.String initialValue)
           
 void setName(java.lang.String name)
          Sets the name of the property.
 void setPersistence(java.lang.String persistence)
          A string indicating how the property is persisted.
 void setType(java.lang.String type)
           
 
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

PropertySpecification

public PropertySpecification()
Method Detail

getInitialValue

public java.lang.String getInitialValue()
Description copied from interface: IPropertySpecification
Returns the initial value for this property, as a binding reference. May return null if the property has no initial value. The initial value is from finishLoad() and re-applied in pageDetached().

Specified by:
getInitialValue in interface IPropertySpecification

getName

public java.lang.String getName()
Specified by:
getName in interface IPropertySpecification

isPersistent

public boolean isPersistent()
Description copied from interface: IPropertySpecification
Returns true if IPropertySpecification.getPersistence()is null.

Specified by:
isPersistent in interface IPropertySpecification

getType

public java.lang.String getType()
The type of property to create, or null if no type was specified. The value is the name of a primitive type, a fully qualified class name, or an array name for either. Type is only specified for 3.0 DTDs, in 4.0 the only behavior is for the new property to match the type defined by an abstract accessor, or to be java.lang.Object.

Specified by:
getType in interface IPropertySpecification

setInitialValue

public void setInitialValue(java.lang.String initialValue)
Specified by:
setInitialValue in interface IPropertySpecification

setName

public void setName(java.lang.String name)
Sets the name of the property. This should not be changed once this IPropertySpecification is added to a ComponentSpecification.

Specified by:
setName in interface IPropertySpecification

setType

public void setType(java.lang.String type)
Specified by:
setType in interface IPropertySpecification

getPersistence

public java.lang.String getPersistence()
Description copied from interface: IPropertySpecification
If null, then the property is not persistent.

Specified by:
getPersistence in interface IPropertySpecification
Since:
4.0

setPersistence

public void setPersistence(java.lang.String persistence)
Description copied from interface: IPropertySpecification
A string indicating how the property is persisted.

Specified by:
setPersistence in interface IPropertySpecification
Since:
4.0