com.adobe.service.ddxm.client
Class Output

java.lang.Object
  extended by com.adobe.service.ddxm.client.Output
All Implemented Interfaces:
java.io.Serializable

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

The Output is a container for the results of a DDX job. It includes the successful documents as well as the Throwable exceptions that occurred for each DDX block that failed. It also contains audit lists that are useful for iterating through the result documents or Throwable exceptions.

See Also:
Serialized Form

Field Summary
static java.lang.String RESULT_LIST_PREFIX
          The Key name for a result block which produces multiple outputs.
 
Constructor Summary
Output()
           
 
Method Summary
 void cleanupFailures()
          Audits the successful documents list to remove any documents associated with failed blocks.
 java.util.Map getDocuments()
          Retrieves the successful documents from the DDX job.
 java.util.List getFailedBlocks()
          A list of the names of the failed blocks.
 Document getJobLog()
          Retrieves the job log that was generated during execution of the DDX.
 java.util.Map getMultipleResultsBlocks()
          Retrieves the multiple result blocks (a map of result block names to a list of document names that was produced by that block).
 int getNumRequestedBlocks()
          Retrieves the number of result blocks in the DDX.
 java.util.Map getParentResultNames()
          Retrieves a map of the result block name to the document names resulting from that result block.
 java.util.List getSuccessfulBlocks()
          Retrieves the names of the blocks that were successful.
 java.util.List getSuccessfulDocuments()
          Retrieves the names of the documents that were successful.
 java.util.Map getThrowables()
          Retrieves a map of the throwable exceptions that were generated during execution of the DDX.
 boolean isFailedBlock(java.lang.Object docname)
          Determines if a named document resulted from a failed block.
 void markAsFailed(java.lang.String docName, java.lang.Throwable e)
          Removes a document from the list of successful documents, by moving the document's result block from the successful blocks list to the failed blocks list.
 void setDocuments(java.util.Map documents)
          Sets the successful documents from the DDX job.
 void setFailedBlocks(java.util.List failedBlocks)
          Sets the names of the failed blocks.
 void setJobLog(Document jobLog)
          Sets the job log that was generated during execution of the DDX.
 void setMultipleResultsBlocks(java.util.Map multipleResultsBlocks)
          Sets the multiple result blocks (a map of result block names to a list of document names that was produced by that block).
 void setNumRequestedBlocks(int numRequestedBlocks)
          Sets the number of result blocks in the DDX.
 void setParentResultNames(java.util.Map parentResultNames)
          Sets a map of the result block name to the document names resulting from that result block.
 void setSuccessfulBlocks(java.util.List successfulBlocks)
          Sets the names of the blocks that were successful.
 void setSuccessfulDocuments(java.util.List successfulDocuments)
          Sets the names of the documents that were successful.
 void setThrowables(java.util.Map throwables)
          Sets a map of the throwable exceptions that were generated during execution of the DDX.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESULT_LIST_PREFIX

public static final java.lang.String RESULT_LIST_PREFIX
The Key name for a result block which produces multiple outputs. The value is a java.util.List of java.lang.String objects containing the names of the documents generated from the result block.

The Key name is either RESULT_LIST_PREFIX + result attribute value or RESULT_LIST_PREFIX + prefix attribute value.

For example:

<PDFsFromBookmarks prefix="chaps"> : key = "_resultlist_chaps"
<FileAttachments result="extracted_docs"> : key = "_resultlist_extracted_docs"

See Also:
Constant Field Values
Constructor Detail

Output

public Output()
Method Detail

markAsFailed

public void markAsFailed(java.lang.String docName,
                         java.lang.Throwable e)
Removes a document from the list of successful documents, by moving the document's result block from the successful blocks list to the failed blocks list. When a document fails, which is one of multiple outputs from a result block (PDFsFromBookmarks or FileAttachments), then remove all other documents from the successful documents list generated from the same result block.

Parameters:
docName - The document that was thought to be a success.
e - The exception that caused the failure.

isFailedBlock

public boolean isFailedBlock(java.lang.Object docname)
Determines if a named document resulted from a failed block.

Parameters:
docname - The name of the output document.
Returns:
true if the document is from a block that failed, false otherwise.

