com.adobe.livecycle.applicationmanager.client
Interface ApplicationManager


public interface ApplicationManager

Interface for creating, adding, deleting and updating applications and assets.

Sample usage of these API

//Create service factory Properties connectionProps = new Properties(); connectionProps.setProperty("DSC_DEFAULT_SOAP_ENDPOINT", "http://localhost:8080"); connectionProps.setProperty("DSC_TRANSPORT_PROTOCOL", "SOAP"); connectionProps.setProperty("DSC_SERVER_TYPE", "JBoss"); connectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "administrator"); connectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password"); // Create the service client factory ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps); appMgrClient = new ApplicationManagerClient(myFactory)

//Create an application called Sample1, version 1.0 is created
appMgrClient.createApplication("Sample1");


//create sub folders ( will create folder2 and folder3)
appMgrClient.addFolder("Sample1", "Folder1/Folder2/Folder3");


//create asset in the head version
Document content=new Document("C:/sampleForm.xdp",true);
appMgrClient.addAsset("Sample1", "Folder1/sampleForm.xdp", content);


//update asset in the head version of the application
content=new Document("C:/sampleForm.xdp",true);
appMgrClient.updateAsset("Sample1", "Folder1/sampleForm.xdp");


//deploy head version of the application
appMgrClient.deployApplication("Sample1");


//undeploy head version of the application
appMgrClient.undeployApplication("Sample1");


//delete Asset from the head version of the application
appMgrClient.deleteAsset("Sample1", "Folder1/sampleForm.xdp");


//delete folder, should delete all the folder in the hierarchy
appMgrClient.deleteFolder("Sample1", "Folder1");


//delete Application head version
appMgrClient.deleteApplication("Sample1");



Method Summary
 java.lang.String addAsset(java.lang.String anAppName, java.lang.String anAssetName, Document anAssetContent)
           This method creates a new asset under the head version of the application.
 java.lang.String addAsset(java.lang.String anAppName, java.lang.String anAppVersion, java.lang.String anAssetName, Document anAssetContent, java.util.List aSecondaries)
           This method creates a new asset under the application with a given application name, version, content and the secondaries.
 java.lang.String addFolder(java.lang.String anAppName, java.lang.String aFolderName)
          This method creates a new folder in the head version of the application.
 java.lang.String addFolder(java.lang.String anAppName, java.lang.String anAppVersion, java.lang.String aFolderName)
          This method creates a new folder under the application version specified.
 java.lang.String createApplication(java.lang.String aApplicationName)
          This method creates a brand new application.
 java.lang.String createApplicationVersion(java.lang.String aApplicationName, boolean aMajorRevision, java.lang.String aDescription)
          This method creates a new version of the application from the head version of the application specified by the application name.
 java.lang.String createApplicationVersion(java.lang.String aApplicationName, java.lang.String aSourceVersion, boolean aMajorRevision, java.lang.String aDescription)
          This method creates a new version of the given application specified by the application name.
 java.lang.String createApplicationVersion(java.lang.String applicationName, java.lang.String sourceVersion, java.lang.String targetVersion, java.lang.String description)
          This method creates a new version of the existing application.
 void deleteApplication(java.lang.String anAppName)
          This method deletes the head version of the application.
 void deleteApplication(java.lang.String anAppName, java.lang.String anAppVersion)
          This method deletes an application with given name and version.
 void deleteAsset(java.lang.String anAppName, java.lang.String anAssetPath)
          This method permanently deletes an asset from the head version of the application.
 void deleteAsset(java.lang.String anAppName, java.lang.String anAppVersion, java.lang.String anAssetPath)
          This method permanently deletes an asset from the application.
 void deleteFolder(java.lang.String anAppName, java.lang.String aFolderPath)
          This method deletes a folder from the head version of the application.
 void deleteFolder(java.lang.String anAppName, java.lang.String anAppVersion, java.lang.String aFolderPath)
          This method deletes a folder.
 boolean deployApplication(java.lang.String anAppName)
          This method deploys the head version of the application.
 boolean deployApplication(java.lang.String anAppName, java.lang.String anAppVersion)
          This method deploys the given version of the application.
 Document export(java.util.List exportResourceIds, java.lang.String lcaDescription)
          This methods creates an LCA archive from the list of resource IDs provided
 Application getApplication(ApplicationId applicationId)
          Returns the application with the specified name.
 java.util.List getApplications()
          Returns a list of applications in the system.
 ApplicationStatus getApplicationStatus(ApplicationId applicationId)
          Returns an ApplicationStatus instance for the given application, which describes the deployment status of each application component and the application as a whole.
 java.util.List getVersions(java.lang.String anApplicationName, boolean getHead)
          This method returns the list of string containing all the versions for the given application.
 java.lang.String importApplication(Document app)
          This methods imports the contents of the LCA in the Designtime Repository
 ApplicationStatus previewApplicationArchive(Document applicationArchiveDocument)
          Provides a preview (prior to import) of the LC 8 application archive specified by the application archive parameter.
 Document previewLCA(Document aRequest)
          Provides a preview (prior to import) of the LC 9 and above application archive specified by the given document.
 boolean undeployApplication(java.lang.String anAppName)
          This method undeploys the head version of the application.
 boolean undeployApplication(java.lang.String anAppName, java.lang.String anAppVersion)
          This method undeploys the given version of the application.
 java.lang.String updateAsset(java.lang.String anAppName, java.lang.String anAssetName, Document aUpdatedAssetContent)
          This method updates an existing asset in the head version of the application
 java.lang.String updateAsset(java.lang.String anAppName, java.lang.String anAppVersion, java.lang.String anAssetName, Document aUpdatedAssetContent, java.util.List aSecondaries)
          This method updates an existing asset in the application with the name and version provided.
 

