org.apache.myfaces.extensions.validator.core.property
Interface PropertyInformation

All Known Implementing Classes:
DefaultPropertyInformation

public interface PropertyInformation

Contains all the information of a property (e.g. PropertyDetails) MetaDataEntry's are considered as a special kind of information and separate methods are created for them.

Since:
1.x.1
Author:
Gerhard Petracek

Method Summary
 void addMetaDataEntry(MetaDataEntry metaDataEntry)
          Adds the given MetaDataEntry
 boolean containsInformation(String key)
          Verifies if we have information for the given key.
 Object getInformation(String key)
          Returns the information for the given key.
<T> T
getInformation(String key, Class<T> targetClass)
          In addition to PropertyInformation#getInformation(java.lang.String) it casts to the given type.
 MetaDataEntry[] getMetaDataEntries()
          Returns an immutable array which contains the MetaDataEntrys which were created for the property.
 void resetMetaDataEntries()
          removes all MetaDataEntrys.
 void setInformation(String key, Object value)
          Stores the given value and links it to the given key.
 

Method Detail

containsInformation

boolean containsInformation(String key)
Verifies if we have information for the given key. Some predefined keys are defined in PropertyInformationKeys.

Parameters:
key - key of the information.
Returns:
true if the instance is aware of an information which is linked to the given key

getInformation

Object getInformation(String key)
Returns the information for the given key.

Parameters:
key - key for the requested information
Returns:
the object (or null) which is linked to the given key

getInformation

<T> T getInformation(String key,
                     Class<T> targetClass)
In addition to PropertyInformation#getInformation(java.lang.String) it casts to the given type.

Type Parameters:
T - Type declaration for generics.
Parameters:
key - key for the requested information
targetClass - target class type
Returns:
the object (or null) which is linked to the given key
See Also:
getInformation(java.lang.String)

setInformation

void setInformation(String key,
                    Object value)
Stores the given value and links it to the given key.

Parameters:
key - key of the information.
value - value as information for the key.

getMetaDataEntries

MetaDataEntry[] getMetaDataEntries()
Returns an immutable array which contains the MetaDataEntrys which were created for the property.

Returns:
all MetaDataEntrys

addMetaDataEntry

void addMetaDataEntry(MetaDataEntry metaDataEntry)
Adds the given MetaDataEntry

Parameters:
metaDataEntry - MetaDataEntry to store.

resetMetaDataEntries

void resetMetaDataEntries()
removes all MetaDataEntrys.



Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.