cleanupFailures

public void cleanupFailures()
Audits the successful documents list to remove any documents associated with failed blocks.


getDocuments

public java.util.Map getDocuments()
Retrieves the successful documents from the DDX job.

Returns:
A java.util.Map containing the successful documents.

setDocuments

public void setDocuments(java.util.Map documents)
Sets the successful documents from the DDX job.

Parameters:
documents - The successful documents from the DDX job.

getFailedBlocks

public java.util.List getFailedBlocks()
A list of the names of the failed blocks. This is a list of the keys in the throwable exceptions map.

Returns:
A java.util.List containing the names of the failed blocks.

setFailedBlocks

public void setFailedBlocks(java.util.List failedBlocks)
Sets the names of the failed blocks.

Parameters:
failedBlocks - The names of the failed blocks.

getJobLog

public Document getJobLog()
Retrieves the job log that was generated during execution of the DDX.

Returns:
A Document containing the job log that was generated during execution of the DDX.

setJobLog

public void setJobLog(Document jobLog)
Sets the job log that was generated during execution of the DDX.

Parameters:
jobLog - A Document containing the job log that was generated during execution of the DDX.

getNumRequestedBlocks

public int getNumRequestedBlocks()
Retrieves the number of result blocks in the DDX.

Returns:
The number of result blocks in the DDX.

setNumRequestedBlocks

public void setNumRequestedBlocks(int numRequestedBlocks)
Sets the number of result blocks in the DDX.

Parameters:
numRequestedBlocks - The number of result blocks in the DDX.

getParentResultNames

public java.util.Map getParentResultNames()
Retrieves a map of the result block name to the document names resulting from that result block. This is particularly useful for blocks that can result in multiple output documents such as PDFsFromBookmarks and FileAttachments result blocks.

Returns:
A java.util.Map of the result block name to the document names resulting from that result block.

setParentResultNames

public void setParentResultNames(java.util.Map parentResultNames)
Sets a map of the result block name to the document names resulting from that result block. This is particularly useful for blocks that can result in multiple output documents such as PDFsFromBookmarks and FileAttachments result blocks.

Parameters:
parentResultNames - A java.util.Map of the result block name to the document names resulting from that result block.

getSuccessfulBlocks

public java.util.List getSuccessfulBlocks()
Retrieves the names of the blocks that were successful.

Returns:
A java.util.List containing the names of the blocks that were successful.

setSuccessfulBlocks

public void setSuccessfulBlocks(java.util.List successfulBlocks)
Sets the names of the blocks that were successful.

Parameters:
successfulBlocks - A java.util.List containing the names of the blocks that were successful.

getSuccessfulDocuments

public java.util.List getSuccessfulDocuments()
Retrieves the names of the documents that were successful. This collection has all of the keys in the documents map.

Returns:
A java.util.List containing the names of the documents that were successful.

setSuccessfulDocuments

public void setSuccessfulDocuments(java.util.List successfulDocuments)
Sets the names of the documents that were successful. This collection has all of the keys in the documents map.

Parameters:
successfulDocuments - A java.util.List containing the names of the documents that were successful.

getThrowables

public java.util.Map getThrowables()
Retrieves a map of the throwable exceptions that were generated during execution of the DDX.

Returns:
A java.util.Map containing the throwable exceptions that were generated during execution of the DDX.

setThrowables

public void setThrowables(java.util.Map throwables)
Sets a map of the throwable exceptions that were generated during execution of the DDX.

Parameters:
throwables - A java.util.Map containing the throwable exceptions that were generated during execution of the DDX.

getMultipleResultsBlocks

public java.util.Map getMultipleResultsBlocks()
Retrieves the multiple result blocks (a map of result block names to a list of document names that was produced by that block).

Returns:
The multiple result blocks.

setMultipleResultsBlocks

public void setMultipleResultsBlocks(java.util.Map multipleResultsBlocks)
Sets the multiple result blocks (a map of result block names to a list of document names that was produced by that block).

Parameters:
multipleResultsBlocks - The multiple result blocks.


[an error occurred while processing this directive] [an error occurred while processing this directive]