|
|||||||||
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 atg.repository.RepositoryPropertyDescriptor atg.repository.ChooserPropertyDescriptor atg.repository.NotEmptyChooserPropertyDescriptor
public class NotEmptyChooserPropertyDescriptor
A property descriptor to be used with a Repository that returns the first object
that is not empty or the merged collection of all non-empty values.
The 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:
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected boolean |
mMerge
|
protected boolean |
mRemoveDuplicates
|
Fields inherited from class atg.repository.ChooserPropertyDescriptor |
---|
mDebug, mPropertyNames, PROPERTIES_PARAM |
Fields inherited from class atg.repository.RepositoryPropertyDescriptor |
---|
EMPTY_LIST, EMPTY_MAP, EMPTY_SET, FOREIGN_REPOSITORY_NAME, FOREIGN_REPOSITORY_PATH, mCollectionOrMap |
Fields inherited from class atg.beans.DynamicPropertyDescriptor |
---|
PORTABLE_VALUE_KEY |
Fields inherited from class atg.beans.SerializableFeatureDescriptor |
---|
BUNDLE_ATTRIBUTE_NAME, LOCALE_ATTRIBUTE_NAME |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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)
|
Methods inherited from class atg.repository.ChooserPropertyDescriptor |
---|
isQueryable, isWritable, logDebug |
Methods inherited from class atg.beans.SerializableFeatureDescriptor |
---|
copyFeatureDescriptor, getDisplayName, getDisplayNameResource, getDisplaySortString, getShortDescription, getShortDescriptionResource, getSortString, setDisplayNameResource, setShortDescriptionResource |
Methods inherited from class java.beans.FeatureDescriptor |
---|
attributeNames, getName, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected boolean mMerge
protected boolean mRemoveDuplicates
Constructor Detail |
---|
public NotEmptyChooserPropertyDescriptor()
public NotEmptyChooserPropertyDescriptor(java.lang.String pPropertyName)
public NotEmptyChooserPropertyDescriptor(java.lang.String pPropertyName, java.lang.Class pPropertyType, java.lang.String pShortDescription)
Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |