org.xwiki.jira
Class JiraScriptService

java.lang.Object
  extended by org.xwiki.jira.JiraScriptService
All Implemented Interfaces:
org.xwiki.script.service.ScriptService

@Component
@Named(value="jira")
public class JiraScriptService
extends Object
implements org.xwiki.script.service.ScriptService

Expose Atlassian's JIRA REST service to XWiki scripts.

Since:
3.2M3
Version:
$Id: aa0dbe551134c996e1ffe8bdf48ea257a59ab7c7 $

Constructor Summary
JiraScriptService()
           
 
Method Summary
 com.atlassian.jira.rest.client.JiraRestClient getJiraRestClient(String jiraURL)
          Connect anonymously to the remote JIRA instance.
 com.atlassian.jira.rest.client.JiraRestClient getJiraRestClient(String jiraURL, String username, String password)
          Note that the password will be passed in clear over the network to the remote JIRA instance.
 com.atlassian.jira.rest.client.ProgressMonitor getNullProgressMonitor()
          Since all JRJC APIs require to be passed a ProgressMonitor this method makes it easy to get one (especially useful from Velocity scripts since they can't do any new).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraScriptService

public JiraScriptService()
Method Detail

getJiraRestClient

public com.atlassian.jira.rest.client.JiraRestClient getJiraRestClient(String jiraURL,
                                                                       String username,
                                                                       String password)
Note that the password will be passed in clear over the network to the remote JIRA instance. Thus, only use this method when connecting over HTTPS.

Parameters:
jiraURL - the URL to the remote JIRA instance to connect to
username - the username to connect to JIRA
password - the password to connect to JIRA
Returns:
the client to interact with the remote JIRA instance

getJiraRestClient

public com.atlassian.jira.rest.client.JiraRestClient getJiraRestClient(String jiraURL)
Connect anonymously to the remote JIRA instance.

Parameters:
jiraURL - the URL to the remote JIRA instance to connect to
Returns:
the client to interact with the remote JIRA instance

getNullProgressMonitor

public com.atlassian.jira.rest.client.ProgressMonitor getNullProgressMonitor()
Since all JRJC APIs require to be passed a ProgressMonitor this method makes it easy to get one (especially useful from Velocity scripts since they can't do any new).

Returns:
a ProgressMonitor that doesn't do anything


Copyright © 2004-2013 XWiki. All Rights Reserved.