com.ecyrd.jspwiki
Class PageRenamer

java.lang.Object
  extended by com.ecyrd.jspwiki.PageRenamer

public class PageRenamer
extends Object

Do all the nitty-gritty work of renaming pages.

Since:
2.4

Field Summary
static String DIR_EXTENSION
           
static String PROP_STORAGEDIR
           
 
Constructor Summary
PageRenamer(WikiEngine engine, Properties props)
          Constructor, ties this renamer instance to a WikiEngine.
 
Method Summary
 String checkPluralPageName(String pageName)
           
 String renamePage(WikiContext context, String oldName, String newName, boolean changeReferrers)
          Renames, or moves, a wiki page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIR_EXTENSION

public static final String DIR_EXTENSION
See Also:
Constant Field Values

PROP_STORAGEDIR

public static final String PROP_STORAGEDIR
See Also:
Constant Field Values
Constructor Detail

PageRenamer

public PageRenamer(WikiEngine engine,
                   Properties props)
Constructor, ties this renamer instance to a WikiEngine.

Method Detail

renamePage

public String renamePage(WikiContext context,
                         String oldName,
                         String newName,
                         boolean changeReferrers)
                  throws WikiException
Renames, or moves, a wiki page. Can also alter referring wiki links to point to the renamed page.

Parameters:
context - TODO
oldName - Name of the source page.
newName - Name of the destination page.
changeReferrers - If true, then changes any referring links to point to the renamed page.
Returns:
The name of the page that the source was renamed to.
Throws:
WikiException - In the case of an error, such as the destination page already existing.

checkPluralPageName

public String checkPluralPageName(String pageName)