Creates a reservation object that can be modified and checked in as a new version of this document. The reservation object can be accessed from this document's Reservation property. You can either specify the type of checkout reservation (exclusive or collaborative) or use the default checkout reservation setting of the object store.

To successfully check out a document, the following requirements must be met or an exception will be thrown:

  • The document must be the current version (IsCurrentVersion property is set to true).
  • The document must not already be checked out (IsReserved property is set to false).
  • The document must be version-enabled (IsVersioningEnabled property is set to true).
  • The user must have the appropriate access rights (MINOR_VERSION to check out a minor version, or MAJOR_VERSION to check out a released version).

After a successful call to Checkout, the Content Engine performs the following steps:

  • Applies the versioning security template for the reservation state (if it exists and is enabled) to the newly created reservation object.
  • Sets the IsReserved property of the checked-out document to true.
  • Sets the ReservationType property of the checked-out document to the appropriate setting: (COLLABORATIVE or EXCLUSIVE).

Namespace: FileNet.Api.Core
Assembly: FileNet.Api (in filenet.api.dll)

Syntax

Visual Basic (Declaration)
Sub Checkout( _ 
   ByVal type As ReservationType,  _ 
   ByVal reservationId As Id,  _ 
   ByVal reservationClass As String,  _ 
   ByVal reservationProperties As IProperties _ 
)
C#
void Checkout(
   ReservationType type,
   Id reservationId,
   string reservationClass,
   IProperties reservationProperties
)
C++
void Checkout(
   ReservationType type,
   Id reservationId,
   String reservationClass,
   IProperties reservationProperties
) abstract 
J#
void Checkout(
   ReservationType type,
   Id reservationId,
   string reservationClass,
   IProperties reservationProperties
)
JScript
function Checkout(
   type : ReservationType,
   reservationId : Id,
   reservationClass : String,
   reservationProperties : IProperties
)

Parameters

type
A ReservationType constant that specifies the type of checkout reservation: collaborative, exclusive, or the default object store setting.
reservationId
A String representing a GUID to be assigned to the reservation object that is created when this document is checked out. An assigned ID can be useful if you need to later import a series of document versions. Do not assign an ID that already belongs to an existing Content Engine object. If this parameter is null, the Content Engine will automatically assign a GUID to the reservation object.
reservationClass
A String representing the symbolic name of the class to which this document's reservation object will belong, thus allowing you to specify the class of the new document version that will be created when the reservation object is checked in. If this parameter is null, the reservation object's class will be the same as the reserved document's class.
reservationProperties
A Properties object containing the collection of this document's property values that will be carried over to its reservation object, thus allowing you to modify them. Once the reservation is checked in, these property values will belong to the new document version.
Note
If you use a Factory.Document.CreateInstance() method to create a new document as a reservation object in order to use its Properties collection, you should ensure that the new object is not saved before it is checked in. This is because only "dirty" properties (those that have had their values changed and have not yet been saved) will be marked by the server to be updated by the reservation object. Otherwise, once an object has been saved, its properties will no longer be "dirty" and thus their values will not be used by the server for the new document version that is created during check-in.
An error will occur if you attempt to set the value of a contained Property object that is read-only (its Settability property is READ_ONLY). Note that this error will occur even if you attempt to set a read-only property's value to the same value as its current value.

See Also