com.atlassian.jira.rpc.xmlrpc
Interface XmlRpcService

All Known Implementing Classes:
JiraXmlRpcService

public interface XmlRpcService

The XmlRpcService provides an XML-RPC interface into JIRA. All available methods are documented here. For the latest on the plugin, visit http://confluence.atlassian.com/display/JIRAEXT/JIRA+RPC+plugin


Method Summary
 boolean addComment(java.lang.String token, java.lang.String issueKey, java.lang.String comment)
          Adds a comment to an issue
 java.util.Hashtable createIssue(java.lang.String token, java.util.Hashtable rIssueStruct)
          Creates an issue in JIRA from a Hashtable object.
 java.util.Vector getComments(java.lang.String token, java.lang.String issueKey)
          Returns all comments associated with the issue
 java.util.Vector getComponents(java.lang.String token, java.lang.String projectKey)
          Returns all components available in the specified project
 java.util.Vector getFavouriteFilters(java.lang.String token)
          Gets all favourite filters available for the currently logged in user
 java.util.Hashtable getIssue(java.lang.String token, java.lang.String issueKey)
          Gets an issue from a given issue key.
 java.util.Vector getIssuesFromFilter(java.lang.String token, java.lang.String filterId)
          Executes a saved filter
 java.util.Vector getIssuesFromTextSearch(java.lang.String token, java.lang.String searchTerms)
          Find issues using a free text search
 java.util.Vector getIssuesFromTextSearchWithProject(java.lang.String token, java.util.Vector projectKeys, java.lang.String searchTerms, int maxNumResults)
          Find issues using a free text search, limited to certain projects
 java.util.Vector getIssueTypes(java.lang.String token)
          Returns all visible issue types in the system
 java.util.Vector getIssueTypesForProject(java.lang.String token, java.lang.String projectId)
          Returns all visible (non-sub task) issue types for the specified project id
 java.util.Vector getPriorities(java.lang.String token)
          Returns all priorities in the system
 java.util.Vector getProjectsNoSchemes(java.lang.String token)
          Returns a list of projects available to the user
 java.util.Vector getResolutions(java.lang.String token)
          Returns all resolutions in the system
 java.util.Vector getSavedFilters(java.lang.String token)
          Deprecated. since v3.13. Please use getFavouriteFilters(String)
 java.util.Hashtable getServerInfo(java.lang.String token)
          Returns the Server information such as baseUrl, version, edition, buildDate, buildNumber.
 java.util.Vector getStatuses(java.lang.String token)
          Returns all statuses in the system
 java.util.Vector getSubTaskIssueTypes(java.lang.String token)
          Returns all visible subtask issue types in the system
 java.util.Vector getSubTaskIssueTypesForProject(java.lang.String token, java.lang.String projectId)
          Returns all visible sub task issue types for the specified project id.
 java.util.Hashtable getUser(java.lang.String token, java.lang.String username)
          Returns a user's information given a username
 java.util.Vector getVersions(java.lang.String token, java.lang.String projectKey)
          Returns all versions available in the specified project
 java.lang.String login(java.lang.String username, java.lang.String password)
          Logs the user into JIRA.
 boolean logout(java.lang.String token)
          Logs the user out of JIRA
 java.util.Hashtable updateIssue(java.lang.String token, java.lang.String issueKey, java.util.Hashtable fieldValues)
          Updates an issue in JIRA from a Hashtable object.
 

Method Detail

login

java.lang.String login(java.lang.String username,
                       java.lang.String password)
                       throws java.lang.Exception
Logs the user into JIRA. The security token which is returned is used in all subsequent method calls.

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:
java.lang.Exception

logout

boolean logout(java.lang.String token)
Logs the user out of JIRA

Parameters:
token -
Returns:
whether the logging out was successful or not

getServerInfo

java.util.Hashtable getServerInfo(java.lang.String token)
Returns the Server information such as baseUrl, version, edition, buildDate, buildNumber.

Parameters:
token -
Returns:
Hashtable with fields from RemoteServerInfo.

getProjectsNoSchemes

java.util.Vector getProjectsNoSchemes(java.lang.String token)
                                      throws java.lang.Exception
Returns a list of projects available to the user

Parameters:
token -
Returns:
Vector of Hashtables with fields from RemoteProject
Throws:
java.lang.Exception

getVersions

java.util.Vector getVersions(java.lang.String token,
                             java.lang.String projectKey)
                             throws java.lang.Exception
Returns all versions available in the specified project

Parameters:
token -
projectKey - The key of project
Returns:
Vector of Hashtables with fields from RemoteVersion
Throws:
java.lang.Exception

getComponents

java.util.Vector getComponents(java.lang.String token,
                               java.lang.String projectKey)
                               throws java.lang.Exception
Returns all components available in the specified project

Parameters:
token -
projectKey - The key of the project
Returns:
Vector of Hashtables with fields from RemoteComment
Throws:
java.lang.Exception

getIssueTypesForProject

java.util.Vector getIssueTypesForProject(java.lang.String token,
                                         java.lang.String projectId)
                                         throws java.lang.Exception
Returns all visible (non-sub task) issue types for the specified project id

Parameters:
token -
projectId -
Returns:
Vector of Hashtables with fields from RemoteIssueType
Throws:
java.lang.Exception

getSubTaskIssueTypesForProject

java.util.Vector getSubTaskIssueTypesForProject(java.lang.String token,
                                                java.lang.String projectId)
                                                throws java.lang.Exception
Returns all visible sub task issue types for the specified project id.

