org.asciidoctor
Class OptionsBuilder

java.lang.Object
  extended by org.asciidoctor.OptionsBuilder

public class OptionsBuilder
extends Object


Method Summary
 Map<String,Object> asMap()
          Gets a map with configured options.
 OptionsBuilder attributes(Attributes attributes)
          Sets attributes used for rendering input.
 OptionsBuilder attributes(Map<String,Object> attributes)
          Sets attributes used for rendering input.
 OptionsBuilder backend(String backend)
          Sets backend option.
 OptionsBuilder baseDir(File baseDir)
          Sets base dir for working directory.
 OptionsBuilder compact(boolean compact)
          Compact the output removing blank lines.
 OptionsBuilder destinationDir(File destinationDir)
          Destination output directory.
 OptionsBuilder docType(String docType)
          Sets doctype option.
 OptionsBuilder eruby(String eruby)
          Sets eruby implementation.
 Options get()
           
 OptionsBuilder headerFooter(boolean headerFooter)
          Sets header footer attribute.
 OptionsBuilder inPlace(boolean inPlace)
          Sets in place attribute.
 OptionsBuilder mkDirs(boolean mkDirs)
          Sets if asciidoctor should create output directory if it does not exist or not.
 OptionsBuilder option(String option, Object value)
          Sets a custom or unlisted option.
static OptionsBuilder options()
          Creates options builder instance.
 OptionsBuilder safe(SafeMode safeMode)
          Sets the safe mode.
 OptionsBuilder templateDir(File templateDir)
          Sets template directory.
 OptionsBuilder templateEngine(String templateEngine)
          Sets the template engine.
 OptionsBuilder toDir(File directory)
          Sets to dir value.
 OptionsBuilder toFile(File toFile)
          Sets to file value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

options

public static OptionsBuilder options()
Creates options builder instance.

Returns:
options builder instance.

backend

public OptionsBuilder backend(String backend)
Sets backend option.

Parameters:
backend - value.
Returns:
this instance.

docType

public OptionsBuilder docType(String docType)
Sets doctype option.

Parameters:
docType - value.
Returns:
this instance.

inPlace

public OptionsBuilder inPlace(boolean inPlace)
Sets in place attribute.

Parameters:
inPlace - value.
Returns:
this instance.

headerFooter

public OptionsBuilder headerFooter(boolean headerFooter)
Sets header footer attribute.

Parameters:
headerFooter - value.
Returns:
this instance.

templateDir

public OptionsBuilder templateDir(File templateDir)
Sets template directory.

Parameters:
templateDir - directory where templates are stored.
Returns:
this instance.

templateEngine

public OptionsBuilder templateEngine(String templateEngine)
Sets the template engine.

Parameters:
templateEngine - used to render the document.
Returns:
this instance.

attributes

public OptionsBuilder attributes(Map<String,Object> attributes)
Sets attributes used for rendering input.

Parameters:
attributes - map.
Returns:
this instance.

attributes

public OptionsBuilder attributes(Attributes attributes)
Sets attributes used for rendering input.

Parameters:
attributes - map.
Returns:
this instance.

toFile

public OptionsBuilder toFile(File toFile)
Sets to file value. This is the destination file name.

Parameters:
toFile - name of output file.
Returns:
this instance.

toDir

public OptionsBuilder toDir(File directory)
Sets to dir value. This is the destination directory.

Parameters:
directory - where output is generated.
Returns:
this instance.

mkDirs

public OptionsBuilder mkDirs(boolean mkDirs)
Sets if asciidoctor should create output directory if it does not exist or not.

Parameters:
mkDirs - true if directory must be created, false otherwise.
Returns:
this instance.

safe

public OptionsBuilder safe(SafeMode safeMode)
Sets the safe mode.

Parameters:
safeMode - to run asciidoctor.
Returns:
this instance.

eruby

public OptionsBuilder eruby(String eruby)
Sets eruby implementation.

Parameters:
eruby - implementation.
Returns:
this instance.

compact

public OptionsBuilder compact(boolean compact)
Compact the output removing blank lines.

Parameters:
compact - value.
Returns:
this instance.

destinationDir

public OptionsBuilder destinationDir(File destinationDir)
Destination output directory.

Parameters:
destinationDir - destination directory.
Returns:
this instance.

option

public OptionsBuilder option(String option,
                             Object value)
Sets a custom or unlisted option.

Parameters:
option - name.
value - for given option.
Returns:
this instance.

baseDir

public OptionsBuilder baseDir(File baseDir)
Sets base dir for working directory.

Parameters:
baseDir - working directory.
Returns:
this instance.

asMap

public Map<String,Object> asMap()
Gets a map with configured options.

Returns:
map with all options. By default an empty map is returned.

get

public Options get()


Copyright © 2013. All Rights Reserved.