org.ceryle.wiki.visualizer.core.rpc2
Class WikiRpc

java.lang.Object
  extended by org.ceryle.wiki.visualizer.core.rpc2.WikiRpc

public class WikiRpc
extends Object

This class is intended to be an standalone wrapper for Wiki XML-RPC calls. To that end it internalizes all needed utility classes and functions. (So it might duplicate some functionality found elsewhere.) This was created in response to Hula's client which did some things that I didn't like. Generally the Hula client is just fine, but it does some things like caching and opening connections and unexpected times. This class is intended to exhibit least surprise behaviours and match the Wiki XML-RPC method and parameter names exactly. NOTE: There are likely problems with UTC, UTF and Base64 stuff. Any review and comments appreciated.

Author:
John Volkar

Nested Class Summary
 class WikiRpc.LinkInfo
          Encapsulate the return data.
 class WikiRpc.PageInfo
          Encapsulate the return data.
 
Constructor Summary
WikiRpc(String xmlrpcUrl)
          Connects to Wiki XML-RPC 'url'.
 
Method Summary
 String[] getAllPages()
          Returns a list of all pages names, in no particular order.
 String getPage(String pageName)
          Get the raw Wiki text of page, latest version.
 String getPageHTML(String pageName)
          Return page in rendered HTML, latest version.
 String getPageHTMLVersion(String pageName, int version)
          Return page in rendered HTML for the specified version.
 WikiRpc.PageInfo getPageInfo(String pageName)
          Returns a PageInfo for the current version of the named page.
 WikiRpc.PageInfo getPageInfoVersion(String pageName, int version)
          Returns a PageInfo for the desired version of the named page.
 String getPageVersion(String pageName, int version)
          Get the raw Wiki text of the page for the specified version.
 WikiRpc.PageInfo[] getRecentChanges(Date asOf)
          Get list of changed pages since 'asOf'.
 int getRPCVersionSupported()
          This version of RPCClient only supports version 1 of the Wiki XML-RPC interface.
 WikiRpc.LinkInfo[] listLinks(String pageName)
          Lists all links for a given page.
 Date toUTC(Date d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiRpc

public WikiRpc(String xmlrpcUrl)
Connects to Wiki XML-RPC 'url'.

Method Detail

getRPCVersionSupported

public int getRPCVersionSupported()
This version of RPCClient only supports version 1 of the Wiki XML-RPC interface.


getPage

public String getPage(String pageName)
Get the raw Wiki text of page, latest version.


getPageVersion

public String getPageVersion(String pageName,
                             int version)
Get the raw Wiki text of the page for the specified version.


getPageHTML

public String getPageHTML(String pageName)
Return page in rendered HTML, latest version.


getPageHTMLVersion

public String getPageHTMLVersion(String pageName,
                                 int version)
Return page in rendered HTML for the specified version.


getRecentChanges

public WikiRpc.PageInfo[] getRecentChanges(Date asOf)
Get list of changed pages since 'asOf'. The result is an array of RecentChanges. You must pass 'asOf' in local time.


getAllPages

public String[] getAllPages()
Returns a list of all pages names, in no particular order.


getPageInfo

public WikiRpc.PageInfo getPageInfo(String pageName)
Returns a PageInfo for the current version of the named page.


getPageInfoVersion

public WikiRpc.PageInfo getPageInfoVersion(String pageName,
                                           int version)
Returns a PageInfo for the desired version of the named page.


listLinks

public WikiRpc.LinkInfo[] listLinks(String pageName)
Lists all links for a given page.


toUTC

public Date toUTC(Date d)


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.