Package javax.jcr.version
Interface Version
-
-
Field Summary
-
Fields inherited from interface javax.jcr.Node
JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VersionHistorygetContainingHistory()Returns theVersionHistorythat contains thisVersion.CalendargetCreated()Returns the date this version was created.NodegetFrozenNode()Returns the frozen node of this version.VersiongetLinearPredecessor()Assuming that thisVersionobject was acquired through aWorkspaceWand is within theVersionHistoryH, this method returns the predecessor of this version along the same line of descent as is returned byH.getAllLinearVersions()whereHwas also acquired throughW.VersiongetLinearSuccessor()Assuming that thisVersionobject was acquired through aWorkspaceWand is within theVersionHistoryH, this method returns the successor of this version along the same line of descent as is returned byH.getAllLinearVersions()whereHwas also acquired throughW.Version[]getPredecessors()In both simple and full versioning repositories, this method returns the predecessor versions of this version.Version[]getSuccessors()Returns the successor versions of this version.-
Methods inherited from interface javax.jcr.Item
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save
-
Methods inherited from interface javax.jcr.Node
addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, followLifecycleTransition, getAllowedLifecycleTransistions, getBaseVersion, getCorrespondingNodePath, getDefinition, getIdentifier, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperties, getProperty, getReferences, getReferences, getSharedSet, getUUID, getVersionHistory, getWeakReferences, getWeakReferences, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNodeType, lock, merge, orderBefore, removeMixin, removeShare, removeSharedSet, restore, restore, restore, restoreByLabel, setPrimaryType, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, update
-
-
-
-
Method Detail
-
getContainingHistory
VersionHistory getContainingHistory() throws RepositoryException
Returns theVersionHistorythat contains thisVersion.- Returns:
- the
VersionHistorythat contains thisVersion. - Throws:
RepositoryException- if an error occurs.
-
getCreated
Calendar getCreated() throws RepositoryException
Returns the date this version was created. This corresponds to the value of thejcr:createdproperty in thent:versionnode that represents this version.- Returns:
- a
Calendarobject - Throws:
RepositoryException- if an error occurs.
-
getLinearSuccessor
Version getLinearSuccessor() throws RepositoryException
Assuming that thisVersionobject was acquired through aWorkspaceWand is within theVersionHistoryH, this method returns the successor of this version along the same line of descent as is returned byH.getAllLinearVersions()whereHwas also acquired throughW.Note that under simple versioning the behavior of this method is equivalent to getting the unique successor (if any) of this version.
- Returns:
- a
Versionornullif no linear successor exists. - Throws:
RepositoryException- if an error occurs.- See Also:
VersionHistory.getAllLinearVersions()
-
getSuccessors
Version[] getSuccessors() throws RepositoryException
Returns the successor versions of this version. This corresponds to returning all thent:versionnodes referenced by thejcr:successorsmulti-value property in thent:versionnode that represents this version.In a simple versioning repository this method
- Returns:
- a
Versionarray. - Throws:
RepositoryException- if an error occurs.
-
getLinearPredecessor
Version getLinearPredecessor() throws RepositoryException
Assuming that thisVersionobject was acquired through aWorkspaceWand is within theVersionHistoryH, this method returns the predecessor of this version along the same line of descent as is returned byH.getAllLinearVersions()whereHwas also acquired throughW.Note that under simple versioning the behavior of this method is equivalent to getting the unique predecessor (if any) of this version.
- Returns:
- a
Versionornullif no linear predecessor exists. - Throws:
RepositoryException- if an error occurs.- See Also:
VersionHistory.getAllLinearVersions()
-
getPredecessors
Version[] getPredecessors() throws RepositoryException
In both simple and full versioning repositories, this method returns the predecessor versions of this version. This corresponds to returning all thent:versionnodes whosejcr:successorsproperty includes a reference to thent:versionnode that represents this version.- Returns:
- a
Versionarray. - Throws:
RepositoryException- if an error occurs.
-
getFrozenNode
Node getFrozenNode() throws RepositoryException
Returns the frozen node of this version.- Returns:
- a
Nodeobject - Throws:
RepositoryException- if an error occurs.- Since:
- JCR 2.0
-
-