com.adobe.livecycle.formdataintegration.client
Class FormDataIntegrationClient

java.lang.Object
  extended by com.adobe.livecycle.formdataintegration.client.FormDataIntegrationClient

public class FormDataIntegrationClient
extends java.lang.Object

Enables you to create a Java object that invokes operations that belong to the FormDataIntegration service. Using this object, you can perform tasks such as importing data into form fields and exporting data from form fields.

You can import and export interactive PDF form data. An interactive PDF form is a PDF document that contains one or more fields for collecting information from a user or displaying custom information. There are two types of PDF forms:

The data format that you can use for importing and exporting depends on the type of form on which you are performing the operation. This data can be in one of the following formats:


Constructor Summary
FormDataIntegrationClient(ServiceClientFactory serviceClientFactory)
          A constructor that creates a FormDataIntegrationClient( object.
 
Method Summary
 Document exportData(Document inPdfDoc)
          Deprecated.  
 Document exportData2(Document inPdfDoc, DataFormat dataFormat)
          Exports form data from a PDF document.
 Document importData(Document inPdfDoc, Document inDataDoc)
          Imports XFA, XFDF, or FDF form data into a PDF document.
 boolean isSynchronous()
          Specifies whether FormDataIntegration service is invoked synchronously.
 void setSynchronous(boolean synchronous)
          Sets the FormDataIntegration service to be invoked synchronously.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormDataIntegrationClient

public FormDataIntegrationClient(ServiceClientFactory serviceClientFactory)
A constructor that creates a FormDataIntegrationClient( object.

Parameters:
serviceClientFactory - A ServiceClientFactory object that contains connection properties. For information about setting connection properties, see Invoking Adobe Experience Manager forms Services.
Method Detail

isSynchronous

public boolean isSynchronous()
Specifies whether FormDataIntegration service is invoked synchronously. A synchronous request is blocked until FormDataIntegration service finishes processing the request and returns the result back to the caller.

Returns:
A Boolean value that specifies whether FormDataIntegration service is invoked synchronously.

setSynchronous

public void setSynchronous(boolean synchronous)
Sets the FormDataIntegration service to be invoked synchronously. A synchronous request is blocked until FormDataIntegration service finishes processing the request and returns the result back to the caller.

Parameters:
synchronous - A Boolean value that specifies whether FormDataIntegration service is invoked synchronously.

importData

public Document importData(Document inPdfDoc,
                           Document inDataDoc)
                    throws ImportFormDataException,
                           com.adobe.idp.dsc.DSCException
Imports XFA, XFDF, or FDF form data into a PDF document. The following table shows which data formats you can use for each PDF document type.
Form typeImport formatResult
Acrobat form XFDF or FDF Successful
Acrobat form XFA Unsuccessful
XML form XFA Successful
XML form XFDF or FDF Unsuccessful

Parameters:
inPdfDoc - A Document object that represents the PDF document in which data is imported.
inDataDoc - A Document object that represents XFA, XFDF, or FDF data to import.
Returns:
A Document object that represents the PDF document that contains the imported data.
Throws:
ImportFormDataException - If you attempt to import data into an incompatible PDF document.
com.adobe.idp.dsc.DSCException - If an error occurs while importing data into a PDF document.

exportData

public Document exportData(Document inPdfDoc)
                    throws ExportFormDataException,
                           com.adobe.idp.dsc.DSCException
Deprecated. 

Exports form data from a PDF document. The following table shows data formats that can be exported from each PDF document type.
Form typeImport formatResult
Form type Export format Result
Acrobat form XFDF or FDF Successful
Acrobat form XFA Unsuccessful
XML form XFA Successful
XML form XFDF or FDF Unsuccessful

Parameters:
inPdfDoc - A Document object that represents the PDF document from which data is exported.
Returns:
A Document object that represents the exported data.
Throws:
ExportFormDataException - If an error occurs during this operation. For example, if you specify a PDF document that does not contain form fields.
com.adobe.idp.dsc.DSCException - If an error occurs while exporting data from a PDF document.

exportData2

public Document exportData2(Document inPdfDoc,
                            DataFormat dataFormat)
                     throws ExportFormDataException,
                            com.adobe.idp.dsc.DSCException
Exports form data from a PDF document.

Parameters:
inPdfDoc - A Document object that represents the PDF document from which data is exported.
DataFormat - enum value that specifies the format of data exported. Possible values are Auto, XDP and XMLData.
Returns:
A Document object that represents the exported data.
Throws:
ExportFormDataException - If an error occurs during this operation. For example, if you specify a PDF document that does not contain form fields.
com.adobe.idp.dsc.DSCException - If an error occurs while exporting data from a PDF document.