Interface CustomMetadataPolicyOperator

All Known Implementing Classes:
BeanMetadataPolicyOperator, DefaultMetadataPolicyOperator

public interface CustomMetadataPolicyOperator
Interface describing a custom policy operator to be used with MetadataPolicy objects.
Since:
3.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Object inputValue, MetadataPolicy policy)
    Apply the operator for the given input that has the given metadata policy attached.
    boolean
    Validate whether the operator is compatible with the other operators in the policy.
  • Method Details

    • validate

      boolean validate(@Nonnull MetadataPolicy policy)
      Validate whether the operator is compatible with the other operators in the policy.
      Parameters:
      policy - The metadata policy to be used by the custom policy operator.
      Returns:
      true if
    • apply

      @Nullable Object apply(@Nullable Object inputValue, @Nonnull MetadataPolicy policy) throws ConstraintViolationException
      Apply the operator for the given input that has the given metadata policy attached.
      Parameters:
      inputValue - The value to be used by the custom policy operator.
      policy - The metadata policy to be used by the custom policy operator.
      Returns:
      The value returned by the custom policy operator.
      Throws:
      ConstraintViolationException - If the value-check of the custom operator fails.