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
Supported API: true
Extendable: true
populateEventList client have to provide a logic which will allow or not
particular action to be executed.
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionGet the event list filled inpopulateEventList
Supported API: truegetInvalidObjects(WTCollection toBeSuperseded) Checks whether given list of objects is valid to be superseded.voidhandleEvent(KeyedEvent event) Handles events for superseded parts.voidFills list of events that are handled by delegate.
-
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
Handles events for superseded parts. This method is used inStandardSupersedeServiceto register a handler for specific event. Each event added inpopulateEventListshould 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
Get the event list filled inpopulateEventList
Supported API: true- Returns:
- List of events
-