Class AbstractDataUtility

java.lang.Object
com.ptc.core.components.factory.AbstractDataUtility
All Implemented Interfaces:
DataUtility
Direct Known Subclasses:
com.ptc.core.components.factory.dataUtilities.AbstractAttributeDataUtility, AbstractBooleanValueDataUtility, AutomateFastTrackDataUtility, BusinessRuleConflictsDataUtility, ChangeLinkAttributeDataUtility, com.ptc.core.components.factory.dataUtilities.DefaultDataUtility, NmActionDataUtility, PersistedCollectionCustomAttributesDelegate, VisualizationDataUtility, WorkItemAttributeDataUtility

public abstract class AbstractDataUtility extends Object implements DataUtility
Helper class that provides default implementations for some DataUtility methods.

Supported API: true

Extendable: true
  • Method Details

    • setModelData

      public void setModelData(String component_id, List<?> objects, ModelContext mc) throws WTException
      No-op implementation of setModelData

      Supported API: true

      Extendable: true
      Specified by:
      setModelData in interface DataUtility
      Parameters:
      component_id - The identifier of the component that requested this data utility
      objects - The data objects that will subsequently be processed by calls to getDataValue.
      Throws:
      WTException - If a problem happens while batch processing the data objects.
    • getLabel

      public String getLabel(String component_id, ModelContext mc) throws WTException
      Get a default label for the component id. First looks in the component type default resource bundle for a label. If it cannot find one there, then uses introspection to find a label. If that does not work, then the component id itself is returned.
      Specified by:
      getLabel in interface DataUtility
      Parameters:
      component_id - The component to get a label for
      mc - The model context
      Returns:
      A default label

      Supported API: true

      Extendable: true
      Throws:
      WTException
    • getToolTip

      public String getToolTip(String component_id, ModelContext mc) throws WTException
      No-op implementation of getTooltip

      Supported API: true

      Extendable: true
      Specified by:
      getToolTip in interface DataUtility
      Parameters:
      component_id -
      mc -
      Returns:
      a String tooltip
      Throws:
      WTException
    • getColumnDescriptor

      public ColumnDescriptor getColumnDescriptor(String component_id, ModelContext mc)
      Get the column descriptor. The default will be used unless otherwise specified. The default is created from the factory. DataUtilities can override this method and call other column descriptors for use with their columns. Attributes which a datautility may want to change could be the width of the column or whether it is able to be resizable or not. These can be override the default.

      Supported API: true

      Extendable: true
      Specified by:
      getColumnDescriptor in interface DataUtility
      Parameters:
      mc - The model context is used for getting the component descriptor.
      Returns:
      A column descriptor that is suitable for this column.