Package wt.supersede

Interface SupersedeValidationDelegate


public interface SupersedeValidationDelegate
Delegate is used to validate whether parts selected in Affected Objects table (Change Task) are eligible to be superseded. It is used also to validate if some actions can be executed on superseded parts. For events defined in populateEventList client have to provide a logic which will allow or not particular action to be executed.

Supported API: true

Extendable: true
  • Method Details

    • getInvalidObjects

      Map<LocalizableMessage,WTCollection> getInvalidObjects(WTCollection toBeSuperseded) throws WTException
      Checks whether given list of objects is valid to be superseded. Validation is done for each single object in the list, if any object appears to be not valid it is added to the resulting map.

      Supported API: true
      Parameters:
      toBeSuperseded - List of objects to be validated.
      Returns:
      Map where key is a validation massage and a value is a list of objects which are not valid. Keys explain why the corresponding objects are not valid to be superseded.
      Throws:
      WTException
    • populateEventList

      void populateEventList()
      Fills list of events that are handled by delegate.

      Supported API: true
    • handleEvent

      void handleEvent(KeyedEvent event) throws WTException
      Handles events for superseded parts. This method is used in StandardSupersedeService to register a handler for specific event. Each event added in populateEventList should be handled by this method. If for particular event target object validation rules defined in this delegate are not met, this method should throw specific exception.

      Supported API: true
      Parameters:
      event -
      Throws:
      WTException
    • getEventList

      List<String> getEventList()
      Get the event list filled in populateEventList

      Supported API: true
      Returns:
      List of events