Class WikiPageRenameEvent

java.lang.Object
java.util.EventObject
org.apache.wiki.event.WikiEvent
org.apache.wiki.event.WikiPageEvent
org.apache.wiki.event.WikiPageRenameEvent
All Implemented Interfaces:
java.io.Serializable

public class WikiPageRenameEvent
extends WikiPageEvent
WikiPageRenameEvent extends WikiPageEvent to indicate a change in the name of a WikiPage.

This reuses WikiPageEvent.getPageName() to return the new name of the page, with getOldPageName() returning the old name.

Since:
2.5.108
See Also:
WikiPageEvent, Serialized Form
  • Field Details

  • Constructor Details

    • WikiPageRenameEvent

      public WikiPageRenameEvent​(java.lang.Object src, java.lang.String oldname, java.lang.String newname)
      Constructs an instance of this event.
      Parameters:
      src - the Object that is the source of the event.
      oldname - the old name of the WikiPage being acted upon.
      newname - the new name of the WikiPage being acted upon.
  • Method Details

    • getOldPageName

      public java.lang.String getOldPageName()
      Returns the old Wiki page name associated with this event. This may be null if unavailable.
      Returns:
      the old Wiki page name associated with this WikiEvent, or null.
    • getNewPageName

      public java.lang.String getNewPageName()
      Returns the new Wiki page name associated with this event. This returns the same value as the superclass' WikiPageEvent.getPageName(). This may be null if unavailable.
      Returns:
      the new Wiki page name associated with this WikiEvent, or null.
    • isValidType

      public static boolean isValidType​(int type)
      Returns true if the int value is a WikiPageRenameEvent type.
    • eventName

      public java.lang.String eventName()
      Returns a textual representation of the event type.
      Overrides:
      eventName in class WikiPageEvent
      Returns:
      a String representation of the type
    • getTypeDescription

      public java.lang.String getTypeDescription()
      Returns a human-readable description of the event type.
      Overrides:
      getTypeDescription in class WikiPageEvent
      Returns:
      a String description of the type