Class TextConsumerInterceptor

    • Field Detail

      • isTextConsumer

        protected boolean isTextConsumer
    • Constructor Detail

      • TextConsumerInterceptor

        public TextConsumerInterceptor()
    • Method Detail

      • postConstruct

        @PostConstruct
        public void postConstruct()
      • visitBefore

        public void visitBefore​(Element element,
                                ExecutionContext executionContext)
                         throws SmooksException
        Description copied from interface: BeforeVisitor
        Visits the beginning of an Element.
        Specified by:
        visitBefore in interface BeforeVisitor
        Parameters:
        element - the Element representing the beginning of the fragment. The Element's ancestors are traversable unless the global configuration parameter maintain.element.stack is set to false. The Element's child nodes are not traversable.
        executionContext - the current ExecutionContext
        Throws:
        SmooksException
      • visitAfter

        public void visitAfter​(Element element,
                               ExecutionContext executionContext)
                        throws SmooksException
        Description copied from interface: AfterVisitor
        Visits the end of an Element.
        Specified by:
        visitAfter in interface AfterVisitor
        Parameters:
        element - the Element representing the end of the fragment. The Element's ancestors are traversable unless the global configuration parameter maintain.element.stack is set to false. The Element's child nodes are traversable if one of the following conditions are met:
        executionContext - the current ExecutionContext
        Throws:
        SmooksException
      • visitChildText

        public void visitChildText​(CharacterData characterData,
                                   ExecutionContext executionContext)
                            throws SmooksException
        Description copied from interface: ChildrenVisitor
        Visits the character data of an Element. This method is invoked once for each chunk of character data. A shortcut for collecting character data is to annotate the SaxNgVisitor implementation with org.smooks.engine.delivery.sax.annotation.StreamResultWriter, or stash the character data in a TextAccumulatorMemento and restore the TextAccumulatorMemento in AfterVisitor.visitAfter(Element, ExecutionContext).
        Specified by:
        visitChildText in interface ChildrenVisitor
        Parameters:
        characterData - the node which includes character data but not any child Elements. The Element's ancestors are traversable unless the global configuration parameter maintain.element.stack is set to false.
        executionContext - the current ExecutionContext
        Throws:
        SmooksException
      • visitChildElement

        public void visitChildElement​(Element childElement,
                                      ExecutionContext executionContext)
        Description copied from interface: ChildrenVisitor
        Visits a child Element. This method is invoked once for each child Element.
        Specified by:
        visitChildElement in interface ChildrenVisitor
        Parameters:
        childElement - the child ElementElement's ancestors are traversable unless the global configuration parameter maintain.element.stack is set to false. The Element's child nodes are not traversable.
        executionContext - the current ExecutionContext