Content Management Guide
CHAPTER 11
This chapter describes how to handle events related to WebDAV operations and activities. It has these sections:
This chapter assumes familiarity with the exteNd Director event model and event handling. For more information, see the chapter on working with events in Developing exteNd Director Applications.
The WebDAV API events are an extension of the base exteNd Director event model framework, consisting of state change events, event producers, and event listeners (including vetoable listeners). The API for WebDAV events is defined in the com.sssw.webdav.event.api package.
The API defines a set of state changed events related to WebDAV operations. Event IDs are exposed on the individual event classes as well as on the com.sssw.webdav.event.api.EbiConstants interface. There are also generic state change events defined in com.sssw.fw.event.api.EbiotateChangeEvent.
Below is a list of event IDs defined in com.sssw.webdav.event.api.EbiConstants:
For more information about WebDAV operations, see Supported WebDAV methods.
To subscribe to WebDAV events:
Use the addStateChangeListener() or add VetoableStateChangeListener method available on the EbiStateChangeProducer interface.
You can register for a specified type or types of events using this version of addStateChangeListener():
public boolean addStateChangeListener( BitSet events, EbiStateChangeListener listener)
where events is a bit set of event IDs.
Use the event IDs specified in com.sssw.webdav.event.api.EbiConstants. For example, this code registers for create, delete and move operations on collections and resources:
EbiStateChangeProducer producer = new EbiStateChangeProducer() // Instantiate a Java BitSet and populate it BitSet events = new BitSet(); events.set(EbiConstants.MKCOL_EVENT_ID_ID); events.set(EbiConstants.DELETE_EVENT_ID); events.set(EbiConstants.MOVE_EVENT_ID); // Add listener producer.addStateChangeListener(events, Mylistener);
To enable or disable WebDAV events:
com.sssw.webdav.events.enable.Default
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...