public static final class EmitEachSelectorValidator.Config
extends java.lang.Object
Constructor and Description |
---|
Config() |
Modifier and Type | Method and Description |
---|---|
ShapeId |
getBindToTrait()
Gets the optional trait that each emitted event is bound to.
|
java.lang.String |
getMessageTemplate()
Gets the optional message template that can reference selector variables.
|
Selector |
getSelector()
Gets the required selector that matches shapes.
|
void |
setBindToTrait(ShapeId bindToTrait) |
void |
setMessageTemplate(java.lang.String messageTemplate)
Sets the optional message template for each emitted event.
|
void |
setSelector(Selector selector) |
public Selector getSelector()
Each shape that matches the given selector will emit a validation event.
public void setSelector(Selector selector)
public ShapeId getBindToTrait()
An event is only emitted for shapes that have this trait.
public void setBindToTrait(ShapeId bindToTrait)
public java.lang.String getMessageTemplate()
public void setMessageTemplate(java.lang.String messageTemplate)
messageTemplate
- Message template to set.ModelSyntaxException
- if the message template is invalid.