Method Detail

getApplication

Application getApplication(ApplicationId applicationId)
                           throws ApplicationManagerClientException
Returns the application with the specified name.

Parameters:
applicationId - An ApplicationId instance containing the name of the application to be fetched.
Returns:
The application with the specified name.
Throws:
ApplicationManagerClientException -
E_NULL_PARAM if the given ApplicationId instance or the application name it contains is null
E_APPLICATION_DOES_NOT_EXIST if an application with the given name does not exist
E_UNKNOWN_ERROR if an internal error occurs while fetching the application

getApplications

java.util.List getApplications()
                               throws ApplicationManagerClientException
Returns a list of applications in the system.

Returns:
A list of Application instances representing the applications in the system.
Throws:
ApplicationManagerClientException -
E_UNKNOWN_ERROR if an internal error occurs while fetching the applications

getApplicationStatus

ApplicationStatus getApplicationStatus(ApplicationId applicationId)
                                       throws ApplicationManagerClientException
Returns an ApplicationStatus instance for the given application, which describes the deployment status of each application component and the application as a whole.

Parameters:
applicationId - An ApplicationId instance containing the name of the application whose status is to be fetched.
Returns:
The status of the given application.
Throws:
ApplicationManagerClientException -
E_NULL_PARAM if the given ApplicationId instance or the application name it contains is null
E_APPLICATION_DOES_NOT_EXIST if an application with the given name does not exist
E_UNKNOWN_ERROR if an internal error occurs while fetching the application status

previewApplicationArchive

ApplicationStatus previewApplicationArchive(Document applicationArchiveDocument)
                                            throws ApplicationManagerClientException
Provides a preview (prior to import) of the LC 8 application archive specified by the application archive parameter. The preview is intended to describe what actions would be taken during a subsequent import operation on the same application archive. The application components within the archive will be previewed following the declarations in the application descriptor contained in the archive. The application components will be previewed in the following order: repository resources, services, and then orchestrations. The return value is an ApplicationStatus object, which will describe the preview status of each application component and the application as a whole.

Parameters:
applicationArchiveDocument - A Document instance representing the application archive to be previewed.
Returns:
An ApplicationStatus instance representing the result of the preview.
Throws:
ApplicationManagerClientException -
E_NULL_PARAM if the given document is null or empty
E_INVALID_ARCHIVE if the given document is not a valid LC 8 application archive
E_TLO_HANDLER_NOT_FOUND if a preview handler could not be found for some application component in the archive
E_UNKNOWN_ERROR if an internal error occurs during preview

previewLCA

Document previewLCA(Document aRequest)
                    throws ApplicationManagerClientException
Provides a preview (prior to import) of the LC 9 and above application archive specified by the given document. The preview returns a change-list of TLOs indicating whether they are to be created, updated or deleted.

