Represents the base class for interfaces whose instances are versionable objects. If versioning is enabled on a versionable object (its IsVersioningEnabled property is true), it can have multiple versions associated with it in an object store. A versionable object can be checked out, optionally edited, and checked in as a major or a minor version. A major version is either the current released version (if it is the latest major version) or a previous released version that was superseded. A minor version is either the in-process version (if it is the latest minor version) or a previous in-process version that was superseded. When a versionable object is checked out, a reservation object is created, which you can modify. During the check-in operation, the reservation object becomes the current version of the versionable object, therefore creating a new version. All of a versionable object's versions can be accessed by its associated VersionSeries object or from the collection returned by its Versions property.


The following tables list the members exposed by IVersionable.

Public Properties

  Name Description
Public property CurrentVersion Specifies a document version that represents the latest checked-in version associated with this document or version series. The current version can be either a major version or a minor version.
Public property DateCheckedIn Specifies the date and time that this document was checked in. The Content Engine stores dates and times using Coordinated Universal Time (UTC).

The server sets this property on a document version when it is checked in and it remains set throughout the life of the document version. When a document is checked out, the server sets this property on the document's reservation object to null.

Settability of this property is read-only for most users. Users who have been granted privileged write access (AccessRight.PRIVILEGED_WRITE) can set this property on a document while it is being checked in. Note that although the settability of this property for users with privileged write access is SETTABLE_ONLY_BEFORE_CHECKIN, those users can not set this property on a document prior to check in; it can be set only while a document is being checked in.

Public property FoldersFiledIn A FolderSet collection object containing the Folder objects in which this document is filed.
Public property IsCurrentVersion Specifies whether this document version is the current (latest) version object of a document's version series (true) or not (false). The current version can be a major version or a minor version.
Public property IsFrozenVersion Specifies whether this document version is a frozen version (true) or not (false). If a document version is frozen, you cannot modify its custom properties. However, you may be able to modify the custom properties of other versions of that document, provided they have not been frozen. Note that the modifiability of a document's system properties is not affected by a document version's frozen status.
Public property IsReserved For a Document object, specifies whether a user has reserved the right to check in the next version following this document version (true) or not (false). For a VersionSeries object, specifies whether the current version in this version series is checked out (true) or not (false).
Public property IsVersioningEnabled Specifies whether you can create a new version of this object (True) or not (False).
Public property MajorVersionNumber Specifies the major version number of this document version. A document's major version number is set to 1 the first time that you check it in as a major version and then incremented by 1 for each additional time that you check it in as a major version.
Public property MinorVersionNumber Specifies the minor version number of this document version. A document's minor version number is set to 1 the first time that you check it in as a minor version and then incremented by 1 for each additional time that you check it in as a minor version. Note that if you check in a document as a major version, its minor version number will be reset to 0.
Public property Reservation Specifies the reservation object of this object's version series, which has a VersionStatus property value of RESERVATION. A reservation object is created by the server when you check out a document, which you can modify and check in as a new version of that document.
Public property ReservationType Specifies a ReservationType constant that explicitly indicates the type of this document reservation (collaborative or exclusive) or whether its reservation type is the same as the default object store setting. A collaborative reservation is a reservation that any user with the appropriate permissions can check in, modify, or delete. An exclusive reservation is a reservation that only the reservation owner can check in, modify, or delete.
Public property SecurityFolder Indicates a Folder object from which the object inherits security (a security parent).

This value is indirectly set when DefineSecurityParentage is specified as the value of the defineSecurityParentage parameter for the IFolder.File method. The value, in this case, is the folder in which the object is filed.

You can designate multiple security parents for an object by using one or more object-valued properties and setting the SecurityProxyType value for these properties to INHERITANCE.

Public property Versions Specifies a VersionableSet object that contains all of the document versions associated with this document or version series.
Public property VersionSeries Specifies a VersionSeries object that contains all of the document versions associated with this document or DynamicReferentialContainmentRelationship object.
Public property VersionStatus Specifies a VersionStatus constant that indicates the current version status of this document version.

The VersionStatus property can have one of the following values:

  • IN_PROCESS: Indicates an in-process document version. An in-process version is a version that has been checked in and is the latest minor version. Note that only one version at a time in a given version series can be in the IN_PROCESS state. When a reservation version is checked in as a minor version and becomes the new in-process version, the previous in-process version becomes a superseded version.
  • RELEASED: Indicates a released document version. A released version is a version that has been checked in and is the latest major version. Note that only one version at a time in a given version series can be in the RELEASED state.
  • RESERVATION: Indicates a reservation document version. A reservation version is a version that has been checked out.
  • SUPERSEDED: Indicates a superseded document version. A superseded version is a major or minor version that has been replaced by a later version.
Top

Public Methods

  Name Description
