|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.version.VersionManagerImpl
This Class implements a VersionManager.
Constructor Summary | |
VersionManagerImpl(PersistenceManager pMgr,
NodeTypeRegistry ntReg,
DelegatingObservationDispatcher obsMgr,
String rootUUID,
String rootParentUUID)
Creates a bew vesuion manager |
Method Summary | |
Version |
checkin(NodeImpl node)
invokes the checkin() on the persistent version manager and remaps the newly created version objects. |
void |
close()
Close this version manager. |
VersionHistory |
createVersionHistory(Session session,
NodeState node)
Creates a new version history. |
List |
getItemReferences(InternalVersionItem item)
{@inheritDoc} |
InternalVersion |
getVersion(String id)
Returns the version with the given id |
VersionHistory |
getVersionHistory(Session session,
NodeState node)
Returns the version history of the specified node or
null if the given node doesn't (yet) have an associated
version history. |
InternalVersionHistory |
getVersionHistory(String id)
Returns the version history with the given id |
VirtualItemStateProvider |
getVirtualItemStateProvider()
returns the virtual item state provider that exposes the internal versions as items. |
boolean |
hasItem(String id)
checks, if the node with the given id exists |
boolean |
hasVersion(String id)
Checks if the version with the given id exists |
boolean |
hasVersionHistory(String id)
Checks if the version history with the given id exists |
void |
removeVersion(VersionHistory history,
QName name)
Removes the specified version from the history |
void |
setItemReferences(InternalVersionItem item,
List references)
{@inheritDoc} |
boolean |
setNodeReferences(NodeReferences refs)
|
Version |
setVersionLabel(VersionHistory history,
QName version,
QName label,
boolean move)
Sets the version label to the given version .
If the label is already assigned to another version, a VersionException is
thrown unless move is true . If version
is null , the label is removed from the respective version.
In either case, the version the label was previously assigned is returned,
or null of the label was not moved. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VersionManagerImpl(PersistenceManager pMgr, NodeTypeRegistry ntReg, DelegatingObservationDispatcher obsMgr, String rootUUID, String rootParentUUID) throws RepositoryException
Method Detail |
public VirtualItemStateProvider getVirtualItemStateProvider()
getVirtualItemStateProvider
in interface VersionManager
public void close() throws Exception
close
in interface VersionManager
Exception
- if an error occurspublic VersionHistory createVersionHistory(Session session, NodeState node) throws RepositoryException
createVersionHistory
in interface VersionManager
node
-
RepositoryException
VersionManager.getVersionHistory(Session, NodeState)
public VersionHistory getVersionHistory(Session session, NodeState node) throws RepositoryException
node
or
null
if the given node doesn't (yet) have an associated
version history.
getVersionHistory
in interface VersionManager
session
- node
- node whose version history should be returned
node
or
null
if the given node doesn't (yet) have an
associated version history.
RepositoryException
- if an error occursVersionManager.createVersionHistory(Session, NodeState)
public boolean hasVersionHistory(String id)
hasVersionHistory
in interface VersionManager
id
-
public InternalVersionHistory getVersionHistory(String id) throws RepositoryException
getVersionHistory
in interface VersionManager
id
-
RepositoryException
public boolean hasVersion(String id)
hasVersion
in interface VersionManager
id
-
public InternalVersion getVersion(String id) throws RepositoryException
getVersion
in interface VersionManager
id
-
RepositoryException
public boolean hasItem(String id)
id
-
public Version checkin(NodeImpl node) throws RepositoryException
checkin
in interface VersionManager
node
-
RepositoryException
public void removeVersion(VersionHistory history, QName name) throws VersionException, RepositoryException
removeVersion
in interface VersionManager
history
- the version history from where to remove the version.name
- the name of the version to remove.
VersionException
- if the version history
does
not have a version with name
.
RepositoryException
- if any other error occurs.public Version setVersionLabel(VersionHistory history, QName version, QName label, boolean move) throws RepositoryException
label
to the given version
.
If the label is already assigned to another version, a VersionException is
thrown unless move
is true
. If version
is null
, the label is removed from the respective version.
In either case, the version the label was previously assigned is returned,
or null
of the label was not moved.
setVersionLabel
in interface VersionManager
history
- version
- label
- move
-
RepositoryException
public boolean setNodeReferences(NodeReferences refs)
public void setItemReferences(InternalVersionItem item, List references)
public List getItemReferences(InternalVersionItem item)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |