com.atlassian.jira.rpc.xmlrpc
Class JiraXmlRpcService

java.lang.Object
  extended by com.atlassian.jira.rpc.xmlrpc.JiraXmlRpcService
All Implemented Interfaces:
XmlRpcService

public class JiraXmlRpcService
extends Object
implements XmlRpcService


Constructor Summary
JiraXmlRpcService(com.atlassian.plugin.PluginManager pluginManager)
           
 
Method Summary
 boolean addComment(String token, String issueKey, String comment)
          Adds a comment to an issue
 Hashtable createIssue(String token, Hashtable rIssueStruct)
          Creates an issue in JIRA from a Hashtable object.
 Vector getComments(String token, String issueKey)
          Returns all comments associated with the issue
 Vector getComponents(String token, String projectKey)
          Returns all components available in the specified project
 Hashtable getIssue(String token, String issueKey)
          Gets an issue from a given issue key.
 Vector getIssuesFromFilter(String token, String filterId)
          Executes a saved filter
 Vector getIssuesFromTextSearch(String token, String searchTerms)
          Find issues using a free text search
 Vector getIssuesFromTextSearchWithProject(String token, Vector projectKeys, String searchTerms, int maxNumResults)
          Find issues using a free text search, limited to certain projects
 Vector getIssueTypes(String token)
          Returns all visible issue types in the system
 Vector getIssueTypesForProject(String token, String projectId)
          Returns all visible (non-sub task) issue types for the specified project id
 Vector getPriorities(String token)
          Returns all priorities in the system
 Vector getProjects(String token)
          Returns a list of projects available to the user
 Vector getResolutions(String token)
          Returns all resolutions in the system
 Vector getSavedFilters(String token)
          Gets all saved filters available for the currently logged in user
 Hashtable getServerInfo(String token)
          Returns the Server information such as baseUrl, version, edition, buildDate, buildNumber.
 Vector getStatuses(String token)
          Returns all statuses in the system
 Vector getSubTaskIssueTypes(String token)
          Returns all visible subtask issue types in the system
 Vector getSubTaskIssueTypesForProject(String token, String projectId)
          Returns all visible sub task issue types for the specified project id.
 Hashtable getUser(String token, String username)
          Returns a user's information given a username
 Vector getVersions(String token, String projectKey)
          Returns all versions available in the specified project
 String login(String username, String password)
          Logs the user into JIRA.
 boolean logout(String token)
          Logs the user out of JIRA
 Hashtable updateIssue(String token, String issueKey, Hashtable rIssueStruct)
          Updates an issue in JIRA from a Hashtable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraXmlRpcService

public JiraXmlRpcService(com.atlassian.plugin.PluginManager pluginManager)
Method Detail

login

public String login(String username,
                    String password)
             throws RemoteException,
                    RemoteAuthenticationException
Description copied from interface: XmlRpcService
Logs the user into JIRA. The security token which is returned is used in all subsequent method calls.

Specified by:
login in interface XmlRpcService
Parameters:
username - username of the person logged in in as
password - the appropriate password
Returns:
A string which is a security token to be used in all subsequent calls
Throws:
RemoteException
RemoteAuthenticationException

logout

public boolean logout(String token)
Description copied from interface: XmlRpcService
Logs the user out of JIRA

Specified by:
logout in interface XmlRpcService
Returns:
whether the logging out was successful or not

getServerInfo

public Hashtable getServerInfo(String token)
Description copied from interface: XmlRpcService
Returns the Server information such as baseUrl, version, edition, buildDate, buildNumber.

Specified by:
getServerInfo in interface XmlRpcService
Returns:
Hashtable with fields from RemoteServerInfo.

getProjects

public Vector getProjects(String token)
                   throws RemotePermissionException,
                          RemoteException,
                          RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns a list of projects available to the user

Specified by:
getProjects in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemoteProject
Throws:
RemotePermissionException
RemoteException
RemoteAuthenticationException

getVersions

