|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
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 |
---|
FolderSet get_FoldersFiledIn()
Folder get_SecurityFolder()
void set_SecurityFolder(Folder value)
java.lang.Boolean get_IsReserved()
java.lang.Boolean get_IsCurrentVersion()
java.lang.Boolean get_IsFrozenVersion()
VersionSeries get_VersionSeries()
VersionableSet get_Versions()
IndependentObject get_Reservation()
java.lang.Boolean get_IsVersioningEnabled()
java.lang.Integer get_MajorVersionNumber()
java.lang.Integer get_MinorVersionNumber()
VersionStatus get_VersionStatus()
ReservationType get_ReservationType()
java.util.Date get_DateCheckedIn()
void set_DateCheckedIn(java.util.Date value)
void changeClass(java.lang.String className)
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:
null
if there is no default defined).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.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:
className
- A String
specifying the symbolic name, ClassNames
constant, ID, or GUIDConstants
constant of the class to which this object is to be changed.
E_NULL_OR_INVALID_PARAM_VALUE
- if className
is null
or has a length of zero.void demoteVersion()
false
).
After a successful call to demoteVersion
, the Content Engine performs the following steps on the document version that is being demoted:
IN_PROCESS
state.IN_PROCESS
.In addition, the Content Engine performs the following steps on the previous major document version:
RELEASED
.RELEASED
state.
E_NOT_SUPPORTED
- if the following requirements are not met:
RELEASED
).true
).MINOR_VERSION
).false
).Versionable cancelCheckout()
EXCLUSIVE
),
the user must be the reservation owner (the reservation owner's name is the value of the reservation object's Creator property) or have both
WRITE_OWNER
and DELETE
access rights. Regardless of whether the reservation object is an exclusive or a collaborative reservation, the user
must also have appropriate access rights on the reservation object (MINOR_VERSION
or MAJOR_VERSION
) to cancel the checkout.
Note that calling this method is effectively the same as deleting a reserved document's reservation object.
After a successful call to cancelCheckout
, the Content Engine performs the following steps on the reserved document version and deletes its reservation object:
false
.null
.
Versionable
object specify the reservation object for which a delete pending action has been created.
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.void checkout(ReservationType type, Id reservationId, java.lang.String reservationClass, Properties reservationProperties)
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:
true
.COLLABORATIVE
or EXCLUSIVE
)
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 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. These property values will then belong to the new document version when the reservation is checked in.
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, make sure that the new document cannot be saved. The reason for
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.
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:
true
).false
).true
).MINOR_VERSION
to check out a minor version,
or MAJOR_VERSION
to check out a released version).void promoteVersion()
false
).
After a successful call to promoteVersion
, the Content Engine performs the following steps on the document version that is being promoted:
RELEASED
state.RELEASED
.In addition, the Content Engine performs the following steps on the previous major document version that is being superseded:
SUPERSEDED
.SUPERSEDED
state.
E_NOT_SUPPORTED
- if the following requirements are not met:
IN_PROCESS
).true
).MAJOR_VERSION
).false
).void freeze()
freeze
call, the IsFrozenVersion property of the object representing the document version is set to true
.
E_NOT_SUPPORTED
- if this document is a reservation object (VersionStatus = RESERVATION
) or is already a frozen version
(IsFrozenVersion = true
).Annotation createAnnotation(int annotatedContentElement, java.lang.String className)
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.
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 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.
Annotation
object.Versionable get_CurrentVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |