Package com.networknt.schema
Enum ValidatorTypeCode
- java.lang.Object
-
- java.lang.Enum<ValidatorTypeCode>
-
- com.networknt.schema.ValidatorTypeCode
-
- All Implemented Interfaces:
ErrorMessageType,Keyword,Serializable,Comparable<ValidatorTypeCode>
public enum ValidatorTypeCode extends Enum<ValidatorTypeCode> implements Keyword, ErrorMessageType
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValidatorTypeCodefromValue(String value)StringgetCustomMessage()StringgetErrorCode()Your error code.StringgetErrorCodeKey()MessageFormatgetMessageFormat()optional message formatstatic List<ValidatorTypeCode>getNonFormatKeywords(SpecVersion.VersionFlag versionFlag)StringgetValue()longgetVersionCode()JsonValidatornewValidator(String schemaPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidationContext validationContext)voidsetCustomMessage(String message)StringtoString()static ValidatorTypeCodevalueOf(String name)Returns the enum constant of this type with the specified name.static ValidatorTypeCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADDITIONAL_PROPERTIES
public static final ValidatorTypeCode ADDITIONAL_PROPERTIES
-
ALL_OF
public static final ValidatorTypeCode ALL_OF
-
ANY_OF
public static final ValidatorTypeCode ANY_OF
-
CROSS_EDITS
public static final ValidatorTypeCode CROSS_EDITS
-
DEPENDENCIES
public static final ValidatorTypeCode DEPENDENCIES
-
EDITS
public static final ValidatorTypeCode EDITS
-
ENUM
public static final ValidatorTypeCode ENUM
-
FORMAT
public static final ValidatorTypeCode FORMAT
-
ITEMS
public static final ValidatorTypeCode ITEMS
-
MAXIMUM
public static final ValidatorTypeCode MAXIMUM
-
MAX_ITEMS
public static final ValidatorTypeCode MAX_ITEMS
-
MAX_LENGTH
public static final ValidatorTypeCode MAX_LENGTH
-
MAX_PROPERTIES
public static final ValidatorTypeCode MAX_PROPERTIES
-
MINIMUM
public static final ValidatorTypeCode MINIMUM
-
MIN_ITEMS
public static final ValidatorTypeCode MIN_ITEMS
-
MIN_LENGTH
public static final ValidatorTypeCode MIN_LENGTH
-
MIN_PROPERTIES
public static final ValidatorTypeCode MIN_PROPERTIES
-
MULTIPLE_OF
public static final ValidatorTypeCode MULTIPLE_OF
-
NOT_ALLOWED
public static final ValidatorTypeCode NOT_ALLOWED
-
NOT
public static final ValidatorTypeCode NOT
-
ONE_OF
public static final ValidatorTypeCode ONE_OF
-
PATTERN_PROPERTIES
public static final ValidatorTypeCode PATTERN_PROPERTIES
-
PATTERN
public static final ValidatorTypeCode PATTERN
-
PREFIX_ITEMS
public static final ValidatorTypeCode PREFIX_ITEMS
-
PROPERTIES
public static final ValidatorTypeCode PROPERTIES
-
READ_ONLY
public static final ValidatorTypeCode READ_ONLY
-
REF
public static final ValidatorTypeCode REF
-
REQUIRED
public static final ValidatorTypeCode REQUIRED
-
TYPE
public static final ValidatorTypeCode TYPE
-
UNION_TYPE
public static final ValidatorTypeCode UNION_TYPE
-
UNIQUE_ITEMS
public static final ValidatorTypeCode UNIQUE_ITEMS
-
DATETIME
public static final ValidatorTypeCode DATETIME
-
UUID
public static final ValidatorTypeCode UUID
-
ID
public static final ValidatorTypeCode ID
-
IF_THEN_ELSE
public static final ValidatorTypeCode IF_THEN_ELSE
-
EXCLUSIVE_MAXIMUM
public static final ValidatorTypeCode EXCLUSIVE_MAXIMUM
-
EXCLUSIVE_MINIMUM
public static final ValidatorTypeCode EXCLUSIVE_MINIMUM
-
TRUE
public static final ValidatorTypeCode TRUE
-
FALSE
public static final ValidatorTypeCode FALSE
-
CONST
public static final ValidatorTypeCode CONST
-
CONTAINS
public static final ValidatorTypeCode CONTAINS
-
PROPERTYNAMES
public static final ValidatorTypeCode PROPERTYNAMES
-
DEPENDENT_REQUIRED
public static final ValidatorTypeCode DEPENDENT_REQUIRED
-
DEPENDENT_SCHEMAS
public static final ValidatorTypeCode DEPENDENT_SCHEMAS
-
UNEVALUATED_PROPERTIES
public static final ValidatorTypeCode UNEVALUATED_PROPERTIES
-
-
Method Detail
-
values
public static ValidatorTypeCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ValidatorTypeCode c : ValidatorTypeCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValidatorTypeCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNonFormatKeywords
public static List<ValidatorTypeCode> getNonFormatKeywords(SpecVersion.VersionFlag versionFlag)
-
fromValue
public static ValidatorTypeCode fromValue(String value)
-
newValidator
public JsonValidator newValidator(String schemaPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidationContext validationContext) throws Exception
- Specified by:
newValidatorin interfaceKeyword- Throws:
Exception
-
toString
public String toString()
- Overrides:
toStringin classEnum<ValidatorTypeCode>
-
getErrorCode
public String getErrorCode()
Description copied from interface:ErrorMessageTypeYour error code. Please ensure global uniqueness. Builtin error codes are sequential numbers.Customer error codes could have a prefix to denote the namespace of your custom keywords and errors.
- Specified by:
getErrorCodein interfaceErrorMessageType- Returns:
- error code
-
getMessageFormat
public MessageFormat getMessageFormat()
Description copied from interface:ErrorMessageTypeoptional message format- Specified by:
getMessageFormatin interfaceErrorMessageType- Returns:
- the message format or null if no message text shall be rendered.
-
setCustomMessage
public void setCustomMessage(String message)
- Specified by:
setCustomMessagein interfaceKeyword
-
getCustomMessage
public String getCustomMessage()
- Specified by:
getCustomMessagein interfaceErrorMessageType
-
getErrorCodeKey
public String getErrorCodeKey()
-
getVersionCode
public long getVersionCode()
-
-