net.kwatee.agiledeployment.client
Class KwateeAPI

java.lang.Object
  extended by net.kwatee.agiledeployment.client.KwateeAPI

public class KwateeAPI
extends Object


Method Summary
 void close()
          Clean logout from the session
 void createArtifact(String artifactName, String artifactProperties)
          Creates a new artifact and optionally set additional properties
 void createEnvironment(String environmentName, String environmentProperties)
          Creates a new environment and optionally sets additional properties.
static KwateeAPI createInstance(String serviceUrl)
          Creates a new api connection instance
 void createServer(String serverName, String serverProperties)
          Creates a new server and optionally sets additional properties
 void createVersion(String artifactName, String versionName, String versionProperties)
          Creates a version in an artifact and optionally set additional properties
 void deleteArtifact(String artifactName)
          Deletes an artifact
 void deleteArtifactPackageOverlay(String artifactName, String versionName, String path)
          Deletes an existing version overlay
 void deleteEnvironment(String environmentName)
          Deletes an environment
 void deleteRelease(String environmentName, String releaseName)
          Deletes a release
 void deleteReleasePackageOverlay(String environmentName, String releaseName, String artifactName, String serverName, String path)
          Deletes an existing release artifact overlay
 void deleteServer(String serverName)
          Deletes a server
 void deleteVersion(String artifactName, String versionName)
          Deletes an artifact's version
 void downloadArtifactPackageFile(String artifactName, String versionName, String path, File downloadFile)
          Downloads a file within the package in the specified location
 void downloadInstaller(String environmentName, String releaseName, File downloadFile)
          Downloads an installer in the specified location
 void downloadLightweightInstaller(String environmentName, String releaseName, File downloadFile)
          Downloads a self-contained command-line installer (to install one server at a time) in the specified location
 void downloadReleasePackageFile(String environmentName, String releaseName, String artifactName, String serverName, String path, File downloadFile)
          Downloads a file within the release artifact package in the specified location
 void duplicateEnvironment(String environmentName, String duplicateFrom, String environmentProperties)
          Duplicates an existing environment and optionally set additional properties.
 void duplicateServer(String serverName, String duplicateFrom, String serverProperties)
          Duplicates an existing server and optionally set additional properties
 void duplicateVersion(String artifactName, String versionName, String duplicateFrom, String versionProperties)
          Duplicates an existing version and optionally set additional properties
 String getArtifact(String artifactName)
          Retrieves an artifact's properties
 String getArtifactPackageFiles(String artifactName, String versionName, String path)
          Retrieves the files present in a version's package at a given relative path
 String getArtifacts()
          Retrieves the list of artifacts in the repository
 String getArtifactSpecialFiles(String artifactName, String versionName)
          Retrieves all the special files (overlays, with variables, with custom flags) within the package
 String getArtifactVariables(String artifactName, String versionName)
          Retrieves the list of version variables
 String getDeployment(String environmentName, String releaseName)
          Retrieves the deployment properties
 String getDeployments()
          Retrieves the list of deployments
 String getEffectiveReleaseArtifacts(String environmentName, String releaseName)
          Retrieves the effective release artifacts (resolves defaultVersions/serverVersions)
 String getEnvironment(String environmentName)
          Retrieves an environment's properties
 String getEnvironments()
          Retrieves the list of environments in the repository
 String getInfoConduitTypes()
          Retrieves the available conduit types (ssh, ftp, ...)
 String getInfoContext()
          Retrieves kwatee information (version, ...)
 String getInfoPlatforms()
          Retrieves the available platforms (operating systems)
 String getInfoServerPoolTypes()
          Retrieves the available server pool types (ec2, ...)
 String getOngoingOperation()
          Retrieves an ongoing deployment operation
 String getOperationProgress(String ref)
          Retrieves the progress of a deployment operation
 int getOperationStatus(String ref)
           
 String getProgressMessages(String ref, String serverName, String artifactName)
          Retrieves the details of a deployment operation for a given server and or artifact
 String getRelease(String environmentName, String releaseName)
          Retrieve an environment's release properties
 String getReleasePackageFiles(String environmentName, String releaseName, String artifactName, String serverName, String path)
          Retrieves the files present in an release artifact package at a given relative path with the package
 String getReleaseSpecialFiles(String environmentName, String releaseName, String artifactName, String serverName)
          Retrieves all the special files (overlays, with variables, with custom flags) within the release artifact package
 String getReleaseVariables(String environmentName, String releaseName)
          Retrieves the list of release variables
 String getServer(String serverName)
          Retrieves the properties of a server
 String getServers()
          Retrieves the list of servers in the repository
 String getVersion(String artifactName, String versionName)
          Retrieves the properties of an artifact's version
 void importActifactsBundle(File bundleFile)
          Uploads (Http Post) an artifacts bundle into the repository
 void importActifactsBundle(String bundleUrl)
          Uploads (from URL) an artifacts bundle into the repository
 void manageCancel(String ref, boolean dontClear)
          Cancels an ongoing operation
 String manageCheckIntegrity(String environmentName, String releaseName, String serverName, String artifactName)
          Initiates a check integrity operation
 String manageDeploy(String environmentName, String releaseName, String serverName, String artifactName)
          Initiates a deploy operation
 String manageStart(String environmentName, String releaseName, String serverName, String artifactName)
          Initiates a start executables operation
 String manageStatus(String environmentName, String releaseName, String serverName, String artifactName)
          Initiates an executables status operation
 String manageStop(String environmentName, String releaseName, String serverName, String artifactName)
          Initiates a stop executables operation
 String manageUndeploy(String environmentName, String releaseName, String serverName, String artifactName, boolean forceUndeploy)
          Initiates a undeploy operation
 void reeditRelease(String environmentName, String releaseName)
          Reedits a previously tagged release
 void sendCredentials(String environmentName, String serverName, boolean sameForAllServers, String credentials)
          Supply server credentials without storing them in kwatee
 String serverDiagnostics(String serverName, String properties)
          Tests a connection to the server and returns server capabilities
 void setReleaseArtifactActiveVersion(String environmentName, String releaseName, String artifactName, String versionName, String serverName)
          Sets the active version (default of server-specific) of a release artifact
 void setReleaseVariables(String environmentName, String releaseName, String variables)
          Sets the release variables
 void tagRelease(String environmentName, String releaseName, String releaseProperties)
          Tags a release and optionally sets additional properties (e.g.
 void updateArtifact(String artifactName, String artifactProperties)
          Updates an artifact's properties
 void updateArtifactPackageFileProperties(String artifactName, String versionName, String path, String fileProperties)
          Update custom flags (ignoreIdenty, dontDelete, ...) of a file within a package
 void updateArtifactVariables(String artifactName, String versionName, String variables)
          Updates version variables
 void updateEnvironment(String environmentName, String environmentProperties)
          Updates the environment with new properties
 void updateRelease(String environmentName, String releaseName, String releaseProperties)
          Updates a release with new properties
 void updateReleasePackageFileProperties(String environmentName, String releaseName, String artifactName, String serverName, String path, String fileProperties)
          Update custom flags (ignoreIdenty, dontDelete, ...) of a file within a release artifact package
 void updateServer(String serverName, String serverProperties)
          Updates the properties of a server
 void updateVersion(String artifactName, String versionName, String versionProperties)
          Updates an artifact's version properties
 void uploadArtifactPackage(String artifactName, String versionName, File uploadFile, boolean deleteOverlays)
          Uploads (Http POST) a package to an artifact's version.
 void uploadArtifactPackage(String artifactName, String versionName, String uploadUrl, boolean deleteOverlays)
          Uploads (from URL) a package to an artifact's version.
 void uploadArtifactPackageOverlay(String artifactName, String versionName, String path, File uploadFile)
          Uploads (Http POST) an overlay at a relative path within the package
 void uploadArtifactPackageOverlay(String artifactName, String versionName, String path, String uploadUrl)
          Uploads (from URL) an overlay at a relative path within the package
 void uploadReleasePackageOverlay(String environmentName, String releaseName, String artifactName, String serverName, String path, File uploadFile)
          Uploads (Http Post) an overlay at a relative path within the release artifact package
 void uploadReleasePackageOverlay(String environmentName, String releaseName, String artifactName, String serverName, String path, String uploadUrl)
          Uploads (from URL) an overlay at a relative path within the release artifact package
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createInstance

public static KwateeAPI createInstance(String serviceUrl)
                                throws IOException
Creates a new api connection instance

Parameters:
serviceUrl - url of the form http://user:password@host:port/kwatee
Returns:
an instance
Throws:
IOException

close

public void close()
Clean logout from the session


getArtifacts

public String getArtifacts()
                    throws IOException
Retrieves the list of artifacts in the repository

Returns:
an array of artifacts in the repository (plain string JSON)
Throws:
IOException

getArtifact

public String getArtifact(String artifactName)
                   throws IOException
Retrieves an artifact's properties

Parameters:
artifactName - the name of an artifact
Returns:
the artifact's properties (plain string JSON)
Throws:
IOException

updateArtifact

public void updateArtifact(String artifactName,
                           String artifactProperties)
                    throws IOException
Updates an artifact's properties

Parameters:
artifactName - the name of an artifact
artifactProperties - the artifact's properties to update (plain string JSON)
Throws:
IOException

createArtifact

public void createArtifact(String artifactName,
                           String artifactProperties)
                    throws IOException
Creates a new artifact and optionally set additional properties

Parameters:
artifactName - the name of the artifact to create
artifactProperties - the artifact's properties to set (plain string JSON) or null
Throws:
IOException

deleteArtifact

public void deleteArtifact(String artifactName)
                    throws IOException
Deletes an artifact

Parameters:
artifactName - the name of an artifact
Throws:
IOException

getVersion

public String getVersion(String artifactName,
                         String versionName)
                  throws IOException
Retrieves the properties of an artifact's version

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
Returns:
the version's properties (plain string JSON)
Throws:
IOException

updateVersion

public void updateVersion(String artifactName,
                          String versionName,
                          String versionProperties)
                   throws IOException
Updates an artifact's version properties

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
versionProperties - the version properties to update (plain string JSON)
Throws:
IOException

createVersion

public void createVersion(String artifactName,
                          String versionName,
                          String versionProperties)
                   throws IOException
Creates a version in an artifact and optionally set additional properties

Parameters:
artifactName - the name of the version's artifact
versionName - the name of the version to create
versionProperties - the version properties to set (plain string JSON) or null
Throws:
IOException

duplicateVersion

public void duplicateVersion(String artifactName,
                             String versionName,
                             String duplicateFrom,
                             String versionProperties)
                      throws IOException
Duplicates an existing version and optionally set additional properties

Parameters:
artifactName - the name of the version's artifact
versionName - the name of the version to create
duplicateFrom - name of the version (within same artifact) to duplicate
versionProperties - the version properties to set (plain string JSON) or null
Throws:
IOException

deleteVersion

public void deleteVersion(String artifactName,
                          String versionName)
                   throws IOException
Deletes an artifact's version

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
Throws:
IOException

uploadArtifactPackage

public void uploadArtifactPackage(String artifactName,
                                  String versionName,
                                  File uploadFile,
                                  boolean deleteOverlays)
                           throws IOException
Uploads (Http POST) a package to an artifact's version. Replaces whatever existing package there is but retains previously uploaded overlays unless deleteOverlays=true

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
uploadFile - the package file to upload
deleteOverlays - if false, preserves existing overlays
Throws:
IOException

uploadArtifactPackage

public void uploadArtifactPackage(String artifactName,
                                  String versionName,
                                  String uploadUrl,
                                  boolean deleteOverlays)
                           throws IOException
Uploads (from URL) a package to an artifact's version. Replaces whatever existing package there is but retains previously uploaded overlays unless deleteOverlays=true

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
uploadUrl - the package url (can be file:///) to upload
deleteOverlays - if false, preserves existing overlays
Throws:
IOException

getArtifactPackageFiles

public String getArtifactPackageFiles(String artifactName,
                                      String versionName,
                                      String path)
                               throws IOException
Retrieves the files present in a version's package at a given relative path

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
path - the relative path of the directory to list within package (null for root of package listing)
Returns:
the files present in a package at a given relative path as an array (plain string JSON)
Throws:
IOException

getArtifactSpecialFiles

public String getArtifactSpecialFiles(String artifactName,
                                      String versionName)
                               throws IOException
Retrieves all the special files (overlays, with variables, with custom flags) within the package

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
Returns:
all the special files (overlays, with variables, with custom flags) within the package as an array (plain string JSON)
Throws:
IOException

updateArtifactPackageFileProperties

public void updateArtifactPackageFileProperties(String artifactName,
                                                String versionName,
                                                String path,
                                                String fileProperties)
                                         throws IOException
Update custom flags (ignoreIdenty, dontDelete, ...) of a file within a package

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
path - the relative path of the file within the package
fileProperties - the file's properties to update (plain string JSON)
Throws:
IOException

downloadArtifactPackageFile

public void downloadArtifactPackageFile(String artifactName,
                                        String versionName,
                                        String path,
                                        File downloadFile)
                                 throws IOException
Downloads a file within the package in the specified location

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
path - the relative path of the file within the package
downloadFile - the location to store the result into
Throws:
IOException

uploadArtifactPackageOverlay

public void uploadArtifactPackageOverlay(String artifactName,
                                         String versionName,
                                         String path,
                                         File uploadFile)
                                  throws IOException
Uploads (Http POST) an overlay at a relative path within the package

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
path - the relative path of the overlay directory within the package
uploadFile - a file to upload
Throws:
IOException

uploadArtifactPackageOverlay

public void uploadArtifactPackageOverlay(String artifactName,
                                         String versionName,
                                         String path,
                                         String uploadUrl)
                                  throws IOException
Uploads (from URL) an overlay at a relative path within the package

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
path - the relative path of the overlay directory within the package
uploadUrl - the url to a file (can be file:///) to upload
Throws:
IOException

deleteArtifactPackageOverlay

public void deleteArtifactPackageOverlay(String artifactName,
                                         String versionName,
                                         String path)
                                  throws IOException
Deletes an existing version overlay

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
path - the relative path of the file within the package
Throws:
IOException

getArtifactVariables

public String getArtifactVariables(String artifactName,
                                   String versionName)
                            throws IOException
Retrieves the list of version variables

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
Returns:
an array of version variables (plain string JSON)
Throws:
IOException

updateArtifactVariables

public void updateArtifactVariables(String artifactName,
                                    String versionName,
                                    String variables)
                             throws IOException
Updates version variables

Parameters:
artifactName - the name of the version's artifact
versionName - the name of a version
variables - array of variables (plain string JSON)
Throws:
IOException

importActifactsBundle

public void importActifactsBundle(File bundleFile)
                           throws IOException
Uploads (Http Post) an artifacts bundle into the repository

Parameters:
bundleFile - the artifacts bundle to import
Throws:
IOException

importActifactsBundle

public void importActifactsBundle(String bundleUrl)
                           throws IOException
Uploads (from URL) an artifacts bundle into the repository

Parameters:
bundleUrl - the url to an artifacts bundle (can be file:///) to import
Throws:
IOException

getServers

public String getServers()
                  throws IOException
Retrieves the list of servers in the repository

Returns:
an array of servers (plain string JSON)
Throws:
IOException

getServer

public String getServer(String serverName)
                 throws IOException
Retrieves the properties of a server

Parameters:
serverName - the name of the server
Returns:
the server's properties (plain string JSON)
Throws:
IOException

updateServer

public void updateServer(String serverName,
                         String serverProperties)
                  throws IOException
Updates the properties of a server

Parameters:
serverName - the name of the server
serverProperties - the server properties to update (plain string JSON)
Throws:
IOException

createServer

public void createServer(String serverName,
                         String serverProperties)
                  throws IOException
Creates a new server and optionally sets additional properties

Parameters:
serverName - the name of the server
serverProperties - the server properties to set (plain string JSON) or null
Throws:
IOException

duplicateServer

public void duplicateServer(String serverName,
                            String duplicateFrom,
                            String serverProperties)
                     throws IOException
Duplicates an existing server and optionally set additional properties

Parameters:
serverName - the name of the server to create
duplicateFrom - the name of the server to duplicate
serverProperties - the properties to set (plain string JSON) or null
Throws:
IOException

deleteServer

public void deleteServer(String serverName)
                  throws IOException
Deletes a server

Parameters:
serverName - the name of the server
Throws:
IOException

serverDiagnostics

public String serverDiagnostics(String serverName,
                                String properties)
                         throws IOException
Tests a connection to the server and returns server capabilities

Parameters:
serverName - the name of the server
properties - JSON server properties (typically for credentials)
Returns:
JSON array of server capabilities (plain string JSON)
Throws:
IOException

getEnvironments

public String getEnvironments()
                       throws IOException
Retrieves the list of environments in the repository

Returns:
an array of environments (plain string JSON)
Throws:
IOException

getEnvironment

public String getEnvironment(String environmentName)
                      throws IOException
Retrieves an environment's properties

Parameters:
environmentName - the name of an environment
Returns:
the JSON environment properties (plain string JSON)
Throws:
IOException

updateEnvironment

public void updateEnvironment(String environmentName,
                              String environmentProperties)
                       throws IOException
Updates the environment with new properties

Parameters:
environmentName - the name of an environment
environmentProperties - the environment properties to update (plain string JSON)
Throws:
IOException

createEnvironment

public void createEnvironment(String environmentName,
                              String environmentProperties)
                       throws IOException
Creates a new environment and optionally sets additional properties.

Parameters:
environmentName - the name of the environment to create.
environmentProperties - the environment properties to set (plain string JSON) or null
Throws:
IOException

duplicateEnvironment

public void duplicateEnvironment(String environmentName,
                                 String duplicateFrom,
                                 String environmentProperties)
                          throws IOException
Duplicates an existing environment and optionally set additional properties. Note that only the snapshot environment is included in a duplicate operation.

Parameters:
environmentName - the name of the environment to create
duplicateFrom - name of the environment to duplicate
environmentProperties - the environment properties to set (plain string JSON) or null
Throws:
IOException

deleteEnvironment

public void deleteEnvironment(String environmentName)
                       throws IOException
Deletes an environment

Parameters:
environmentName - the name of an environment
Throws:
IOException

getRelease

public String getRelease(String environmentName,
                         String releaseName)
                  throws IOException
Retrieve an environment's release properties

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
Returns:
the release properties (plain string JSON)
Throws:
IOException

updateRelease

public void updateRelease(String environmentName,
                          String releaseName,
                          String releaseProperties)
                   throws IOException
Updates a release with new properties

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
releaseProperties - the release properties to update (plain string JSON)
Throws:
IOException

tagRelease

public void tagRelease(String environmentName,
                       String releaseName,
                       String releaseProperties)
                throws IOException
Tags a release and optionally sets additional properties (e.g. description)

Parameters:
environmentName - the name of the release's environment
releaseName - the name of tagged release to create
releaseProperties - the release properties to set (plain string JSON)
Throws:
IOException

reeditRelease

public void reeditRelease(String environmentName,
                          String releaseName)
                   throws IOException
Reedits a previously tagged release

Parameters:
environmentName - the name of the release's environment
releaseName - the name of existing tagged release
Throws:
IOException

deleteRelease

public void deleteRelease(String environmentName,
                          String releaseName)
                   throws IOException
Deletes a release

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
Throws:
IOException

getEffectiveReleaseArtifacts

public String getEffectiveReleaseArtifacts(String environmentName,
                                           String releaseName)
                                    throws IOException
Retrieves the effective release artifacts (resolves defaultVersions/serverVersions)

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
Returns:
an array of release artifacts (plain string JSON)
Throws:
IOException

setReleaseArtifactActiveVersion

public void setReleaseArtifactActiveVersion(String environmentName,
                                            String releaseName,
                                            String artifactName,
                                            String versionName,
                                            String serverName)
                                     throws IOException
Sets the active version (default of server-specific) of a release artifact

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
artifactName - the name of an artifact
versionName - the active version to be set
serverName - null for default active version
Throws:
IOException

getReleasePackageFiles

public String getReleasePackageFiles(String environmentName,
                                     String releaseName,
                                     String artifactName,
                                     String serverName,
                                     String path)
                              throws IOException
Retrieves the files present in an release artifact package at a given relative path with the package

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
artifactName - the name of an artifact
serverName - null for list files in default package
path - the relative path of the directory to list within package (null for full recursive listing)
Returns:
the files present in a package at a given relative path as a JSON array (plain string JSON)
Throws:
IOException

getReleaseSpecialFiles

public String getReleaseSpecialFiles(String environmentName,
                                     String releaseName,
                                     String artifactName,
                                     String serverName)
                              throws IOException
Retrieves all the special files (overlays, with variables, with custom flags) within the release artifact package

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
artifactName - the name of an artifact
serverName - null for list files in default package
Returns:
all the special files (overlays, with variables, with custom flags) within the package as an array (plain string JSON)
Throws:
IOException

updateReleasePackageFileProperties

public void updateReleasePackageFileProperties(String environmentName,
                                               String releaseName,
                                               String artifactName,
                                               String serverName,
                                               String path,
                                               String fileProperties)
                                        throws IOException
Update custom flags (ignoreIdenty, dontDelete, ...) of a file within a release artifact package

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
artifactName - the name of an artifact
serverName - null for list files in default package
path - the relative path of the file within the package
fileProperties - the file properties to update (plain string JSON)
Throws:
IOException

downloadReleasePackageFile

public void downloadReleasePackageFile(String environmentName,
                                       String releaseName,
                                       String artifactName,
                                       String serverName,
                                       String path,
                                       File downloadFile)
                                throws IOException
Downloads a file within the release artifact package in the specified location

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
artifactName - the name of an artifact
serverName - null for list files in default package
path - the relative path of the file within the package
downloadFile - the location to store the result into
Throws:
IOException

uploadReleasePackageOverlay

public void uploadReleasePackageOverlay(String environmentName,
                                        String releaseName,
                                        String artifactName,
                                        String serverName,
                                        String path,
                                        File uploadFile)
                                 throws IOException
Uploads (Http Post) an overlay at a relative path within the release artifact package

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
artifactName - the name of an artifact
serverName - null for list files in default package
path - the relative path of the overlay directory within the package
uploadFile - the file to upload
Throws:
IOException

uploadReleasePackageOverlay

public void uploadReleasePackageOverlay(String environmentName,
                                        String releaseName,
                                        String artifactName,
                                        String serverName,
                                        String path,
                                        String uploadUrl)
                                 throws IOException
Uploads (from URL) an overlay at a relative path within the release artifact package

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
artifactName - the name of an artifact
serverName - null for list files in default package
path - the relative path of the overlay directory within the package
uploadUrl - the url to the file (can be file:///) to upload
Throws:
IOException

deleteReleasePackageOverlay

public void deleteReleasePackageOverlay(String environmentName,
                                        String releaseName,
                                        String artifactName,
                                        String serverName,
                                        String path)
                                 throws IOException
Deletes an existing release artifact overlay

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
artifactName - the name of an artifact
serverName - null for list files in default package
path - the relative path of the file within the package
Throws:
IOException

getReleaseVariables

public String getReleaseVariables(String environmentName,
                                  String releaseName)
                           throws IOException
Retrieves the list of release variables

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
Returns:
an array of variables (plain string JSON)
Throws:
IOException

setReleaseVariables

public void setReleaseVariables(String environmentName,
                                String releaseName,
                                String variables)
                         throws IOException
Sets the release variables

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
variables - an array of variables (plain string JSON)
Throws:
IOException

getDeployments

public String getDeployments()
                      throws IOException
Retrieves the list of deployments

Returns:
an array of deployments (plain string JSON)
Throws:
IOException

getDeployment

public String getDeployment(String environmentName,
                            String releaseName)
                     throws IOException
Retrieves the deployment properties

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
Returns:
the deployment's properties (plain string JSON)
Throws:
IOException

downloadLightweightInstaller

public void downloadLightweightInstaller(String environmentName,
                                         String releaseName,
                                         File downloadFile)
                                  throws IOException
Downloads a self-contained command-line installer (to install one server at a time) in the specified location

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
downloadFile - the location to store the result into
Throws:
IOException

downloadInstaller

public void downloadInstaller(String environmentName,
                              String releaseName,
                              File downloadFile)
                       throws IOException
Downloads an installer in the specified location

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
downloadFile - the location to store the result into
Throws:
IOException

manageDeploy

public String manageDeploy(String environmentName,
                           String releaseName,
                           String serverName,
                           String artifactName)
                    throws IOException
Initiates a deploy operation

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
serverName - the name of a server or null for all servers in environment
artifactName - the name of an artifact or null for all artifacts within server/environment
Returns:
a deployment operation reference
Throws:
IOException

manageUndeploy

public String manageUndeploy(String environmentName,
                             String releaseName,
                             String serverName,
                             String artifactName,
                             boolean forceUndeploy)
                      throws IOException
Initiates a undeploy operation

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
serverName - the name of a server or null for all servers in environment
artifactName - the name of an artifact or null for all artifacts within server/environment
forceUndeploy - if true ignores errors and removes files
Returns:
a deployment operation reference
Throws:
IOException

manageCheckIntegrity

public String manageCheckIntegrity(String environmentName,
                                   String releaseName,
                                   String serverName,
                                   String artifactName)
                            throws IOException
Initiates a check integrity operation

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
serverName - the name of a server or null for all servers in environment
artifactName - the name of an artifact or null for all artifacts within server/environment
Returns:
a deployment operation reference
Throws:
IOException

manageStart

public String manageStart(String environmentName,
                          String releaseName,
                          String serverName,
                          String artifactName)
                   throws IOException
Initiates a start executables operation

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
serverName - the name of a server or null for all servers in environment
artifactName - the name of an artifact or null for all artifacts within server/environment
Returns:
a deployment operation reference
Throws:
IOException

manageStop

public String manageStop(String environmentName,
                         String releaseName,
                         String serverName,
                         String artifactName)
                  throws IOException
Initiates a stop executables operation

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
serverName - the name of a server or null for all servers in environment
artifactName - the name of an artifact or null for all artifacts within server/environment
Returns:
a deployment operation reference
Throws:
IOException

manageStatus

public String manageStatus(String environmentName,
                           String releaseName,
                           String serverName,
                           String artifactName)
                    throws IOException
Initiates an executables status operation

Parameters:
environmentName - the name of the release's environment
releaseName - the name of the release or null for snapshot release
serverName - the name of a server or null for all servers in environment
artifactName - the name of an artifact or null for all artifacts within server/environment
Returns:
a deployment operation reference
Throws:
IOException

getOngoingOperation

public String getOngoingOperation()
                           throws IOException
Retrieves an ongoing deployment operation

Returns:
a deployment operation reference or null if no operation is in progress
Throws:
IOException

getOperationStatus

public int getOperationStatus(String ref)
                       throws IOException
Parameters:
ref - the reference of an ongoing deployment operation
Throws:
IOException

getOperationProgress

public String getOperationProgress(String ref)
                            throws IOException
Retrieves the progress of a deployment operation

Parameters:
ref - the reference of an ongoing deployment operation
Returns:
the properties of the deployment operation (plain string JSON)
Throws:
IOException

getProgressMessages

public String getProgressMessages(String ref,
                                  String serverName,
                                  String artifactName)
                           throws IOException
Retrieves the details of a deployment operation for a given server and or artifact

Parameters:
ref - the reference of an ongoing deployment operation
serverName - the name of the server for which info is requested
artifactName - the name of an artifact for which info is requested. If null, server-wide information is returned
Returns:
the operation details (plain string JSON)
Throws:
IOException

manageCancel

public void manageCancel(String ref,
                         boolean dontClear)
                  throws IOException
Cancels an ongoing operation

Parameters:
ref - the reference of an ongoing deployment operation
dontClear - if true the status is kept active
Throws:
IOException

sendCredentials

public void sendCredentials(String environmentName,
                            String serverName,
                            boolean sameForAllServers,
                            String credentials)
                     throws IOException
Supply server credentials without storing them in kwatee

Parameters:
environmentName - the name of an environment
serverName - the name of the server
sameForAllServers - if true, these same credentials will be applied to all servers that need it.
credentials - the optional credentials (plain string JSON or null)
Throws:
IOException

getInfoContext

public String getInfoContext()
                      throws IOException
Retrieves kwatee information (version, ...)

Returns:
kwatee properties (plain string JSON)
Throws:
IOException

getInfoPlatforms

public String getInfoPlatforms()
                        throws IOException
Retrieves the available platforms (operating systems)

Returns:
an array of platforms (plain string JSON)
Throws:
IOException

getInfoConduitTypes

public String getInfoConduitTypes()
                           throws IOException
Retrieves the available conduit types (ssh, ftp, ...)

Returns:
an array of conduit types (plain string JSON)
Throws:
IOException

getInfoServerPoolTypes

public String getInfoServerPoolTypes()
                              throws IOException
Retrieves the available server pool types (ec2, ...)

Returns:
an array of server pool types (plain string JSON)
Throws:
IOException


Copyright © 2014. All Rights Reserved.