com.filenet.api.core

Interface Versionable

  • All Known Subinterfaces:
    CodeModule, Document, PublishTemplate, StoredSearch, 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

    • Method Detail

      • 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_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_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.
      • get_CmIsMarkedForDeletion

        java.lang.Boolean get_CmIsMarkedForDeletion()
        Returns the value of the CmIsMarkedForDeletion property. For more information, see CmIsMarkedForDeletion 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:
        • 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.
        • Property constraints for the new class (for example, required values, choice lists, ranges) are not enforced.

        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.

        Changing the document class of a document object has no effect on the storage location of the document�s content. For more information, see the Document Storage topic in the "Document Concepts" section of the Content Engine Java and .NET API Developer�s Guide.

        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:

        • 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 (if it exists and is enabled) for the RELEASED state.

        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), only the user who checked out the document can cancel the check out, or must 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.
        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:

        • 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)
        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 a collection of property values that will be set on the reservation object. 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 in order to use its Properties collection on the reservation object, you should ensure that the new document is not saved before the reservation object 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:

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

        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. This is a convenience method for creating an Annotation object from the document. You can also create an Annotation directly using the Factory.Annotation.createInstance() method, and then setting the AnnotatedObject property with the object on which the Annotation is placed.

        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.

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