Parameters:
aRequest - A Document instance representing the LC 9 application archive to be previewed.
Returns:
A Document instance representing the results of preview. The document's input-stream can be parsed using the com.adobe.idp.applicationmanager.appinfo.LcaInfoDocument.Factory.parse() API to obtain a structured LcaInfoDocument instance which can be inspected to reveal the results of the preview.
Throws:
ApplicationManagerClientException -
E_NULL_PARAM if the given document is null
E_INVALID_APPINFO if the application descriptor in the given application archive is invalid, or specifies an invalid import action
E_APPINFO_PREVIOUS_VERSION if the application descriptor in the given application archive has a version less than 9
E_APPLICATION_DOES_NOT_EXIST if the application descriptor in the given application archive specifies an update action for an application which does not exist in the repository
E_UNKNOWN_ERROR if an internal error occurs during preview

createApplication

java.lang.String createApplication(java.lang.String aApplicationName)
                                   throws ApplicationManagerClientException

This method creates a brand new application. This application will be created with the version 1.0.

Pre-conditions:
An application with same name must not exist
Post-conditions:
A new application with the version 1.0 is created

Parameters:
aApplicationName - is name of the application
Returns:
aApplicationPath is path to the application created
Throws:
ApplicationManagerClientException -
E_APPLICATION_ALREADY_EXISTS if application with the same name exists
E_INTERNAL_ERROR if there is internal error

createApplicationVersion

java.lang.String createApplicationVersion(java.lang.String aApplicationName,
                                          boolean aMajorRevision,
                                          java.lang.String aDescription)
                                          throws ApplicationManagerClientException

This method creates a new version of the application from the head version of the application specified by the application name. All the assets in the head version will be copied to the new version.

Pre-conditions:
Application must exist
Target version must not exist
Post-conditions:
A new application with target version is created

Parameters:
aApplicationName - is name of the application
aMajorRevision - if true, major version is updated else minor
aDescription - is description of the new version
Returns:
aApplicationPath return path to the new application version
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if the application specified by application name does not exist
E_APPLICATION_VERSION_DOES_NOT_EXIST if the source Version does not exist E_APPLICATION_VERSION_ALREADY_EXIST if the version specified by target version already exists

createApplicationVersion

java.lang.String createApplicationVersion(java.lang.String aApplicationName,
                                          java.lang.String aSourceVersion,
                                          boolean aMajorRevision,
                                          java.lang.String aDescription)
                                          throws ApplicationManagerClientException

This method creates a new version of the given application specified by the application name. All the assets in the from the source version will be copied to the target version. Major version will be created if revMajorVersion is true else minor version is created.

Pre-conditions:
Application must exist
Source version must exist
Target version must not exist
Post-conditions:
A new application with the target version is created

Parameters:
aApplicationName - is name of the application
aSourceVersion - is version of the source application, if empty, head version will be used
aMajorRevision - if true, major version is updated else minor
aDescription - is description of the new version
Returns:
aApplicationPath return path to the new application version
Throws:
ApplicationManagerClientException -
E_INVALID_VERSION_FORMAT if the source or target version are not of the form major.minor where major and minor are numerals
E_APPLICATION_DOES_NOT_EXIST if the application specified by application name does not exist
E_APPLICATION_VERSION_DOES_NOT_EXIST if the source Version does not exist E_APPLICATION_VERSION_ALREADY_EXIST if the version specified by target version already exists

createApplicationVersion

java.lang.String createApplicationVersion(java.lang.String applicationName,
                                          java.lang.String sourceVersion,
                                          java.lang.String targetVersion,
                                          java.lang.String description)
                                          throws ApplicationManagerClientException
This method creates a new version of the existing application. All the TLos under the source version will be copied to the new version. The revision of all the tlos in the new version will be 1.0

Parameters:
applicationName - Name of the application
sourceVersion - Source Version from which the tlos need to be copied
targetVersion - Target version of the application
description - Description of the new version
Returns:
The name of the new application version
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if the application with the given name does not exist
E_APPLICATION_SOURCE_VERSION_DOES_NOT_EXIST if the specified source version for the application does not exist
E_APPLICATION_TARGET_VERSION_ALREADY_EXIST if the specified target version for the application already exists
E_INVALID_VALUE if the given application name is empty
E_NULL_PARAM if either the source or target version is empty
E_INVALID_VERSION_FORMAT if either the source or target version is not in the expected format
E_REPOSITORY_INTERNAL_ERROR if an internal repository error occurs while creating the application version

importApplication

java.lang.String importApplication(Document app)
                                   throws ApplicationManagerClientException
This methods imports the contents of the LCA in the Designtime Repository

