com.ecyrd.jspwiki
Class PageRenamer
java.lang.Object
com.ecyrd.jspwiki.PageRenamer
public class PageRenamer
- extends Object
Do all the nitty-gritty work of renaming pages.
- Since:
- 2.4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
PageRenamer
public PageRenamer(WikiEngine engine,
Properties props)
- Constructor, ties this renamer instance to a WikiEngine.
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
- TODOoldName
- 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)