public class VersionSeries extends TiePublicObject
If a DefaultVersionDescription is not set (is null) then a request for a resolved public object will be deferred to the last version description.
The VersionSeries class has methods to checkOut (aka reserveNext()), checkIn (aka newRevision)
and cancelCheckOut (aka unReserve)
a document belonging to this series. Invoking these methods can affect the lock
state of the various versioning objects such as Family, VersionSeries etc.
Prior to 9.0.3, the behavior was as follows:
Out-of-the-box, there are six policies for the three versioning operations.
The policy names and their semantics are defined below as static constants.
To switch the policy associated with the VersionSeries class for a particular operation,
find the policy by name that you wish to switch to from the PolicyBundle collection on
the session. Associate the policy with the VersionSeries ClassObject or the instance
by using LibraryObject.putPolicy(Policy po)
. Associating with the VersionSeries
ClassObject affects all VersionSeries in the system while associating it with the
instance only applies that policy for that instance.
To define a totally new policy with a custom semantic for a particular operation, construct a policy object using the API. Details on how to create a new policy are in the Developers guide. The "Operation" attribute of the new policy must be equal to the Operation for which you are trying to change the default policy. This is stored in the "Operation" attribute of the default Policy Object. The implementation for the policy must reside in the server side subclass of VersionSeries class i.e. S_TieVersionSeries or its subclass. The implementation method must also take a server side S_LibraryObjectDefinition as a parameter and be public. The implementation is dynamically invoked. <
For more details on Policies, refer to the documentation for the Policy class.
For a description of the various lock states, refer to the documentation for the LockObject class.
Modifier and Type | Field and Description |
---|---|
static String |
CLASS_NAME
The class name for this class.
|
static String |
DEFAULTVERSIONDESCRIPTION_ATTRIBUTE
The VersionDescription which will be used as the ResolvedPublicObject
for this VersionSeries.
|
static String |
LASTVERSIONDESCRIPTION_ATTRIBUTE
The last VersionDescription in this VersionSeries.
|
static String |
LOCK_ON_NEW_VERSION_POLICY_LOCK_ALL
The out-of-the-box versioning policy for newVersion aka checkIn operation.
|
static String |
LOCK_ON_NEW_VERSION_POLICY_LOCK_NONE
An alternate versioning policy for newVersion aka checkIn operation.
|
static String |
LOCK_ON_RESERVE_NEXT_POLICY_LOCK_ALL
The out-of-the-box versioning policy for reserveNext aka checkOut operation.
|
static String |
LOCK_ON_RESERVE_NEXT_POLICY_LOCK_NONE
An alternate versioning policy for reserveNext aka checkOut operation.
|
static String |
PENDINGPUBLICOBJECT_ATTRIBUTE
A PublicObject which allows incremental archiving of work in
progress while a VersionSeries is reserved.
|
static String |
RESERVATIONCOMMENT_ATTRIBUTE
The check-out comment stating the purpose of the reservation.
|
static String |
RESERVATIONDATE_ATTRIBUTE
The date and time (in GMT) when the VersionSeries was reserved.
|
static String |
RESERVOR_ATTRIBUTE
The DirectoryUser that has this VersionSeries reserved for the purpose of
adding a new version.
|
static String |
UNLOCK_ON_UNRESERVE_POLICY_UNLOCK_ALL
The out-of-the-box versioning policy for Unreserve aka cancelCheckOut operation.
|
static String |
UNLOCK_ON_UNRESERVE_POLICY_UNLOCK_NONE
An alternate versioning policy for unReserve aka cancelCheckOut operation.
|
static String |
VERSIONLIMIT_ATTRIBUTE
The limit of the number of versions which this VersionSeries should keep.
|
static String |
WORKPATH_ATTRIBUTE
The location of a version's content on the client's local store.
|
ACL_ATTRIBUTE, CREATEDATE_ATTRIBUTE, CREATOR_ATTRIBUTE, DELETOR_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, EXPIRATIONDATE_ATTRIBUTE, FAMILY_ATTRIBUTE, FLAG_CATEGORY_EXISTS, FLAG_CONFIGURATIONCATEGORY_EXISTS, FLAG_MARKED, FLAG_NOINFERIOR, FLAG_NOSELECT, FLAG_NTFS_ARCHIVE, FLAG_NTFS_HIDDEN, FLAG_NTFS_READONLY, FLAG_NTFS_SYSTEM, FLAG_UNMARKED, FLAGS_ATTRIBUTE, LASTMODIFIER_ATTRIBUTE, LASTMODIFYDATE_ATTRIBUTE, LOCKENTRIES_ATTRIBUTE, LOCKOBJECT_ATTRIBUTE, NAME_ATTRIBUTE, OWNER_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, POLICYLISTS_ATTRIBUTE, PRIMARYPARENTFOLDER_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE, RESOLVEDPUBLICOBJECT_ATTRIBUTE, SECURINGPUBLICOBJECT_ATTRIBUTE
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session
Modifier | Constructor and Description |
---|---|
protected |
VersionSeries(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Construct a VersionSeries object - standard variant.
|
Modifier and Type | Method and Description |
---|---|
protected static VersionSeries |
constructVersionSeries(LibrarySession sess,
S_LibraryObjectData data)
Constructs a VersionSeries from data corresponding to it.
|
protected static VersionSeries[] |
constructVersionSeriesArray(LibrarySession sess,
Long[] ids)
Construct a Version Series array from an array of object IDs.
|
protected static Vector |
constructVersionSeriesVector(LibrarySession sess,
Vector vector)
Constructs a vector of VersionSeries objects from a vector
of data objects corresponding to it.
|
VersionDescription |
createBranchedVersionSeries(VersionDescriptionDefinition vddef)
Creates a branched
version series in this family, which relates back to the latest
version description in this series.
|
BranchRelationship[] |
getChildBranchRelationships()
Returns an array of BranchRelationships that describe
branch or integrate operations involving this VersionSeries as
a parent (the other series are the child).
|
BranchRelationship[] |
getChildBranchRelationships(ClassObject relClass,
SortSpecification sortSpec)
Returns an array of BranchRelationships that describe
branch or integrate operations involving this VersionSeries as
a parent (the other series are the child).
|
static Long |
getClassId(LibrarySession session)
Get the ID of the ClassObject representing VERSIONSERIES.
|
VersionDescription |
getDefaultVersionDescription()
Returns the default version of this version series.
|
VersionDescription |
getFirstVersionDescription()
Returns the first VersionDescription of this series.
|
VersionDescription |
getLastVersionDescription()
Returns the last VersionDescription of this series.
|
VersionDescription |
getNextVersionDescription(VersionDescription version)
Returns the next VersionDescription of this series.
|
BranchRelationship[] |
getParentBranchRelationships()
Returns an array of BranchRelationships that describe
branch or integrate operations involving this VersionSeries as
a child (the other series are the parent).
|
BranchRelationship[] |
getParentBranchRelationships(ClassObject relClass,
SortSpecification sortSpec)
Returns an array of BranchRelationships that describe
branch or integrate operations involving this VersionSeries as
a child (the other series are the parent).
|
PublicObject |
getPendingPublicObject()
Returns the pending PublicObject that will become the next
version upon a newVersion() invocation.
|
VersionDescription |
getPreviousVersionDescription(VersionDescription version)
Returns the Version description previous to the one being passed
by the user.
|
String |
getReservationComment()
Returns the comment when this series was reserved,
or null if this series is not reserved.
|
Date |
getReservationDate()
Returns the Date that this VersionSeries was reserved,
null if not reserved.
|
DirectoryUser |
getReservor()
Returns the User that reserved this VersionSeries, null if not reserved
|
PublicObject |
getResolvedPublicObject()
Return the PublicObject to which this object resolves.
|
VersionDescription[] |
getVersionDescriptions()
Returns an array of all VersionDescriptions in this VersionSeries.
|
VersionDescription |
getVersionDescriptions(int index)
Returns the specified VersionDescription of this series.
|
VersionDescription[] |
getVersionDescriptions(PublicObject version)
Returns an array of VersionDescriptions which reference
the versioned public object passed in (more than one
VersionDescription can refer to the same PublicObject).
|
int |
getVersionLimit()
Gets the value of the VersionLimit attribute.
|
VersionSeries |
getVersionSeries()
Override to PublicObject.getVersionSeries(); returns this.
|
PublicObject |
getWorkingCopy()
Returns the "working copy".
|
String |
getWorkpath()
Returns the value for the local file path specified
when this series was reserved.
|
boolean |
isLatestVersionDescription(VersionDescription version)
Returns true if the specified VersionDescription is the
latest in this series.
|
boolean |
isReserved()
Returns true if this VersionSeries is reserved by any user.
|
boolean |
isReservedByCurrentUser()
Returns true if this VersionSeries is reserved by the current user.
|
boolean |
isVersioned()
Returns false always.
|
VersionDescription |
newVersion(VersionDescriptionDefinition vddef)
Creates a new VersionDescription in this series from the
specified VersionDescriptionDefinition.
|
void |
reserveNext(String contentPath,
String comment)
Reserves the right to add the next version.
|
protected void |
resetVersionDescriptions()
Clear locally cached list of Versions.
|
void |
setDefaultVersionDescription(VersionDescription version)
Set the Default Version Description of this series.
|
void |
setPendingPublicObject(PublicObject po)
Sets the pending PublicObject that will become the next
version upon a newVersion() invocation.
|
void |
setVersionLimit(int limit)
Sets the value of the VersionLimit attribute.
|
void |
unReserve()
Cancels the reservation.
|
protected static VersionSeries[] |
vectorToVersionSeriesArray(Vector vector)
Returns an array of VersionSeries objects from a vector
of VersionSeries objects.
|
protected static VersionSeries |
vectorVersionSeriesElement(Vector vector,
int index)
Get a VersionSeries out of a Vector of VersionSeries.
|
protected void |
verifyAddVersionCapability()
Verify the ability to add a version.
|
addAccess, addAttachment, addCategory, addFlags, addMessageList, addRelationship, auditPublicObjectLocked, auditPublicObjectUnlocked, canAcquireManualLock, canReleaseDavLock, canReleaseLock, canReleaseManualLock, capabilities, checkAuditViewCapability, checkCapabilities, checkCapability, checkEffectiveAccess, checkEffectiveAccess, checkLockAccess, checkParentFolderCapability, checkVersioned, clearFlags, constructPublicObject, constructPublicObjectArray, constructPublicObjectVector, containsLockEntry, copy, coreAutoFolderingEnabled, createCategories, createDedicatedPolicyPropertyBundle, delete, deriveEffectiveAccessLevel, findAttachmentRelation, findOrAddActivityRecord, findOrAddActivityRecord, findOrAddActor, findOrAddActor, findOrAddMessageList, findOrAddMessageList, free, getAcl, getActivityRecord, getActor, getAllFolderPaths, getAllFolderPaths, getAllFolderPaths, getAnyFolderPath, getAnyFolderPath, getAnyFolderPath, getAttachmentRelation, getAttachmentRelations, getAttachments, getCapabilities, getCategories, getCategories, getCategories, getCategories, getCategories, getCategory, getConsumedStorage, getCreateDate, getCreator, getDefaultAccessLevel, getDefinitionForSimplePropertyUpdates, getDeletor, getDescription, getEffectiveAccessLevel, getEffectiveAccessLevel, getExpirationDate, getFamily, getFirstCategory, getFirstVersion, getFlags, getFolderReferences, getFolderReferences, getFolderReferencesSortSpecification, getLastModifier, getLastModifyDate, getLastVersion, getLeftwardRelationshipObjects, getLeftwardRelationshipObjects, getLeftwardRelationships, getLeftwardRelationships, getLeftwardRelationshipsCount, getLeftwardRelationshipsCount, getLinks, getLockEntries, getLockEntries, getLockObject, getLockRestrictions, getLockTypeAuditProperties, getMessageList, getNextVersion, getOwner, getPolicyBundle, getPolicyLists, getPreviousVersion, getPrimaryFolderPath, getPrimaryParentFolder, getPrimaryParentFolder, getRelations, getRestrictingLockEntries, getRightwardRelationshipObjects, getRightwardRelationshipObjects, getRightwardRelationships, getRightwardRelationships, getSecuringPublicObject, getSingletonVersionDescription, getVersionNumber, getVersions, grantAccess, handleCopy, handleCreate, handleUnlockAll, hasActivityRecord, hasActor, hasAttachmentRelation, hasCategories, hasCategory, hasConfigurationCategories, hasMessageList, hasNameAttribute, hasPropertyBundleAttribute, isAttachment, isDeleted, isLatestVersion, isLocked, isLockingSupported, isOwner, isVersionable, isWorkingCopy, listLeftwardRelationships, listRightwardRelationships, lock, lock, lock, lock, postCopy, postCreate, postSecurityChangedEvent, postUpdate, preCopy, preCreate, preFree, preUpdate, putPolicy, reassociateLinks, removeAllPolicies, removeAttachment, removePolicy, removePolicy, removeRelationship, resetFolderReferences, resolveFolderReferenceSortSpecification, revokeAccess, revokeAllAccess, setAcl, setDescription, setExpirationDate, setFlags, setFolderReferencesSortSpecification, setLockEntries, setLockEntrySecurity, setOwner, setOwnerByName, setPolicyBundle, setPolicyLists, setSecuringPublicObject, toPublicObjectArray, undelete, unlock, unlock, unlockAll, updateFlags, updateLock, vectorPublicObjectElement, vectorToPublicObjectArray, verifyAddRelationshipCapability, verifyCapabilities, verifyCapability, verifyDeleteCapability, verifyLockCapability, verifyRemoveRelationshipCapability, verifyUnlockCapability, verifyVersionSeries
added, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, auditUpdated, canPurge, checkIfPropertyBundleSupported, checkRequiredAttributeSet, clearCopyContext, clearFreeContext, clearUpdateContext, compareTo, constructIdArray, constructIdArray, constructLibraryObject, constructLibraryObjectVector, createDedicatedPropertyBundle, createInstance, deriveDomainUniqueName, dispose, equals, equals, free, freeAll, get, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getAuditDomainContext, getAuditEventFolderContext, getClassId, getClassname, getClassName, getClassObject, getCommonName, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getLabel, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, handleUpdate, hashCode, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, isValidEventType, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postEvent, postEvent, postFree, prePostAuditEvent, putProperty, putProperty, removeAllProperties, removeAllSimpleProperties, removeAllSimpleProperties, removed, removeProperty, removeSimpleProperty, removeSimpleProperty, renderAsRandomAccessContent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setCopyContext, setFreeContext, setId, setName, setPropertyBundle, setPropertyValue, setUpdateContext, toString, trace, trustHandleCreate, trustHandleCreateAsAdmin, trustHandleFree, trustHandleFreeAsAdmin, trustHandleUpdate, trustHandleUpdateAsAdmin, update, updateAndExposeDefinition, validatePropertyValues, vectorLibraryObjectElement, vectorToLibraryObjectArray, verifyAdministrationMode, verifyConnected, verifyPersistent, verifySystemUserAccess, verifyTargetObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
public static final String CLASS_NAME
public static final String DEFAULTVERSIONDESCRIPTION_ATTRIBUTE
public static final String LASTVERSIONDESCRIPTION_ATTRIBUTE
public static final String RESERVOR_ATTRIBUTE
public static final String RESERVATIONDATE_ATTRIBUTE
public static final String RESERVATIONCOMMENT_ATTRIBUTE
public static final String WORKPATH_ATTRIBUTE
public static final String VERSIONLIMIT_ATTRIBUTE
public static final String PENDINGPUBLICOBJECT_ATTRIBUTE
public static final String LOCK_ON_RESERVE_NEXT_POLICY_LOCK_ALL
public static final String LOCK_ON_NEW_VERSION_POLICY_LOCK_ALL
SystemLockObject
,
Constant Field Valuespublic static final String UNLOCK_ON_UNRESERVE_POLICY_UNLOCK_ALL
public static final String LOCK_ON_RESERVE_NEXT_POLICY_LOCK_NONE
public static final String LOCK_ON_NEW_VERSION_POLICY_LOCK_NONE
public static final String UNLOCK_ON_UNRESERVE_POLICY_UNLOCK_NONE
protected VersionSeries(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- current LibSessionid
- object IDclassId
- class IDdata
- object dataIfsException
- if operation fails.public static Long getClassId(LibrarySession session) throws IfsException
session
- the session contextIfsException
- if the operation failspublic VersionSeries getVersionSeries() throws IfsException
getVersionSeries
in class PublicObject
IfsException
- if operation fails.public String getReservationComment() throws IfsException
getReservationComment
in class PublicObject
IfsException
- if operation fails.public VersionDescription getDefaultVersionDescription() throws IfsException
IfsException
- public void setDefaultVersionDescription(VersionDescription version) throws IfsException
version
- the desired default VersionDescription.IfsException
- if operation fails.public boolean isLatestVersionDescription(VersionDescription version) throws IfsException
version
- the relevent VersionDescriptionIfsException
- if operation fails.public VersionDescription[] getVersionDescriptions(PublicObject version) throws IfsException
version
- PublicObject versionIfsException
- if operation fails.public boolean isReserved() throws IfsException
isReserved
in class PublicObject
IfsException
- if operation fails.public boolean isReservedByCurrentUser() throws IfsException
isReservedByCurrentUser
in class PublicObject
IfsException
- if operation fails.public DirectoryUser getReservor() throws IfsException
getReservor
in class PublicObject
IfsException
- public Date getReservationDate() throws IfsException
getReservationDate
in class PublicObject
IfsException
- if operation fails.public PublicObject getWorkingCopy() throws IfsException
This VersionSeries must already be checked-out by the same user, or else a null is returned.
getWorkingCopy
in class PublicObject
IfsException
- if the operation failspublic PublicObject getPendingPublicObject() throws IfsException
IfsException
- if operation fails.public void setPendingPublicObject(PublicObject po) throws IfsException
po
- the new PublicObject that will become the next version upon a newVersion() invocation.IfsException
- if operation fails.public PublicObject getResolvedPublicObject() throws IfsException
this
). For the version classes, (Family,
VersionSeries, and VersionDescription), this will return a non
version-class object as determined by the configuration of the instance
of the version class.
This override exists to return the Pending PublicObject value if the caller is the Reservor of this VersionSeries; in all other cases, it defers to the imlementation in the superclass (PublicObject).
getResolvedPublicObject
in class PublicObject
IfsException
- if operation fails.PublicObject.getResolvedPublicObject()
public int getVersionLimit() throws IfsException
IfsException
public void setVersionLimit(int limit) throws IfsException
Equivalent to:
AttributeValue av = AttributeValue.newAttributeValue(implementation); setAttribute(VERSIONLIMIT_ATTRIBUTE, av);
limit
- the advisory version limit.IfsException
- if the operation failspublic VersionDescription getFirstVersionDescription() throws IfsException
IfsException
- if operation fails.public VersionDescription getLastVersionDescription() throws IfsException
IfsException
- public VersionDescription getNextVersionDescription(VersionDescription version) throws IfsException
IfsException
- if operation fails.public VersionDescription getPreviousVersionDescription(VersionDescription version) throws IfsException
version
- some VersionDescription in the seriesIfsException
- if operation fails.public String getWorkpath() throws IfsException
IfsException
- if operation fails.public void unReserve() throws IfsException
unReserve
in class PublicObject
IfsException
- if operation fails.public VersionDescription newVersion(VersionDescriptionDefinition vddef) throws IfsException
newVersion
in class PublicObject
vddef
- VersionDescriptionDefinitionIfsException
- if operation fails.protected void verifyAddVersionCapability() throws IfsException
IfsException
- if the operation failspublic void reserveNext(String contentPath, String comment) throws IfsException
reserveNext
in class PublicObject
contentPath
- path to local file of reserved contentcomment
- Check in comment.IfsException
- if operation fails.VersionSeries
public VersionDescription createBranchedVersionSeries(VersionDescriptionDefinition vddef) throws IfsException
setPrimaryVersionSeries()
method.vddef
- Definition object describing the first VersionDescription
in the new VersionSeries.IfsException
- on failurepublic VersionDescription[] getVersionDescriptions() throws IfsException
IfsException
- if operation fails.public VersionDescription getVersionDescriptions(int index) throws IfsException
IfsException
- if operation fails.public BranchRelationship[] getParentBranchRelationships() throws IfsException
IfsException
- on failurepublic BranchRelationship[] getParentBranchRelationships(ClassObject relClass, SortSpecification sortSpec) throws IfsException
relClass
- - a ClassObject on which to filter. Must be a subclass of BranchRelationship.sortSpec
- - order to sort BranchRelationshipsIfsException
- on failurepublic BranchRelationship[] getChildBranchRelationships() throws IfsException
IfsException
- on failurepublic BranchRelationship[] getChildBranchRelationships(ClassObject relClass, SortSpecification sortSpec) throws IfsException
relClass
- - a ClassObject on which to filter. Must be a subclass of BranchRelationship.sortSpec
- - order to sort BranchRelationshipsIfsException
- on failureprotected void resetVersionDescriptions() throws IfsException
IfsException
- on failurepublic boolean isVersioned() throws IfsException
isVersioned
in class PublicObject
IfsException
- if operation fails.protected static Vector constructVersionSeriesVector(LibrarySession sess, Vector vector) throws IfsException
sess
- handle to the sessionvector
- vector of data objectsIfsException
- if the operation failsprotected static VersionSeries constructVersionSeries(LibrarySession sess, S_LibraryObjectData data) throws IfsException
sess
- handle to the sessiondata
- data corresponding to the objectIfsException
- if the operation failsprotected static VersionSeries[] constructVersionSeriesArray(LibrarySession sess, Long[] ids) throws IfsException
sess
- the requesting sessionids
- the array of object IDsIfsException
- if operation fails.protected static VersionSeries[] vectorToVersionSeriesArray(Vector vector)
vector
- Vector of VersionSeries objectsprotected static VersionSeries vectorVersionSeriesElement(Vector vector, int index)
vector
- Vector of VersionSeries objectsindex
- zero-based index into the VectorIndexOutOfBoundsException
- if there is no object at the specified index.Copyright © 2023. All rights reserved.