com.filenet.api.core
Interface Versionable

All Known Subinterfaces:
CodeModule, Document, PublishTemplate, WorkflowDefinition, XMLPropertyMappingScript

public interface Versionable

Represents the base class for classes 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.

Metadata

Auditable: false
AllowsInstances: false
AllowsSubClasses: false
ClassDefinitionName: None
IsDependent: false
IsHidden: false
Searchable: true
StorageType: ObjectStore
SuperclassName: Containable


Method Summary
 Versionable cancelCheckout()
          Cancels the check-out reservation held on this document or version series by deleting the reservation object associated with it.
 void changeClass(java.lang.String className)
          Changes the class of a Content Engine object.
 void checkout(ReservationType type, Id reservationId, java.lang.String reservationClass, Properties reservationProperties)
          Creates a reservation object that can be modified and checked in as a new version of this document.
 Annotation createAnnotation(int annotatedContentElement, java.lang.String className)
          Creates and associates a new annotation to a specific content element of this document.
 void demoteVersion()
          Demotes the latest major version of this document to an unreleased minor version.
 void freeze()
          Prevents changes to the custom properties of this document version.
 Versionable get_CurrentVersion()
          Returns the value of the CurrentVersion property.
 java.util.Date get_DateCheckedIn()
          Returns the value of the DateCheckedIn property.
 FolderSet get_FoldersFiledIn()
          Returns the value of the FoldersFiledIn property.
 java.lang.Boolean get_IsCurrentVersion()
          Returns the value of the IsCurrentVersion property.
 java.lang.Boolean get_IsFrozenVersion()
          Returns the value of the IsFrozenVersion property.
 java.lang.Boolean get_IsReserved()
          Returns the value of the IsReserved property.
 java.lang.Boolean get_IsVersioningEnabled()
          Returns the value of the IsVersioningEnabled property.
 java.lang.Integer get_MajorVersionNumber()
          Returns the value of the MajorVersionNumber property.
 java.lang.Integer get_MinorVersionNumber()
          Returns the value of the MinorVersionNumber property.
 IndependentObject get_Reservation()
          Returns the value of the Reservation property.
 ReservationType get_ReservationType()
          Returns the value of the ReservationType property.
 Folder get_SecurityFolder()
          Returns the value of the SecurityFolder property.
 VersionableSet get_Versions()
          Returns the value of the Versions property.
 VersionSeries get_VersionSeries()
          Returns the value of the VersionSeries property.
 VersionStatus get_VersionStatus()
          Returns the value of the VersionStatus property.
 void promoteVersion()
          Promotes an unreleased minor version of this document to a released major version.
 void set_DateCheckedIn(java.util.Date value)
          Sets the value of the DateCheckedIn property.
 void set_SecurityFolder(Folder value)
          Sets the value of the SecurityFolder property.
 

Method Detail

get_FoldersFiledIn

FolderSet get_FoldersFiledIn()
Returns the value of the FoldersFiledIn property. For more information, see FoldersFiledIn Property.


get_SecurityFolder

Folder get_SecurityFolder()
Returns the value of the SecurityFolder property. For more information, see SecurityFolder Property.


set_SecurityFolder

void set_SecurityFolder(Folder value)
Sets the value of the SecurityFolder property. For more information, see SecurityFolder Property.


get_IsReserved

java.lang.Boolean get_IsReserved()
Returns the value of the IsReserved property. For more information, see IsReserved Property.


get_IsCurrentVersion

java.lang.Boolean get_IsCurrentVersion()
Returns the value of the IsCurrentVersion property. For more information, see IsCurrentVersion Property.


get_IsFrozenVersion

java.lang.Boolean get_IsFrozenVersion()
Returns the value of the IsFrozenVersion property. For more information, see IsFrozenVersion Property.


get_VersionSeries

VersionSeries get_VersionSeries()
Returns the value of the VersionSeries property. For more information, see VersionSeries Property.


get_Versions

VersionableSet get_Versions()
Returns the value of the Versions property. For more information, see Versions Property.


get_Reservation

IndependentObject get_Reservation()
Returns the value of the Reservation property. For more information, see Reservation Property.


get_IsVersioningEnabled

