Class ChangeItemFormDelegate

java.lang.Object
com.ptc.core.components.forms.DefaultObjectFormProcessorDelegate
com.ptc.windchill.enterprise.change2.forms.delegates.ChangeItemFormDelegate
All Implemented Interfaces:
ObjectFormProcessorDelegate
Direct Known Subclasses:
RelatedProductDataFormDelegate

public abstract class ChangeItemFormDelegate extends DefaultObjectFormProcessorDelegate
An abstract implementation for a form processor delegate which creates, updates or removes associations from change objects. Typically used for the processing of a wizard.

Supported API: true

Extendable: false
  • Method Details

    • getComponentMode

      protected ComponentMode getComponentMode()
      Helper method to retrieve the component mode for the given processing session. Requires the init( ) method to have been executed.

      Supported API: true
      Returns:
      the ComponentMode.
    • getTableId

      protected String getTableId()
      This method will return the valid table ID for the given table. The implementing subclasses are required to implement the methods getDelegateName() and getDefaultTableId() used by this method.

      Supported API: true
      Returns:
      The table ID.
      See Also:
    • getDelegateName

      protected abstract String getDelegateName()
      Method to retrieve the delegate name used for table ID parameter lookups.

      Supported API: true
      Returns:
      the delegate name.
    • getDefaultTableId

      protected abstract String getDefaultTableId()
      Method to retrieve the default table ID used for table ID parameter lookups.

      Supported API: true
      Returns:
      the table id for the default processing.
    • getAssociationClass

      protected abstract Class getAssociationClass(ChangeItemIfc item)
      Method to retrieve the associated class such as ReportedAgainst.class for saving affected data for a Problem Report.

      Supported API: true
      Parameters:
      item - The Change object that the changeables getting associated to.
      Returns:
      The associated class for the given Change Object.
    • getItemsToStoreForAssociation

      protected abstract Vector getItemsToStoreForAssociation(List items) throws WTException
      Retrieval method for RelatedProductData links to get the list of items to store.

      Supported API: true
      Parameters:
      items - The current list of items that are displayed or hidden in the change table.
      Returns:
      The list of items to be associated.
      Throws:
      WTException
    • postProcess

      public FormResult postProcess(NmCommandBean clientData, List<ObjectBean> objectBeans) throws WTException
      Method to process the data posted for the associated objects to the change item. The objectList must contain a persisted changeItem in order for this processing to occur.

      Supported API: true
      Specified by:
      postProcess in interface ObjectFormProcessorDelegate
      Overrides:
      postProcess in class DefaultObjectFormProcessorDelegate
      Parameters:
      clientData - - Contains all the form data and other context information from the wizard client. Input.
      objectBeans - - Each bean contains the form data for one object being operated upon. Input
      Returns:
      FormResult with status set to FormProcessingStatus.SUCCESS
      Throws:
      WTException
    • processLinkAttributes

      protected abstract WTCollection processLinkAttributes(ChangeItemIfc item, WTCollection binaryLinks) throws WTException
      Abstract method to process any link attributes associated with the table. This method is called automatically by the postProcess( ) method. Any implementing classes should overload this method to process any specific link attributes which are present.

      Supported API: true
      Parameters:
      item - The change item
      binaryLinks - The collection of current binary links.
      Returns:
      A collection of just the "changed" binary links that are processed.
      Throws:
      WTException
    • getReferenceValueFromMap

      @Deprecated protected static Object getReferenceValueFromMap(Map map, Persistable persistable, String pre_fix, String post_fix) throws WTException
      Deprecated.
      No longer used as of 10.0
      Utility method to retrieve a value from a map using either the object or version reference of the object. Depending on which layer generated the id, the id may be a Version or Object reference. This method will attempt to extract the change value from the appropriate reference string.
      This is used for the attributes generated by the ChangeLinkAttributeDataUtility which will generate a link in the fashion OR:wt.part.WTPart:22233_ApprovedQuantity

      Supported API: true
      Parameters:
      map - The map of changed values
      persistable - The persistable which to generate the references from.
      pre_fix - The string in from of the map key.
      post_fix - The terminating string from the map key (example "ApprovedQuantity")
      Returns:
      the value referenced in the map or null.
      Throws:
      WTException
    • getReferenceValueFromMap

      @Deprecated protected static Object getReferenceValueFromMap(Map map, Persistable persistable, String post_fix) throws WTException
      Deprecated.
      No longer used as of 10.0
      Utility method to retrieve a value from a map using either the object or version reference of the object. Depending on which layer generated the id, the id may be a Version or Object reference. This method will attempt to extract the change value from the appropriate reference string.
      This is used for the attributes generated by the ChangeLinkAttributeDataUtility which will generate a link in the fashion OR:wt.part.WTPart:22233_ApprovedQuantity

      Supported API: true
      Parameters:
      map - The map of changed values
      persistable - The persistable which to generate the references from.
      post_fix - The terminating string from the map key (example "ApprovedQuantity")
      Returns:
      the value referenced in the map or null.
      Throws:
      WTException