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.
Namespace:
FileNet.Api.CoreTo 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).
Assembly: FileNet.Api (in FileNet.Api.dll)
Syntax
Visual Basic (Declaration) |
---|
Sub Checkout ( _ type As ReservationType, _ reservationId As Id, _ reservationClass As String, _ reservationProperties As IProperties _ ) |
C# |
---|
void Checkout( ReservationType type, Id reservationId, string reservationClass, IProperties reservationProperties ) |
Visual C++ |
---|
void Checkout( ReservationType type, Id^ reservationId, String^ reservationClass, IProperties^ reservationProperties ) |
JavaScript |
---|
function checkout(type, reservationId, reservationClass, reservationProperties); |
Parameters
- type
- Type: FileNet.Api.Constants..::.ReservationType
A ReservationType constant that specifies the type of checkout reservation: collaborative, exclusive, or the default object store setting.
- reservationId
- Type: FileNet.Api.Util..::.Id
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
- Type: System..::.String
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
- Type: FileNet.Api.Property..::.IProperties
A Properties object containing containing a collection of property values that will be set on the reservation object. Once the reservation is checked in, these property values will belong to the new document version.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.Note:If you use a Factory.Document.CreateInstance() method to create a new document in order to use its Properties collection on the reservation object, you should ensure that the new object is not saved before the reservation object 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.