Interface IDomainSchemaValidator


public interface IDomainSchemaValidator
Prepares attributes for validation and provides the validate method that has to be called after all the registrations are done. The chosen data structure depends on the implementation.
Since:
11.3
Author:
Voicu Moldovan, Petru Galanton
  • Method Details

    • registerEntity

      void registerEntity(SchemaEntity entity)
      Registers an entity instance that was parsed in a REST message based on a domain schema.
      Parameters:
      entity - the entity instance that was parsed
    • registerRelation

      void registerRelation(SchemaRelation relation)
      Registers a relation that was parsed in a REST message based on a domain schema.
      Parameters:
      relation - the relation that should be registered
    • registerAttribute

      void registerAttribute(SchemaAttribute attribute)
      Registers an attribute that was parsed in a REST message based on a domain schema.
      Parameters:
      attribute - the attribute that should be registered
    • registerRoot

      void registerRoot(EntityValue reference)
      Registers the reference to the root entity instance in a REST message based on a domain schema. The root entity instance should already be registered with registerEntity(SchemaEntity) when this method is called. The purpose of this method is to indicate to the validator which of the registered entity instances is the root instance.
      Parameters:
      reference - the reference to the root entity instance
    • registerArgument

      void registerArgument(SchemaArgument argument)
      Parameters:
      argument - Schema agrument with name, values and validations
    • registerFragment

      void registerFragment(SchemaFragment fragment)
      Parameters:
      fragment - Schema fragment with name, value and validations
    • registerHeader

      void registerHeader(SchemaHeader header)
      Parameters:
      header - Schema header with name, values and validations
    • validate

      void validate(ParserContext parserContext)
      Iterate each registered attribute and relation in the data structure and call the validate method on it.
      Parameters:
      parserContext - Context that is used for validation
    • getRootName

      String getRootName()
      Returns the name of the root element of the validated message. When the message is XML, this name should be equal to the tag name of the root XML element. The name may also be null, for example in JSON format, the root object doesn't have a name.
      Returns:
      the root name, may be null.