Package org.bson

Interface FieldNameValidator

All Known Implementing Classes:
CollectibleDocumentFieldNameValidator, MappedFieldNameValidator, NoOpFieldNameValidator, UpdateFieldNameValidator

@Deprecated(since="2022-10-31") public interface FieldNameValidator
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A field name validator, for use by BSON writers to validate field names as documents are encoded.
Since:
3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Gets a new validator to use for the value of the field with the given name.
    boolean
    validate(String fieldName)
    Deprecated.
    Returns true if the field name is valid, false otherwise.
  • Method Details

    • validate

      boolean validate(String fieldName)
      Deprecated.
      Returns true if the field name is valid, false otherwise.
      Parameters:
      fieldName - the field name
      Returns:
      true if the field name is valid, false otherwise
    • getValidatorForField

      FieldNameValidator getValidatorForField(String fieldName)
      Deprecated.
      Gets a new validator to use for the value of the field with the given name.
      Parameters:
      fieldName - the field name
      Returns:
      a non-null validator