O'Reilly logo

Professional SharePoint® 2007 Development by Tom Rizzo, Adam Buenz, J. Dan Attis, Matt Ranlett, Brendon Schwartz, Eli Robillard, Jeff Julian, John Alexander, John Holliday

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required