ShowTable of Contents
This content applies to Lotus Quickr 8.5 for WebSphere Portal only.
You can help automate library management by creating events for drafts, documents, folders, or the library. To customize the handling of these events, you must create and deploy a custom event handler. This topic describes the basic concepts of event handlers.
Events are discrete actions that can occur on the server to access or modify managed content. They can be used to print logs or send notification after a library is created or to scan a document for viruses after uploading it. An event handler can be programmed to extend the capabilities of IBM® Lotus® Quickr™ for WebSphere Portal.
The source of an event identifies the object which triggers an action in the event handler. Documents, drafts, folders, and libraries are all examples.
The operation or action that occurs in the event is called the event type. Create, update, delete, download, approve, reject, submit are all examples.
Each event can occur in a different phase with different notification options. For example:
- OBSERVE: Use this phase to be notified of an event without vetoing it. Any exceptions thrown by a handler are logged to the system log, but is not displayed on the user interface. All handlers that hook this phase will be called asynchronously after commit of the current transaction.
- OBSERVE_VETO: Use this phase to provide filtering for the content created on the server. An event handler can stop the transaction from committing by throwing an exception which is displayed on the user interface. Handlers that hook this phase are called synchronously before commit of the current transaction.
A subscription is a statement to attach an event handler to a specified event type, event source, and event phase.
This topic shows you the event types that are compatible with each event source.
Creating an event handler
The event handler is a common OSGi bundle. Refer to OSGi documentation to learn more about creating a bundle. This topic focuses on the additional work needed to create an event handler once the OSGi bundle has been created.
Enabling event handlers
Administrators can disable event handling for the entire server.
Installing the event handler
Use the OSGi console to install the event handler after it has been developed and enabled.