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

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
 
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.NodeIterator getAllFrozenNodes()
           
 javax.jcr.NodeIterator getAllLinearFrozenNodes()
           
 javax.jcr.version.VersionIterator getAllLinearVersions()
           
 javax.jcr.version.VersionIterator getAllVersions()
          
 javax.jcr.version.Version getRootVersion()
          
 javax.jcr.version.Version getVersion(String versionName)
          
 String getVersionableIdentifier()
           
 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, 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, isNode, 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
 
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, 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
 
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

getAllFrozenNodes

public javax.jcr.NodeIterator getAllFrozenNodes()
                                         throws javax.jcr.RepositoryException
Specified by:
getAllFrozenNodes in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException

getAllLinearFrozenNodes

public javax.jcr.NodeIterator getAllLinearFrozenNodes()
                                               throws javax.jcr.RepositoryException
Specified by:
getAllLinearFrozenNodes in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException

getAllLinearVersions

public javax.jcr.version.VersionIterator getAllLinearVersions()
                                                       throws javax.jcr.RepositoryException
Specified by:
getAllLinearVersions in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException

getVersionableIdentifier

public String getVersionableIdentifier()
                                throws javax.jcr.RepositoryException
Specified by:
getVersionableIdentifier in interface javax.jcr.version.VersionHistory
Throws:
javax.jcr.RepositoryException


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.