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_PARAM
EMPTY_LIST, EMPTY_MAP, EMPTY_SET, FOREIGN_REPOSITORY_NAME, FOREIGN_REPOSITORY_PATH, IS_BACKING_MAP_PROPERTY, mCollectionOrMap, NULL_VALUE
PORTABLE_VALUE_KEY
BUNDLE_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, logDebug
clone, createPropertyDescriptorFromType, getAttributeNames, getCascadeDelete, getCascadeInsert, getCascadeUpdate, getComponentItemDescriptor, getComponentPropertyBeanInfo, getDefaultValue, getDefaultValueString, getEnumeratedLocalizedValuesMapping, getEnumeratedValues, getItemDescriptor, getLocalizedResourceBundle, getPropertyBeanInfo, getPropertyItemDescriptor, getResourceBundle, getResourceBundleName, getSecureLogging, getSecureLoggingFormatter, getSecureLoggingString, getUnmodifiableDefaultValue, getValue, isAssignableFrom, isCacheable, isCollectionOrMap, isDerived, isDynamicallyCreated, isIdProperty, isIgnoreNullValue, isLocalizable, isLoggingDebug, isMultiValued, isPersistent, isSecureLogging, isValidValue, isVersionable, isVersionableSet, registerPropertyDescriptorClass, setCacheable, setCascadeDelete, setCascadeInsert, setCascadeUpdate, setComponentItemDescriptor, setDefaultValue, setDefaultValueString, setDerived, setDynamicallyCreated, setIdProperty, setIgnoreNullValue, setItemDescriptor, setLoggingDebug, setPersistent, setPropertyItemDescriptor, setPropertyType, setPropertyValue, setQueryable, setResourceBundleName, setSecureLogging, setSecureLoggingFormatter, setVersionable, toString
createLocalePropertyEditor, createLocalePropertyEditor, createPropertyEditor, getComponentPropertyType, getLocale, getPropertyEditorClass, getPropertyType, getUIPropertyEditor, isReadable, isRequired, setComponentPropertyType, setPropertyEditorClass, setReadable, setRequired, setWritable
copyFeatureDescriptor, getCurrentLocale, getDisplayName, getDisplayName, getDisplayNameResource, getDisplaySortString, getLocalizedDisplayName, getLocalizedResourceBundle, getShortDescription, getShortDescriptionResource, getSortString, setDisplayNameResource, setShortDescriptionResource
public 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.ChooserPropertyDescriptor
protected 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.ChooserPropertyDescriptor
public void setValue(java.lang.String pAttributeName, java.lang.Object pValue)
setValue
in class atg.repository.ChooserPropertyDescriptor
public java.lang.String getTypeName()
getTypeName
in class atg.repository.ChooserPropertyDescriptor