Class ChangeLinkAttributeHelper
java.lang.Object
com.ptc.windchill.enterprise.change2.ChangeLinkAttributeHelper
Helper class for displaying and processing link attributes.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChangeLinkAttributeBeanGets theChangeLinkAttributeBeanfor the current request.static ChangeLinkAttributeBeanGets theChangeLinkAttributeBeanfor the current request.static InventoryDispositiongetDefaultDisposition(ChangeLinkAttributeBean linkBean, String attributeId) Get the default InventoryDisposition value for a link attribute.static DispositionHandlergetDispositionHandler(String componentId) Retrieve the current configured disposition handler from the DefaultServiceProvider.static StringgetGUIComponentId(String component_id, WTReference ref) Generates the GUI component id using the reference of an object and the component id.static StringgetTableDataValue(String componentId, WTReference ref, ChangeLinkAttributeBean linkBean) Will retrieve the attribute value from the table/form data for the given component ID and the ID as generated for the row item of a given WTReference.static ArrayList<InventoryDisposition> getValidDispositionValues(ChangeLinkAttributeBean linkBean, String attributeId) Get list of valid InventoryDisposition values for a link attribute.static booleanisInventoryDispositionSupported(ChangeLinkAttributeBean linkBean, String componentId, Class<?> item) Will determine if the designated class supports the ability to have a Disposition on its inventory applied.
-
Method Details
-
getChangeLinkAttributeBean
Gets theChangeLinkAttributeBeanfor the current request.
Supported API: true- Returns:
- linkBean
- See Also:
-
getChangeLinkAttributeBean
Gets theChangeLinkAttributeBeanfor the current request. This api should be called when you need to ensure that a link bean is associated with a specific ChangeItem.
Supported API: true- Returns:
- linkBean
- See Also:
-
isInventoryDispositionSupported
public static boolean isInventoryDispositionSupported(ChangeLinkAttributeBean linkBean, String componentId, Class<?> item) Will determine if the designated class supports the ability to have a Disposition on its inventory applied.
Supported API: true- Parameters:
linkBean- The ChangeLinkAttributeBeancomponentId- The column id for the disposition attributeitem- The class to validate for support- Returns:
- boolean true if the class is supported.
-
getDispositionHandler
Retrieve the current configured disposition handler from the DefaultServiceProvider. This provider will look inservice.propertiesfor an entry with a selector ofcomponent idusing the classcom.ptc.windchill.enterprise.change2.handler.DispositionHandleras the provider name.
Supported API: true- Parameters:
componentId- The column id for the disposition attribute- Returns:
- Object An instance of the disposition handler obtained from the service provider, or null if none is
found or the class does not implement the
DispositionHandlerinterface. - See Also:
-
getValidDispositionValues
public static ArrayList<InventoryDisposition> getValidDispositionValues(ChangeLinkAttributeBean linkBean, String attributeId) Get list of valid InventoryDisposition values for a link attribute.
Supported API: true- Parameters:
linkBean- ChangeLinkAttributeBean object for the AffectedActivityData link.attributeId- Attribute id value.- Returns:
- List of valid InventoryDisposition objects the link and attributes types.
-
getDefaultDisposition
public static InventoryDisposition getDefaultDisposition(ChangeLinkAttributeBean linkBean, String attributeId) Get the default InventoryDisposition value for a link attribute.
Supported API: true- Parameters:
linkBean- ChangeLinkAttributeBean object for the AffectedActivityData link.attributeId- Attribute id value.- Returns:
- Default disposition, or null if no valid dispositions are defined for the attribute.
-
getTableDataValue
public static String getTableDataValue(String componentId, WTReference ref, ChangeLinkAttributeBean linkBean) throws WTException Will retrieve the attribute value from the table/form data for the given component ID and the ID as generated for the row item of a given WTReference.
Supported API: true- Parameters:
componentId- The component IDref- The reference of the itemlinkBean-- Returns:
- value for given componentId from the table data
- 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
-