11.4. Managing the Document Revision Cycle
Referring back to the generic model of the document lifecycle, note that all documents follow the general pattern of creation/revision/publication. Unlike the creation phase, which happens only once, the revision phase occurs repeatedly until the document is ready for publication. During the revision phase, many different types of events can occur, depending on the state of the document metadata and the status of its content.
The SharePoint object model defines eight pairs of events that can occur during the document revision cycle. These are captured by the following elements of the SPItemEventReceiverType enumeration. Using these events, you can control all aspects of document revision.
ItemUpdated/Updating
ItemCheckedIn/CheckingIn
ItemCheckedOut/CheckingOut
ItemUncheckedOut/UncheckingOut
ItemAttachmentAdded/Adding
ItemAttachmentDeleted/Deleting
ItemFileMoved/Moving
ItemDeleted/Deleting
We shall ignore the ItemFileConverted event and the ItemFileMoved/Moving event pair because they happen outside the document revision cycle.
During each stage of the revision cycle, you can use document metadata to analyze the current state of the document in terms of the problem domain and then update the metadata in the appropriate way. This revised metadata can be used to further constrain the behavior of the document or to control the actions of the people involved in editing it.
The following sections explore the construction of both generic and domain-specific ...
Get Professional SharePoint® 2007 Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.