Interface ConstraintContext

All Superinterfaces:
DependenciesDefinitionContext, SchemaNodeContext

public interface ConstraintContext extends DependenciesDefinitionContext
Provides methods for setting up a constraint in the context of its data model.
See Also:
  • Method Details

    • setDependencyToLocalNode

      void setDependencyToLocalNode()
      Specifies that the validation result of the current constraint depends only on the local value of the underlying node. Except for changes to this local value, the validation result will not be affected by any external events.

      For more information, see Dependencies and Validation section.

      Throws:
      IllegalStateException - if a value dependency has been added to this constraint or if the associated field is computed.
    • setBlocksCommitToNever

      void setBlocksCommitToNever()
      Specifies that the current constraint must never block an operation, even if it adds validation errors.

      When submitting a form in the context of the user interface, the current constraint will not be checked on user input. This allows relaxing the default behavior which prevents from submitting erroneous values. The current constraint will be still checked after submitting a form, if the form is valid and modified values have been committed.

      Since:
      5.5.0