org.apache.maven.scm.provider.integrity
Class APISession

java.lang.Object
  extended by org.apache.maven.scm.provider.integrity.APISession

public class APISession
extends Object

The APISession provides a wrapper for the MKS JAVA API

Since:
1.6
Version:
$Id: APISession.java 1.2 2011/08/22 13:06:44EDT Cletus D'Souza (dsouza) Exp $
Author:
Cletus D'Souza

Field Summary
static int MAJOR_VERSION
           
static int MINOR_VERSION
           
static String VERSION
           
 
Constructor Summary
APISession(ScmLogger logger)
          Constructor for the API Session Object Needs an ScmLogger to log all API operations
 
Method Summary
 com.mks.api.response.Response connect(String host, int portNum, String user, String paswd)
          Establishes a connection with the MKS Integrity Server
 String getHostName()
          Returns the MKS Integrity Hostname for this APISession
 ScmLogger getLogger()
          Returns the ScmLogger for this APISession
 String getPassword()
          Returns the MKS Integrity Password for this APISession
 int getPort()
          Returns the MKS Integrity Port for this APISession
 String getUserName()
          Returns the MKS Integrity User for this APISession
 com.mks.api.response.Response runCommand(com.mks.api.Command cmd)
          This function executes a generic API Command
 com.mks.api.response.Response runCommandAs(com.mks.api.Command cmd, String impersonateUser)
          This function executes a generic API Command impersonating another user
 void Terminate()
          Terminate the API Session and Integration Point
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION

MAJOR_VERSION

public static final int MAJOR_VERSION

MINOR_VERSION

public static final int MINOR_VERSION
Constructor Detail

APISession

public APISession(ScmLogger logger)
Constructor for the API Session Object Needs an ScmLogger to log all API operations

Parameters:
logger -
Method Detail

connect

public com.mks.api.response.Response connect(String host,
                                             int portNum,
                                             String user,
                                             String paswd)
                                      throws com.mks.api.response.APIException
Establishes a connection with the MKS Integrity Server

Parameters:
host - Hostname or IP address for the MKS Integrity Server
portNum - Port number for the MKS Integrity Server
user - Username to connect to the MKS Integrity Server
paswd - Password for the User connecting to the server
Throws:
com.mks.api.response.APIException

runCommand

public com.mks.api.response.Response runCommand(com.mks.api.Command cmd)
                                         throws com.mks.api.response.APIException
This function executes a generic API Command

Parameters:
cmd - MKS API Command Object representing an API command
Returns:
MKS API Response Object
Throws:
com.mks.api.response.APIException

runCommandAs

public com.mks.api.response.Response runCommandAs(com.mks.api.Command cmd,
                                                  String impersonateUser)
                                           throws com.mks.api.response.APIException
This function executes a generic API Command impersonating another user

Parameters:
cmd - MKS API Command Object representing a API command
impersonateUser - The user to impersonate
Returns:
MKS API Response Object
Throws:
com.mks.api.response.APIException

Terminate

public void Terminate()
Terminate the API Session and Integration Point


getHostName

public String getHostName()
Returns the MKS Integrity Hostname for this APISession

Returns:

getPort

public int getPort()
Returns the MKS Integrity Port for this APISession

Returns:

getUserName

public String getUserName()
Returns the MKS Integrity User for this APISession

Returns:

getPassword

public String getPassword()
Returns the MKS Integrity Password for this APISession

Returns:

getLogger

public ScmLogger getLogger()
Returns the ScmLogger for this APISession



Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.