Class EndpointValidationResult
java.lang.Object
org.apache.camel.catalog.EndpointValidationResult
- All Implemented Interfaces:
Serializable
Details result of validating endpoint uri.
- Since:
- 3.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultValue(String name, String value) Adds a default value entry for an option that was not configured.voidaddDeprecated(String name) Adds a deprecated option warning to the validation result.voidaddIncapable(String uri) Adds an incapable URI warning to the validation result.voidaddInvalidArray(String name, String value) Adds an invalid array value error to the validation result.voidaddInvalidBoolean(String name, String value) Adds an invalid boolean value error to the validation result.voidaddInvalidDuration(String name, String value) Adds an invalid duration value error to the validation result.voidaddInvalidEnum(String name, String value) Adds an invalid enum value error to the validation result.voidaddInvalidEnumChoices(String name, String[] choices) Adds the valid enum choices for an invalid enum option.voidaddInvalidEnumSuggestions(String name, String[] suggestions) Adds spelling suggestions for an invalid enum option value.voidaddInvalidInteger(String name, String value) Adds an invalid integer value error to the validation result.voidaddInvalidMap(String name, String value) Adds an invalid map value error to the validation result.voidaddInvalidNumber(String name, String value) Adds an invalid number value error to the validation result.voidaddInvalidReference(String name, String value) Adds an invalid bean reference error to the validation result.voidaddLenient(String name) voidaddNotConsumerOnly(String name) voidaddNotProducerOnly(String name) voidaddRequired(String name) Adds a missing required option error to the validation result.voidaddSyntaxError(String syntaxError) Adds a syntax error to the validation result.voidaddUnknown(String name) Adds an unknown option error to the validation result.voidaddUnknownComponent(String name) Adds an unknown component warning to the validation result.voidaddUnknownSuggestions(String name, String[] suggestions) Adds spelling suggestions for an unknown option name.Returns options that were not configured and are using default values, or null if none.Returns the set of deprecated option names that are used, or null if none.getEnumChoices(String optionName) Returns the list of valid enum choices for the given option name.@Nullable StringReturns the incapable URI that could not be validated, or null if not applicable.Returns options with invalid array values, or null if none.Returns options with invalid boolean values, or null if none.Returns options with invalid duration values, or null if none.Returns options with invalid enum values mapped to the invalid value, or null if none.Returns options with invalid enum values mapped to the valid choices, or null if none.Returns spelling suggestions for invalid enum option values, or null if none.Returns options with invalid integer values, or null if none.Returns options with invalid map values, or null if none.Returns options with invalid number values, or null if none.Returns options with invalid bean reference values, or null if none.intReturns the number of validation errors.intReturns the number of validation warnings.Returns the set of required option names that are missing, or null if none.@Nullable StringReturns the syntax error message, or null if there is no syntax error.Returns the set of unknown option names, or null if none.@Nullable StringReturns the name of an unknown component that was used, or null if none.Returns spelling suggestions for unknown option names, or null if none.@Nullable StringgetUri()booleanReturns true if the validation result has one or more errors.booleanReturns true if the validation result has one or more warnings.booleanReturns true if the validation result has no errors.@Nullable StringsummaryErrorMessage(boolean includeHeader) A human readable summary of the validation errors.@Nullable StringsummaryErrorMessage(boolean includeHeader, boolean ignoreDeprecated, boolean includeWarnings) A human readable summary of the validation errors.
-
Constructor Details
-
EndpointValidationResult
public EndpointValidationResult() -
EndpointValidationResult
-
-
Method Details
-
getUri
-
isSuccess
public boolean isSuccess()Returns true if the validation result has no errors. -
addLenient
-
addNotConsumerOnly
-
addNotProducerOnly
-
getNotConsumerOnly
-
getNotProducerOnly
-
getLenient
-
summaryErrorMessage
A human readable summary of the validation errors.- Parameters:
includeHeader- whether to include a header- Returns:
- the summary, or null if no validation errors
-
summaryErrorMessage
public @Nullable String summaryErrorMessage(boolean includeHeader, boolean ignoreDeprecated, boolean includeWarnings) A human readable summary of the validation errors.- Parameters:
includeHeader- whether to include a headerignoreDeprecated- whether to ignore deprecated options in use as an error or notincludeWarnings- whether to include warnings as an error or not- Returns:
- the summary, or null if no validation errors
-
hasErrors
public boolean hasErrors()Returns true if the validation result has one or more errors. -
getNumberOfErrors
public int getNumberOfErrors()Returns the number of validation errors. -
hasWarnings
public boolean hasWarnings()Returns true if the validation result has one or more warnings. -
getNumberOfWarnings
public int getNumberOfWarnings()Returns the number of validation warnings. -
addSyntaxError
Adds a syntax error to the validation result. -
addIncapable
Adds an incapable URI warning to the validation result. -
addUnknownComponent
Adds an unknown component warning to the validation result. -
addUnknown
Adds an unknown option error to the validation result. -
addUnknownSuggestions
-
addRequired
Adds a missing required option error to the validation result. -
addDeprecated
Adds a deprecated option warning to the validation result. -
addInvalidEnum
-
addInvalidEnumChoices
-
addInvalidEnumSuggestions
-
addInvalidReference
-
addInvalidMap
-
addInvalidArray
-
addInvalidBoolean
-
addInvalidInteger
-
addInvalidNumber
-
addInvalidDuration
-
addDefaultValue
-
getSyntaxError
Returns the syntax error message, or null if there is no syntax error. -
getIncapable
Returns the incapable URI that could not be validated, or null if not applicable. -
getUnknown
-
getUnknownSuggestions
-
getUnknownComponent
Returns the name of an unknown component that was used, or null if none. -
getRequired
-
getDeprecated
-
getInvalidEnum
-
getInvalidEnumChoices
-
getInvalidEnumSuggestions
-
getEnumChoices
-
getInvalidReference
-
getInvalidMap
-
getInvalidArray
-
getInvalidBoolean
-
getInvalidInteger
-
getInvalidNumber
-
getInvalidDuration
-
getDefaultValues
-