public class WikiPageEvent extends WikiEvent
E.g., a typical event sequence for the pre-translate phase would be:
These two events are fired once per page request, at the beginning and after delivery of the page (respectively). They are generated
by the org.apache.wiki.ui.WikiServletFilter.
Page lock and unlock events occur only once during an editing session, so there are no begin and end events. They are generated
by the org.apache.wiki.pages.PageManager.
Other WikiPageEvents include both phase boundary and in-phase events for saving, pre- and post-translating content.
These are very noisy event types, but are not fired unless a listener is available. They are generated by the
org.apache.wiki.filters.FilterManager, org.apache.wiki.filters.PageEventFilter, and potentially other
implementing classes.
Note that due to the asynchronous nature of event processing, any threads spawned by such events will not necessarily have completed during their specific phase; we can assume only that no more events of that phase will be fired after its *_END event has been fired.
WikiEvent,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
PAGE_DELETE_REQUEST
Indicates a wiki page delete event (the beginning of a delete request).
|
static int |
PAGE_DELETED
Indicates a wiki page deleted event (after the delete has been completed).
|
static int |
PAGE_DELIVERED
Indicates a wiki page delivery event (the end of a request).
|
static int |
PAGE_LOCK
Indicates a page lock event.
|
static int |
PAGE_REINDEX
Indicates a wiki page reindex event (a page was changed when requested to a provided)
|
static int |
PAGE_REQUESTED
Indicates a wiki page request event (the start of a request).
|
static int |
PAGE_UNLOCK
Indicates a page unlock event.
|
static int |
POST_SAVE
Indicates a wiki post-save page event.
|
static int |
POST_SAVE_BEGIN
Indicates the beginning of all wiki post-save page events.
|
static int |
POST_SAVE_END
Indicates the end of all wiki post-save page events.
|
static int |
POST_TRANSLATE
Indicates a wiki post-translate page event.
|
static int |
POST_TRANSLATE_BEGIN
Indicates the beginning of all wiki post-translate page events.
|
static int |
POST_TRANSLATE_END
Indicates the end of all wiki post-translate page events.
|
static int |
PRE_SAVE
Indicates a wiki pre-save page event.
|
static int |
PRE_SAVE_BEGIN
Indicates the beginning of all wiki pre-save page events.
|
static int |
PRE_SAVE_END
Indicates the end of all wiki pre-save page events.
|
static int |
PRE_TRANSLATE
Indicates a wiki pre-translate page event.
|
static int |
PRE_TRANSLATE_BEGIN
Indicates the beginning of all wiki pre-translate page events.
|
static int |
PRE_TRANSLATE_END
Indicates the end of all wiki pre-translate page events.
|
| Constructor and Description |
|---|
WikiPageEvent(java.lang.Object src,
int type,
java.lang.String pagename)
Constructs an instance of this event.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
eventName()
Returns a textual representation of the event type.
|
java.lang.String |
getPageName()
Returns the Wiki page name associated with this event.
|
java.lang.String |
getTypeDescription()
Returns a human-readable description of the event type.
|
static boolean |
isValidType(int type)
Returns true if the int value is a WikiPageEvent type.
|
public static final int PAGE_LOCK
org.apache.wiki.pages.PageManager.public static final int PAGE_UNLOCK
org.apache.wiki.pages.PageManager.public static final int PRE_TRANSLATE_BEGIN
org.apache.wiki.filters.FilterManager.public static final int PRE_TRANSLATE
org.apache.wiki.filters.PageEventFilter.public static final int PRE_TRANSLATE_END
org.apache.wiki.filters.FilterManager.public static final int POST_TRANSLATE_BEGIN
org.apache.wiki.filters.FilterManager.public static final int POST_TRANSLATE
org.apache.wiki.filters.PageEventFilter.public static final int POST_TRANSLATE_END
org.apache.wiki.filters.FilterManager.public static final int PRE_SAVE_BEGIN
org.apache.wiki.filters.FilterManager.public static final int PRE_SAVE
org.apache.wiki.filters.PageEventFilter.public static final int PRE_SAVE_END
org.apache.wiki.filters.FilterManager.public static final int POST_SAVE_BEGIN
org.apache.wiki.filters.FilterManager.public static final int POST_SAVE
org.apache.wiki.filters.PageEventFilter.public static final int POST_SAVE_END
org.apache.wiki.filters.FilterManager.public static final int PAGE_REQUESTED
org.apache.wiki.ui.WikiServletFilter.public static final int PAGE_DELIVERED
org.apache.wiki.ui.WikiServletFilter.public static final int PAGE_DELETE_REQUEST
org.apache.wiki.ui.WikiServletFilter.public static final int PAGE_DELETED
org.apache.wiki.ui.WikiServletFilter.public static final int PAGE_REINDEX
public WikiPageEvent(java.lang.Object src, int type, java.lang.String pagename)
src - the Object that is the source of the event.type - the type of the event (see the enumerated int values defined in WikiEvent).pagename - the WikiPage being acted upon.public java.lang.String getPageName()
public static boolean isValidType(int type)
public java.lang.String eventName()
public java.lang.String getTypeDescription()
getTypeDescription in class WikiEventCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.