Class EmitEachSelectorValidator.Config

  • Enclosing class:
    EmitEachSelectorValidator

    public static final class EmitEachSelectorValidator.Config
    extends java.lang.Object
    EmitEachSelector configuration settings.
    • Constructor Summary

      Constructors 
      Constructor Description
      Config()  
    • Method Summary

      Modifier and Type Method 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Config

        public Config()
    • Method Detail

      • getSelector

        public Selector getSelector()
        Gets the required selector that matches shapes.

        Each shape that matches the given selector will emit a validation event.

        Returns:
        Selector to match on.
      • setSelector

        public void setSelector​(Selector selector)
      • getBindToTrait

        public ShapeId getBindToTrait()
        Gets the optional trait that each emitted event is bound to.

        An event is only emitted for shapes that have this trait.

        Returns:
        Returns the trait to bind each event to.
      • setBindToTrait

        public void setBindToTrait​(ShapeId bindToTrait)
      • getMessageTemplate

        public java.lang.String getMessageTemplate()
        Gets the optional message template that can reference selector variables.
        Returns:
        Returns the message template.
      • setMessageTemplate

        public void setMessageTemplate​(java.lang.String messageTemplate)
        Sets the optional message template for each emitted event.
        Parameters:
        messageTemplate - Message template to set.
        Throws:
        ModelSyntaxException - if the message template is invalid.