Class ChangeLinkAttributeHelper

java.lang.Object
com.ptc.windchill.enterprise.change2.ChangeLinkAttributeHelper

public class ChangeLinkAttributeHelper extends Object
Helper class for displaying and processing link attributes.

Supported API: true

Extendable: false
See Also:
  • Method Details

    • getChangeLinkAttributeBean

      public static ChangeLinkAttributeBean getChangeLinkAttributeBean()
      Gets the ChangeLinkAttributeBean for the current request.

      Supported API: true
      Returns:
      linkBean
      See Also:
    • getChangeLinkAttributeBean

      public static ChangeLinkAttributeBean getChangeLinkAttributeBean(ChangeItem item)
      Gets the ChangeLinkAttributeBean for 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 ChangeLinkAttributeBean
      componentId - The column id for the disposition attribute
      item - The class to validate for support
      Returns:
      boolean true if the class is supported.
    • getDispositionHandler

      public static DispositionHandler getDispositionHandler(String componentId)
      Retrieve the current configured disposition handler from the DefaultServiceProvider. This provider will look in service.properties for an entry with a selector of component id using the class com.ptc.windchill.enterprise.change2.handler.DispositionHandler as 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 DispositionHandler interface.
      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 ID
      ref - The reference of the item
      linkBean -
      Returns:
      value for given componentId from the table data
      Throws:
      WTException
    • getGUIComponentId

      public static String getGUIComponentId(String component_id, WTReference ref) throws WTException
      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