Plumtree EDK (Enterprise Web Development Kit) 5.4.0

IDocumentManager.CheckInDocument Method 

Checks in a new version of a document that is currently in the checked-out state.

void CheckInDocument(
   IDocument document,
   string checkInComment,
   Stream inStream,
   string language,
   bool keepCheckedOut
);

Parameters

document
The document that is being checked in. Cannot be null.
checkInComment
A string containing a comment that will be inserted into the document history as a check-in comment of the new version. Cannot be null.
inStream
A Stream from which the contents of the new version of the document will be read. Cannot be null.
language
The document content language. This is the ISO 639-1 language code, i.e. en for english. Specifying a null language will set the language to that of the current user.
keepCheckedOut
If set to true then this operation will check-in and (atomically) subsequently check-out the document. The document will finish in the checked-out state.

Remarks

This includes saving a new version of the document, incrementing the current version number and making a new entry in the document's history.

Note: To use any document upload/download functionality, including this using method, you must install WSE 2.0 (http://msdn.microsoft.com/webservices/building/wse/).

The following sample code demonstrates how to check in a new document version.
//Open an inputstream for the document contents - this can be any readable Stream
Stream fileInputStream = File.OpenRead("c:\\MyNewDocument.doc");
//Check in the new version
documentManager.CheckInDocument(checkedOutDocument, "this is an updated version of the document", fileInputStream, "en", false);

Exceptions

Exception TypeCondition
PermissionDeniedException The user does not have permission to check-in the document, or the user does not currently have the document checked-out.
CollaborationException The method call resulted in an error or the the user does not have access to the document.
SoapException There is a communication problem during the execution of the remote method call.
InvalidOperationException The document is not checked-out, has not yet been inserted or has already been removed.

See Also

IDocumentManager Interface | Plumtree.Remote.PRC.Collaboration.Document Namespace