Interface MdibValidator

  • All Implemented Interfaces:

    
    public interface MdibValidator
    
                        

    Interface for MDIB validators.

    Register MDIB validators by using installValidator.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit init() Called before any validation step is executed.
      Unit validate(Mdib mdib, ComponentTree.Root componentTree) Validator that is executed after the entire tree has been constructed.
      Unit visitPreInit(VersionedMdibComponent component) An MDIB component visitor that is called back during tree construction for each node before initialization.
      Unit visitPostInit(VersionedMdibComponent component) An MDIB component visitor that is called back during tree construction for each node after initialization.
      abstract String getName() Human-readable name for the validator instance.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • init

         Unit init()

        Called before any validation step is executed.

      • validate

         Unit validate(Mdib mdib, ComponentTree.Root componentTree)

        Validator that is executed after the entire tree has been constructed.

        Use error(message: String) to stop MDIB creation and throw an error. In order to increase usability, provide a path to the object where the error occurred by using org.somda.dsl.biceps.base.tree.VersionedMdibComponent.cursor.

        If not implemented, performs nothing.

      • visitPreInit

         Unit visitPreInit(VersionedMdibComponent component)

        An MDIB component visitor that is called back during tree construction for each node before initialization.

        Use error(message: String) to stop MDIB creation and throw an error.

        The path to the current node is printed to the error output automatically.

        If not implemented, performs nothing.

      • visitPostInit

         Unit visitPostInit(VersionedMdibComponent component)

        An MDIB component visitor that is called back during tree construction for each node after initialization.

        Use error(message: String) to stop MDIB creation and throw an error.

        The path to the current node is printed to the error output automatically.

        If not implemented, performs nothing.

      • getName

         abstract String getName()

        Human-readable name for the validator instance.