Class AttributesBuilder

java.lang.Object
org.asciidoctor.AttributesBuilder

public class AttributesBuilder extends Object
  • Method Details

    • attributes

      @Deprecated public static AttributesBuilder attributes()
      Deprecated.
      Creates attributes builder.
      Returns:
      attributes builder.
    • attributes

      @Deprecated public static AttributesBuilder attributes(String[] arguments)
      Deprecated.
      Creates attributes builder.
      Returns:
      attributes builder.
    • attributes

      @Deprecated public static AttributesBuilder attributes(String arguments)
      Deprecated.
      Creates attributes builder.
      Returns:
      attributes builder.
    • sourceLanguage

      public AttributesBuilder sourceLanguage(String sourceLanguage)
      Source language attribute.
      Parameters:
      sourceLanguage - value.
      Returns:
      this instance.
    • skipFrontMatter

      public AttributesBuilder skipFrontMatter(boolean skipFrontMatter)
      Skips front matter.
      Parameters:
      skipFrontMatter - value.
      Returns:
      this instance.
    • ignoreUndefinedAttributes

      public AttributesBuilder ignoreUndefinedAttributes(boolean ignoreUndefinedAttributes)
      Sets ignore undefined flag so lines are kept when they contain a reference to a missing attribute.
      Parameters:
      ignoreUndefinedAttributes - value.
      Returns:
      this instance.
    • maxIncludeDepth

      public AttributesBuilder maxIncludeDepth(int maxIncludeDepth)
      Sets max include depth attribute.
      Parameters:
      maxIncludeDepth - value.
      Returns:
      this instance.
    • sectNumLevels

      public AttributesBuilder sectNumLevels(int sectnumlevels)
      Sets sect num levels attribute.
      Parameters:
      sectnumlevels - value.
      Returns:
      this instance.
    • attributeMissing

      public AttributesBuilder attributeMissing(String attributeMissing)
      Sets attribute missing attribute. (Possible values skip, drop, drop-line)
      Parameters:
      attributeMissing - value.
      Returns:
      this instance.
    • attributeUndefined

      public AttributesBuilder attributeUndefined(String attributeUndefined)
      Sets attribute undefined attribute. (Possible values skip, drop, drop-line)
      Parameters:
      attributeUndefined - value.
      Returns:
      this instance.
    • setAnchors

      public AttributesBuilder setAnchors(boolean setAnchors)
      Sets setanchor flag.
      Parameters:
      setAnchors - value.
      Returns:
      this instance.
    • untitledLabel

      public AttributesBuilder untitledLabel(String untitledLabel)
      Sets the untitled label value.
      Parameters:
      untitledLabel - value.
      Returns:
      this instance.
    • tableOfContents

      public AttributesBuilder tableOfContents(Placement placement)
      Sets table of contents attribute.
      Parameters:
      placement - where toc is rendered.
      Returns:
      this instance.
    • tableOfContents2

      @Deprecated public AttributesBuilder tableOfContents2(Placement placement)
      Sets table of contents 2 attribute.
      Parameters:
      placement - where toc is rendered.
      Returns:
      this instance.
    • allowUriRead

      public AttributesBuilder allowUriRead(boolean allowUriRead)
      Sets allow uri read attribute.
      Parameters:
      allowUriRead - value.
      Returns:
      this instance.
    • backend

      public AttributesBuilder backend(String backend)
      Sets backend attribue.
      Parameters:
      backend - value.
      Returns:
      this instance.
    • showTitle

      public AttributesBuilder showTitle(boolean showTitle)
      Sets showtitle value as an alias for notitle!
      Parameters:
      showTitle - value.
      Returns:
      this instance
    • title

      public AttributesBuilder title(String title)
      Sets title of document.
      Parameters:
      title - for document.
      Returns:
      this instance.
    • docType

      public AttributesBuilder docType(String docType)
      Sets doc type attribute.
      Parameters:
      docType - value.
      Returns:
      this instance.
    • imagesDir

      public AttributesBuilder imagesDir(String imagesDir)
      Sets image directory.
      Parameters:
      imagesDir - location.
      Returns:
      this instance.
    • sourceHighlighter

      public AttributesBuilder sourceHighlighter(String sourceHighlighter)
      Sets source highlighter processor. It should be supported by asciidoctor.
      Parameters:
      sourceHighlighter - name of the source highlighting library (e.g., coderay).
      Returns:
      this instance.
    • localDate

      public AttributesBuilder localDate(Date date)
      Sets local date for document.
      Parameters:
      date -
      Returns:
      this instance.
    • localTime

      public AttributesBuilder localTime(Date time)
      Sets local time for document.
      Parameters:
      time -
      Returns:
      this instance.
    • docDate

      public AttributesBuilder docDate(Date date)
      Sets doc date for current document.
      Parameters:
      date -
      Returns:
      this instance.
    • docTime

      public AttributesBuilder docTime(Date time)
      Sets doc time for current document.
      Parameters:
      time -
      Returns:
      this instance.
    • tableOfContents

      public AttributesBuilder tableOfContents(boolean toc)
      Sets if table of contents should be rendered or not
      Parameters:
      toc - value
      Returns:
      this instance.
    • styleSheetName

      public AttributesBuilder styleSheetName(String styleSheetName)
      Sets stylesheet name.
      Parameters:
      styleSheetName - of css file.
      Returns:
      this instance.
    • unsetStyleSheet

      public AttributesBuilder unsetStyleSheet()
      Unsets stylesheet name so document will be generated without style.
      Returns:
      this instance.
    • stylesDir

      public AttributesBuilder stylesDir(String stylesDir)
      Sets the styles dir.
      Parameters:
      stylesDir - directory.
      Returns:
      this instance.
    • linkCss

      public AttributesBuilder linkCss(boolean linkCss)
      Sets link css attribute.
      Parameters:
      linkCss - true if css is linked, false if css is embedded.
      Returns:
      this instance.
    • copyCss

      public AttributesBuilder copyCss(boolean copyCss)
      Sets copy css attribute.
      Parameters:
      copyCss - true if css should be copied to the output location, false otherwise.
      Returns:
      this instance.
    • icons

      public AttributesBuilder icons(String icons)
      Sets which admonition icons to use. Attributes.IMAGE_ICONS constant can be used to use the original icons with images or Attributes.FONT_ICONS for font icons (font-awesome).
      Parameters:
      icons - value.
      Returns:
      this instance.
    • iconFontRemote

      public AttributesBuilder iconFontRemote(boolean iconFontRemote)
      Enable icon font remote attribute. If enabled, will use the iconfont-cdn value to load the icon font URI; if disabled, will use the iconfont-name value to locate the icon font CSS file
      Parameters:
      iconFontRemote - true if attribute enabled false otherwise.
      Returns:
      this instance.
    • iconFontCdn

      public AttributesBuilder iconFontCdn(URI cdnUri)
      The URI prefix of the icon font; looks for minified CSS file based on iconfont-name value; used when iconfont-remote is set
      Parameters:
      cdnUri - uri where css is stored.
      Returns:
      this instance.
    • iconFontName

      public AttributesBuilder iconFontName(String iconFontName)
      The name of the stylesheet in the stylesdir to load (.css extension added automatically)
      Parameters:
      iconFontName - stylesheet name without .css extension.
      Returns:
      this instance.
    • iconsDir

      public AttributesBuilder iconsDir(String iconsDir)
      Sets icons directory location.
      Parameters:
      iconsDir - location.
      Returns:
      this instance.
    • dataUri

      public AttributesBuilder dataUri(boolean dataUri)
      Sets data-uri attribute.
      Parameters:
      dataUri - true if images should be embedded, false otherwise.
    • attribute

      public AttributesBuilder attribute(String attributeName)
      Sets custom or unlisted attribute to the default value, empty string.
      Parameters:
      attributeName - A flag-only attribute, such as "icons"
      Returns:
      this instance.
    • sectionNumbers

      public AttributesBuilder sectionNumbers(boolean sectionNumbers)
      Auto-number section titles in the HTML backend.
      Parameters:
      sectionNumbers - true if numbers should be autonumbered, false otherwise.
      Returns:
      this instance.
    • hardbreaks

      public AttributesBuilder hardbreaks(boolean hardbreaks)
      Sets hardbreaks at the end of each line.
      Parameters:
      hardbreaks - true if each line should be added a hardbreak, false otherwise.
      Returns:
      this instance.
    • cacheUri

      public AttributesBuilder cacheUri(boolean cacheUri)
      Sets cache-uri flag.
      Parameters:
      cacheUri - true if URI content should be cached, false otherwise.
      Returns:
      this instance.
    • hiddenUriScheme

      public AttributesBuilder hiddenUriScheme(boolean hiddenUriScheme)
      Sets hide-uri-scheme flag.
      Parameters:
      hiddenUriScheme - true if URI is hidden, false otherwise.
      Returns:
      this instance.
    • appendixCaption

      public AttributesBuilder appendixCaption(String appendixCaption)
      Sets appendix-caption label.
      Parameters:
      appendixCaption - value.
      Returns:
      this instance.
    • math

      public AttributesBuilder math(String math)
      Sets math default engine.
      Parameters:
      math - value.
      Returns:
      this instance.
    • linkAttrs

      public AttributesBuilder linkAttrs(boolean linkAttrs)
      Sets linkattrs attribute.
      Parameters:
      linkAttrs - true if Asciidoctor should parse link macro attributes, false otherwise.
      Returns:
      this instance.
    • experimental

      public AttributesBuilder experimental(boolean experimental)
      Sets experimental attribute.
      Parameters:
      experimental - true if experimental features should be enabled, false otherwise.
    • noFooter

      public AttributesBuilder noFooter(boolean noFooter)
      Sets nofooter attribute.
      Parameters:
      noFooter - true if footer block should not be shown, false otherwise.
      Returns:
      this instance.
    • compatMode

      public AttributesBuilder compatMode(CompatMode compatMode)
      Sets compat mode attribute.
      Parameters:
      compatMode - value.
      Returns:
      this instance.
    • attribute

      public AttributesBuilder attribute(String attributeName, Object attributeValue)
      Sets custom or unlisted attribute
      Parameters:
      attributeName -
      attributeValue -
      Returns:
      this instance.
    • attributes

      public AttributesBuilder attributes(Map<String,Object> attributes)
      Adds all attributes.
      Parameters:
      attributes - map.
      Returns:
      this instance.
    • arguments

      public AttributesBuilder arguments(String attributes)
      Sets attributes in string form. An example of a valid string would be: 'toc numbered source-highlighter=coderay' where you are adding three attributes: toc, numbered and source-highlighter with value coderay.
      Parameters:
      attributes - in string format.
      Returns:
      this instance.
    • arguments

      public AttributesBuilder arguments(String... attributes)
      Sets attributes in array form. An example of a valid array would be: '['toc', 'numbered']' where you are adding three attributes: toc and numbered.
      Parameters:
      attributes - in array format.
      Returns:
      this instance.
    • asMap

      @Deprecated public Map<String,Object> asMap()
      Deprecated.
      Use build() instead.
      Gets a map with configured options.
      Returns:
      map with all options. By default an empty map is returned.
    • get

      @Deprecated public Attributes get()
      Deprecated.
      Use build() instead.
    • build

      public Attributes build()
      Returns a valid Attributes instance.
      Returns:
      attributes instance.