|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.ItemImpl
org.apache.jackrabbit.core.NodeImpl
org.apache.jackrabbit.core.version.VersionImpl
public class VersionImpl
Base implementation of the Version interface.
| Field Summary |
|---|
| Fields inherited from class org.apache.jackrabbit.core.NodeImpl |
|---|
CREATED |
| Fields inherited from class org.apache.jackrabbit.core.ItemImpl |
|---|
id, itemMgr, rep, session, stateMgr, STATUS_DESTROYED, STATUS_INVALIDATED, STATUS_MODIFIED, STATUS_NORMAL |
| Constructor Summary | |
|---|---|
VersionImpl(ItemManager itemMgr,
SessionImpl session,
AbstractNodeData data)
Create a new instance of this class. |
|
| Method Summary | |
|---|---|
VersionHistory |
getContainingHistory()
|
Calendar |
getCreated()
|
Node |
getFrozenNode()
Returns the frozen node of this version. |
InternalFrozenNode |
getInternalFrozenNode()
Returns the frozen node of this version |
protected InternalVersion |
getInternalVersion()
Returns the internal version. |
Version |
getLinearPredecessor()
Assuming that this Version object was acquired through a Workspace
W and is within the VersionHistory H,
this method returns the predecessor of this version along the same line of descent
as is returned by H.getAllLinearVersions() where H
was also acquired through W. |
Version |
getLinearSuccessor()
Assuming that this Version object was acquired through a Workspace
W and is within the VersionHistory H,
this method returns the successor of this version along the same line of descent
as is returned by H.getAllLinearVersions() where H
was also acquired through W. |
Version[] |
getPredecessors()
|
Version[] |
getSuccessors()
|
boolean |
isMoreRecent(VersionImpl v)
Checks if this version is more recent than the given version v. |
boolean |
isRootVersion()
Checks if this is the root version. |
boolean |
isSame(Item otherItem)
|
NodeIterator |
merge(String srcWorkspace,
boolean bestEffort)
Always throws a ConstraintViolationException since this node
is protected. |
String |
toString()
Return a string representation of this version node for diagnostic purposes. |
void |
update(String srcWorkspaceName)
Always throws a ConstraintViolationException since this node
is protected. |
| Methods inherited from class org.apache.jackrabbit.core.ItemImpl |
|---|
getAncestor, getDepth, getId, getPath, getSession, internalRemove, isModified, isNew, isTransactionalNew, isTransient, refresh, remove, safeGetJCRPath, sanityCheck, save, setRemoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.jcr.Node |
|---|
addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, getBaseVersion, getCorrespondingNodePath, getDefinition, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperty, getReferences, getUUID, getVersionHistory, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNodeType, lock, orderBefore, removeMixin, restore, restore, restore, restoreByLabel, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock |
| Methods inherited from interface javax.jcr.Item |
|---|
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, refresh, remove, save |
| Constructor Detail |
|---|
public VersionImpl(ItemManager itemMgr,
SessionImpl session,
AbstractNodeData data)
itemMgr - item managersession - sessiondata - node data| Method Detail |
|---|
protected InternalVersion getInternalVersion()
throws RepositoryException
RepositoryException - if the internal version is not available
public Calendar getCreated()
throws RepositoryException
getCreated in interface VersionRepositoryException
public Version[] getSuccessors()
throws RepositoryException
getSuccessors in interface VersionRepositoryException
public Version[] getPredecessors()
throws RepositoryException
getPredecessors in interface VersionRepositoryException
public Version getLinearSuccessor()
throws RepositoryException
Version object was acquired through a Workspace
W and is within the VersionHistory H,
this method returns the successor of this version along the same line of descent
as is returned by H.getAllLinearVersions() where H
was also acquired through W.
Note that under simple versioing the behavior of this method is equivalent to getting the unique successor (if any) of this version.
Version or null if no linear successor exists.
RepositoryException - if an error occurs.VersionHistory.getAllLinearVersions()
public Version getLinearPredecessor()
throws RepositoryException
Version object was acquired through a Workspace
W and is within the VersionHistory H,
this method returns the predecessor of this version along the same line of descent
as is returned by H.getAllLinearVersions() where H
was also acquired through W.
Note that under simple versioning the behavior of this method is equivalent to getting the unique predecessor (if any) of this version.
Version or null if no linear predecessor exists.
RepositoryException - if an error occurs.VersionHistory.getAllLinearVersions()
public VersionHistory getContainingHistory()
throws RepositoryException
getContainingHistory in interface VersionRepositoryException
public InternalFrozenNode getInternalFrozenNode()
throws RepositoryException
RepositoryException - if an error occurs
public Node getFrozenNode()
throws RepositoryException
Node object
RepositoryException - if an error occurs.public boolean isSame(Item otherItem)
isSame in interface ItemisSame in class ItemImpl
public boolean isMoreRecent(VersionImpl v)
throws RepositoryException
v.
A version is more recent if and only if it is a successor (or a successor
of a successor, etc., to any degree of separation) of the compared one.
v - the version to check
true if the version is more recent;
false otherwise.
RepositoryException - if a repository error occurs
public boolean isRootVersion()
throws RepositoryException
true if this version is the root version;
false otherwise.
RepositoryException - if a repository error occurs
public void update(String srcWorkspaceName)
throws ConstraintViolationException
ConstraintViolationException since this node
is protected.
update in interface Nodeupdate in class NodeImplConstraintViolationException
public NodeIterator merge(String srcWorkspace,
boolean bestEffort)
throws ConstraintViolationException
ConstraintViolationException since this node
is protected.
merge in interface Nodemerge in class NodeImplConstraintViolationExceptionpublic String toString()
toString in class NodeImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||