Interface MassChangeFilterDelegate

All Known Implementing Classes:
AbstractDefaultFilterDelegate, AbstractDocumentLinkFilterDelegate, AbstractPartUsageFilterDelegate, AbstractWorkableFilterDelegate, AddDocumentLinkFilterDelegate, AddPartUsageFilterDelegate, ChangePartUsageFilterDelegate, MPMReplaceResourceFilterDelegate, RemoveDocumentLinkFilterDelegate, RemovePartUsageFilterDelegate, ReplacePartUsageFilterDelegate

public interface MassChangeFilterDelegate
A filter delegate is used for the mass change client to filter out objects selected by the user that are ineligible for a specific mass change operation. Using the filtered list of eligible objects the filter delegate then creates, modifies, or deletes associations for the selected mass change operation. If an object is ineligible for the selected mass change operation, the ineligible object will not be processed.

The default mass change operations and filter delegates are defined in the /config/actions/MassChange-actions.xml.

To create a new mass change operation:
  1. Create a new action for the mass change operation that is of type massChange in a customized actions.xml. The action is the name of the JSP representing the FORM data for the mass change operation.
  2. A resoureBundle should be assigned to the action of the massChange object type which should have a entry for the action title for the mass change operation. If the action title is not assigned an empty label for the operation will be displayed.
  3. Implement the MassChangeFilterDelegate and register the implemented filter delegate as the command class in the action for the mass change operation.
  4. The operation must be added to the master list of available operations. This list is specified in wt.properties and defines the order (from left to right) of the operations as viewed within the wizard.
To extend or change a filter delegate for an existing mass change operation:
  1. Override the action (mass change operation) by creating a new action with the same name and type as the existing action for the mass change operation in a customized actions.xml.
  2. A resoureBundle should be assigned to the action of the massChange object type which should have a entry for the action title for the mass change operation. If the action title is not assigned an empty label for the operation will be displayed. The original resource bundle can be used but needs to be redefined for the overridden action (mass change operation).
  3. Register the extended or implemented filter delegate as the command class in the action for the mass change operation.
 Example of a mass change operation action:
 
   <objecttype name="massChange" class="wt.change2.Changeable2" resourceBundle="com.ptc.windchill.enterprise.massChange.massChangeActionsRB">
     <action name="someMassChangeOperation">
       <description>The insert part criteria panel in the launch mass change action.</description>
       <command class="com.ptc.windchill.enterprise.massChange.filters.ImplementedFilterDelegate"/>
     </action>
   </objecttype>
 
The supported and excluded base types for selected target objects for the mass change operation can be registered against the mass change operation in wt.properties. To specify the supported types for a particular mass change operation the following name convention should be followed massChange.operationName.supportedTypes likewise for excluded types it is massChange.operationName.excludedTypes. If the supported types are not specified for a mass change operation than all objects are supported for the operation.
 Example of the out of the box supported types for Insert existing part operation (addPartUsage):
 
 <Property name="massChange.addPartUsage.supportedTypes" multivalued="," default="WCTYPE|wt.part.WTPart" overridable="true" />
 


Extendable: true

Supported API: true
  • Method Details

    • evaluate

      void evaluate(MassChangeFilterState mcFilterState) throws WTException
      Evaluate mass change target objects to determine which are filtered out of the mass change operation. Filtered objects will be marked as excluded. Objects already excluded will not be evaluated.
      Implementing classes must have first line: super.evaluate(mcFilterState)

      Supported API: true
      Parameters:
      mcFilterState - MassChangeFilterState object populated with mass change target objects. The form result and target filter states are updated based on filtering results.
      Throws:
      WTException
    • processOperation

      void processOperation(MassChangeFilterState mcFilterState) throws WTException
      Process the mass change operation for all non-excluded target objects.
      Implementing classes must have first line: super.processOperation(mcFilterState)

      Supported API: true
      Parameters:
      mcFilterState - MassChangeFilterState object populated with mass change target objects.
      Throws:
      WTException
    • getCadPublishMap

      WTKeyedMap getCadPublishMap()
      Get the CAD publish map. Should only be called after processOperation(MassChangeFilterState).

      Supported API: true
      Returns:
      WTKeyedMap of target to taskId (Long). Task Id uniquely identifies the event log entry for the background publish task.
    • setCommandBean

      void setCommandBean(NmCommandBean cb)
      Set the command bean for use in the filter delegate. This method is provided to support direct implementations of the interface. If extending an existing mass change filter delegate, this method is not required to be overridden.

      Supported API: true
      Parameters:
      cb -
    • getHintText

      String getHintText()
      Retrieve the hint text for the mass change operation.

      Supported API: true
      Returns:
      String
    • getServerExcludedItems

      Collection<Changeable2> getServerExcludedItems()
      Return the items which were excluded during server processing (and could not be pre-validated out prior to server processing).

      Supported API: true
      Returns:
      A collection of changeables which are the excluded items.
    • validateFormSubmission

      UIValidationResult validateFormSubmission(UIValidationCriteria validationCriteria) throws WTException
      Validation for Mass Change Operation/Criteria Step. This method will be called once the Next/Finish button is clicked from Step 1 of the Mass Change wizard from
      invalid @link
      {@link #MassChangeStepValidator.validateFormSubmission()
      }.

      Expected result from this method is a UIValidationResult.PERMITTED object. Any other result is considered a failure, but intended outcome for a failure should be a UIValidationResult.DENIED object.

      Supported API: true
      Parameters:
      validationCriteria - - UIValidationCriteria object that holds client data
      Returns:
      UIValidationResult
      Throws:
      WTException