Parameters:
token -
projectId -
Returns:
Vector of Hashtables with fields from RemoteIssueType
Throws:
java.lang.Exception

getIssueTypes

java.util.Vector getIssueTypes(java.lang.String token)
                               throws java.lang.Exception
Returns all visible issue types in the system

Parameters:
token -
Returns:
Vector of Hashtables with fields from RemoteIssueType
Throws:
java.lang.Exception

getSubTaskIssueTypes

java.util.Vector getSubTaskIssueTypes(java.lang.String token)
                                      throws java.lang.Exception
Returns all visible subtask issue types in the system

Parameters:
token -
Returns:
Vector of Hashtables with fields from RemoteIssueType
Throws:
java.lang.Exception

getPriorities

java.util.Vector getPriorities(java.lang.String token)
                               throws java.lang.Exception
Returns all priorities in the system

Parameters:
token -
Returns:
Vector of Hashtables with fields from RemotePriority
Throws:
java.lang.Exception

getStatuses

java.util.Vector getStatuses(java.lang.String token)
                             throws java.lang.Exception
Returns all statuses in the system

Parameters:
token -
Returns:
Vector of Hashtables with fields from RemoteStatus
Throws:
java.lang.Exception

getResolutions

java.util.Vector getResolutions(java.lang.String token)
                                throws java.lang.Exception
Returns all resolutions in the system

Parameters:
token -
Returns:
Vector of Hashtables with fields from RemoteResolution
Throws:
java.lang.Exception

getUser

java.util.Hashtable getUser(java.lang.String token,
                            java.lang.String username)
                            throws java.lang.Exception
Returns a user's information given a username

Parameters:
token -
username - the username of the user being retrieved
Returns:
Vector of Hashtables with fields from RemoteUser
Throws:
java.lang.Exception

getSavedFilters

java.util.Vector getSavedFilters(java.lang.String token)
                                 throws java.lang.Exception
Deprecated. since v3.13. Please use getFavouriteFilters(String)

Gets all favourite filters available for the currently logged in user

Parameters:
token -
Returns:
Vector of Hashtables with fields from RemoteFilter
Throws:
java.lang.Exception

getFavouriteFilters

java.util.Vector getFavouriteFilters(java.lang.String token)
                                     throws java.lang.Exception
Gets all favourite filters available for the currently logged in user

Parameters:
token -
Returns:
Vector of Hashtables with fields from RemoteFilter
Throws:
java.lang.Exception

getIssue

java.util.Hashtable getIssue(java.lang.String token,
                             java.lang.String issueKey)
                             throws java.lang.Exception
Gets an issue from a given issue key. The Hashtable returned have nested Hashtables for keys, components, affectsVersions, fixVersions and customFieldValues.

Parameters:
token -
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:
java.lang.Exception

createIssue

java.util.Hashtable createIssue(java.lang.String token,
                                java.util.Hashtable rIssueStruct)
                                throws java.lang.Exception
Creates an issue in JIRA from a Hashtable object. The Hashtable must be in same structure that's returned by 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)

Parameters:
token -
rIssueStruct - Hashtable of issue fields with the appropriate structure for RemoteIssue.
Returns:
Hashtable with fields for the generated issue.
Throws:
java.lang.Exception

updateIssue

java.util.Hashtable updateIssue(java.lang.String token,
                                java.lang.String issueKey,
                                java.util.Hashtable fieldValues)
                                throws java.lang.Exception
Updates an issue in JIRA from a Hashtable object. The Hashtable must be in same structure that's returned by 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)

Parameters:
token -
fieldValues - Hashtable of issue fields with the appropriate structure for RemoteIssue.
Returns:
Hashtable with fields for the generated issue.
Throws:
java.lang.Exception

addComment

boolean addComment(java.lang.String token,
                   java.lang.String issueKey,
                   java.lang.String comment)
                   throws java.lang.Exception
Adds a comment to an issue

Parameters:
token -
issueKey - he key of an issue (e.g. JRA-111)
comment - the text string for the comment
Throws:
java.lang.Exception

getIssuesFromFilter

java.util.Vector getIssuesFromFilter(java.lang.String token,
                                     java.lang.String filterId)
                                     throws java.lang.Exception
Executes a saved filter

Parameters:
token -
filterId - id of the saved filter
Returns:
Vector of Hashtables representing the issue
Throws:
java.lang.Exception

getIssuesFromTextSearch

java.util.Vector getIssuesFromTextSearch(java.lang.String token,
                                         java.lang.String searchTerms)
                                         throws java.lang.Exception
Find issues using a free text search

Parameters:
token -
searchTerms - The terms to search for
Returns:
Vector of Hashtables representing the issue
Throws:
java.lang.Exception

getIssuesFromTextSearchWithProject

java.util.Vector getIssuesFromTextSearchWithProject(java.lang.String token,
                                                    java.util.Vector projectKeys,
                                                    java.lang.String searchTerms,
                                                    int maxNumResults)
                                                    throws java.lang.Exception
Find issues using a free text search, limited to certain projects

Parameters:
token -
projectKeys -
searchTerms -
Returns:
Throws:
java.lang.Exception

getComments

java.util.Vector getComments(java.lang.String token,
                             java.lang.String issueKey)
                             throws java.lang.Exception
Returns all comments associated with the issue

Parameters:
token -
issueKey - the key of an issue (e.g. JRA-111)
Returns:
Vector of Hashtables with fields from RemoteComment
Throws:
java.lang.Exception


Copyright © 2004-2011 Atlassian. All Rights Reserved.