Class PersistedCollectionCustomAttributesDelegate

java.lang.Object
com.ptc.core.components.factory.AbstractDataUtility
com.ptc.core.percolui.PersistedCollectionCustomAttributesDelegate
All Implemented Interfaces:
DataUtility

public abstract class PersistedCollectionCustomAttributesDelegate extends AbstractDataUtility
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:
context="default" name="com.ptc.core.percolui.PersistedCollectionCustomAttributesDelegate">
<Option requestor=""
serviceClass=""
selector="null"
cardinality="duplicate"/>
/>

For each custom attribute identifier there must be a new

  • Method Details

    • getCustomAttributeIds

      public abstract Set<String> getCustomAttributeIds()
      Get the custom attribute identifiers.

      Supported API: true
      Returns:
      Set of custom attribute identifier strings.
    • getCustomAttributeDisplayLabel

      public abstract String getCustomAttributeDisplayLabel(String attributeId, Locale locale)
      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

      public Object 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).