|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
Application getApplication(ApplicationId applicationId) throws ApplicationManagerClientException
applicationId
- An ApplicationId
instance containing the name of the application to be fetched.
ApplicationManagerClientException
- ApplicationId
instance or the application name it contains is null java.util.List getApplications() throws ApplicationManagerClientException
Application
instances representing the applications in the system.
ApplicationManagerClientException
- ApplicationStatus getApplicationStatus(ApplicationId applicationId) throws ApplicationManagerClientException
ApplicationStatus
instance for the given application, which describes the deployment
status of each application component and the application as a whole.
applicationId
- An ApplicationId
instance containing the name of the application whose status is to be fetched.
ApplicationManagerClientException
- ApplicationId
instance or the application name it contains is null ApplicationStatus previewApplicationArchive(Document applicationArchiveDocument) throws ApplicationManagerClientException
applicationArchiveDocument
- A Document
instance representing the application archive to be previewed.
ApplicationStatus
instance representing the result of the preview.
ApplicationManagerClientException
- Document previewLCA(Document aRequest) throws ApplicationManagerClientException
aRequest
- A Document
instance representing the LC 9 application archive to be previewed.
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.
ApplicationManagerClientException
- 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
aApplicationName
- is name of the application
ApplicationManagerClientException
- 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
aApplicationName
- is name of the applicationaMajorRevision
- if true, major version is updated else minoraDescription
- is description of the new version
ApplicationManagerClientException
- 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
aApplicationName
- is name of the applicationaSourceVersion
- is version of the source application, if empty, head version will be usedaMajorRevision
- if true, major version is updated else minoraDescription
- is description of the new version
ApplicationManagerClientException
- java.lang.String createApplicationVersion(java.lang.String applicationName, java.lang.String sourceVersion, java.lang.String targetVersion, java.lang.String description) throws ApplicationManagerClientException
applicationName
- Name of the applicationsourceVersion
- Source Version from which the tlos need to be copiedtargetVersion
- Target version of the applicationdescription
- Description of the new version
ApplicationManagerClientException
- java.lang.String importApplication(Document app) throws ApplicationManagerClientException
app
- Represents archive LCA
ApplicationManagerClientException
- Document export(java.util.List exportResourceIds, java.lang.String lcaDescription) throws ApplicationManagerClientException
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.
ApplicationManagerClientException
- 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
anAppName
- Application name to which the folder is to be addedaFolderName
- is name of the folder. If path is recursive, all the folders in the chain are created.
ApplicationManagerClientException
- 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.
anAppName
- Application name to which the folder is to be addedanAppVersion
- Application Version to which the folder is to be added. If empty, head version will be usedaFolderName
- is name of the folder. If path is recursive, all the folders in the chain are created.
ApplicationManagerClientException
- 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.
anAppName
- is an application name to which the folder is to be addedanAssetName
- is the name of the assetanAssetContent
- is content for the asset as com.adobe.idp.Document
ApplicationManagerClientException
- 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.
anAppName
- Application name to which the folder is to be addedanAppVersion
- Application Version to which the folder is to be added. If empty, head version will be usedanAssetName
- is name of the assetanAssetContent
- is content for the asset as com.adobe.idp.DocumentaSecondaries
- is a list of documents containing the secondary content. Its important to set the 'file' attribute on the secondary document to reflect the filename.
ApplicationManagerClientException
- 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.
anAppName
- is an application name to which the folder is to be addedanAssetPath
- is a Path to the asset
ApplicationManagerClientException
- 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.
anAppName
- Application name to which the folder is to be addedanAppVersion
- Application Version to which the folder is to be added. If empty, head version will be usedanAssetPath
- : Path to the asset
ApplicationManagerClientException
- 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.
anAppName
- Application name to which the folder is to be addedaFolderPath
- – path of the folder.
ApplicationManagerClientException
- 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.
anAppName
- Application name to which the folder is to be addedanAppVersion
- Application Version to which the folder is to be added. If empty, head version will be usedaFolderPath
- – path of the folder.
ApplicationManagerClientException
- 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.
anAppName
- Application name to which the folder is to be added
ApplicationManagerClientException
- 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
anAppName
- Application name to which the folder is to be addedanAppVersion
- Application Version to which the folder is to be added. If empty, head version will be used
ApplicationManagerClientException
- 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.
anAppName
- Application name to which the folder is to be addedanAssetName
- is name of the assetaUpdatedAssetContent
- is content for the asset as com.adobe.idp.Document
ApplicationManagerClientException
- 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
anAppName
- Application name to which the folder is to be addedanAppVersion
- Application Version to which the folder is to be added. If empty, head version will be usedanAssetName
- is name of the assetaUpdatedAssetContent
- is content for the asset as com.adobe.idp.DocumentaSecondaries
- is a list of documents containing the secondary content. Its important to set the 'file' attribute on the secondary document to reflect the filename.
ApplicationManagerClientException
- 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
anApplicationName
- is name of the application
ApplicationManagerClientException
- 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
anAppName
- is name of the applicationanAppVersion
- is version of the application
ApplicationManagerClientException
- 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
anApplicationName
- is name of the application
ApplicationManagerClientException
- 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:
anAppName
- is name of the applicationanAppVersion
- is version of the application
ApplicationManagerClientException
- 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:
anApplicationName
- is name of the applicationgetHead
- is boolean, if true will return only head version
ApplicationManagerClientException
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |