org.xwiki.jira
Class JiraScriptService

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

@Component
@Named(value="jira")
public class JiraScriptService
extends Object
implements ScriptService

Expose Atlassian's JIRA REST service to XWiki scripts.

Since:
3.2M3

Constructor Summary
JiraScriptService()
           
 
Method Summary
 JiraRestClient getJiraRestClient(String jiraURL)
          Connect anonymously to the remote JIRA instance.
 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.
 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 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 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 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