java.lang.Boolean get_IsVersioningEnabled()
Returns the value of the IsVersioningEnabled property. For more information, see IsVersioningEnabled Property.


get_MajorVersionNumber

java.lang.Integer get_MajorVersionNumber()
Returns the value of the MajorVersionNumber property. For more information, see MajorVersionNumber Property.


get_MinorVersionNumber

java.lang.Integer get_MinorVersionNumber()
Returns the value of the MinorVersionNumber property. For more information, see MinorVersionNumber Property.


get_VersionStatus

VersionStatus get_VersionStatus()
Returns the value of the VersionStatus property. For more information, see VersionStatus Property.


get_ReservationType

ReservationType get_ReservationType()
Returns the value of the ReservationType property. For more information, see ReservationType Property.


get_DateCheckedIn

java.util.Date get_DateCheckedIn()
Returns the value of the DateCheckedIn property. For more information, see DateCheckedIn Property.


set_DateCheckedIn

void set_DateCheckedIn(java.util.Date value)
Sets the value of the DateCheckedIn property. For more information, see DateCheckedIn Property.


changeClass

void changeClass(java.lang.String className)
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:

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:

Parameters:
className - A String specifying the symbolic name, ClassNames constant, ID, or GUIDConstants constant of the class to which this object is to be changed.
Throws:
E_NULL_OR_INVALID_PARAM_VALUE - if className is null or has a length of zero.

demoteVersion

void 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).

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

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

Throws:
E_NOT_SUPPORTED - if the following requirements are not met:
  • This document must be the latest major version (VersionStatus property is set to RELEASED).
  • This document must be the current version (IsCurrentVersion property is set to true).
  • .
  • This user must have the appropriate access rights (MINOR_VERSION).
  • This document must not be reserved (IsReserved property is set to false).

cancelCheckout

Versionable 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:

Returns:
A Versionable object specifying the reservation object for which a delete pending action has been created. You must call this Versionable object’s save method to compete the cancellation of the checkout.
Throws:
API_NOT_A_RESERVATION - if this document is not checked out.
E_NOT_SUPPORTED - if this document is a newly created object that has never been checked in.

checkout

void checkout(ReservationType type,
              Id reservationId,
              java.lang.String reservationClass,
              Properties reservationProperties)
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.

After a successful call to checkout, the Content Engine performs the following steps:

Parameters:
type - A ReservationType constant that specifies the type of checkout reservation: collaborative, exclusive, or the default object store setting.
reservationId - A String representing a GUID to be assigned to the reservation object that is created when a 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 - 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 - A Properties object containing the collection of this document's property values that will be carried over to its reservation object, thus allowing you to modify them. Once the reservation is checked in, these property values will belong to the new document version. Note that if you use a Factory.Document.createInstance() method to create a new document as a reservation object in order to use its Properties collection, you should ensure that the new document will not be saved before it 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.
Throws:
E_READ_ONLY - if you attempt to set the value of a Property object in the Properties collection specified by reservationProperties that is read-only (its Settability property is READ_ONLY). Note that this exception will be thrown even if you attempt to set a read-only property's value to the same value as its current value.
E_NOT_SUPPORTED - if the following requirements are not met:
  • 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).

promoteVersion

void 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).

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

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

Throws:
E_NOT_SUPPORTED - if the following requirements are not met:
  • 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).

freeze

void 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.

Throws:
E_NOT_SUPPORTED - if this document is a reservation object (VersionStatus = RESERVATION) or is already a frozen version (IsFrozenVersion = true).

createAnnotation

Annotation createAnnotation(int annotatedContentElement,
                            java.lang.String className)
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.

Parameters:
annotatedContentElement - An integer that specifies the index of the document content element to which this annotation applies. It is recommended that you specify a unique and unchanging identifier for a content element, such as the element's ElementSequenceNumber property. For more information, see the Annotation.AnnotatedContentElement property.
className - A String that specifies the symbolic name, ID, or GUID constant of the class type of the new annotation object. For a list of GUID constants, see the GUIDConstants class.
Returns:
An Annotation object.

get_CurrentVersion

Versionable get_CurrentVersion()
Returns the value of the CurrentVersion property. For more information, see CurrentVersion Property.



© Copyright IBM Corporation 2006, 2009. All rights reserved.