Interface ProcessorHandler
-
public interface ProcessorHandler
Processor handler that can handle and apply stitch processor, in other words it is responsible for stitch transformation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
fileParameterName()
Returns file parameter name for external file.com.fasterxml.jackson.databind.JsonNode
handle(com.fasterxml.jackson.databind.JsonNode input, StitchProcessor processor, DeploymentContext deploymentContext, java.util.Map<java.lang.String,java.lang.Object> params)
This method is responsible for stitch transformation.java.lang.String
type()
Returns type that can be handled by this handler.void
validate(StitchProcessorDto processor)
Method for processor validation during parsing/validation phase.
-
-
-
Method Detail
-
type
java.lang.String type()
Returns type that can be handled by this handler.- Returns:
- type that can be handled by handler.
-
fileParameterName
java.lang.String fileParameterName()
Returns file parameter name for external file.- Returns:
- parameter name that corresponds to one that can be saved externally.
-
handle
com.fasterxml.jackson.databind.JsonNode handle(com.fasterxml.jackson.databind.JsonNode input, StitchProcessor processor, DeploymentContext deploymentContext, java.util.Map<java.lang.String,java.lang.Object> params) throws java.lang.Exception
This method is responsible for stitch transformation. It should do whatever is expected from processor to transform input.- Parameters:
input
- to handler asJsonNode
processor
- that is being applieddeploymentContext
- context for deployment associated with stitch transformationparams
- parameters given to processor- Returns:
- transformed input with applied processor as
JsonNode
. - Throws:
java.lang.Exception
- when handling of a processor failed
-
validate
void validate(StitchProcessorDto processor) throws InvalidProcessorException
Method for processor validation during parsing/validation phase.- Parameters:
processor
- to be validated- Throws:
InvalidProcessorException
- when processor can't pass validation
-
-