Class AttributePropertyProcessorHelper

java.lang.Object
com.ptc.core.components.forms.AttributePropertyProcessorHelper

public class AttributePropertyProcessorHelper extends Object
Helper class with APIs that support in authoring custom data utilities.

Supported API: true

Extendable: false
  • Method Details

    • getAttributeValueFromForm

      public static Object getAttributeValueFromForm(String component_id, Object datum, ModelContext mc) throws ClassNotFoundException, IllegalArgumentException, ParseException, Exception
      Retrieve value of the attribute if available in the following order : 1. in form OR 2. in datum

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      datum - The object to extract model data from
      mc - The context in which the component model data is being extracted
      Returns:
      Object
      Throws:
      Exception
      ParseException
      IllegalArgumentException
      ClassNotFoundException
    • getColumnName

      public static String getColumnName(String component_id, Object datum, ModelContext mc) throws WTException
      Provide the column name to be set on the GUI component (to be used in Single valued attribute columns)

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      datum - The object to extract model data from
      mc - The context in which the component model data is being extracted
      Returns:
      name of column
      Throws:
      WTException
    • getAttributeValueFromParameterMap

      public static HashMap<String,Object> getAttributeValueFromParameterMap(String component_id, Object datum, ModelContext mc) throws WTException
      Provide attribute values present in the form data

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      datum - The object to extract model data from
      mc - The context in which the component model data is being extracted
      Returns:
      returns map containing values related to attribute for example, for Real number with unit, it will be Value and Unit for Hyperlink, its URL and Label
      Throws:
      WTException
    • getUnitOfMeasure

      public static String getUnitOfMeasure(ModelContext mc) throws WTException
      Provide the unit of measure for the attribute in the context

      Supported API: true
      Parameters:
      mc - The context in which the component model data is being extracted
      Returns:
      unit of measure
      Throws:
      WTException
    • getAttributeTypeSummary

      public static AttributeTypeSummary getAttributeTypeSummary(String component_id, Object datum, ModelContext mc) throws WTException
      Provide the AttributeTypeSummary of the attribute in context

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      datum - The object to extract model data from
      mc - The context in which the component model data is being extracted
      Returns:
      AttributeTypeSummary
      Throws:
      WTException