com.midvision.rapiddeploy.connector
Class RapidDeployConnector

java.lang.Object
  extended by com.midvision.rapiddeploy.connector.RapidDeployConnector

public class RapidDeployConnector
extends Object


Constructor Summary
RapidDeployConnector()
           
 
Method Summary
static String extractHostname(String responseOutput)
           
static String extractJobId(String responseOutput)
           
static String extractJobStatus(String responseOutput)
           
static List<String> extractTagValueFromXml(String xmlContent, String tagName)
           
static String extractXPathExpressionFromXml(String xmlContent, String xpathExpr)
           
static String invokeRapidDeployBuildPackage(String authenticationToken, String serverUrl, String projectName, String packageName, String archiveExtension, boolean logEnabled)
           
static String invokeRapidDeployDeploymentPollOutput(String authenticationToken, String serverUrl, String projectName, String targetEnvironment, String packageName, boolean logEnabled)
          Runs a Job in RapidDeploy with basic information.
static String invokeRapidDeployDeploymentPollOutput(String authenticationToken, String serverUrl, String projectName, String targetEnvironment, String packageName, boolean logEnabled, boolean asynchronousJob)
          Runs a Job in RapidDeploy providing the option to run it asynchronously.
static String invokeRapidDeployDeploymentPollOutput(String authenticationToken, String serverUrl, String projectName, String targetEnvironment, String packageName, boolean logEnabled, boolean asynchronousJob, boolean allowFailedPkg)
          Runs a Job in RapidDeploy providing the options to run it asynchronously and selecting if running or not previously failed packages.
static String invokeRapidDeployDeploymentPollOutput(String authenticationToken, String serverUrl, String projectName, String targetEnvironment, String packageName, boolean logEnabled, String userName, String passwordEncrypted, String keyFilePath, String keyPassPhraseEncrypted, String encryptionKey)
          Runs a Job in RapidDeploy with specific transport credentials.
static String invokeRapidDeployDeploymentPollOutput(String authenticationToken, String serverUrl, String projectName, String targetEnvironment, String packageName, boolean logEnabled, String userName, String passwordEncrypted, String keyFilePath, String keyPassPhraseEncrypted, String encryptionKey, boolean asynchronousJob)
          Runs a Job in RapidDeploy with specific transport credentials and providing the option to run it asynchronously as well.
static String invokeRapidDeployDeploymentPollOutput(String authenticationToken, String serverUrl, String projectName, String targetEnvironment, String packageName, boolean logEnabled, String userName, String passwordEncrypted, String keyFilePath, String keyPassPhraseEncrypted, String encryptionKey, boolean asynchronousJob, boolean allowFailedPkg)
          Runs a Job in RapidDeploy with all possible options (Main method).
static String invokeRapidDeployGetSingleServer(String authenticationToken, String serverUrl, String serverName)
           
static List<String> invokeRapidDeployListEnvironments(String authenticationToken, String serverUrl, String projectName)
           
static List<String> invokeRapidDeployListPackages(String authenticationToken, String serverUrl, String projectName)
           
static List<String> invokeRapidDeployListPackages(String authenticationToken, String serverUrl, String projectName, String server, String environment, String instance)
           
static List<String> invokeRapidDeployListProjects(String authenticationToken, String serverUrl)
           
static List<String> invokeRapidDeployListServers(String authenticationToken, String serverUrl)
           
static String pollRapidDeployJobDetails(String authenticationToken, String serverUrl, String jobId)
           
static String pollRapidDeployJobLog(String authenticationToken, String serverUrl, String jobId)
           
 void test()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RapidDeployConnector

public RapidDeployConnector()
Method Detail

invokeRapidDeployDeploymentPollOutput

public static String invokeRapidDeployDeploymentPollOutput(String authenticationToken,
                                                           String serverUrl,
                                                           String projectName,
                                                           String targetEnvironment,
                                                           String packageName,
                                                           boolean logEnabled)
                                                    throws Exception
Runs a Job in RapidDeploy with basic information.

Parameters:
authenticationToken -
serverUrl -
projectName -
targetEnvironment -
packageName -
logEnabled -
Returns:
Throws:
Exception

invokeRapidDeployDeploymentPollOutput

public static String invokeRapidDeployDeploymentPollOutput(String authenticationToken,
                                                           String serverUrl,
                                                           String projectName,
                                                           String targetEnvironment,
                                                           String packageName,
                                                           boolean logEnabled,
                                                           String userName,
                                                           String passwordEncrypted,
                                                           String keyFilePath,
                                                           String keyPassPhraseEncrypted,
                                                           String encryptionKey)
                                                    throws Exception
Runs a Job in RapidDeploy with specific transport credentials.

Parameters:
authenticationToken -
serverUrl -
projectName -
targetEnvironment -
packageName -
logEnabled -
userName -
passwordEncrypted -
keyFilePath -
keyPassPhraseEncrypted -
encryptionKey -
Returns:
Throws:
Exception

invokeRapidDeployDeploymentPollOutput

public static String invokeRapidDeployDeploymentPollOutput(String authenticationToken,
                                                           String serverUrl,
                                                           String projectName,
                                                           String targetEnvironment,
                                                           String packageName,
                                                           boolean logEnabled,
                                                           boolean asynchronousJob)
                                                    throws Exception
Runs a Job in RapidDeploy providing the option to run it asynchronously.