Parameters:
app - Represents archive LCA
Returns:
The applicationResourceId of the application just imported
Throws:
ApplicationManagerClientException -
E_NULL_PARAM if the input document is null
E_INVALID_ARCHIVE if the input document is not a valid application archive
E_INVALID_APPINFO if the input document does not contain a valid application descriptor
E_APPINFO_PREVIOUS_VERSION if the input application has an older version which cannot be handled here
E_NO_PERMISSION if the user does not ave sufficient permissions for performing the import
E_APPLICATION_DOES_NOT_EXIST if the import is occuring in update mode and the application with the path specified by the given document does not exist
E_IMPORT_COMPONENT_ERROR if an error occurs while installing/updating/starting/stopping some application component
E_TLO_LOCKED_BY_OTHER if some TLO in the given application is locked by another user during the import process
E_TLO_NOTLOCKED_FORUPDATE if an internal error occurs while trying to lock a TLO for updation
E_APPLICATION_UNDEPLOY_ERROR if an unexpected error occurs while undeploying the existing version of the application in update mode
E_REPOSITORY_INTERNAL_ERROR if an internal repository error occurs during import
E_INTERNAL_ERROR if some unexpected (e.g. I/O related) error occurs during import

export

Document export(java.util.List exportResourceIds,
                java.lang.String lcaDescription)
                throws ApplicationManagerClientException
This methods creates an LCA archive from the list of resource IDs provided

Parameters:
exportResourceIds - List of resource IDs indicating the applications to be exported. Each entry indicates an application to be exported.
lcaDescription - Description for the exported lca.
Returns:
Document which contains the exported archive
Throws:
ApplicationManagerClientException -
E_NULL_PARAM if the given list is null, or any of the resource IDs in the given list is empty
E_INVALID_VALUE if any of the resource IDs in the given list is not a valid path
E_APPLICATION_DOES_NOT_EXIST if any of the resource IDs in the given list references an application which does not exist
E_REPOSITORY_INTERNAL_ERROR if an internal repository error occurs during export
E_INTERNAL_ERROR if some unexpected (e.g. I/O related) error occurs during export

addFolder

java.lang.String addFolder(java.lang.String anAppName,
                           java.lang.String aFolderName)
                           throws ApplicationManagerClientException

This method creates a new folder in the head version of the application.

Pre-conditions:
Application must exist
Post-conditions:
A new folder will be created under the head version of the application

Parameters:
anAppName - Application name to which the folder is to be added
aFolderName - is name of the folder. If path is recursive, all the folders in the chain are created.
Returns:
Path to the new folder
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST : if the Parent does not exists
E_FOLDER_ALREADY_EXISTS : If the folder already exists
E_INTERNAL_ERROR if there is internal error

addFolder

java.lang.String addFolder(java.lang.String anAppName,
                           java.lang.String anAppVersion,
                           java.lang.String aFolderName)
                           throws ApplicationManagerClientException

This method creates a new folder under the application version specified.

Pre-conditions:
An application and the application version must exist.
Post-conditions:
A new folder will be created under the parent path.

Parameters:
anAppName - Application name to which the folder is to be added
anAppVersion - Application Version to which the folder is to be added. If empty, head version will be used
aFolderName - is name of the folder. If path is recursive, all the folders in the chain are created.
Returns:
Path to the new folder
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST : if the Parent does not exists
E_FOLDER_ALREADY_EXISTS : If the folder already exists
E_INTERNAL_ERROR if there is internal error

addAsset

java.lang.String addAsset(java.lang.String anAppName,
                          java.lang.String anAssetName,
                          Document anAssetContent)
                          throws ApplicationManagerClientException

This method creates a new asset under the head version of the application. with a given application name, asset name and content.

Pre-conditions:
Application must exist.
Post-conditions:
A new asset will be added under the application path.

Parameters:
anAppName - is an application name to which the folder is to be added
anAssetName - is the name of the asset
anAssetContent - is content for the asset as com.adobe.idp.Document
Returns:
Path to the new asset
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if the Parent does not exists
E_ASSET_ALREADY_EXISTS : If the folder already exists
E_INTERNAL_ERROR if there is internal error

addAsset

java.lang.String addAsset(java.lang.String anAppName,
                          java.lang.String anAppVersion,
                          java.lang.String anAssetName,
                          Document anAssetContent,
                          java.util.List aSecondaries)
                          throws ApplicationManagerClientException

This method creates a new asset under the application with a given application name, version, content and the secondaries.

