Take a survey

Developing Applications Using APIs > Deploying LiveCycle Applications > Exporting Applications > Exporting an application using the Java API

Exporting an application using the Java API
To export an application by using the Java API, perform the following steps:
1.
Include client JAR files, such as adobe-livecycle-client.jar, in your Java project’s class path. (See Including LiveCycle ES library files.)
2.
Create a ServiceClientFactory object that contains connection properties. (See Setting connection properties.)
Create an ApplicationManager object by invoking its constructor and passing the ServiceClientFactory object.
3.
Create a ServiceRegistryClient object by invoking its constructor and passing the ServiceClientFactory object.
4.
Specify the application to export by invoking the ServiceRegistryClient object’s getServiceConfiguration method and passing the following values:
This method returns a ServiceConfiguration object that represents the application’s configuration values.
Create a Service object by invoking the ServiceRegistryClient object’s getService method and passing the name of the service that corresponds to the application.
Get the service category value (a required value to export an application) by invoking the ServiceRegistryClient object’s getServiceCategory method and passing the category identifier value. This value can be obtained by invoking the ServiceRegistryClient object’s getCategoryId method. The getServiceCategory method returns a ServiceCategory object.
Create an ApplicationDocument object by invoking the ApplicationDocument.Factory.newInstance method. This object is used as an argument for the ApplicationManager object’s exportApplicationArchive method.
Invoke the ApplicationDocument object’s addNewApplication method.
Create an ApplicationDocument.Application.Orchestrations object by invoking the ApplicationDocument.Application.Orchestrations.Factory.newInstance method.
Invoke the ApplicationDocument.Application.Orchestrations object’s addNewOrchestration method.
Create an Orchestration object by invoking the ApplicationDocument.Application.Orchestrations object’s getOrchestrationArray method and passing the value 0.
Specify the major version of the application to export by invoking the Orchestration object’s setMinorVersion method and passing the return value of the ServiceConfiguration object’s getMajorVersion method.
Specify the minor version of the application to export by invoking the Orchestration object’s setMinorVersion method and passing the return value of the ServiceConfiguration object’s getMinorVersion method.
Create a ProcessTemplateDocument object by invoking the ProcessTemplateDocumentFactory.parseProcessTemplate method and passing the return value of the ServiceConfiguration object’s getDescriptor method.
Set the description of the application by invoking the Orchestration object’s setDescription method and passing the return value of the ProcessTemplateDocument object’s getDescription method.
Invoke the Orchestration object’s setId method and pass the return value of the ProcessTemplateDocument object’s getName method.
Invoke the Orchestration object’s setCategoryId method and pass the return value of the Service object’s getCategoryId method.
Invoke the Orchestration object’s setCategoryDescription method and pass the return value of the ServiceCategory object’s getDescription method.
Create an ApplicationDocument.Application object by invoking the ApplicationDocument object’s getApplication method.
Specify the name of the application to export by invoking the ApplicationDocument.Application object’s setName method and passing the application’s identifier value (this value is obtained by invoking the ServiceConfiguration object’s getServiceId method).
Specify the application’s description by invoking the ApplicationDocument.Application object’s setDescription method and passing the description of the service configuration (this value is obtained by invoking the ServiceConfiguration object’s getDescription method).
Invoke the ApplicationDocument.Application object’s setOrchestrations method and pass the ApplicationDocument.Application.Orchestrations object.
5.
Invoke the ApplicationManager object’s exportApplicationArchive method and pass the ApplicationDocument object. This method returns an ApplicationStatus object.
Get the exported application by invoking the ApplicationStatus object’s getArchiveDocument method. This method returns a com.adobe.idp.Document object.
6.
Create a java.io.File object by using its constructor and specifying the name and location of the LCA file.
Invoke the com.adobe.idp.Document object’s copyToFile method and pass the java.io.File object.
View Quick Start

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/exportingApps.150.3.html