Package org.frankframework.pipes
Class JsonValidator
java.lang.Object
org.frankframework.core.TransactionAttributes
org.frankframework.pipes.AbstractPipe
org.frankframework.pipes.FixedForwardPipe
org.frankframework.pipes.AbstractValidator
org.frankframework.pipes.JsonValidator
- All Implemented Interfaces:
HasTransactionAttribute
,IConfigurable
,IConfigurationAware
,IDualModeValidator
,IForwardTarget
,INamedObject
,IPipe
,IScopeProvider
,IValidator
,IWithParameters
,EventThrowing
,HasStatistics
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
Pipe that validates the input message against a JSON Schema.
- Author:
- Gerrit van Brakel
-
Nested Class Summary
Nested classes/interfaces inherited from class org.frankframework.pipes.AbstractValidator
AbstractValidator.ResponseValidatorWrapper
-
Field Summary
Fields inherited from class org.frankframework.pipes.AbstractPipe
parameterNamesMustBeUnique
Fields inherited from class org.frankframework.core.TransactionAttributes
log
Fields inherited from interface org.frankframework.core.IPipe
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checks for correct configuration of forwardprotected org.leadpony.justify.api.JsonSchema
void
setReasonSessionKey
(String reasonSessionKey) If set: key of session variable to store reasons of mis-validation invoid
The JSON Schema to validate tovoid
setSubSchemaPrefix
(String prefix) Prefix to element name to find subschema in schemavoid
start()
Perform necessary action to start the pipe.protected PipeForward
validate
(Message messageToValidate, PipeLineSession session, boolean responseMode, String messageRoot) Methods inherited from class org.frankframework.pipes.AbstractValidator
determineForward, doPipe, doPipe, getResponseRoot, getResponseValidator, getRoot, getSchemaSessionKey, isConfiguredForMixedValidation, isForwardFailureToSuccess, isThrowException, setForwardFailureToSuccess, setResponseRoot, setRoot, setSchemaSessionKey, validate, validate
Methods inherited from class org.frankframework.pipes.FixedForwardPipe
getIfParam, getIfValue, getOnlyIfSessionKey, getOnlyIfValue, getParameterValue, getSuccessForward, getUnlessSessionKey, getUnlessValue, isSkipOnEmptyInput, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
Methods inherited from class org.frankframework.pipes.AbstractPipe
addForward, addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getApplicationContext, getChompCharSize, getConfigurationClassLoader, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getEventSourceName, getForwards, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getName, getParameterList, getPipeLine, getSecLogSessionKeys, getStoreResultInSessionKey, hasRegisteredForward, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, registerEvent, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setEventPublisher, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPipeLine, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, stop, throwEvent
Methods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, getTransactionAttribute, getTransactionTimeout, getTxDef, isTransacted, isTransacted, setTransacted, setTransactionAttribute, setTransactionTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.IConfigurationAware
getApplicationContext, getName
Methods inherited from interface org.frankframework.core.IForwardTarget
getName
Methods inherited from interface org.frankframework.core.INamedObject
getName
Methods inherited from interface org.frankframework.core.IPipe
addForward, consumesSessionVariable, getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getForwards, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, registerEvent, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setPipeLine, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, stop, throwEvent, throwEvent
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.IValidator
setName
-
Constructor Details
-
JsonValidator
public JsonValidator()
-
-
Method Details
-
configure
Description copied from class:FixedForwardPipe
checks for correct configuration of forward- Specified by:
configure
in interfaceIConfigurable
- Specified by:
configure
in interfaceIPipe
- Overrides:
configure
in classAbstractValidator
- Throws:
ConfigurationException
-
start
public void start()Description copied from interface:IPipe
Perform necessary action to start the pipe. This method is executed after theIPipe.configure()
method, for each start and stop command of the adapter.- Specified by:
start
in interfaceIPipe
- Overrides:
start
in classAbstractPipe
-
validate
protected PipeForward validate(Message messageToValidate, PipeLineSession session, boolean responseMode, String messageRoot) throws PipeRunException - Specified by:
validate
in classAbstractValidator
- Throws:
PipeRunException
-
getJsonSchema
- Throws:
IOException
-
setSchema
The JSON Schema to validate to -
setSubSchemaPrefix
Prefix to element name to find subschema in schema- Default value
- /definitions/
-
setReasonSessionKey
If set: key of session variable to store reasons of mis-validation in- Default value
- failureReason
-
getSchema
-
getSubSchemaPrefix
-
getReasonSessionKey
-