Package com.ptc.core.percolui
Class PersistedCollectionCustomAttributesDelegate
java.lang.Object
com.ptc.core.components.factory.AbstractDataUtility
com.ptc.core.percolui.PersistedCollectionCustomAttributesDelegate
- All Implemented Interfaces:
DataUtility
Abstract base class for delegates that customize the persisted collection contents table display to
include custom member attribute columns. Custom delegate classes must implement the four abstract
methods defined in this class to enable display of the custom attribute columns and values. In
addition, each custom attribute must have an identifier string that is unique across the entire system.
For each concrete sub-class delegate there must be a new service entry in service.properties.xconf:
For each custom attribute identifier there must be a new
<Option requestor="
serviceClass="
selector="null"
cardinality="duplicate"/>
/>
-
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetCustomAttributeDisplayLabel(String attributeId, Locale locale) Get display label for a custom attribute.abstract StringgetCustomAttributeDisplayValue(String attributeId, Locale locale) Get display value for a custom attribute.Get the custom attribute identifiers.abstract WTKeyedMapgetCustomAttributeMap(PersistedCollectionHolder holder, WTSet members) Get the custom attributes for members of a holder.Get the custom attributes data object.Methods inherited from class com.ptc.core.components.factory.AbstractDataUtility
getColumnDescriptor, getToolTip, setModelData
-
Method Details
-
getCustomAttributeIds
Get the custom attribute identifiers.
Supported API: true- Returns:
- Set of custom attribute identifier strings.
-
getCustomAttributeDisplayLabel
Get display label for a custom attribute.
Supported API: true- Parameters:
attributeId- Identifier for the attribute.locale- Locale to use for localizing display label.- Returns:
- Localized display label.
-
getCustomAttributeDisplayValue
public abstract String getCustomAttributeDisplayValue(String attributeId, Locale locale) throws WTException Get display value for a custom attribute. When this method is called the custom attribute values, if any, can be obtained from the delegate object by calling method this.getCustomAttributesObject().
Supported API: true- Parameters:
attributeId- Identifier for the attribute.locale- Locale to use for localizing display value.- Returns:
- Localized display value.
- Throws:
WTException- If a problem occurs while creating the value.
-
getCustomAttributeMap
public abstract WTKeyedMap getCustomAttributeMap(PersistedCollectionHolder holder, WTSet members) throws WTException Get the custom attributes for members of a holder.
Supported API: true- Parameters:
holder- PersistedCollectionHolder object to get custom attribute values for.members- Deflated set of members to get the custom attributes for.- Returns:
- WTKeyedMap map of member references (key) to custom attribute data object (value).
- Throws:
WTException- If a problem occurs while creating the map.
-
getCustomAttributeObject
Get the custom attributes data object.
Supported API: true- Returns:
- Customization-specific object containing all the custom attribute values for a member of a PersistedCollectionHolder (may be null).
-