org.apache.wiki.content
Class PageRenamer

java.lang.Object
  extended by org.apache.wiki.content.PageRenamer

public class PageRenamer
extends Object

Provides page renaming functionality. Note that there used to be a similarly named class in 2.6, but due to unclear copyright, the class was completely rewritten from scratch for 2.8.

Since:
2.8

Constructor Summary
PageRenamer()
           
 
Method Summary
 String renamePage(WikiContext context, String renameFrom, String renameTo, boolean changeReferrers)
          Renames a page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageRenamer

public PageRenamer()
Method Detail

renamePage

public String renamePage(WikiContext context,
                         String renameFrom,
                         String renameTo,
                         boolean changeReferrers)
                  throws WikiException
Renames a page.

Parameters:
context - The current context.
renameFrom - The name from which to rename.
renameTo - The new name.
changeReferrers - If true, also changes all the referrers.
Returns:
The final new name (in case it had to be modified)
Throws:
WikiException - If the page cannot be renamed.


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.