Pre-conditions:
Application must exist.
Post-conditions:
A new asset will be added under the application path.

Parameters:
anAppName - Application name to which the folder is to be added
anAppVersion - Application Version to which the folder is to be added. If empty, head version will be used
anAssetName - is name of the asset
anAssetContent - is content for the asset as com.adobe.idp.Document
aSecondaries - is a list of documents containing the secondary content. Its important to set the 'file' attribute on the secondary document to reflect the filename.
Returns:
Path to the new asset
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if the Parent does not exists
E_ASSET_ALREADY_EXISTS : If the folder already exists
E_INTERNAL_ERROR if there is internal error

deleteAsset

void deleteAsset(java.lang.String anAppName,
                 java.lang.String anAssetPath)
                 throws ApplicationManagerClientException

This method permanently deletes an asset from the head version of the application. If an asset is deployed then an exception is thrown indicating it cannot be deleted.

Pre-conditions:
Asset must exist
Asset should not be deployed to the run time
Post-conditions:
An asset will be permanently deleted.

Parameters:
anAppName - is an application name to which the folder is to be added
anAssetPath - is a Path to the asset
Throws:
ApplicationManagerClientException -
E_ASSET_DOES_NOT_EXIST if an asset does not exist
E_INTERNAL_ERROR if there was an internal error
E_TLO_DEPLOYED_CANNOT_DELETE if an asset is deployed in runtime

deleteAsset

void deleteAsset(java.lang.String anAppName,
                 java.lang.String anAppVersion,
                 java.lang.String anAssetPath)
                 throws ApplicationManagerClientException

This method permanently deletes an asset from the application. If an asset is deployed then an exception is thrown indicating it cannot be deleted.

Pre-conditions:
Asset must exist
Asset should not be deployed to the run time
Post-conditions:
An asset will be permanently deleted.

Parameters:
anAppName - Application name to which the folder is to be added
anAppVersion - Application Version to which the folder is to be added. If empty, head version will be used
anAssetPath - : Path to the asset
Throws:
ApplicationManagerClientException -
E_ASSET_DOES_NOT_EXIST if an asset does not exist
E_INTERNAL_ERROR if there was an internal error
E_TLO_DEPLOYED_CANNOT_DELETE if an asset is deployed in runtime

deleteFolder

void deleteFolder(java.lang.String anAppName,
                  java.lang.String aFolderPath)
                  throws ApplicationManagerClientException

This method deletes a folder from the head version of the application.

Pre-conditions:
Folder must exist
Post-conditions:
A folder will be permanently deleted.

Parameters:
anAppName - Application name to which the folder is to be added
aFolderPath - – path of the folder.
Throws:
ApplicationManagerClientException -
E_FOLDER_DOES_NOT_EXIST if the Folder does not exist
E_INTERNAL_ERROR if there was an internal error

deleteFolder

void deleteFolder(java.lang.String anAppName,
                  java.lang.String anAppVersion,
                  java.lang.String aFolderPath)
                  throws ApplicationManagerClientException

This method deletes a folder.

Pre-conditions:
Folder must exist
Post-conditions:
A folder will be permanently deleted.

Parameters:
anAppName - Application name to which the folder is to be added
anAppVersion - Application Version to which the folder is to be added. If empty, head version will be used
aFolderPath - – path of the folder.
Throws:
ApplicationManagerClientException -
E_FOLDER_DOES_NOT_EXIST if the Folder does not exist
E_INTERNAL_ERROR if there was an internal error

deleteApplication

void deleteApplication(java.lang.String anAppName)
                       throws ApplicationManagerClientException

This method deletes the head version of the application.

Pre-conditions:
An application must exist
Post-conditions:
An application will be permanently deleted.

Parameters:
anAppName - Application name to which the folder is to be added
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if the Folder does not exist
E_INTERNAL_ERROR if there was an internal error

deleteApplication

void deleteApplication(java.lang.String anAppName,
                       java.lang.String anAppVersion)
                       throws ApplicationManagerClientException

This method deletes an application with given name and version. If version is empty then it deletes the head version of the application.

Pre-conditions:
An application must exist
Post-conditions:
An application will be permanently deleted

Parameters:
anAppName - Application name to which the folder is to be added
anAppVersion - Application Version to which the folder is to be added. If empty, head version will be used
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if the Folder does not exist
E_INTERNAL_ERROR if there was an internal error

updateAsset

