com.googlecode.msidor.maven.plugins.hpalm.deliverynote
Interface HPALMMojoDAOI

All Known Implementing Classes:
DefaultHPALMMojoDAO

public interface HPALMMojoDAOI

HPALMMavenPlugin Data Access Object interface. An implementation of this interface should provide API that allows to execute remote commands on Confluence and HP ALM servers.

Author:
Maciej SIDOR

Method Summary
 Object authenticateToConfluence(String confleunceUser, String confluencePassword)
          Authenticates to Confluence
 String authenticateToHPALM(String targetURL, String username, String password)
          Authenticate to HP ALM
 HashMap<Object,Object> getConfluencePage(Object cookie, String confluencePageID)
          Retrieves Confluence page content
 String getFromHPALM(String targetURL, String cookie)
          Get the content from target URL via GET method
 void initializeXmlRpcClient(String confluenceServer)
          Initialize XML RPC Client
 String putToHPALM(String targetURL, String urlParameters, String cookie)
          Send content to target URL via PUT method
 void updateConfluencePage(Object cookie, HashMap<Object,Object> page, HashMap<Object,Object> pageUpdateOptions)
          Update Confluence page with given content
 

Method Detail

updateConfluencePage

void updateConfluencePage(Object cookie,
                          HashMap<Object,Object> page,
                          HashMap<Object,Object> pageUpdateOptions)
                          throws org.apache.xmlrpc.XmlRpcException
Update Confluence page with given content

Parameters:
cookie - Confluence session authentication object
page - Confluence page content
pageUpdateOptions - Update options
Throws:
org.apache.xmlrpc.XmlRpcException

getConfluencePage

HashMap<Object,Object> getConfluencePage(Object cookie,
                                         String confluencePageID)
                                         throws org.apache.xmlrpc.XmlRpcException
Retrieves Confluence page content

Parameters:
cookie - Confluence session authentication object
confluencePageID - CID of Confluence page to retrieve
Returns:
Confluence page content
Throws:
org.apache.xmlrpc.XmlRpcException

authenticateToConfluence

Object authenticateToConfluence(String confleunceUser,
                                String confluencePassword)
                                throws org.apache.xmlrpc.XmlRpcException
Authenticates to Confluence

Parameters:
confleunceUser - Confluence user
confluencePassword - Confluence password
Returns:
Confluence session authentication object
Throws:
org.apache.xmlrpc.XmlRpcException

initializeXmlRpcClient

void initializeXmlRpcClient(String confluenceServer)
                            throws MalformedURLException
Initialize XML RPC Client

Parameters:
confluenceServer - Confluence address
Throws:
MalformedURLException

putToHPALM

String putToHPALM(String targetURL,
                  String urlParameters,
                  String cookie)
                  throws org.apache.maven.plugin.MojoFailureException
Send content to target URL via PUT method

Parameters:
targetURL - - target to send the content to
urlParameters - - the content to be sent
cookie - - cookie to be set in Cookie header file
Returns:
response from the target URL
Throws:
org.apache.maven.plugin.MojoFailureException - if server responded with code different than 200

getFromHPALM

String getFromHPALM(String targetURL,
                    String cookie)
                    throws org.apache.maven.plugin.MojoFailureException
Get the content from target URL via GET method

Parameters:
targetURL - - target to get the content from
cookie - - cookie to be set in Cookie header file
Returns:
response from the target URL
Throws:
org.apache.maven.plugin.MojoFailureException - if server responded with code different than 200

authenticateToHPALM

String authenticateToHPALM(String targetURL,
                           String username,
                           String password)
                           throws org.apache.maven.plugin.MojoFailureException
Authenticate to HP ALM

Parameters:
targetURL - - target to authenticate to
username - - HP ALM user
password - - HP ALM password
Returns:
authentication cookie
Throws:
org.apache.maven.plugin.MojoFailureException - if server responded with code different than 200


Copyright © 2014. All rights reserved.