com.tszadel.qctools4j
Interface IQcConnection

All Known Implementing Classes:
QcConnectionImpl

public interface IQcConnection

Connection to Quality Center.

Author:
tszadel

Method Summary
 void connect(String pUsername, String pPassword, String pDomain, String pProject)
          Connect to a given project.
 void disconnect()
          Disconnect from Quality center.
 BugClient getBugClient()
          Returns the defect client.
 String getCurrentDomain()
          Returns the name of the current project.
 List<Group> getCurrentGroups()
          Returns the groups that the current user is member.
 String getCurrentProject()
          Returns the name of the current project.
 String getCurrentUser()
          Returns the name of the current user.
 List<Domain> getDomainList()
          Returns the list of visible domains.
 FieldDescriptionClient getPermissionClient()
          Returns the Permission client.
 String getServerURL()
          Returns the name of the server.
 TestClient getTestClient()
          Returns the Test client.
 UserClient getUserClient()
          Returns the user client.
 String getVersion()
          Returns the version of the QC Server.
 boolean isConnected()
          Check if the client is connected to a server.
 boolean isLoggedIn()
          Check if the client is connected to a project.
 void login(String pUsername, String pPassword)
          Login.
 

Method Detail

connect

void connect(String pUsername,
             String pPassword,
             String pDomain,
             String pProject)
             throws QcException
Connect to a given project.

Need to call disconnect once the work is terminated

Parameters:
pUsername - The user name.
pPassword - The password.
pDomain - The domain.
pProject - The project.
Throws:
QcException - Connection error.

disconnect

void disconnect()
                throws QcException
Disconnect from Quality center.

Throws:
QcException - QC Error.

getBugClient

BugClient getBugClient()
                       throws QcException
Returns the defect client.

Returns:
The defect client.
Throws:
QcException - QC Error

getCurrentDomain

String getCurrentDomain()
                        throws QcException
Returns the name of the current project.

Returns:
The name of the current project or null if not logged in.
Throws:
QcException - QC Error.

getCurrentGroups

List<Group> getCurrentGroups()
                             throws QcException
Returns the groups that the current user is member.

Returns:
The groups of the current user.
Throws:
QcException - Qc Error.

getCurrentProject

String getCurrentProject()
                         throws QcException
Returns the name of the current project.

Returns:
The name of the current project or null if not logged in.
Throws:
QcException - QC Error.

getCurrentUser

String getCurrentUser()
                      throws QcException
Returns the name of the current user.

Returns:
The name of the current user or null if not logged in.
Throws:
QcException - QC Error.

getDomainList

List<Domain> getDomainList()
                           throws QcException
Returns the list of visible domains.
The user need to be logged in.

Returns:
The list of visible domains.
Throws:
QcException - Connection error.

getPermissionClient

FieldDescriptionClient getPermissionClient()
                                           throws QcException
Returns the Permission client.

Returns:
The test client.
Throws:
QcException - QC Error

getServerURL

String getServerURL()
                    throws QcException
Returns the name of the server.

Returns:
The name of the server.
Throws:
QcException - QC Error.

getTestClient

TestClient getTestClient()
                         throws QcException
Returns the Test client.

Returns:
The test client.
Throws:
QcException - QC Error

getUserClient

UserClient getUserClient()
                         throws QcException
Returns the user client.

Returns:
The user client.
Throws:
QcException - Qc Error.

getVersion

String getVersion()
                  throws QcException
Returns the version of the QC Server.

Returns:
The version of the QC Server.
Throws:
QcException - QC Error

isConnected

boolean isConnected()
Check if the client is connected to a server.

Returns:
True if connected, false otherwise.

isLoggedIn

boolean isLoggedIn()
Check if the client is connected to a project.

Returns:
True if connected, false otherwise.

login

void login(String pUsername,
           String pPassword)
           throws QcException
Login.

Parameters:
pUsername - The username.
pPassword - The password.
Throws:
QcException - Login error.