Model Bridge API
Temporary bridge between new components and the old core, until the old core is completely split into components |
Type | JAR |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Table of contents
Description
This is a technical module, for XWiki developers.
It offers some Model interfaces that don't make you depend on xwiki-platform-oldcore at compile time, such as:
- DocumentAccessBridge: exposes methods for accessing Document data, returning DocumentModelBridge to represent a Document.
- SkinAccessBridge: exposes methods for accessing Skin data.
- XWiki 14.0+ DocumentAuthors to manipulate the different authors of a document.
It also provides lots of Events that are useful when you wish to write an EventListener (see tutorial). Note that the "Source" and "Data" column below correspond to the parameters of the EventListener.onEvent(Event event, Object source, Object data) call.
- Document-related events:
Event Name Source Data Description DocumentCreatingEvent XWikiDocument object XWikiContext object Sent when a Document is being created, before it's saved to the store. This gives you the ability to modify the Document before the save or even cancel the save altogether (since 8.0M1) DocumentCreatedEvent XWikiDocument object XWikiContext object Sent after the Document has been created and saved. Allows you to perform extra actions (index the content, run some code, etc) DocumentDeletingEvent XWikiDocument object XWikiContext object Sent when a Document is being deleted, before it's deleted from the store. DocumentDeletedEvent XWikiDocument object XWikiContext object Sent after the Document has been deleted from the store. DocumentUpdatingEvent XWikiDocument object XWikiContext object Sent when a Document is being modified, before it's saved to the store. This gives you the ability to modify the Document further before the save or even cancel the save altogether (since 8.0M1) DocumentUpdatedEvent XWikiDocument object XWikiContext object Sent after the Document has been saved. DocumentRollingBackEvent XWikiDocument object XWikiContext object Sent before a Document is rolled-back. DocumentRolledBackEvent XWikiDocument object XWikiContext object Sent after a Document has been rolled-back. DocumentVersionRangeDeletedEvent XWikiDocument object XWikiContext object XWiki 13.5+ Sent after one or several document history versions have been deleted DocumentVersionRangeDeletingEvent XWikiDocument object XWikiContext object XWiki 13.7+ Sent before one or several document history versions are about to be deleted DocumentRestoringEvent XWikiDocument object XWikiContext object XWiki 13.7+ Sent before a document is restored from the recycle bin DocumentRestoredEvent XWikiDocument object XWikiContext object XWiki 13.7+ Sent after a document is restored from the recycle bin - Wiki-related events:
Event Name Source Data Description WikiReadyEvent wiki id (String) XWikiContext object Sent when a wiki is ready to service request (and it's store schema has been updated) WikiCreatingEvent wiki id (String) XWikiContext object Sent just before a wiki is created WikiCreatedEvent wiki id (String) XWikiContext object Sent just after a wiki has been created (after provisioning has been done, see below) WikiCreateFailedEvent wiki id (String) XWikiContext object Sent when a wiki has failed to be created WikiCopiedEvent wiki id (String) XWikiContext object Sent after a wiki has been copied. Note that this event is an Event that predates the wiki provisioning concept and it's not sent when provisioning WikiDeletedEvent wiki id (String) XWikiContext object Sent after a wiki has been deleted WikiProvisioningEvent wiki id (String) XWikiContext object Sent before a wiki has been provisioned (i.e. before the content of the wiki has been filled), during the wiki creation process WikiProvisionedEvent wiki id (String) XWikiContext object Sent after a wiki has been provisioned (i.e. after the content of the wiki has been filled), during the wiki creation process - Other types of events:
Event Name Source Data Description ApplicationReadyEvent XWiki object XWikiContext object Sent when the XWiki application is ready to service requests. Note that at this stage the store is ready. ActionExecutingEvent XWikiDocument object XWikiContext object Sent when an Action is requested (view, edit, etc) but before the Action is performed. Note that this Event is cancelable. ActionExecutedEvent XWikiDocument object XWikiContext object Sent after an Action (view, edit, etc) has executed.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Dependencies
Dependencies for this extension (org.xwiki.platform:xwiki-platform-bridge 16.9.0):
- org.xwiki.platform:xwiki-platform-model-api 16.9.0
- org.xwiki.commons:xwiki-commons-component-api 16.9.0
- org.xwiki.rendering:xwiki-rendering-api 16.9.0
- org.xwiki.commons:xwiki-commons-observation-api 16.9.0
- org.xwiki.platform:xwiki-platform-security-authorization-api 16.9.0
- org.xwiki.platform:xwiki-platform-user-api 16.9.0