public Vector getVersions(String token,
                          String projectKey)
                   throws RemotePermissionException,
                          RemoteException,
                          RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all versions available in the specified project

Specified by:
getVersions in interface XmlRpcService
projectKey - The key of project
Returns:
Vector of Hashtables with fields from RemoteVersion
Throws:
RemotePermissionException
RemoteException
RemoteAuthenticationException

getComponents

public Vector getComponents(String token,
                            String projectKey)
                     throws RemotePermissionException,
                            RemoteException,
                            RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all components available in the specified project

Specified by:
getComponents in interface XmlRpcService
projectKey - The key of the project
Returns:
Vector of Hashtables with fields from RemoteComment
Throws:
RemotePermissionException
RemoteException
RemoteAuthenticationException

getIssueTypesForProject

public Vector getIssueTypesForProject(String token,
                                      String projectId)
                               throws RemotePermissionException,
                                      RemoteException,
                                      RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all visible (non-sub task) issue types for the specified project id

Specified by:
getIssueTypesForProject in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemoteIssueType
Throws:
RemotePermissionException
RemoteException
RemoteAuthenticationException

getSubTaskIssueTypesForProject

public Vector getSubTaskIssueTypesForProject(String token,
                                             String projectId)
                                      throws RemotePermissionException,
                                             RemoteException,
                                             RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all visible sub task issue types for the specified project id.

Specified by:
getSubTaskIssueTypesForProject in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemoteIssueType
Throws:
RemotePermissionException
RemoteException
RemoteAuthenticationException

getIssueTypes

public Vector getIssueTypes(String token)
                     throws RemotePermissionException,
                            RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all visible issue types in the system

Specified by:
getIssueTypes in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemoteIssueType
Throws:
RemotePermissionException
RemoteAuthenticationException

getSubTaskIssueTypes

public Vector getSubTaskIssueTypes(String token)
                            throws Exception
Description copied from interface: XmlRpcService
Returns all visible subtask issue types in the system

Specified by:
getSubTaskIssueTypes in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemoteIssueType
Throws:
Exception

getPriorities

public Vector getPriorities(String token)
                     throws RemotePermissionException,
                            RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all priorities in the system

Specified by:
getPriorities in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemotePriority
Throws:
RemotePermissionException
RemoteAuthenticationException

getStatuses

public Vector getStatuses(String token)
                   throws RemotePermissionException,
                          RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all statuses in the system

Specified by:
getStatuses in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemoteStatus
Throws:
RemotePermissionException
RemoteAuthenticationException

getResolutions

public Vector getResolutions(String token)
                      throws RemotePermissionException,
                             RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all resolutions in the system

Specified by:
getResolutions in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemoteResolution
Throws:
RemotePermissionException
RemoteAuthenticationException

getUser

public Hashtable getUser(String token,
                         String username)
                  throws RemotePermissionException,
                         RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns a user's information given a username

Specified by:
getUser in interface XmlRpcService
username - the username of the user being retrieved
Returns:
Vector of Hashtables with fields from RemoteUser
Throws:
RemotePermissionException
RemoteAuthenticationException

getSavedFilters

public Vector getSavedFilters(String token)
                       throws RemotePermissionException,
                              RemoteException,
                              RemoteAuthenticationException
Description copied from interface: XmlRpcService
Gets all saved filters available for the currently logged in user

Specified by:
getSavedFilters in interface XmlRpcService
Returns:
Vector of Hashtables with fields from RemoteFilter
Throws:
RemotePermissionException
RemoteException
RemoteAuthenticationException

getIssue

public Hashtable getIssue(String token,
                          String issueKey)
                   throws RemoteException,
                          RemotePermissionException,
                          RemoteAuthenticationException
Description copied from interface: XmlRpcService
Gets an issue from a given issue key. The Hashtable returned have nested Hashtables for keys, components, affectsVersions, fixVersions and customFieldValues.

