3.37 DocumentVersion

A document management document version.

3.37.1 Properties

The following table lists properties along with their access and descriptions.

Property

Access

Description

Application

R/O

Application. The Application object.

Archived

R/O

Boolean. TRUE if this document version is archived.

CheckedOut

R/O

Boolean. TRUE if this document version is checked out.

ConnectedReadWrite

R/O

Boolean. TRUE if this document version has been checked out from the master account and downloaded.

CreationDate

R/O

Date. The date and time this document version was created.

Creator

R/O

Address. The creator of this document version.

Description

R/W

String. The description of this document version.

Document

R/O

Document. The document from which this document version originated.

DocumentLibrary

R/O

DocumentLibrary. The document library in which this document version is stored.

DocumentVersionEvents

R/O

DocumentVersionEvents collection. Events that have affected this document version.

ExpirationDate

R/O

Date. The date and time this document version will expire.

InUse

R/O

Boolean. TRUE if this document version has been retrieved by an application.

ODMADocumentID

R/O

String. Document ID for Open Document Management API (ODMA). When adding a document in GroupWise Remote, the new document is assigned a temporary ODMA identifier. When the remote account is synchronized with the master account, the ID will change. However, DocumentReference objects that refer to the temporary ID will be fixed. Using a DocumentReference, an Independent Software Vendor (ISV) can then track the document through a synchronization cycle.

OriginalFileType

R/W

String. The external file extension for this document.

Parent

R/O

DocumentVersion collection. The DocumentVersions collection that owns this object.

RetrievalDate

R/O

Date. The date and time this document version was last retrieved by an application.

Retriever

R/O

Address. The user who last retrieved this document version.

StagedFilename

R/O

String. The full path and file name where the document version was last staged (stored on disk when retrieved by an application). If the document has not been staged, this property returns an empty string ("").

VersionNumber

R/O

Long. The version number of this document version. This number is unique within the document versions for each document.

3.37.2 Methods

CheckIn([String Filename], [CheckInConstants StatusChange])

Checks in the version. Throws an exception if the version is not checked out. Filename is the file containing the new content for the version. If Filename is omitted, the version content is not changed. StatusChange indicates whether to change the versions status to checked in (CheckIn, the default) or leave it checked out (LeaveCheckedOut). Passing LeaveCheckedOut is equivalent to checking the document in, then checking it out again. If StatusChange is omitted, it defaults to egwDoCheckIn. To check in a file, the Filename parameter is required. The name of the file to check in can be obtained from the StagedFilename property. See CheckInConstants.

CheckOut([String Filename])

Checks out the version. Throws an exception if the version is already checked out. Filename is the file to which the version content is copied. If Filename is omitted, the version content can be obtained later with the CopyOut method. Must eventually be matched by a CheckIn.

CopyOut(String Filename)

Copies the version content to a file even if the version is checked out or retrieved.

Delete()

Deletes this document version from the document library. If this is the last document version, this method will also delete the original document.

EndPreview([String Filename])

Ends a Preview. Throws an exception if the version is not in a preview state (detected by the document management engine). Calling this method will log an end preview event for the document, and delete the file created by the Preview method. If Filename is omitted, this method will try to use the StagedFilename. If the StagedFilename is an empty string (""), this method will do nothing.

EndRetrieve([String Filename], [EndRetrieveStatus StatusChange])

Ends a version retrieval. Throws an exception if the version is not retrieved. Filename is the file containing the new content for the version. If Filename is omitted, the version's content is not changed. StatusChange indicates whether to change the versions status to not in use (the default) or leave it in use. Passing egwLeaveInUse is equivalent to calling EndRetrieve followed by Retrieve. If all parameters are omitted, this method will end retrieval of the file specified by the StagedFilename. If the StagedFilename is an empty string (""), this method will do nothing.

Preview([String Filename])

Copies the version content to a file even if the version is checked out or retrieved.

Refresh()

Forces this DocumentVersion object, its associated Address objects returned by its Creator and Retriever properties, and its DocumentVersionEvents collection to reread property values from the message database. The actual reading of a specific property may be postponed until the next time the property is accessed. This "lazy evaluation" is an optimization that avoids unnecessary reading of unaccessed properties.

RemoteEndRetrieve([VARIANT Filename], [EndRetrieveStatus Statuschange])

Ends retrieval of a previously retrieved version on a Remote system.

Retrieve([String Filename])

Retrieves the document version to a file specified by Filename. Throws an exception if the version is already retrieved. Must eventually be matched by an EndRetrieve.

3.37.3 Remarks

CheckOut, CheckIn, and CopyOut are identical to Retrieve, EndRetrieve, and Preview because they all copy the version content to a file accessible by other programs. However, CheckOut, CheckIn, and CopyOut grant users file access to transfer the file, modify it using applications, and so forth, while Retrieve, EndRetrieve, and Preview open the file in an application, and cease access when the application closes the file. The distinction is important to a document history because each method logs varying DocumentVersionEvents.