public interface ProcessorHandler
Processor handler that can handle and apply stitch processor, in other words it is responsible for stitch transformation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns file parameter name for external file.
    com.fasterxml.jackson.databind.JsonNode
    handle(com.fasterxml.jackson.databind.JsonNode input, StitchProcessor processor, DeploymentContext deploymentContext, Map<String,Object> params)
    This method is responsible for stitch transformation.
    Returns type that can be handled by this handler.
    void
    Method for processor validation during parsing/validation phase.
  • Method Details

    • type

      String type()
      Returns type that can be handled by this handler.
      Returns:
      type that can be handled by handler.
    • fileParameterName

      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, Map<String,Object> params) throws Exception
      This method is responsible for stitch transformation. It should do whatever is expected from processor to transform input.
      Parameters:
      input - to handler as JsonNode
      processor - that is being applied
      deploymentContext - context for deployment associated with stitch transformation
      params - parameters given to processor
      Returns:
      transformed input with applied processor as JsonNode.
      Throws:
      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