Parameters:
authenticationToken -
serverUrl -
projectName -
targetEnvironment -
packageName -
logEnabled -
asynchronousJob -
Returns:
Throws:
Exception

invokeRapidDeployDeploymentPollOutput

public static String invokeRapidDeployDeploymentPollOutput(String authenticationToken,
                                                           String serverUrl,
                                                           String projectName,
                                                           String targetEnvironment,
                                                           String packageName,
                                                           boolean logEnabled,
                                                           boolean asynchronousJob,
                                                           boolean allowFailedPkg)
                                                    throws Exception
Runs a Job in RapidDeploy providing the options to run it asynchronously and selecting if running or not previously failed packages.

Parameters:
authenticationToken -
serverUrl -
projectName -
targetEnvironment -
packageName -
logEnabled -
asynchronousJob -
allowFailedPkg -
Returns:
Throws:
Exception

invokeRapidDeployDeploymentPollOutput

public static String invokeRapidDeployDeploymentPollOutput(String authenticationToken,
                                                           String serverUrl,
                                                           String projectName,
                                                           String targetEnvironment,
                                                           String packageName,
                                                           boolean logEnabled,
                                                           String userName,
                                                           String passwordEncrypted,
                                                           String keyFilePath,
                                                           String keyPassPhraseEncrypted,
                                                           String encryptionKey,
                                                           boolean asynchronousJob)
                                                    throws Exception
Runs a Job in RapidDeploy with specific transport credentials and providing the option to run it asynchronously as well.

Parameters:
authenticationToken -
serverUrl -
projectName -
targetEnvironment -
packageName -
logEnabled -
userName -
passwordEncrypted -
keyFilePath -
keyPassPhraseEncrypted -
encryptionKey -
asynchronousJob -
Returns:
Throws:
Exception

invokeRapidDeployDeploymentPollOutput

public static String invokeRapidDeployDeploymentPollOutput(String authenticationToken,
                                                           String serverUrl,
                                                           String projectName,
                                                           String targetEnvironment,
                                                           String packageName,
                                                           boolean logEnabled,
                                                           String userName,
                                                           String passwordEncrypted,
                                                           String keyFilePath,
                                                           String keyPassPhraseEncrypted,
                                                           String encryptionKey,
                                                           boolean asynchronousJob,
                                                           boolean allowFailedPkg)
                                                    throws Exception
Runs a Job in RapidDeploy with all possible options (Main method).

Parameters:
authenticationToken -
serverUrl -
projectName -
targetEnvironment -
packageName -
logEnabled -
userName -
passwordEncrypted -
keyFilePath -
keyPassPhraseEncrypted -
encryptionKey -
asynchronousJob -
allowFailedPkg -
Returns:
Throws:
Exception

invokeRapidDeployBuildPackage

public static String invokeRapidDeployBuildPackage(String authenticationToken,
                                                   String serverUrl,
                                                   String projectName,
                                                   String packageName,
                                                   String archiveExtension,
                                                   boolean logEnabled)
                                            throws Exception
Throws:
Exception

pollRapidDeployJobDetails

public static String pollRapidDeployJobDetails(String authenticationToken,
                                               String serverUrl,
                                               String jobId)
                                        throws Exception
Throws:
Exception

pollRapidDeployJobLog

public static String pollRapidDeployJobLog(String authenticationToken,
                                           String serverUrl,
                                           String jobId)
                                    throws Exception
Throws:
Exception

invokeRapidDeployListProjects

public static List<String> invokeRapidDeployListProjects(String authenticationToken,
                                                         String serverUrl)
                                                  throws Exception
Throws:
Exception

invokeRapidDeployListEnvironments

public static List<String> invokeRapidDeployListEnvironments(String authenticationToken,
                                                             String serverUrl,
                                                             String projectName)
                                                      throws Exception
Throws:
Exception

invokeRapidDeployListPackages

public static List<String> invokeRapidDeployListPackages(String authenticationToken,
                                                         String serverUrl,
                                                         String projectName,
                                                         String server,
                                                         String environment,
                                                         String instance)
                                                  throws Exception
Throws:
Exception

invokeRapidDeployListPackages

public static List<String> invokeRapidDeployListPackages(String authenticationToken,
                                                         String serverUrl,
                                                         String projectName)
                                                  throws Exception
Throws:
Exception

invokeRapidDeployListServers

public static List<String> invokeRapidDeployListServers(String authenticationToken,
                                                        String serverUrl)
                                                 throws Exception
Throws:
Exception

invokeRapidDeployGetSingleServer

public static String invokeRapidDeployGetSingleServer(String authenticationToken,
                                                      String serverUrl,
                                                      String serverName)
                                               throws Exception
Throws:
Exception

extractTagValueFromXml

public static List<String> extractTagValueFromXml(String xmlContent,
                                                  String tagName)
                                           throws Exception
Throws:
Exception

extractXPathExpressionFromXml

public static String extractXPathExpressionFromXml(String xmlContent,
                                                   String xpathExpr)
                                            throws Exception
Throws:
Exception

extractJobStatus

public static String extractJobStatus(String responseOutput)
                               throws Exception
Throws:
Exception

test

public void test()

extractJobId

public static String extractJobId(String responseOutput)
                           throws Exception
Throws:
Exception

extractHostname

public static String extractHostname(String responseOutput)
                              throws Exception
Throws:
Exception


Copyright © 2015. All Rights Reserved.