Package com.adobe.fd.assembler.client
Class AssemblerOptionSpec
- java.lang.Object
-
- com.adobe.fd.assembler.client.AssemblerOptionSpec
-
- All Implemented Interfaces:
java.io.Serializable
public class AssemblerOptionSpec extends java.lang.Object implements java.io.SerializableAnAssemblerOptionSpecobject is the container for the"environment"options for a DDX job. Current environment parameters include the job log level, the default style, and flags to indicate if the DDX job is a validation-only test or if it should fail if an error is encountered.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AssemblerOptionSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDefaultStyle()Retrieves the default style.intgetFirstBatesNumber()Returns the first numeric value for the first Bates number pattern if the start value is not specified.java.lang.StringgetLogLevel()Retrieves the log level.booleanisFailOnError()Determines whether the DDX job should exit immediately when anExceptionor other error occurs.booleanisTakeOwnership()Determines whether assembler can assume ownership of the document.booleanisValidateOnly()Determines whether the DDX job is a validation-only test.voidsetDefaultStyle(java.lang.String defaultStyle)Sets a default style to use when none is specified in the DDX document.voidsetFailOnError(boolean failOnError)Sets whether the DDX job should exit immediately when anExceptionor other error occurs.voidsetFirstBatesNumber(int start)Sets the first numeric value to use when theBatesNumberelement does not contain astartattribute.voidsetLogLevel(java.lang.String logLevel)Sets the log level.voidsetTakeOwnership(boolean takeOwnership)Sets whether assembler can assume ownership of the documentvoidsetValidateOnly(boolean validateOnly)Sets whether the DDX job is a validation-only test, which means that Assembler should validate the DDX but not execute it.
-
-
-
Method Detail
-
getDefaultStyle
public java.lang.String getDefaultStyle()
Retrieves the default style.- Returns:
- A
java.lang.Stringcontaining the default style.
-
setDefaultStyle
public void setDefaultStyle(java.lang.String defaultStyle)
Sets a default style to use when none is specified in the DDX document.- Parameters:
defaultStyle- The default style to set. This is a CSS2 style string in the format of "property: value; property: value". For instance,"font:<font-style> <font-weight> <font-size>/<line-height> <font-family-specifier>". Note that if the<font-family-specifier>contains spaces, it should be surrounded with single quotes. For example,'Minion Pro'. If no default is ever specified, a default of"font: normal normal 12pt 'Minion Pro'"is used.
-
getLogLevel
public java.lang.String getLogLevel()
Retrieves the log level.- Returns:
- A
Stringcontaining the log level.
-
setLogLevel
public void setLogLevel(java.lang.String logLevel)
Sets the log level. The log level can be set to one of the following values that have integer equivalents:- OFF = positive infinity
- SEVERE = 1000
- WARNING = 900
- INFO = 800
- CONFIG = 700
- FINE = 500
- FINER = 400
- FINEST = 300
- ALL = negative infinity
If the log level is not set, then it defaults to
"INFO". For investigation of problems, it can be set to"FINE", "FINER" or "FINEST",but performance will be negatively affected in this mode.- Parameters:
logLevel- The log level to be set. This is the string representation of ajava.util.logging.Levelvalue.
-
isValidateOnly
public boolean isValidateOnly()
Determines whether the DDX job is a validation-only test.- Returns:
trueif the DDX job is a validation-only test,falseotherwise.
-
setValidateOnly
public void setValidateOnly(boolean validateOnly)
Sets whether the DDX job is a validation-only test, which means that Assembler should validate the DDX but not execute it.- Parameters:
validateOnly- A value oftruehalts processing of the DDX after the DDX has been parsed and verified to be in compliance with the schema and application validation rules. In this case the result map will benull, and the input map is allowed to be empty ornullsince the input data streams are not evaluated until actually used during job execution. The default isfalse, meaning that normal processing will be performed.
-
isFailOnError
public boolean isFailOnError()
Determines whether the DDX job should exit immediately when anExceptionor other error occurs.- Returns:
trueif the DDX job should exit immediately when anExceptionor other error occurs,falseotherwise.
-
setFailOnError
public void setFailOnError(boolean failOnError)
Sets whether the DDX job should exit immediately when anExceptionor other error occurs.To see this method used in a code example, see the Programmatically Assembling PDF Documents quick start in the SDK Help.
- Parameters:
failOnError- A value oftruemeans that the job will terminate upon an error or exception condition and throw the correspondingThrowableexception. A value offalsemeans that the job will terminate the current DDX result block, store theThrowableexception in the output map, and attempt to execute any remaining result blocks. The default istrue, meaning that the first error will terminate the DDX job immediately.
-
getFirstBatesNumber
public int getFirstBatesNumber()
Returns the first numeric value for the first Bates number pattern if the start value is not specified.- Returns:
- Returns the first Bates number. Returns -1 if not set.
-
setFirstBatesNumber
public void setFirstBatesNumber(int start)
Sets the first numeric value to use when theBatesNumberelement does not contain astartattribute.- Parameters:
start- The first numeric value for the first Bates pattern.
-
isTakeOwnership
public boolean isTakeOwnership()
Determines whether assembler can assume ownership of the document.- Returns:
trueif assembler can take ownership of the document,falseotherwise
-
setTakeOwnership
public void setTakeOwnership(boolean takeOwnership)
Sets whether assembler can assume ownership of the document- Parameters:
takeOwnership- A value oftruemeans that assembler can assume ownership of the document and access the files directly instead of copying the input files to a temporary folder.A value offalsemeans that assembler cannot assume ownership of the doucment and temporary files has to be created. The default isfalse.
-
-