Package com.ptc.core.components.forms
Class AttributePropertyProcessorHelper
java.lang.Object
com.ptc.core.components.forms.AttributePropertyProcessorHelper
Helper class with APIs that support in authoring custom data utilities.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class grouping APIs that work for multi valued attribute
Supported API: true -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeTypeSummarygetAttributeTypeSummary(String component_id, Object datum, ModelContext mc) Provide the AttributeTypeSummary of the attribute in context
Supported API: truestatic ObjectgetAttributeValueFromForm(String component_id, Object datum, ModelContext mc) Retrieve value of the attribute if available in the following order : 1.getAttributeValueFromParameterMap(String component_id, Object datum, ModelContext mc) Provide attribute values present in the form data
Supported API: truestatic StringgetColumnName(String component_id, Object datum, ModelContext mc) Provide the column name to be set on the GUI component (to be used in Single valued attribute columns)
Supported API: truestatic StringProvide the unit of measure for the attribute in the context
Supported API: true
-
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 builtdatum- The object to extract model data frommc- The context in which the component model data is being extracted- Returns:
- Object
- Throws:
ExceptionParseExceptionIllegalArgumentExceptionClassNotFoundException
-
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 builtdatum- The object to extract model data frommc- 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 builtdatum- The object to extract model data frommc- 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
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 builtdatum- The object to extract model data frommc- The context in which the component model data is being extracted- Returns:
- AttributeTypeSummary
- Throws:
WTException
-