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 java.lang.Object
implements XmlRpcService


Constructor Summary
JiraXmlRpcService(com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 
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)
          Gets all favourite filters available for the currently logged in user
 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 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.PluginAccessor pluginAccessor)
Method Detail

login

public java.lang.String login(java.lang.String username,
                              java.lang.String password)
                       throws RemoteException
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

logout

public boolean logout(java.lang.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 java.util.Hashtable getServerInfo(java.lang.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.

getProjectsNoSchemes

public java.util.Vector getProjectsNoSchemes(java.lang.String token)
                                      throws RemoteException
Description copied from interface: XmlRpcService
Returns a list of projects available to the user

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

getVersions

public java.util.Vector getVersions(java.lang.String token,
                                    java.lang.String projectKey)
                             throws RemoteException
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:
RemoteException

getComponents

public java.util.Vector getComponents(java.lang.String token,
                                      java.lang.String projectKey)
                               throws RemoteException
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:
RemoteException

getIssueTypesForProject

public java.util.Vector getIssueTypesForProject(java.lang.String token,
                                                java.lang.String projectId)
                                         throws RemoteException
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:
RemoteException

getSubTaskIssueTypesForProject

public java.util.Vector getSubTaskIssueTypesForProject(java.lang.String token,
                                                       java.lang.String projectId)
                                                throws RemoteException
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:
RemoteException

getIssueTypes

public java.util.Vector getIssueTypes(java.lang.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 java.util.Vector getSubTaskIssueTypes(java.lang.String token)
                                      throws java.lang.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:
java.lang.Exception

getPriorities

public java.util.Vector getPriorities(java.lang.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 java.util.Vector getStatuses(java.lang.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 java.util.Vector getResolutions(java.lang.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 java.util.Hashtable getUser(java.lang.String token,
                                   java.lang.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 java.util.Vector getSavedFilters(java.lang.String token)
                                 throws RemoteException
Description copied from interface: XmlRpcService
Gets all favourite filters available for the currently logged in user

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

getFavouriteFilters

public java.util.Vector getFavouriteFilters(java.lang.String token)
                                     throws RemoteException
Description copied from interface: XmlRpcService
Gets all favourite filters available for the currently logged in user

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

getIssue

public java.util.Hashtable getIssue(java.lang.String token,
                                    java.lang.String issueKey)
                             throws RemoteException
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

getComments

public java.util.Vector getComments(java.lang.String token,
                                    java.lang.String issueKey)
                             throws RemoteException
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

createIssue

public java.util.Hashtable createIssue(java.lang.String token,
                                       java.util.Hashtable rIssueStruct)
                                throws RemoteException
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

updateIssue

public java.util.Hashtable updateIssue(java.lang.String token,
                                       java.lang.String issueKey,
                                       java.util.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(java.lang.String token,
                          java.lang.String issueKey,
                          java.lang.String comment)
                   throws java.lang.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:
java.lang.Exception

getIssuesFromFilter

public java.util.Vector getIssuesFromFilter(java.lang.String token,
                                            java.lang.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 java.util.Vector getIssuesFromTextSearch(java.lang.String token,
                                                java.lang.String searchTerms)
                                         throws java.lang.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:
java.lang.Exception

getIssuesFromTextSearchWithProject

public java.util.Vector getIssuesFromTextSearchWithProject(java.lang.String token,
                                                           java.util.Vector projectKeys,
                                                           java.lang.String searchTerms,
                                                           int maxNumResults)
                                                    throws java.lang.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:
java.lang.Exception


Copyright © 2004-2011 Atlassian. All Rights Reserved.