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:
Item, Node, VersionHistory

public class ClientVersionHistory
extends ClientNode
implements 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(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)
          
 NodeIterator getAllFrozenNodes()
           
 NodeIterator getAllLinearFrozenNodes()
           
 VersionIterator getAllLinearVersions()
           
 VersionIterator getAllVersions()
          
 Version getRootVersion()
          
 Version getVersion(String versionName)
          
 String getVersionableIdentifier()
           
 String getVersionableUUID()
          
 Version getVersionByLabel(String label)
          
 String[] getVersionLabels()
          
 String[] getVersionLabels(Version version)
          
 boolean hasVersionLabel(String label)
          
 boolean hasVersionLabel(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(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 Version getRootVersion()
                       throws RepositoryException

Specified by:
getRootVersion in interface VersionHistory
Throws:
RepositoryException

getAllVersions

public VersionIterator getAllVersions()
                               throws RepositoryException

Specified by:
getAllVersions in interface VersionHistory
Throws:
RepositoryException

getVersion

public Version getVersion(String versionName)
                   throws VersionException,
                          RepositoryException

Specified by:
getVersion in interface VersionHistory
Throws:
VersionException
RepositoryException

getVersionByLabel

public Version getVersionByLabel(String label)
                          throws RepositoryException

Specified by:
getVersionByLabel in interface VersionHistory
Throws:
RepositoryException

addVersionLabel

public void addVersionLabel(String versionName,
                            String label,
                            boolean moveLabel)
                     throws VersionException,
                            RepositoryException

Specified by:
addVersionLabel in interface VersionHistory
Throws:
VersionException
RepositoryException

removeVersionLabel

public void removeVersionLabel(String label)
                        throws VersionException,
                               RepositoryException

Specified by:
removeVersionLabel in interface VersionHistory
Throws:
VersionException
RepositoryException

hasVersionLabel

public boolean hasVersionLabel(String label)
                        throws RepositoryException

Specified by:
hasVersionLabel in interface VersionHistory
Throws:
RepositoryException

hasVersionLabel

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

Specified by:
hasVersionLabel in interface VersionHistory
Throws:
VersionException
RepositoryException

getVersionLabels

public String[] getVersionLabels()
                          throws RepositoryException

Specified by:
getVersionLabels in interface VersionHistory
Throws:
RepositoryException

getVersionLabels

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

Specified by:
getVersionLabels in interface VersionHistory
Throws:
VersionException
RepositoryException

removeVersion

public void removeVersion(String versionName)
                   throws UnsupportedRepositoryOperationException,
                          VersionException,
                          RepositoryException

Specified by:
removeVersion in interface VersionHistory
Throws:
UnsupportedRepositoryOperationException
VersionException
RepositoryException

getVersionableUUID

public String getVersionableUUID()
                          throws RepositoryException

Specified by:
getVersionableUUID in interface VersionHistory
Throws:
RepositoryException

getAllFrozenNodes

public NodeIterator getAllFrozenNodes()
                               throws RepositoryException
Specified by:
getAllFrozenNodes in interface VersionHistory
Throws:
RepositoryException

getAllLinearFrozenNodes

public NodeIterator getAllLinearFrozenNodes()
                                     throws RepositoryException
Specified by:
getAllLinearFrozenNodes in interface VersionHistory
Throws:
RepositoryException

getAllLinearVersions

public VersionIterator getAllLinearVersions()
                                     throws RepositoryException
Specified by:
getAllLinearVersions in interface VersionHistory
Throws:
RepositoryException

getVersionableIdentifier

public String getVersionableIdentifier()
                                throws RepositoryException
Specified by:
getVersionableIdentifier in interface VersionHistory
Throws:
RepositoryException


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