Class BindingHandler

java.lang.Object
org.docx4j.model.datastorage.BindingHandler

public class BindingHandler
extends java.lang.Object
  • Field Details

    • CORE_PROPERTIES_STOREITEMID

      public static final java.lang.String CORE_PROPERTIES_STOREITEMID
      See Also:
      Constant Field Values
    • EXTENDED_PROPERTIES_STOREITEMID

      public static final java.lang.String EXTENDED_PROPERTIES_STOREITEMID
      See Also:
      Constant Field Values
    • COVERPAGE_PROPERTIES_STOREITEMID

      public static final java.lang.String COVERPAGE_PROPERTIES_STOREITEMID
      See Also:
      Constant Field Values
  • Constructor Details

  • Method Details

    • setHyperlinkStyle

      public static void setHyperlinkStyle​(java.lang.String hyperlinkStyleID)
      Deprecated.
      Configure, how the handler handles links found in Custom XML. If hyperlinkStyleId is set to null, strings containing 'http://' or 'https://' are not converted to w:hyperlink. This is the default behavior. If hyperlinkStyleId is set to "someWordHyperlinkStyleName", strings containing 'http://' or 'https://' or or 'mailto:' are converted to w:hyperlink. The default Word hyperlink style name is "Hyperlink". Due to the architecture of this class, this is a static flag changing the behavior of all following calls to applyBindings(org.docx4j.openpackaging.packages.WordprocessingMLPackage).
      Parameters:
      hyperlinkStyleID - The style to use for hyperlinks (eg Hyperlink)
    • getHyperlinkStyleId

      public static java.lang.String getHyperlinkStyleId()
      Deprecated.
    • getHyperlinkResolver

      public static BindingHyperlinkResolver getHyperlinkResolver()
      Returns:
      the hyperlinkResolver
      Since:
      3.0.0
    • setHyperlinkResolver

      public static void setHyperlinkResolver​(BindingHyperlinkResolver hyperlinkResolver)
      Parameters:
      hyperlinkResolver - the hyperlinkResolver to set
      Since:
      3.0.0
    • getValueInserterPlainText

      public static ValueInserterPlainText getValueInserterPlainText()
    • setValueInserterPlainText

      public static void setValueInserterPlainText​(ValueInserterPlainText valueInserterPlainText)
      Allow user to customise what is inserted into the document when the bind is performed.
      Parameters:
      valueInserterPlainText -
      Since:
      6.0.1
    • setDomToXPathMap

      public void setDomToXPathMap​(DomToXPathMap domToXPathMap)
    • setStartingIdForNewBookmarks

      public void setStartingIdForNewBookmarks​(java.util.concurrent.atomic.AtomicInteger bookmarkId)
      Provide a way to set the starting bookmark ID number for the purposes of Binding Traverse. For efficiency, user code needs to pass this value through from the previous stage (repeats/condition handing). If it isn't, the value will be calculated (less efficient). New bookmarks could be created from XHTML, or renumbered in Flat OPC XML (TODO).
      Parameters:
      bookmarkId -
      Since:
      3.2.1
    • initBookmarkIdStart

      protected java.util.concurrent.atomic.AtomicInteger initBookmarkIdStart()
    • applyBindings

      @Deprecated public static void applyBindings​(WordprocessingMLPackage wordMLPackage) throws Docx4JException
      Deprecated.
      Throws:
      Docx4JException
    • applyBindings

      public void applyBindings() throws Docx4JException
      Throws:
      Docx4JException
    • getXpathsMap

      public java.util.Map<java.lang.String,​Xpaths.Xpath> getXpathsMap()
    • applyBindings

      public void applyBindings​(JaxbXmlPart part) throws Docx4JException
      Throws:
      Docx4JException
    • xpathGetString

      public static java.lang.String xpathGetString​(WordprocessingMLPackage pkg, java.util.Map<java.lang.String,​CustomXmlPart> customXmlDataStorageParts, CTDataBinding db)
    • xpathGetString

      public static java.lang.String xpathGetString​(WordprocessingMLPackage pkg, java.util.Map<java.lang.String,​CustomXmlPart> customXmlDataStorageParts, java.lang.String storeItemId, java.lang.String xpath, java.lang.String prefixMappings)
      Used by OpenDoPE handler, but not directly by bind.xslt anymore. Not multiLine aware.
      Parameters:
      customXmlDataStorageParts -
      storeItemId -
      xpath -
      prefixMappings - a string such as "xmlns:ns0='http://schemas.medchart'"
      Returns: