|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.ItemImpl org.apache.jackrabbit.core.NodeImpl org.apache.jackrabbit.core.version.VersionHistoryImpl
public class VersionHistoryImpl
Base implementation of the VersionHistory
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 | |
---|---|
VersionHistoryImpl(ItemManager itemMgr,
SessionImpl session,
AbstractNodeData data)
Create a new instance of this class. |
Method Summary | |
---|---|
void |
addVersionLabel(String versionName,
String label,
boolean move)
|
NodeIterator |
getAllFrozenNodes()
Returns an iterator over all the frozen nodes of all the versions of this version history. |
NodeIterator |
getAllLinearFrozenNodes()
This method returns all the frozen nodes of all the versions in this verison history in the same order as VersionHistory.getAllLinearVersions() . |
VersionIterator |
getAllLinearVersions()
This method returns an iterator over all the versions in the line of descent from the root version to that base version within this history that is bound to the workspace through which this VersionHistory was accessed. |
VersionIterator |
getAllVersions()
|
protected InternalVersionHistory |
getInternalVersionHistory()
Returns the internal version history. |
Version |
getRootVersion()
|
Version |
getVersion(String versionName)
|
String |
getVersionableIdentifier()
Returns the identifier of the versionable node for which this is the version history. |
String |
getVersionableUUID()
|
Version |
getVersionByLabel(String label)
|
String[] |
getVersionLabels()
|
String[] |
getVersionLabels(Version version)
|
boolean |
hasVersionLabel(String label)
|
boolean |
hasVersionLabel(Version version,
String label)
|
boolean |
isSame(Item otherItem)
|
NodeIterator |
merge(String srcWorkspace,
boolean bestEffort)
Always throws a ConstraintViolationException since this node
is protected. |
void |
removeVersion(String versionName)
|
void |
removeVersionLabel(String label)
|
String |
toString()
Return a string representation of this version history 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 VersionHistoryImpl(ItemManager itemMgr, SessionImpl session, AbstractNodeData data)
itemMgr
- item managersession
- sessiondata
- node dataMethod Detail |
---|
protected InternalVersionHistory getInternalVersionHistory() throws RepositoryException
RepositoryException
- if the internal version history is not availablepublic Version getRootVersion() throws RepositoryException
getRootVersion
in interface VersionHistory
RepositoryException
VersionHistory.getRootVersion()
public VersionIterator getAllVersions() throws RepositoryException
getAllVersions
in interface VersionHistory
RepositoryException
VersionHistory.getAllVersions()
public NodeIterator getAllFrozenNodes() throws RepositoryException
VersionHistory
NodeIterator
object.
RepositoryException
- if an error occurs.VersionHistory.getAllFrozenNodes()
public VersionIterator getAllLinearVersions() throws RepositoryException
VersionHistory
VersionHistory
was accessed.
Within a version history H
, B
is the base version bound
to workspace W
if and only if there exists a versionable node N
in W
whose version history is H
and B
is the base
version of N
.
The line of descent from version V1
to V2
,
where V2
is a successor of V1
, is the ordered list
of versions starting with V1
and proceeding through each direct successor to
V2
.
The versions are returned in order of creation date, from oldest to newest.
Note that in a simple versioning repository the behavior of this method is equivalent to returning all versions in the version history in order from oldest to newest.
VersionIterator
object.
RepositoryException
- if an error occurs.VersionHistory.getAllLinearVersions()
public NodeIterator getAllLinearFrozenNodes() throws RepositoryException
VersionHistory
VersionHistory.getAllLinearVersions()
.
NodeIterator
object.
RepositoryException
- if an error occurs.VersionHistory.getAllLinearFrozenNodes()
public Version getVersion(String versionName) throws VersionException, RepositoryException
getVersion
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.getVersion(String)
public Version getVersionByLabel(String label) throws RepositoryException
getVersionByLabel
in interface VersionHistory
RepositoryException
VersionHistory.getVersionByLabel(String)
public void addVersionLabel(String versionName, String label, boolean move) throws VersionException, RepositoryException
addVersionLabel
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.addVersionLabel(String, String, boolean)
public void removeVersionLabel(String label) throws RepositoryException
removeVersionLabel
in interface VersionHistory
RepositoryException
VersionHistory.removeVersionLabel(String)
public String[] getVersionLabels() throws RepositoryException
getVersionLabels
in interface VersionHistory
RepositoryException
VersionHistory.getVersionLabels()
public String[] getVersionLabels(Version version) throws VersionException, RepositoryException
getVersionLabels
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.getVersionLabels(javax.jcr.version.Version)
public boolean hasVersionLabel(String label) throws RepositoryException
hasVersionLabel
in interface VersionHistory
RepositoryException
VersionHistory.hasVersionLabel(String)
public boolean hasVersionLabel(Version version, String label) throws VersionException, RepositoryException
hasVersionLabel
in interface VersionHistory
VersionException
RepositoryException
VersionHistory.hasVersionLabel(javax.jcr.version.Version, String)
public void removeVersion(String versionName) throws UnsupportedRepositoryOperationException, VersionException, RepositoryException
removeVersion
in interface VersionHistory
UnsupportedRepositoryOperationException
VersionException
RepositoryException
VersionHistory.removeVersion(String)
public boolean isSame(Item otherItem)
ItemImpl
isSame
in interface Item
isSame
in class ItemImpl
Item.isSame(javax.jcr.Item)
public String getVersionableUUID() throws RepositoryException
getVersionableUUID
in interface VersionHistory
RepositoryException
public String getVersionableIdentifier() throws RepositoryException
RepositoryException
- if an error occurs.public void update(String srcWorkspaceName) throws ConstraintViolationException
ConstraintViolationException
since this node
is protected.
update
in interface Node
update
in class NodeImpl
ConstraintViolationException
public NodeIterator merge(String srcWorkspace, boolean bestEffort) throws ConstraintViolationException
ConstraintViolationException
since this node
is protected.
merge
in interface Node
merge
in class NodeImpl
ConstraintViolationException
public String toString()
toString
in class NodeImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |