com.adobe.livecycle.assembler.client
Class AssemblerOptionSpec

java.lang.Object
  extended by com.adobe.livecycle.assembler.client.AssemblerOptionSpec
All Implemented Interfaces:
java.io.Serializable

public class AssemblerOptionSpec
extends java.lang.Object
implements java.io.Serializable

An AssemblerOptionSpec object 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

Nested Class Summary
static class AssemblerOptionSpec.DDXCompatibilityMode
           
 
Constructor Summary
AssemblerOptionSpec()
           
 
Method Summary
 AssemblerOptionSpec.DDXCompatibilityMode getDdxCompatibilityMode()
          Deprecated. 
 java.lang.String getDefaultStyle()
          Retrieves the default style.
 int getFirstBatesNumber()
          Returns the first numeric value for the first Bates number pattern if the start value is not specified.
 java.lang.String getLogLevel()
          Retrieves the log level.
 boolean isFailOnError()
          Determines whether the DDX job should exit immediately when an Exception or other error occurs.
 boolean isTakeOwnership()
          Determines whether assembler can assume ownership of the document.
 boolean isValidateOnly()
          Determines whether the DDX job is a validation-only test.
 void setDdxCompatibilityMode(AssemblerOptionSpec.DDXCompatibilityMode ddxCompatibilityMode)
          Deprecated. 
 void setDefaultStyle(java.lang.String defaultStyle)
          Sets a default style to use when none is specified in the DDX document.
 void setFailOnError(boolean failOnError)
          Sets whether the DDX job should exit immediately when an Exception or other error occurs.
 void setFirstBatesNumber(int start)
          Sets the first numeric value to use when the BatesNumber element does not contain a start attribute.
 void setLogLevel(java.lang.String logLevel)
          Sets the log level.
 void setTakeOwnership(boolean takeOwnership)
          Sets whether assembler can assume ownership of the document
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssemblerOptionSpec

public AssemblerOptionSpec()
Method Detail

getDefaultStyle

public java.lang.String getDefaultStyle()
Retrieves the default style.

Returns:
A java.lang.String containing 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 String containing 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:

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 a java.util.logging.Level value.

isValidateOnly

public boolean isValidateOnly()
Determines whether the DDX job is a validation-only test.

Returns:
true if the DDX job is a validation-only test, false otherwise.

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 of true halts 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 be null, and the input map is allowed to be empty or null since the input data streams are not evaluated until actually used during job execution. The default is false, meaning that normal processing will be performed.

isFailOnError

public boolean isFailOnError()
Determines whether the DDX job should exit immediately when an Exception or other error occurs.

Returns:
true if the DDX job should exit immediately when an Exception or other error occurs, false otherwise.

setFailOnError

public void setFailOnError(boolean failOnError)
Sets whether the DDX job should exit immediately when an Exception or 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 of true means that the job will terminate upon an error or exception condition and throw the corresponding Throwable exception. A value of false means that the job will terminate the current DDX result block, store the Throwable exception in the output map, and attempt to execute any remaining result blocks. The default is true, 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 the BatesNumber element does not contain a start attribute.

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:
true if assembler can take ownership of the document, false otherwise

setTakeOwnership

public void setTakeOwnership(boolean takeOwnership)
Sets whether assembler can assume ownership of the document

Parameters:
takeOwnership - A value of true means 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 of false means that assembler cannot assume ownership of the doucment and temporary files has to be created. The default is false.

setDdxCompatibilityMode

@Deprecated
public void setDdxCompatibilityMode(AssemblerOptionSpec.DDXCompatibilityMode ddxCompatibilityMode)
Deprecated. 

This API is available only for generating PDFs compatible with LC 8.2. Assembler defines three zones (Left, Center and Right) for adding footer or header content. These zones are identified by ,
and tag in DDX. Each zone can contain exactly one water mark (which can be combination of multiple text elements and/or images). These zones also define the text/image alignment of the content, e.g. content of Center zone is always center aligned. In LC 8.2 it was possible to override the alignment setting of the zone at text block/image level. This in fact makes the concept of meaningless. For example, the DDX snippet below creates a left aligned text block, even though it is contained in center zone, because the text block overrides center zones alignment default.

doc_name

In LC 9.0 text block level alignment overrides are ignored. It simply uses zone alignment setting for all contained elements.

Parameters:
ddxCompatibilityMode - the ddxCompatibilityMode to set

getDdxCompatibilityMode

@Deprecated
public AssemblerOptionSpec.DDXCompatibilityMode getDdxCompatibilityMode()
Deprecated. 

This API is available only for generating PDFs compatible with LC 8.2. Assembler defines three zones (Left, Center and Right) for adding footer or header content. These zones are identified by ,
and tag in DDX. Each zone can contain exactly one water mark (which can be combination of multiple text elements and/or images). These zones also define the text/image alignment of the content, e.g. content of Center zone is always center aligned. In LC 8.2 it was possible to override the alignment setting of the zone at text block/image level. This in fact makes the concept of meaningless. For example, the DDX snippet below creates a left aligned text block, even though it is contained in center zone, because the text block overrides center zones alignment default.

doc_name

In LC 9.0 text block level alignment overrides are ignored. It simply uses zone alignment setting for all contained elements. This API is available only for generating PDFs compatible with LC 8.2.

Returns:
the ddxCompatibilityMode