Class ChangeLinkAttributeDataUtility
java.lang.Object
com.ptc.core.components.factory.AbstractDataUtility
com.ptc.windchill.enterprise.change2.dataUtilities.ChangeLinkAttributeDataUtility
- All Implemented Interfaces:
DataUtility
- Direct Known Subclasses:
ChangeTransitionDataUtility,DispositionDataUtility,ImpactIntentDataUtility
This class is used to process the change binary link attributes used by the
various change clients. This includes the Inventory Disposition attributes.
and the description attributes. The ReportedAgainst Quantity is also handled
by this class.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumUsed to override and retrieve the specific type of data link. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for ChangeLinkAttributeDataUtility. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractGuiComponentcreateGuiComponent(String component_id, Object datum, ChangeLinkAttributeBean linkBean) Creates the GUI component for the component id.getDataValue(String component_id, Object datum, ModelContext mc) Will retrieve a value from a binary link using the reference object as the source.protected StringgetGUIComponentId(String component_id, WTReference ref) Generates the GUI component id using the reference of an object and the component id.getLabel(String component_id, ModelContext mc) Will retrieve the localized label of the attribute.protected Map<WTReference, BinaryLink> processExistingLinks(NmOid oid, String component_id) Deprecated.use ChangeableObjectBeanprotected Map<WTReference, BinaryLink> processExistingLinks(NmOid oid, String component_id, ChangeLinkAttributeDataUtility.LinkType dataLinkType) Deprecated.use ChangeableObjectBeanvoidsetModelData(String component_id, List<?> objects, ModelContext mc) Method to set the Model Data.voidsetNumericEventListener(TextBox component, ChangeLinkAttributeBean linkBean) Adds the onChange event and the onFocus event to assist with some form validation for numeric input
Supported API: trueMethods inherited from class com.ptc.core.components.factory.AbstractDataUtility
getColumnDescriptor, getComponentBasedLabel, getIntrospectionBasedLabel, getLabel, getLabelKey, getMainClassName, getModelAttributes, getPropertyDisplayName, getSoftLabel, getToolTip, resolveJCAObject
-
Constructor Details
-
ChangeLinkAttributeDataUtility
public ChangeLinkAttributeDataUtility()Default constructor for ChangeLinkAttributeDataUtility.
Supported API: true
-
-
Method Details
-
getDataValue
Will retrieve a value from a binary link using the reference object as the source. This method assumes thesetModelData()method has been called to initialize the data.
Supported API: true- Parameters:
component_id- One of the supported component_idsdatum- The object to use as the referencemc- The current model context- Returns:
- An object that can be sent to a view for rendering
- Throws:
WTException- If a problem occurs while extracting the data
-
createGuiComponent
protected AbstractGuiComponent createGuiComponent(String component_id, Object datum, ChangeLinkAttributeBean linkBean) throws WTException Creates the GUI component for the component id. When overridingcreateGuiComponent(String, Object, ChangeLinkAttributeBean)the GUI component id should be set on the gui component. SeegetGUIComponentId(String, WTReference).
Supported API: true- Parameters:
component_id-datum-linkBean-- Returns:
- GUI component
- Throws:
WTException
-
setNumericEventListener
public void setNumericEventListener(TextBox component, ChangeLinkAttributeBean linkBean) throws WTException Adds the onChange event and the onFocus event to assist with some form validation for numeric input
Supported API: true- Parameters:
component-linkBean-- Throws:
WTException
-
getGUIComponentId
Generates the GUI component id using the reference of an object and the component id. The GUI component id needs to be unique in order to properly update text or values of the component. For example the GUI component id for a "WTPart" with the component id "aaDescription" would be: "VR:wt.part.WTPart:1234#aaDescription".
Supported API: true- Parameters:
component_id-ref-- Returns:
- GUI component id
- Throws:
WTException
-
getLabel
Will retrieve the localized label of the attribute. If the attribute is one of the known attributes, the text will be obtained from the resource bundle.
Supported API: true- Specified by:
getLabelin interfaceDataUtility- Overrides:
getLabelin classAbstractDataUtility- Parameters:
component_id- The component ID to search the resource bundle for.mc- The current model context.- Returns:
- the label for the column.
- Throws:
WTException
-
setModelData
Method to set the Model Data. This method will try and deterministically Build up a map of the attribute values such that they can be reused for additional attributes off the binary link.
Supported API: true- Specified by:
setModelDatain interfaceDataUtility- Overrides:
setModelDatain classAbstractDataUtility- Parameters:
component_id- The component id of the column/attributeobjects- The objects to retrieve the data for.mc- The model context.- Throws:
WTException- If a problem happens while batch processing the data objects.
-
processExistingLinks
protected Map<WTReference,BinaryLink> processExistingLinks(NmOid oid, String component_id) throws WTException Deprecated.use ChangeableObjectBeanMethod to retrieve the binary link for the given NmOid and the component id returns a map of persisted binary links and the role A references.
Supported API: true- Parameters:
oid- Context objectcomponent_id- The id of the column/attribute.- Returns:
- a map of reference and corresponding binary links
- Throws:
WTException
-
processExistingLinks
protected Map<WTReference,BinaryLink> processExistingLinks(NmOid oid, String component_id, ChangeLinkAttributeDataUtility.LinkType dataLinkType) throws WTException Deprecated.use ChangeableObjectBeanMethod to retrieve the binary link for the given NmOid and the component id returns a map of persisted binary links and the role A references.
Supported API: true- Parameters:
oid- Context objectcomponent_id- The id of the column/attribute.dataLinkType- used to override and retrieve the specific type of data link.- Returns:
- a map of reference and corresponding binary links
- Throws:
WTException- See Also:
-