Class PayloadProcessor

    • Constructor Detail

      • PayloadProcessor

        public PayloadProcessor​(Smooks smooks,
                                SinkType sinkType)
        Public constructor.
        Parameters:
        smooks - The Smooks instance to be used.
        sinkType - The required sink type.
    • Method Detail

      • setJavaResultBeanId

        public void setJavaResultBeanId​(String javaResultBeanId)
        Set the bean ID to be unpacked from a JavaSink.

        Only relevant for SinkType.JAVA. If not specified, the complete result Map will be returned as the result of the process(Object, ExecutionContext) method call.

        Parameters:
        javaResultBeanId - The bean ID to be unpacked.
      • process

        public final Object process​(Object payload,
                                    ExecutionContext executionContext)
                             throws SmooksException
        Process the supplied payload.

        See class level javadoc.

        Parameters:
        payload - The payload to be filtered. See class level javadoc for supported data types.
        Returns:
        The filter result. Will be "unpacked" as per the SinkType supplied in the constructor.
        Throws:
        SmooksException