Class AddPartUsageFilterDelegate

All Implemented Interfaces:
MassChangeFilterDelegate

public class AddPartUsageFilterDelegate extends AbstractPartUsageFilterDelegate
This filter delegate determines whether the selected objects are eligible for the mass change operation for the selected parts. The delegate will filter invalid selected objects and creates new part usage links for any valid objects selected given the user specified part.

If this delegate is extended or replaced with a customized delegate, the action for the mass change operation should be overridden in a customized actions.xml. The customized delegate should be registered as the command class in the overridden mass change operation action.
This operation is currently registered with the action name addPartUsage.

Extendable: true

Supported API: true

See Also:
  • Method Details

    • preProcessOperation

      protected void preProcessOperation(MassChangeFilterState mcFilterState) throws WTException
      Add associations between target objects and the specified part.
      Overridden methods must have first line: super.preProcessOperation(mcFilterState)

      Supported API: true
      Overrides:
      preProcessOperation in class AbstractPartUsageFilterDelegate
      Parameters:
      mcFilterState - MassChangeFilterState object populated with mass change target objects.
      Throws:
      WTException
    • validateFormSubmission

      public UIValidationResult validateFormSubmission(UIValidationCriteria validationCriteria) throws WTException
      Implementation used for Add Part Usage operation of the Mass Change wizard. This will validate the specified Quantity/Unit pair from the client and will return a UIValidationStatus.DENIED if an error occurs.

      Supported API: true
      Specified by:
      validateFormSubmission in interface MassChangeFilterDelegate
      Overrides:
      validateFormSubmission in class AbstractPartUsageFilterDelegate
      Parameters:
      validationCriteria - - UIValidationCriteria object that holds client data
      Returns:
      UIValidationResult
      Throws:
      WTException
    • preEvaluate

      protected void preEvaluate(MassChangeFilterState mcFilterState) throws WTException
      Filter out mass change target parts that:
      1. Share the same master as the new child part.
      2. Violate an association constraint with the new child part.
      3. Would result in a duplicate line or find number.
      Filtered objects will be marked as excluded. Objects already excluded will not be evaluated.

      Overridden methods must have first line: super.preEvaluate(mcFilterState)

      Supported API: true

      Overrides:
      preEvaluate in class AbstractPartUsageFilterDelegate
      Parameters:
      mcFilterState - MassChangeFilterState object populated with mass change target objects.
      Throws:
      WTException
    • getHintText

      public String getHintText()
      Retrieve the hint text for the Add Part Usage functionality.

      Supported API: true
      Specified by:
      getHintText in interface MassChangeFilterDelegate
      Overrides:
      getHintText in class AbstractDefaultFilterDelegate
      Returns:
      String - the hint text for the add part usage.