public class XmlRpcJiraSession extends AbstractAuthorizedSession
| Modifier and Type | Class and Description |
|---|---|
protected class |
XmlRpcJiraSession.JiraIteratorFromFilters |
protected class |
XmlRpcJiraSession.JiraIteratorFromKeys |
| Constructor and Description |
|---|
XmlRpcJiraSession()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the JIRA session.
|
void |
configure(org.apache.commons.configuration.Configuration config)
Configuration allows:
<jira-home>URL</jira-home> - the JIRA base URL <proxy-host> - HTTP proxy (proxy authorization not possible yet) <team name="NAME"> <Member name="FULLNAME">UID</Member> </Team> - team and member UID associations |
protected Issue |
createIssue(HashMap<String,Object> map)
Converts the XML-RPC response for a singe JIRA issue to an object
|
InputStream |
getAttachment(Attachment attachment)
Returns an input stream that will contain the attachment's content.
|
URL |
getBaseUrl()
Returns the baseUrl.
|
String |
getBugzillaVersion()
Returns the version of JIRA connected to.
|
String |
getCookie()
Returns the XMLPRC token for JIRA session.
|
Issue |
getIssue(String id)
Returns the given issue
|
String |
getMaximumBugzillaVersion()
Returns the maximum JIRA version supported.
|
String |
getMinimumBugzillaVersion()
Returns the minimum JIRA version supported.
|
Proxy |
getProxy()
Returns the proxy.
|
AuthorizationCallback |
getProxyAuthorizationCallback()
Returns the proxyAuthorizationCallback.
|
String |
getTeam(String userId)
Returns the team of the user.
|
String |
getUserName(String userid)
Returns the name of the given user.
|
boolean |
isLoggedIn()
Returns true if connection to JIRA was established.
|
boolean |
open()
Opens the JIRA session (login).
|
void |
registerTeamMember(String team,
String member)
Registers a member for a team.
|
Issue |
requestIssue(String key)
Retrieves a specific JIRA issue
|
protected void |
retrieveComments(Issue issue)
Retrieves the comments of given issue and add them as long descriptions.
|
protected void |
retrieveIssueTypes()
Retrieves all Issue Types.
|
protected void |
retrievePriorities()
Retrieves all priorities.
|
protected void |
retrieveResolutions()
Retrieves all resolutions.
|
protected void |
retrieveStatuses()
Retrieves all statuses.
|
Iterator<Issue> |
searchBugs(SearchData searchData,
SearchResultCountCallback callback)
Searches for JIRA issues.
|
void |
setBaseUrl(URL baseUrl)
Sets the baseUrl.
|
void |
setFields(Issue issue,
HashMap<String,Object> map)
Sets all fields in
Issue according to map retrieved by
JIRA's XML-RPC interface. |
static String |
setIssueType(Issue issue,
Map<String,String> valueMap)
Sets the issue type's name for the issue.
|
protected void |
setLoggedIn(boolean loggedIn)
Sets the login status.
|
static String |
setPriority(Issue issue,
Map<String,String> valueMap)
Sets the priority's name for the issue.
|
void |
setProxy(Proxy proxy)
Sets the proxy.
|
void |
setProxyAuthorizationCallback(AuthorizationCallback proxyAuthorizationCallback)
Sets the proxyAuthorizationCallback.
|
static String |
setResolution(Issue issue,
Map<String,String> valueMap)
Sets the resolution's name for the issue.
|
static String |
setStatus(Issue issue,
Map<String,String> valueMap)
Sets the status's name for the issue.
|
protected void |
test()
A test function.
|
checkBugzillaVersion, createIssue, dump, getAuthorizationCallback, getBugzillaBugClass, getLog, getLogin, getPassword, setAuthorizationCallback, setBugzillaBugClasspublic void configure(org.apache.commons.configuration.Configuration config)
throws org.apache.commons.configuration.ConfigurationException
configure in interface Configurableconfigure in class AbstractAuthorizedSessionconfig - - configuration objectorg.apache.commons.configuration.ConfigurationException - - when configuration failspublic void registerTeamMember(String team, String member)
team - team namemember - member namepublic void close()
Session.close()public String getBugzillaVersion()
Session.getBugzillaVersion()public String getMaximumBugzillaVersion()
Session.getMaximumBugzillaVersion()public String getMinimumBugzillaVersion()
Session.getMinimumBugzillaVersion()protected void setLoggedIn(boolean loggedIn)
loggedIn - - the login status to setpublic boolean isLoggedIn()
Session.isLoggedIn()public String getCookie()
public boolean open()
Session.open()public Issue getIssue(String id)
Sessionid - id of issueSession.getIssue(java.lang.String)public InputStream getAttachment(Attachment attachment) throws IOException
attachment - attachment to retrieve.IOException - when the IO stream cannot be createdpublic Iterator<Issue> searchBugs(SearchData searchData, SearchResultCountCallback callback)
searchData - - all search parameterscallback - - a callback object that will retrieve the number of bugs
found for this searchSession.searchBugs(b4j.core.SearchData, b4j.core.SearchResultCountCallback)protected void test()
protected void retrieveIssueTypes()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptionprotected void retrievePriorities()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptionprotected void retrieveStatuses()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptionprotected void retrieveResolutions()
throws org.apache.xmlrpc.XmlRpcException
org.apache.xmlrpc.XmlRpcExceptionpublic String getUserName(String userid)
userid - JIRA ID of userpublic String getTeam(String userId)
userId - id of userconfigure(Configuration)public Issue requestIssue(String key)
key - JIRA keyprotected void retrieveComments(Issue issue)
issue - the issue to retrieve comments for.protected Issue createIssue(HashMap<String,Object> map)
map - XML-RPC response mappublic void setFields(Issue issue, HashMap<String,Object> map)
Issue according to map retrieved by
JIRA's XML-RPC interface.
Do not call unless you know what you do :)issue - issuemap - map returned from XML-RPC interfacepublic static String setPriority(Issue issue, Map<String,String> valueMap)
issue - JIRA issuevalueMap - maps priority IDs to namespublic static String setStatus(Issue issue, Map<String,String> valueMap)
issue - JIRA issuevalueMap - maps status IDs to namespublic static String setResolution(Issue issue, Map<String,String> valueMap)
issue - JIRA issuevalueMap - maps resolution IDs to namespublic static String setIssueType(Issue issue, Map<String,String> valueMap)
issue - JIRA issuevalueMap - maps issue type IDs to namespublic URL getBaseUrl()
public void setBaseUrl(URL baseUrl)
baseUrl - the baseUrl to setpublic Proxy getProxy()
public void setProxy(Proxy proxy)
proxy - the proxy to setpublic AuthorizationCallback getProxyAuthorizationCallback()
public void setProxyAuthorizationCallback(AuthorizationCallback proxyAuthorizationCallback)
proxyAuthorizationCallback - the proxyAuthorizationCallback to setCopyright © 2012. All Rights Reserved.