Before you can check in a document that has content, you must set the content for the document by adding to its ContentElements collection one or more ContentTransfer objects if the content is stored in a Content Engine object store, or one or more ContentReference objects if the content is stored externally. If you do not want the Content Engine to assign a MIME type to the checked-in document, you must explicitly set the value of the document's MimeType property before calling the Checkin method. After a successful check-in, the reservation object becomes the new current version of the document (its IsCurrentVersion property is set to true). During a minor version check-in, the new minor document version is marked as in-process (its VersionStatus property is set to IN_PROCESS) and the previous in-process minor document version (if it exists) is marked as superseded (its VersionStatus property is set to SUPERSEDED). During a major version check-in, the new major document version is marked as released (its VersionStatus property is set to RELEASED) and the previous released major document version and in-process minor document version (if they exist) are marked as superseded.
The checkinType parameter specifies whether to check in a document as a minor or a major version; set it to MINOR_VERSION to check in a minor version, or MAJOR_VERSION to check in a major version. The autoClassify parameter specifies whether the document should have automatic document classification enabled. (This feature is not supported for publish templates.) If set to AUTO_CLASSIFY, and if a classifier exists for the document's content type, the document will automatically be assigned the proper document class and its properties will be populated based on the document content (and, in the case of XML document classification, mapping rules from user-defined scripts). The Content Engine's classification service uses a document's MIME type to determine if there is a classifier capable of parsing the document. If you set the autoClassify parameter to AUTO_CLASSIFY, the check-in operation changes the value of the document's ClassificationStatus property to CLASSIFICATION_PENDING; if you set it to DO_NOT_AUTO_CLASSIFY, the property is set to NOT_CLASSIFIED.
Namespace:
FileNet.Api.Core
Assembly:
FileNet.Api (in FileNet.Api.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Sub Checkin ( _ autoClassify As AutoClassify, _ checkinType As CheckinType _ ) |
| C# |
|---|
void Checkin( AutoClassify autoClassify, CheckinType checkinType ) |
| Visual C++ |
|---|
void Checkin( AutoClassify autoClassify, CheckinType checkinType ) |
| JavaScript |
|---|
function checkin(autoClassify, checkinType); |
Parameters
- autoClassify
- Type: FileNet.Api.Constants..::.AutoClassify
An AutoClassify constant specifying whether to auto-classify this document during check-in.
- checkinType
- Type: FileNet.Api.Constants..::.CheckinType
A CheckinType constant specifying whether to check in a document as a new minor version or a new major version.