java.lang.String updateAsset(java.lang.String anAppName,
                             java.lang.String anAssetName,
                             Document aUpdatedAssetContent)
                             throws ApplicationManagerClientException

This method updates an existing asset in the head version of the application

Pre-conditions:
An asset must exist
Post-conditions:
An asset will be updated.

Parameters:
anAppName - Application name to which the folder is to be added
anAssetName - is name of the asset
aUpdatedAssetContent - is content for the asset as com.adobe.idp.Document
Returns:
Path to the updated asset
Throws:
ApplicationManagerClientException -
E_ASSET_DOES_NOT_EXIST if an asset does not exists
E_TLO_LOCKED_BY_OTHER if an asset is locked by another user
E_INTERNAL_ERROR if there was an internal error

updateAsset

java.lang.String updateAsset(java.lang.String anAppName,
                             java.lang.String anAppVersion,
                             java.lang.String anAssetName,
                             Document aUpdatedAssetContent,
                             java.util.List aSecondaries)
                             throws ApplicationManagerClientException

This method updates an existing asset in the application with the name and version provided.

Pre-conditions:
An asset must exist
Post-conditions:
An asset will be updated

Parameters:
anAppName - Application name to which the folder is to be added
anAppVersion - Application Version to which the folder is to be added. If empty, head version will be used
anAssetName - is name of the asset
aUpdatedAssetContent - is content for the asset as com.adobe.idp.Document
aSecondaries - is a list of documents containing the secondary content. Its important to set the 'file' attribute on the secondary document to reflect the filename.
Returns:
Path to the updated asset
Throws:
ApplicationManagerClientException -
E_ASSET_DOES_NOT_EXIST if an asset does not exists
E_TLO_LOCKED_BY_OTHER if an asset is locked by another user
E_INTERNAL_ERROR if there was an internal error

deployApplication

boolean deployApplication(java.lang.String anAppName)
                          throws ApplicationManagerClientException

This method deploys the head version of the application. Deployed application can be acted upon. Example, if the application has process

Pre-conditions:
An application must exist
An applicaiton is not deployed
Post-conditions: An application will be deployed

Parameters:
anApplicationName - is name of the application
Returns:
status of deployment, true if successful else false
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if an application does not exists
E_INTERNAL_ERROR if there was an internal error

deployApplication

boolean deployApplication(java.lang.String anAppName,
                          java.lang.String anAppVersion)
                          throws ApplicationManagerClientException

This method deploys the given version of the application.

Pre-conditions:
An application must exist
An application version must exist
An applicaiton is not deployed
Post-conditions: An application will be deployed

Parameters:
anAppName - is name of the application
anAppVersion - is version of the application
Returns:
status of deployment, true if successful else false
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if an application does not exists
E_APPLICATION_NOCHANGE_SINCE_LASTDEPLOY if there is no change in the application
E_INTERNAL_ERROR if there was an internal error

undeployApplication

boolean undeployApplication(java.lang.String anAppName)
                            throws ApplicationManagerClientException

This method undeploys the head version of the application.

Pre-conditions:
An application must exist
An applicaiton is deployed
Post-conditions: An application will be undeployed

Parameters:
anApplicationName - is name of the application
Returns:
status of undeployment, true if successful else false
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if an application does not exists
E_INTERNAL_ERROR if there was an internal error

undeployApplication

boolean undeployApplication(java.lang.String anAppName,
                            java.lang.String anAppVersion)
                            throws ApplicationManagerClientException

This method undeploys the given version of the application.

Pre-conditions:
An application must exist
An application version must exist
An application is deployed
Post-conditions:

Parameters:
anAppName - is name of the application
anAppVersion - is version of the application
Returns:
status of undeployment, true if successful else false
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if an application does not exists
E_APPLICATION_NOCHANGE_SINCE_LASTDEPLOY if there is no change in the application
E_INTERNAL_ERROR if there was an internal error

getVersions

java.util.List getVersions(java.lang.String anApplicationName,
                           boolean getHead)
                           throws ApplicationManagerClientException

This method returns the list of string containing all the versions for the given application.

Pre-conditions:
An application must exist
Post-conditions:

Parameters:
anApplicationName - is name of the application
getHead - is boolean, if true will return only head version
Returns:
status of undeployment, true if successful else false
Throws:
ApplicationManagerClientException -
E_APPLICATION_DOES_NOT_EXIST if an application does not exists
E_INTERNAL_ERROR if there was an internal error