public class NotEmptyChooserPropertyDescriptor
extends atg.repository.ChooserPropertyDescriptor
getPropertyValue method iterates over the list
of property names and fetches the value. If the attribute value merge is set
to true (default false) and if the value is not empty, then it is added to a merged collection.
If no merging is supposed to occur then we just return the first non-empty value. If all the values are empty,
then null is returned.
The term empty means the following:
isIdProperty| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected boolean |
mMerge |
protected boolean |
mRemoveDuplicates |
mDebug, mPropertyNames, PROPERTIES_PARAMEMPTY_LIST, EMPTY_MAP, EMPTY_SET, FOREIGN_REPOSITORY_NAME, FOREIGN_REPOSITORY_PATH, mCollectionOrMapPORTABLE_VALUE_KEYBUNDLE_ATTRIBUTE_NAME, LOCALE_ATTRIBUTE_NAME| Constructor and Description |
|---|
NotEmptyChooserPropertyDescriptor()
Constructs an instanceof NotEmptyChooserPropertyDescriptor
|
NotEmptyChooserPropertyDescriptor(java.lang.String pPropertyName)
Constructs an instanceof NotEmptyChooserPropertyDescriptor
|
NotEmptyChooserPropertyDescriptor(java.lang.String pPropertyName,
java.lang.Class pPropertyType,
java.lang.String pShortDescription)
Constructs an instanceof NotEmptyChooserPropertyDescriptor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getPropertyValue(RepositoryItemImpl pItem,
java.lang.Object pValue)
Returns the first non-empty property value, from the list of property names
|
java.lang.String |
getTypeName()
Returns the name this type uses in the XML file.
|
protected java.lang.Object[] |
mergeIntoArray(RepositoryItemImpl pItem,
java.lang.Object pValue) |
protected java.util.List |
mergeIntoList(RepositoryItemImpl pItem,
java.lang.Object pValue) |
protected java.util.Map |
mergeIntoMap(RepositoryItemImpl pItem,
java.lang.Object pValue) |
protected java.util.Set |
mergeIntoSet(RepositoryItemImpl pItem,
java.lang.Object pValue) |
void |
setValue(java.lang.String pAttributeName,
java.lang.Object pValue)
Looks for an attribute named merge.
|
protected boolean |
useArray(java.lang.Object pObject) |
protected boolean |
useCollection(java.lang.Object pObject) |
protected boolean |
useList(java.lang.Object pObject) |
protected boolean |
useMap(java.lang.Object pObject) |
protected boolean |
useObject(java.lang.Object pObject)
Returns true if the object supplied is not "empty"
|
protected boolean |
useSet(java.lang.Object pObject) |
isQueryable, isWritable, logDebugclone, createPropertyDescriptorFromType, getCascadeDelete, getCascadeInsert, getCascadeUpdate, getComponentItemDescriptor, getComponentPropertyBeanInfo, getDefaultValue, getDefaultValueString, getEnumeratedValues, getItemDescriptor, getLocalizedResourceBundle, getPropertyBeanInfo, getPropertyItemDescriptor, getResourceBundle, getResourceBundleName, getSecureLogging, getSecureLoggingFormatter, getSecureLoggingString, getUnmodifiableDefaultValue, isAssignableFrom, isCacheable, isCollectionOrMap, isDerived, isIdProperty, isIgnoreNullValue, isLoggingDebug, isMultiValued, isPersistent, isSecureLogging, isValidValue, isVersionable, isVersionableSet, registerPropertyDescriptorClass, setCacheable, setCascadeDelete, setCascadeInsert, setCascadeUpdate, setComponentItemDescriptor, setDefaultValue, setDefaultValueString, setDerived, setIdProperty, setIgnoreNullValue, setItemDescriptor, setLoggingDebug, setPersistent, setPropertyItemDescriptor, setPropertyType, setPropertyValue, setQueryable, setResourceBundleName, setSecureLogging, setSecureLoggingFormatter, setVersionable, toStringcreateLocalePropertyEditor, createLocalePropertyEditor, createPropertyEditor, getComponentPropertyType, getLocale, getPropertyEditorClass, getPropertyType, getUIPropertyEditor, isReadable, isRequired, setComponentPropertyType, setPropertyEditorClass, setReadable, setRequired, setWritablecopyFeatureDescriptor, getDisplayName, getDisplayNameResource, getDisplaySortString, getShortDescription, getShortDescriptionResource, getSortString, setDisplayNameResource, setShortDescriptionResourcepublic static java.lang.String CLASS_VERSION
protected boolean mMerge
protected boolean mRemoveDuplicates
public NotEmptyChooserPropertyDescriptor()
public NotEmptyChooserPropertyDescriptor(java.lang.String pPropertyName)
public NotEmptyChooserPropertyDescriptor(java.lang.String pPropertyName,
java.lang.Class pPropertyType,
java.lang.String pShortDescription)
public java.lang.Object getPropertyValue(RepositoryItemImpl pItem, java.lang.Object pValue)
getPropertyValue in class atg.repository.ChooserPropertyDescriptorprotected java.util.List mergeIntoList(RepositoryItemImpl pItem, java.lang.Object pValue)
protected boolean useList(java.lang.Object pObject)
protected boolean useCollection(java.lang.Object pObject)
protected java.util.Set mergeIntoSet(RepositoryItemImpl pItem, java.lang.Object pValue)
protected boolean useSet(java.lang.Object pObject)
protected java.util.Map mergeIntoMap(RepositoryItemImpl pItem, java.lang.Object pValue)
protected boolean useMap(java.lang.Object pObject)
protected java.lang.Object[] mergeIntoArray(RepositoryItemImpl pItem, java.lang.Object pValue)
protected boolean useArray(java.lang.Object pObject)
protected boolean useObject(java.lang.Object pObject)
useObject in class atg.repository.ChooserPropertyDescriptorpublic void setValue(java.lang.String pAttributeName,
java.lang.Object pValue)
setValue in class atg.repository.ChooserPropertyDescriptorpublic java.lang.String getTypeName()
getTypeName in class atg.repository.ChooserPropertyDescriptor