org.ceryle.wiki.plugin
Class InterWikiDiff

java.lang.Object
  extended by org.ceryle.wiki.plugin.InterWikiPlugin
      extended by org.ceryle.wiki.plugin.InterWikiDiff
All Implemented Interfaces:
WikiPlugin

public class InterWikiDiff
extends InterWikiPlugin

This implements an InterWikiDiff feature using the InterWikiPlugin as its basis.

Note that this currently does not provide any protection from asynchronous changes, i.e., there is no page locking during a synchronization.

Parameters:

href='InterWiki:Page'
This is the interwiki link to the source wiki. The InterWiki value must be defined in the calling wiki's configuration. The Page value is used to specify which page or pages are to be compared. It can either be a single page name, a regular expression, or "*" to compare all pages.
since='[int]'
An optional parameter used with the "recentChanges" command. When provided, only the changes from the number of days specified by the 'since' value are included in the result. With this plugin, it's best to leave this unspecified as the default for the plugin is set to ignore the date (i.e., it is set so far in the distant past that all pages will pass the filter). Specifying a date will only synchronize pages modified within that number of days.
format='compact'
When this parameter is present and the command outputs a table, the generated table is smaller and does not include all fields.
dateformat='[dd:MM:yyyy]'
When this parameter is present, the modification date is presented in this format, which should be a Java Date format suitable for displaying dates. The default is "dd:MM:yyyy".

Values for the timeformat and dateformat parameters are specified using the syntax as described in SimpleDateFormat

Author:
Ichiro Furusato
See Also:
InterWikiPlugin

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ceryle.wiki.plugin.InterWikiPlugin
InterWikiPlugin.PageRecord
 
Field Summary
static String CLASS_ONLY_LOCAL
          Color CSS class name for highlighting generated output.
static String CLASS_ONLY_REMOTE
          Color CSS class name for highlighting generated output.
static String COLOR_MISMATCH
          Color CSS class name for highlighting generated output.
static String COLOR_NEWER_LOCAL
          Color CSS class name for highlighting generated output.
static String COLOR_NEWER_REMOTE
          Color CSS class name for highlighting generated output.
static String COLOR_UNKNOWN
          Color CSS class name for highlighting generated output.
static String COLOR_VERSION_MATCH
          Color CSS class name for highlighting generated output.
 
Fields inherited from class org.ceryle.wiki.plugin.InterWikiPlugin
CLASS_XMLRPC, COMMAND_ALLPAGES, COMMAND_APPNAME, COMMAND_BASEURL, COMMAND_LISTLINKS, COMMAND_PAGE, COMMAND_PAGEHTML, COMMAND_PAGEINFO, COMMAND_RECENTCHANGES, COMMAND_TIMEZONE, COMMAND_VIEWURL, default_dateformat, DEFAULT_DAYS, DEFAULT_MODE, default_timeformat, KEY_AUTHOR, KEY_HREF, KEY_LASTMODIFIED, KEY_NAME, KEY_PAGE, KEY_TYPE, KEY_VERSION, linkBack, m_cellpadding, m_compact, m_debug, m_dfmt, m_engine, m_rem_tfmt, m_utc_tfmt, m_xmlrpcURL, MODE_ALLPAGES, MODE_APPNAME, MODE_BASEURL, MODE_LISTLINKS, MODE_PAGE, MODE_PAGEHTML, MODE_PAGEHTMLVERSION, MODE_PAGEINFO, MODE_PAGEINFOVERSION, MODE_PAGEVERSION, MODE_RECENTCHANGES, MODE_TIMEZONE, MODE_UNKNOWN, MODE_VIEWURL, pagenameMain, pagenameRecentChanges, PARAM_COMMAND, PARAM_DATE_FORMAT, PARAM_FORMAT, PARAM_HREF, PARAM_PAGE, PARAM_SINCE, PARAM_TIME_FORMAT, PARAM_VERSION, prohibitDirectCalls, reverseSort, showRemoteTime, wrapWikiText
 
Fields inherited from interface com.ecyrd.jspwiki.plugin.WikiPlugin
CORE_PLUGINS_RESOURCEBUNDLE
 
Constructor Summary
InterWikiDiff()
           
 
Method Summary
 String execute(WikiContext context, Map params)
           
protected  void handleRecentChanges(StringBuffer out, Vector in)
           
 
Methods inherited from class org.ceryle.wiki.plugin.InterWikiPlugin
error, getRemoteCalendar, getRemoteTimeZoneID, getViewURL, handleOutput, isSameDay, processAllPages, processHashtable, processListLinks, processPageInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_ONLY_REMOTE

public static final String CLASS_ONLY_REMOTE
Color CSS class name for highlighting generated output. The value is "iwonlyremot".

See Also:
Constant Field Values

CLASS_ONLY_LOCAL

public static final String CLASS_ONLY_LOCAL
Color CSS class name for highlighting generated output. The value is "iwonlylocal".

See Also:
Constant Field Values

COLOR_VERSION_MATCH

public static final String COLOR_VERSION_MATCH
Color CSS class name for highlighting generated output. The value is "iwversmatch".

See Also:
Constant Field Values

COLOR_NEWER_LOCAL

public static final String COLOR_NEWER_LOCAL
Color CSS class name for highlighting generated output. The value is "iwnewrlocal".

See Also:
Constant Field Values

COLOR_NEWER_REMOTE

public static final String COLOR_NEWER_REMOTE
Color CSS class name for highlighting generated output. The value is "iwnewrremot".

See Also:
Constant Field Values

COLOR_UNKNOWN

public static final String COLOR_UNKNOWN
Color CSS class name for highlighting generated output. The value is "iwunknown".

See Also:
Constant Field Values

COLOR_MISMATCH

public static final String COLOR_MISMATCH
Color CSS class name for highlighting generated output. The value is "iwmismatch".

See Also:
Constant Field Values
Constructor Detail

InterWikiDiff

public InterWikiDiff()
Method Detail

execute

public String execute(WikiContext context,
                      Map params)
               throws PluginException
Specified by:
execute in interface WikiPlugin
Overrides:
execute in class InterWikiPlugin
Throws:
PluginException

handleRecentChanges

protected void handleRecentChanges(StringBuffer out,
                                   Vector in)
                            throws PluginException
Overrides:
handleRecentChanges in class InterWikiPlugin
Throws:
PluginException


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