|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.beans.FeatureDescriptor atg.beans.SerializableFeatureDescriptor atg.beans.DynamicPropertyDescriptor
public class DynamicPropertyDescriptor
This class is used to describe an individual dynamic property accessible via a DynamicPropertyMapper. It is similar to PropertyDescriptor in spirit.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
PORTABLE_VALUE_KEY
|
Fields inherited from class atg.beans.SerializableFeatureDescriptor |
---|
BUNDLE_ATTRIBUTE_NAME, LOCALE_ATTRIBUTE_NAME |
Constructor Summary | |
---|---|
DynamicPropertyDescriptor()
Constructs a new DynamicPropertyDescriptor. |
|
DynamicPropertyDescriptor(DynamicPropertyDescriptor pDesc)
Constructs a DynamicPropertyDescriptor instance based on an existing DynamicPropertyDescriptor. |
|
DynamicPropertyDescriptor(java.beans.PropertyDescriptor pDesc)
Constructs a DynamicPropertyDescriptor instance based on a regular java.beans.PropertyDescriptor. |
|
DynamicPropertyDescriptor(java.lang.String pPropertyName)
Constructs a new DynamicPropertyDescriptor. |
Method Summary | |
---|---|
java.beans.PropertyEditor |
createLocalePropertyEditor()
Returns a new localized PropertyEditor instance that can edit this property for the default Locale. |
java.beans.PropertyEditor |
createLocalePropertyEditor(java.util.Locale pLocale)
Returns a new localized PropertyEditor instance that can edit this property. |
java.beans.PropertyEditor |
createPropertyEditor()
Returns a new PropertyEditor instance that can edit this property. |
DynamicBeanInfo |
getComponentPropertyBeanInfo()
If this is a multi-valued property, this method returns the DynamicBeanInfo for an element of the property. |
java.lang.Class |
getComponentPropertyType()
|
DynamicBeanInfo |
getPropertyBeanInfo()
Get a DynamicBeanInfo describing the type of this property. |
java.lang.Class |
getPropertyEditorClass()
The optional class of this property's PropertyEditor implementation. |
java.lang.Class |
getPropertyType()
The Java type info for the property. |
java.beans.PropertyEditor |
getUIPropertyEditor()
Returns a cached localized PropertyEditor instance for this DynamicPropertyDescriptor. |
boolean |
isMultiValued()
Returns true if this property represents a multi-valued property. |
boolean |
isReadable()
Returns property Readable |
boolean |
isRequired()
Returns property Required |
boolean |
isWritable()
Returns property Writable |
void |
setComponentPropertyType(java.lang.Class pComponentPropertyType)
Sets the property ComponentPropertyType. |
void |
setPropertyEditorClass(java.lang.Class pPropertyEditorClass)
Sets property PropertyEditorClass: the optional class of this property's PropertyEditor implementation. |
void |
setPropertyType(java.lang.Class pPropertyType)
Sets property PropertyType: the class which this property can be expected to have at runtime. |
void |
setReadable(boolean pReadable)
Sets property Readable -- indicates whether this dynamic property is readable. |
void |
setRequired(boolean pRequired)
Sets property Required, indicating whether this dynamic property is required to be non-null in a valid object. |
void |
setWritable(boolean pWritable)
Sets property Writable, indicating whether this dynamic property can be written. |
Methods inherited from class atg.beans.SerializableFeatureDescriptor |
---|
copyFeatureDescriptor, getDisplayName, getDisplayNameResource, getDisplaySortString, getResourceBundle, getShortDescription, getShortDescriptionResource, getSortString, setDisplayNameResource, setShortDescriptionResource, toString |
Methods inherited from class java.beans.FeatureDescriptor |
---|
attributeNames, getName, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String PORTABLE_VALUE_KEY
Constructor Detail |
---|
public DynamicPropertyDescriptor()
public DynamicPropertyDescriptor(java.lang.String pPropertyName)
public DynamicPropertyDescriptor(java.beans.PropertyDescriptor pDesc)
public DynamicPropertyDescriptor(DynamicPropertyDescriptor pDesc)
Method Detail |
---|
public void setReadable(boolean pReadable)
public boolean isReadable()
public void setWritable(boolean pWritable)
public boolean isWritable()
public void setRequired(boolean pRequired)
public boolean isRequired()
public java.beans.PropertyEditor createPropertyEditor()
For dynamic properties this approach is preferable to getPropertyEditorClass(), the corresponding method in java.beans.PropertyDescriptor, since the conversion methods and allowed values of dynamic properties may need to be determined at runtime.
This default implementation simply looks up in nucleus' property editor repository for the property editor for this class. Subclass DynamicPropertyDescriptor if the PropertyEditor depends on other information at runtime - i.e not just the getPropertyType method.
public java.beans.PropertyEditor createLocalePropertyEditor(java.util.Locale pLocale)
This differs from the above method in that the locale-specific editor can vary according to the given locale.
pLocale
- the Locale for which the localized editor should be
created, or null for the default locale.public java.beans.PropertyEditor createLocalePropertyEditor()
public final java.beans.PropertyEditor getUIPropertyEditor()
public void setPropertyType(java.lang.Class pPropertyType)
public java.lang.Class getPropertyType()
public DynamicBeanInfo getPropertyBeanInfo() throws java.beans.IntrospectionException
By default, it returns a DynamicBeanInfo for the Class returned by getPropertyType(). Note: a DynamicPropertyDescriptor that has been subjected to serialization/deserialization must include enough state to permit this method to work.
java.beans.IntrospectionException
public DynamicBeanInfo getComponentPropertyBeanInfo() throws java.beans.IntrospectionException
By default, it returns the DynamicBeanInfo that corresponds to the class returned from getComponentPropertyType. If this is single valued property, this returns null. Note: a DynamicPropertyDescriptor that has been subjected to serialization/deserialization must include enough state to permit this method to work.
java.beans.IntrospectionException
public void setPropertyEditorClass(java.lang.Class pPropertyEditorClass)
public java.lang.Class getPropertyEditorClass()
public boolean isMultiValued()
public void setComponentPropertyType(java.lang.Class pComponentPropertyType)
pComponentPropertyType
- new value to setpublic java.lang.Class getComponentPropertyType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |