Interface ValidationEventDecorator
public interface ValidationEventDecorator
Validation event decorators take validation events and transform them by adding more contextual information,
usually adding a hint to let the user know what can it be done to solve the issue. This might add context specific
information that is not relevant for all cases such as links to internal knowledge sites or explicit instructions
relevant only to the context where Smithy is being used.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ValidationEventDecorator
A decorator that does nothing. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this decorator knows how to decorate this event, usually by looking at the event id.static ValidationEventDecorator
compose
(List<ValidationEventDecorator> decorators) Creates a decorator composed of one or more decorators.Takes an event and potentially updates it to decorate it.
-
Field Details
-
IDENTITY
A decorator that does nothing.
-
-
Method Details
-
canDecorate
Returns true if this decorator knows how to decorate this event, usually by looking at the event id.- Parameters:
ev
- The event to test against- Returns:
- true if this decorator knows how to decorate this event
-
decorate
Takes an event and potentially updates it to decorate it. Returns the same event if this decorators does not know how to handle the event.- Returns:
- The decorated event or the original one if no decoration took place.
-
compose
Creates a decorator composed of one or more decorators.- Parameters:
decorators
- Decorators to compose.- Returns:
- Returns the composed decorator.
-