jfullam.vfabric.rest.appdir
Class DefaultRestProvider

java.lang.Object
  extended by jfullam.vfabric.rest.appdir.DefaultRestProvider
All Implemented Interfaces:
RestProvider

public class DefaultRestProvider
extends Object
implements RestProvider

Uses Apache HttpClient to call the Application Director REST API

Author:
Jonathan Fullam

Constructor Summary
DefaultRestProvider(String baseApi, String user, String password)
           
 
Method Summary
 org.codehaus.jackson.JsonNode getApplications()
           
 org.codehaus.jackson.JsonNode getDeploymentProfiles(String applicationId)
           
 org.codehaus.jackson.JsonNode getDeployments()
           
 org.codehaus.jackson.JsonNode getDeploymentUpdateProperties(String deploymentId)
           
 org.codehaus.jackson.JsonNode getDeployProperties(String deploymentProfileId)
           
static void main(String[] args)
           
 org.codehaus.jackson.JsonNode postScheduleDeployment(String deploymentProfileId, org.codehaus.jackson.JsonNode deployRequest)
           
 org.codehaus.jackson.JsonNode postTeardown(String deploymentId)
           
 void setHttpClient(org.apache.http.impl.client.DefaultHttpClient httpClient)
           
 void setPassword(String password)
           
 void setUser(String user)
           
 org.codehaus.jackson.JsonNode updateDeployment(String deployment, org.codehaus.jackson.JsonNode updateRequest)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRestProvider

public DefaultRestProvider(String baseApi,
                           String user,
                           String password)
                    throws KeyManagementException,
                           NoSuchAlgorithmException
Throws:
KeyManagementException
NoSuchAlgorithmException
Method Detail

getDeployments

public org.codehaus.jackson.JsonNode getDeployments()
                                             throws ServiceException
Specified by:
getDeployments in interface RestProvider
Throws:
ServiceException

postTeardown

public org.codehaus.jackson.JsonNode postTeardown(String deploymentId)
                                           throws ServiceException
Specified by:
postTeardown in interface RestProvider
Throws:
ServiceException

postScheduleDeployment

public org.codehaus.jackson.JsonNode postScheduleDeployment(String deploymentProfileId,
                                                            org.codehaus.jackson.JsonNode deployRequest)
                                                     throws ServiceException
Specified by:
postScheduleDeployment in interface RestProvider
Throws:
ServiceException

getApplications

public org.codehaus.jackson.JsonNode getApplications()
                                              throws ServiceException
Specified by:
getApplications in interface RestProvider
Throws:
ServiceException

getDeployProperties

public org.codehaus.jackson.JsonNode getDeployProperties(String deploymentProfileId)
                                                  throws ServiceException
Specified by:
getDeployProperties in interface RestProvider
Throws:
ServiceException

getDeploymentProfiles

public org.codehaus.jackson.JsonNode getDeploymentProfiles(String applicationId)
                                                    throws ServiceException
Specified by:
getDeploymentProfiles in interface RestProvider
Throws:
ServiceException

getDeploymentUpdateProperties

public org.codehaus.jackson.JsonNode getDeploymentUpdateProperties(String deploymentId)
                                                            throws ServiceException
Specified by:
getDeploymentUpdateProperties in interface RestProvider
Throws:
ServiceException

updateDeployment

public org.codehaus.jackson.JsonNode updateDeployment(String deployment,
                                                      org.codehaus.jackson.JsonNode updateRequest)
                                               throws ServiceException
Specified by:
updateDeployment in interface RestProvider
Throws:
ServiceException

main

public static void main(String[] args)

setUser

public void setUser(String user)

setPassword

public void setPassword(String password)

setHttpClient

public void setHttpClient(org.apache.http.impl.client.DefaultHttpClient httpClient)


Copyright © 2004-2012. All Rights Reserved.