com.xpn.xwiki.plugin.swizzle
Class SwizzleJiraPluginApi

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.plugin.swizzle.SwizzleJiraPluginApi

public class SwizzleJiraPluginApi
extends com.xpn.xwiki.api.Api

Allows getting Swizzle Objects (http://swizzle.codehaus.org/) so that it's easy to use from a Velocity page in a XWiki page.

Example:

 #set ($jira = $xwiki.swizzle.getJira("http://jira.xwiki.org/jira/rpc/xmlrpc"))
 $jira.login("username", "password")

 {table}
 ID | Key | Project Name | Project Lead | Project URL
 #foreach ($project in $jira.getProjects())
   $project.getId() | $project.getKey() | $project.getName() | $project.getLead() | $project.getProjectUrl()
 #end
 {table}
 

Version:
$Id: $

Field Summary
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
SwizzleJiraPluginApi(SwizzleJiraPlugin plugin, com.xpn.xwiki.XWikiContext context)
           
 
Method Summary
 org.codehaus.swizzle.jira.Issue createIssue()
           
 org.codehaus.swizzle.jira.Jira getJira(java.lang.String url)
           
 org.codehaus.swizzle.jira.JiraRss getJiraRss(java.lang.String url)
           
 
Methods inherited from class com.xpn.xwiki.api.Api
checkProgrammingRights, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwizzleJiraPluginApi

public SwizzleJiraPluginApi(SwizzleJiraPlugin plugin,
                            com.xpn.xwiki.XWikiContext context)
Method Detail

getJira

public org.codehaus.swizzle.jira.Jira getJira(java.lang.String url)
                                       throws java.net.MalformedURLException
Parameters:
url - the JIRA URL to connect to. For example "http://jira.acme.org/rpc/xmlrpc".
Returns:
a Swizzle Jira object as described on the Swizzle JIRA home page.
Throws:
java.net.MalformedURLException - in case of invalid URL

getJiraRss

public org.codehaus.swizzle.jira.JiraRss getJiraRss(java.lang.String url)
                                             throws java.lang.Exception
Parameters:
url - the JIRA RSS URL to connect to. For example "http://jira.acme.org/secure/IssueNavigator.jspa?view=rss&&pid=11230....".
Returns:
a Swizzle JiraRss object as described on the Swizzle JIRA home page.
Throws:
java.net.MalformedURLException - in case of invalid URL
java.lang.Exception

createIssue

public org.codehaus.swizzle.jira.Issue createIssue()
Returns:
a Swizzle Issue object
See Also:
Swizzle JIRA home page


Copyright © 2004-2008 XWiki. All Rights Reserved.