org.apache.jackrabbit.rmi.client
Class ClientVersionHistory

java.lang.Object
  extended by org.apache.jackrabbit.rmi.client.ClientObject
      extended by org.apache.jackrabbit.rmi.client.ClientItem
          extended by org.apache.jackrabbit.rmi.client.ClientNode
              extended by org.apache.jackrabbit.rmi.client.ClientVersionHistory
All Implemented Interfaces:
javax.jcr.Item, javax.jcr.Node, javax.jcr.version.VersionHistory

public class ClientVersionHistory
extends ClientNode
implements javax.jcr.version.VersionHistory

Local adapter for the JCR-RMI RemoteVersionHistory interface. This class makes a remote version history locally available using the JCR VersionHistory interface.

See Also:
VersionHistory, RemoteVersionHistory

Constructor Summary
ClientVersionHistory(javax.jcr.Session session, RemoteVersionHistory remote, LocalAdapterFactory factory)
          Creates a local adapter for the given remote version history.
 
Method Summary
 void addVersionLabel(String versionName, String label, boolean moveLabel)
          
 javax.jcr.version.VersionIterator getAllVersions()
          
 javax.jcr.version.Version getRootVersion()
          
 javax.jcr.version.Version getVersion(String versionName)
          
 String getVersionableUUID()
          
 javax.jcr.version.Version getVersionByLabel(String label)
          
 String[] getVersionLabels()
          
 String[] getVersionLabels(javax.jcr.version.Version version)
          
 boolean hasVersionLabel(String label)
          
 boolean hasVersionLabel(javax.jcr.version.Version version, String label)
          
 void removeVersion(String versionName)
          
 void removeVersionLabel(String label)
          
 
Methods inherited from class org.apache.jackrabbit.rmi.client.ClientNode
accept, 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, isNode, isNodeType, lock, merge, orderBefore, removeMixin, restore, restore, restore, restoreByLabel, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, update
 
Methods inherited from class org.apache.jackrabbit.rmi.client.ClientItem
getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isSame, refresh, remove, save
 
Methods inherited from class org.apache.jackrabbit.rmi.client.ClientObject
getFactory, getItem, getNode, getNodeTypeArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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, merge, orderBefore, removeMixin, restore, restore, restore, restoreByLabel, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, update
 
Methods inherited from interface javax.jcr.Item
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save
 

Constructor Detail

ClientVersionHistory

public ClientVersionHistory(javax.jcr.Session session,
                            RemoteVersionHistory remote,
                            LocalAdapterFactory factory)
Creates a local adapter for the given remote version history.

Parameters:
session - current session
remote - remote version history
factory - local adapter factory
Method Detail

getRootVersion

public javax.jcr.version.Version getRootVersion()
                                         throws javax.jcr.RepositoryException

Specified by:
getRootVersion in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException

getAllVersions

public javax.jcr.version.VersionIterator getAllVersions()
                                                 throws javax.jcr.RepositoryException

Specified by:
getAllVersions in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException

getVersion

public javax.jcr.version.Version getVersion(String versionName)
                                     throws javax.jcr.version.VersionException,
                                            javax.jcr.RepositoryException

Specified by:
getVersion in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.version.VersionException
javax.jcr.RepositoryException

getVersionByLabel

public javax.jcr.version.Version getVersionByLabel(String label)
                                            throws javax.jcr.RepositoryException

Specified by:
getVersionByLabel in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException

addVersionLabel

public void addVersionLabel(String versionName,
                            String label,
                            boolean moveLabel)
                     throws javax.jcr.version.VersionException,
                            javax.jcr.RepositoryException

Specified by:
addVersionLabel in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.version.VersionException
javax.jcr.RepositoryException

removeVersionLabel

public void removeVersionLabel(String label)
                        throws javax.jcr.version.VersionException,
                               javax.jcr.RepositoryException

Specified by:
removeVersionLabel in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.version.VersionException
javax.jcr.RepositoryException

hasVersionLabel

public boolean hasVersionLabel(String label)
                        throws javax.jcr.RepositoryException

Specified by:
hasVersionLabel in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException

hasVersionLabel

public boolean hasVersionLabel(javax.jcr.version.Version version,
                               String label)
                        throws javax.jcr.version.VersionException,
                               javax.jcr.RepositoryException

Specified by:
hasVersionLabel in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.version.VersionException
javax.jcr.RepositoryException

getVersionLabels

public String[] getVersionLabels()
                          throws javax.jcr.RepositoryException

Specified by:
getVersionLabels in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException

getVersionLabels

public String[] getVersionLabels(javax.jcr.version.Version version)
                          throws javax.jcr.version.VersionException,
                                 javax.jcr.RepositoryException

Specified by:
getVersionLabels in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.version.VersionException
javax.jcr.RepositoryException

removeVersion

public void removeVersion(String versionName)
                   throws javax.jcr.UnsupportedRepositoryOperationException,
                          javax.jcr.version.VersionException,
                          javax.jcr.RepositoryException

Specified by:
removeVersion in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryException

getVersionableUUID

public String getVersionableUUID()
                          throws javax.jcr.RepositoryException

Specified by:
getVersionableUUID in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.