Specified by:
getIssue in interface XmlRpcService
issueKey - the key of an issue (e.g. JRA-111)
Returns:
Hashtable with fields from RemoteIssue. This has nested Hashtables for components RemoteComponent, affectsVersions, fixVersions RemoteVersion and customFieldValues RemoteCustomFieldValue.
Throws:
RemoteException
RemotePermissionException
RemoteAuthenticationException

getComments

public Vector getComments(String token,
                          String issueKey)
                   throws RemoteException,
                          RemotePermissionException,
                          RemoteAuthenticationException
Description copied from interface: XmlRpcService
Returns all comments associated with the issue

Specified by:
getComments in interface XmlRpcService
issueKey - the key of an issue (e.g. JRA-111)
Returns:
Vector of Hashtables with fields from RemoteComment
Throws:
RemoteException
RemotePermissionException
RemoteAuthenticationException

createIssue

public Hashtable createIssue(String token,
                             Hashtable rIssueStruct)
                      throws RemoteException,
                             RemotePermissionException,
                             RemoteValidationException,
                             RemoteAuthenticationException
Description copied from interface: XmlRpcService
Creates an issue in JIRA from a Hashtable object. The Hashtable must be in same structure that's returned by XmlRpcService.createIssue(String, Hashtable). That is components, affectsVersions, fixVersions and customFieldValues must be blank or be Hashtables with the appropriate data structures. Issues must not have the fields id, key or reporter set, in addition to any standard rules of issue creation (e.g. permissions, not null summary)

Specified by:
createIssue in interface XmlRpcService
rIssueStruct - Hashtable of issue fields with the appropriate structure for RemoteIssue.
Returns:
Hashtable with fields for the generated issue.
Throws:
RemoteException
RemotePermissionException
RemoteValidationException
RemoteAuthenticationException

updateIssue

public Hashtable updateIssue(String token,
                             String issueKey,
                             Hashtable rIssueStruct)
                      throws RemoteException
Description copied from interface: XmlRpcService
Updates an issue in JIRA from a Hashtable object. The Hashtable must be in same structure that's returned by XmlRpcService.createIssue(String, Hashtable). That is components, affectsVersions, fixVersions and customFieldValues must be blank or be Hashtables with the appropriate data structures. Issues must not have the fields id, key or reporter set, in addition to any standard rules of issue creation (e.g. permissions, not null summary)

Specified by:
updateIssue in interface XmlRpcService
rIssueStruct - Hashtable of issue fields with the appropriate structure for RemoteIssue.
Returns:
Hashtable with fields for the generated issue.
Throws:
RemoteException

addComment

public boolean addComment(String token,
                          String issueKey,
                          String comment)
                   throws Exception
Description copied from interface: XmlRpcService
Adds a comment to an issue

Specified by:
addComment in interface XmlRpcService
issueKey - he key of an issue (e.g. JRA-111)
comment - the text string for the comment
Throws:
Exception

getIssuesFromFilter

public Vector getIssuesFromFilter(String token,
                                  String filterId)
                           throws RemoteException
Description copied from interface: XmlRpcService
Executes a saved filter

Specified by:
getIssuesFromFilter in interface XmlRpcService
filterId - id of the saved filter
Returns:
Vector of Hashtables representing the issue
Throws:
RemoteException

getIssuesFromTextSearch

public Vector getIssuesFromTextSearch(String token,
                                      String searchTerms)
                               throws Exception
Description copied from interface: XmlRpcService
Find issues using a free text search

Specified by:
getIssuesFromTextSearch in interface XmlRpcService
searchTerms - The terms to search for
Returns:
Vector of Hashtables representing the issue
Throws:
Exception

getIssuesFromTextSearchWithProject

public Vector getIssuesFromTextSearchWithProject(String token,
                                                 Vector projectKeys,
                                                 String searchTerms,
                                                 int maxNumResults)
                                          throws Exception
Description copied from interface: XmlRpcService
Find issues using a free text search, limited to certain projects

Specified by:
getIssuesFromTextSearchWithProject in interface XmlRpcService
Returns:
Throws:
Exception


Copyright © 2004-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.