Public method CancelCheckout Cancels the check-out reservation held on this document or version series by deleting the reservation object associated with it. Any changes made to the reservation object are lost. If the reservation object is an exclusive reservation (the object's ReservationType property is set to EXCLUSIVE), the user must be the reservation owner (the reservation owner's name is the value of the reservation object's Owner property) or have both WRITE_OWNER and DELETE access rights. Note that this method is provided only as a convenience method for canceling a checkout; all it does is delete the reservation version held by the document or version series from which it is called.

After a document's reservation object is deleted, the Content Engine performs the following steps on the reserved document version:

  • Sets the IsReserved property to false.
  • Sets the ReservationType property to null.

An error occurs if the document is not checked out or is a newly created object that has never been checked in.

Public method ChangeClass Changes the class of a Content Engine object. The new class must already exist and both it and the original class must be subclasses of the same base class. The ChangeClass method does not modify the security for an object, even if the object's current security is derived from the default security for its source class. For the object's user-defined properties, the following rules apply:
  • Any user-defined properties that exist in the new class but not in the original class are set to the default value defined by the new class (or to null if there is no default defined).
  • Any user-defined properties that exist in both the original and the new class that are writable and have the same value (including null) as the default value defined in the original class will be set to the default value defined by the new class. However, any user-defined property that has had its value modified from the default value will retain that modified value in the new class.
  • Any user-defined properties whose definitions exist in the original class but not in the new class will no longer exist on the object when its class is changed.

When the class of a document object is changed, the default document lifecycle policy of the new class will only be applied to the document object's DocumentLifecyclePolicy property if both of the following scenarios occur:

  • The document has no current lifecycle policy.
  • The document is either a reservation object, or is the current version object and is not reserved.

Public method Checkout 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).
Public method CreateAnnotation Creates and associates a new annotation to a specific content element of this document. To persist the created Annotation object to the object store, you must explicitly call its Save method, which will also cause the server to add it to the Annotations collection of this document.
Public method DemoteVersion Demotes the latest major version of this document to an unreleased minor version. This method changes the previous major version (if it exists) to the current released major version, but does not delete any document versions (including content) from the document's version series, therefore allowing you to continue to have access to all version changes. Note that you can demote frozen document versions and documents that are not versioning-enabled (documents whose IsVersioningEnabled property is set to false).

To successfully demote a document, the following requirements must be met or an error will occur:

  • The document must be the latest major version (VersionStatus property is set to RELEASED).
  • The document must be the current version (IsCurrentVersion property is set to true).
  • The user must have the appropriate access rights (MINOR_VERSION).
  • The document must not be reserved (IsReserved property is set to false).

After a successful call to demoteVersion, the Content Engine performs the following steps on the document version that is being demoted:

  • Applies the versioning security template (if it exists and is enabled) for the IN_PROCESS state.
  • Decrements the value of the MajorVersionNumber property by 1.
  • Sets the value of the MinorVersionNumber property to the number of the latest minor version belonging to the last major version + 1.
  • Sets the VersionStatus property to IN_PROCESS.

In addition, the Content Engine performs the following steps on the previous major document version:

  • Sets the VersionStatus property to RELEASED.
  • Applies the versioning security template for the RELEASED state.

Public method Freeze Prevents changes to the custom properties of this document version. You can freeze any checked-in document version, but you cannot freeze a reservation object. Once a document version has been frozen, it cannot be unfrozen; to change a frozen document's custom properties, a new document version must be created. Note, however, that you can change a document version's writable system properties at any time. After a successful Freeze call, the IsFrozenVersion property of the object representing the document version is set to true. An error is generated if this document is a reservation object (VersionStatus = RESERVATION) or is already a frozen version (IsFrozenVersion = true).
Public method PromoteVersion Promotes an unreleased minor version of this document to a released major version. This method changes the current released major version (if it exists) to a superseded major version, but does not delete any document versions (including content) from the document's version series, therefore allowing you to continue to have access to all version changes. Note that you can promote frozen document versions and documents that are not versioning-enabled (documents whose IsVersioningEnabled property is set to false).

To successfully promote a document, the following requirements must be met or an error will occur:

  • The document must be the latest minor version (VersionStatus property is set to IN_PROCESS).
  • The document must be the current version (IsCurrentVersion property is set to true).
  • The user must have the appropriate access rights (MAJOR_VERSION).
  • The document must not be reserved (IsReserved property is set to false).

After a successful call to PromoteVersion, the Content Engine performs the following steps on the document version that is being promoted:

  • Applies the versioning security template (if it exists and is enabled) for the RELEASED state.
  • Sets the MinorVersionNumber property to 0.
  • Increments the MajorVersionNumber property by 1.
  • Sets the VersionStatus property to RELEASED.

In addition, the Content Engine performs the following steps on the previous major document version that is being superseded:

  • Sets the VersionStatus property to SUPERSEDED.
  • Applies the versioning security template (if it exists and is enabled) for the SUPERSEDED state.

Top

See Also