com.opensymphony.module.propertyset
Class PropertySchema

java.lang.Object
  |
  +--com.opensymphony.module.propertyset.PropertySchema
All Implemented Interfaces:
java.io.Serializable

public class PropertySchema
extends java.lang.Object
implements java.io.Serializable

Describes the meta data for a given property. The meta data for a property includes its type as well as any verifiers that constrain it. todo: add multiplicity?

Version:
$Revision: 1.7 $
Author:
Hani Suleiman
See Also:
Serialized Form

Constructor Summary
PropertySchema()
           
PropertySchema(java.lang.String name)
           
 
Method Summary
 boolean addVerifier(PropertyVerifier pv)
           
 java.lang.String getPropertyName()
           
 int getType()
           
 java.util.Collection getVerifiers()
          Returns unmodifiable List of verifiers.
 boolean removeVerifier(PropertyVerifier pv)
           
 void setPropertyName(java.lang.String s)
           
 void setType(int type)
           
 void validate(java.lang.Object value)
          Validate a given value against all verifiers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySchema

public PropertySchema()

PropertySchema

public PropertySchema(java.lang.String name)
Method Detail

setPropertyName

public void setPropertyName(java.lang.String s)

getPropertyName

public java.lang.String getPropertyName()

setType

public void setType(int type)

getType

public int getType()

addVerifier

public boolean addVerifier(PropertyVerifier pv)

removeVerifier

public boolean removeVerifier(PropertyVerifier pv)

getVerifiers

public java.util.Collection getVerifiers()
Returns unmodifiable List of verifiers.

validate

public void validate(java.lang.Object value)
              throws PropertyException
Validate a given value against all verifiers. Default behaviour is to AND all verifiers.

See www.opensymphony.com for more information.