Class AbstractToTextResolver<S>

java.lang.Object
org.wickedsource.docxstamper.replace.typeresolver.AbstractToTextResolver<S>
Type Parameters:
S - the type which to map into a run of text.
All Implemented Interfaces:
ITypeResolver<S>

@Deprecated(since="1.6.7", forRemoval=true) public abstract class AbstractToTextResolver<S> extends Object implements ITypeResolver<S>
Deprecated, for removal: This API element is subject to removal in a future version.
Abstract ITypeResolver that takes a String from the implementing subclass and creates a Run of text from it.
Version:
${version}
Author:
Joseph Verron
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Deprecated, for removal: This API element is subject to removal in a future version.
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.docx4j.wml.R
    resolve(org.docx4j.openpackaging.packages.WordprocessingMLPackage document, S expressionResult)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method is called when a placeholder in the .docx template is to replaced by the result of an expression that was found in the .docx template.
    protected abstract String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Resolves the String for the given object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractToTextResolver

      protected AbstractToTextResolver()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default constructor.
  • Method Details

    • resolve

      public org.docx4j.wml.R resolve(org.docx4j.openpackaging.packages.WordprocessingMLPackage document, S expressionResult)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is called when a placeholder in the .docx template is to replaced by the result of an expression that was found in the .docx template. It creates an object of the DOCX4J api that is put in the place of the found expression. Creates a Run of text from the resolved String.
      Specified by:
      resolve in interface ITypeResolver<S>
      Parameters:
      document - the Word document that can be accessed via the DOCX4J api.
      expressionResult - the result of an expression. Only objects of classes this type resolver is registered for within the TypeResolverRegistrey are passed into this method.
      Returns:
      an object of the DOCX4J api (usually of type org.docx4j.wml.R = "run of text") that will be put in the place of an expression found in the .docx document.
    • resolveStringForObject

      protected abstract String resolveStringForObject(S object)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Resolves the String for the given object.
      Parameters:
      object - the object to resolve the String for.
      Returns:
      the String for the given object.