org.appng.core.templating

## Class ReplaceTagProcessor

- java.lang.Object
- - org.thymeleaf.processor.AbstractProcessor
  - - org.thymeleaf.processor.element.AbstractElementTagProcessor
    - - org.thymeleaf.processor.element.AbstractAttributeTagProcessor
      - - org.thymeleaf.standard.processor.AbstractStandardFragmentInsertionTagProcessor
        - - org.appng.core.templating.ReplaceTagProcessor

- All Implemented Interfaces:
    ThymeleafStandardReplaceTagProcessorCaller, org.thymeleaf.processor.element.IElementProcessor, org.thymeleaf.processor.element.IElementTagProcessor, org.thymeleaf.processor.IProcessor

      public class ReplaceTagProcessor
      extends org.thymeleaf.standard.processor.AbstractStandardFragmentInsertionTagProcessor
      implements ThymeleafStandardReplaceTagProcessorCaller

  A custom implementation of the `StandardReplaceTagProcessor`. Before calling the original doProcess method, it first calls all known interceptors. The interceptors can customize the process attributes and context to call another fragment instead. In this case the interceptor has to return 'true' to indicate that the processing is already done
  Author:
    Claus Stümke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ATTR_NAME`
    `static int` | `PRECEDENCE`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ReplaceTagProcessor(org.thymeleaf.templatemode.TemplateMode templateMode, String dialectPrefix, Collection<ThymeleafReplaceInterceptor> interceptors)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `callStandardDoProcess(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, org.thymeleaf.engine.AttributeName attributeName, String attributeValue, org.thymeleaf.processor.element.IElementTagStructureHandler structureHandler)` this method is for the interceptors to be able to do their own kind of processing call with customized attributes or context
    `protected void` | `doProcess(org.thymeleaf.context.ITemplateContext context, org.thymeleaf.model.IProcessableElementTag tag, org.thymeleaf.engine.AttributeName attributeName, String attributeValue, org.thymeleaf.processor.element.IElementTagStructureHandler structureHandler)`

    - ### Methods inherited from class org.thymeleaf.processor.element.AbstractAttributeTagProcessor

      `doProcess`

    - ### Methods inherited from class org.thymeleaf.processor.element.AbstractElementTagProcessor

      `getDialectPrefix, getMatchingAttributeName, getMatchingElementName, process`

    - ### Methods inherited from class org.thymeleaf.processor.AbstractProcessor

      `getPrecedence, getTemplateMode`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.thymeleaf.processor.IProcessor

      `getPrecedence, getTemplateMode`

- - ### Field Detail

    - #### PRECEDENCE

          public static final int PRECEDENCE

      See Also:
        Constant Field Values

    - #### ATTR_NAME

          public static final String ATTR_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ReplaceTagProcessor

          protected ReplaceTagProcessor(org.thymeleaf.templatemode.TemplateMode templateMode,
                                        String dialectPrefix,
                                        Collection<ThymeleafReplaceInterceptor> interceptors)

  - ### Method Detail

    - #### doProcess

          protected void doProcess(org.thymeleaf.context.ITemplateContext context,
                                   org.thymeleaf.model.IProcessableElementTag tag,
                                   org.thymeleaf.engine.AttributeName attributeName,
                                   String attributeValue,
                                   org.thymeleaf.processor.element.IElementTagStructureHandler structureHandler)

      Overrides:
        `doProcess` in class `org.thymeleaf.standard.processor.AbstractStandardFragmentInsertionTagProcessor`

    - #### callStandardDoProcess

          public void callStandardDoProcess(org.thymeleaf.context.ITemplateContext context,
                                            org.thymeleaf.model.IProcessableElementTag tag,
                                            org.thymeleaf.engine.AttributeName attributeName,
                                            String attributeValue,
                                            org.thymeleaf.processor.element.IElementTagStructureHandler structureHandler)

      this method is for the interceptors to be able to do their own kind of processing call with customized attributes or context
      Specified by:
        `callStandardDoProcess` in interface `ThymeleafStandardReplaceTagProcessorCaller`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.