org.apache.jackrabbit.rmi.server
Class ServerVersionHistory
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.apache.jackrabbit.rmi.server.ServerObject
org.apache.jackrabbit.rmi.server.ServerItem
org.apache.jackrabbit.rmi.server.ServerNode
org.apache.jackrabbit.rmi.server.ServerVersionHistory
- All Implemented Interfaces:
- Serializable, Remote, RemoteItem, RemoteNode, RemoteVersionHistory
public class ServerVersionHistory
- extends ServerNode
- implements RemoteVersionHistory
Remote adapter for the JCR VersionHistory
interface. This class makes a local version history available as an RMI
service using the
RemoteVersionHistory
interface.
- See Also:
VersionHistory
,
RemoteVersionHistory
,
Serialized Form
Methods inherited from class org.apache.jackrabbit.rmi.server.ServerNode |
addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, getBaseVersion, getCorrespondingNodePath, getDefinition, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperty, getReferences, getUUID, getVersionByUUID, getVersionHistory, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNodeType, lock, merge, orderBefore, removeMixin, restore, restore, restoreByLabel, restoreByUUID, setProperty, setProperty, setProperty, setProperty, unlock, update |
Methods inherited from interface org.apache.jackrabbit.rmi.remote.RemoteNode |
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, restoreByLabel, restoreByUUID, setProperty, setProperty, setProperty, setProperty, unlock, update |
ServerVersionHistory
public ServerVersionHistory(VersionHistory versionHistory,
RemoteAdapterFactory factory)
throws RemoteException
- Creates a remote adapter for the given local version history.
- Parameters:
versionHistory
- local version historyfactory
- remote adapter factory
- Throws:
RemoteException
- on RMI errors
getRootVersion
public RemoteVersion getRootVersion()
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.getRootVersion()
method.
- Specified by:
getRootVersion
in interface RemoteVersionHistory
- Returns:
- a
Version
object.
- Throws:
RepositoryException
- if an error occurs.
RemoteException
- on RMI errors
getAllVersions
public RemoteIterator getAllVersions()
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.getAllVersions()
method.
- Specified by:
getAllVersions
in interface RemoteVersionHistory
- Returns:
- remote versions
- Throws:
RepositoryException
- if an error occurs.
RemoteException
- on RMI errors
getVersion
public RemoteVersion getVersion(String versionName)
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.getVersion(String)
method.
- Specified by:
getVersion
in interface RemoteVersionHistory
- Parameters:
versionName
- a version name
- Returns:
- a
Version
object.
- Throws:
RepositoryException
- if an error occurs.
RemoteException
- on RMI errors
getVersionByLabel
public RemoteVersion getVersionByLabel(String label)
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.getVersionByLabel(String)
method.
- Specified by:
getVersionByLabel
in interface RemoteVersionHistory
- Parameters:
label
- a version label
- Returns:
- a
Version
object.
- Throws:
RepositoryException
- if an error occurs.
RemoteException
- on RMI errors
addVersionLabel
public void addVersionLabel(String versionName,
String label,
boolean moveLabel)
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.addVersionLabel(String, String, boolean)
method.
- Specified by:
addVersionLabel
in interface RemoteVersionHistory
- Parameters:
versionName
- the name of the version to which the label is to be added.label
- the label to be added.moveLabel
- if true
, then if label
is already assigned to a version in
this version history, it is moved to the new version specified; if false
, then attempting
to assign an already used label will throw a VersionException
.
- Throws:
RepositoryException
- if another error occurs.
RemoteException
- on RMI errors
removeVersionLabel
public void removeVersionLabel(String label)
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.removeVersionLabel(String)
method.
- Specified by:
removeVersionLabel
in interface RemoteVersionHistory
- Parameters:
label
- a version label
- Throws:
RepositoryException
- if another error occurs.
RemoteException
- on RMI errors
hasVersionLabel
public boolean hasVersionLabel(String label)
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.hasVersionLabel(String)
method.
- Specified by:
hasVersionLabel
in interface RemoteVersionHistory
- Parameters:
label
- a version label
- Returns:
- a
boolean
- Throws:
RepositoryException
- on repository errors
RemoteException
- on RMI errors
hasVersionLabel
public boolean hasVersionLabel(String versionUUID,
String label)
throws RepositoryException,
RemoteException
- Remote version of the
hasVersionLabel(Version, String)
method.
- Specified by:
hasVersionLabel
in interface RemoteVersionHistory
- Parameters:
versionUUID
- The UUID of the version whose labels are to be returned.label
- a version label
- Returns:
- a
boolean
.
- Throws:
RepositoryException
- if another error occurs.
RemoteException
- on RMI errors
getVersionLabels
public String[] getVersionLabels()
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.getVersionLabels()
method.
- Specified by:
getVersionLabels
in interface RemoteVersionHistory
- Returns:
- a
String
array containing all the labels of the version history
- Throws:
RepositoryException
- on repository errors
RemoteException
- on RMI errors
getVersionLabels
public String[] getVersionLabels(String versionUUID)
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.getVersionLabels(Version)
method.
- Specified by:
getVersionLabels
in interface RemoteVersionHistory
- Parameters:
versionUUID
- The UUID of the version whose labels are to be returned.
- Returns:
- a
String
array containing all the labels of the given version
- Throws:
RepositoryException
- if another error occurs.
RemoteException
- on RMI errors
removeVersion
public void removeVersion(String versionName)
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.removeVersion(String)
method.
- Specified by:
removeVersion
in interface RemoteVersionHistory
- Parameters:
versionName
- the name of a version in this version history.
- Throws:
RepositoryException
- if another error occurs.
RemoteException
- on RMI errors
getVersionableUUID
public String getVersionableUUID()
throws RepositoryException,
RemoteException
- Remote version of the
VersionHistory.getVersionableUUID()
VersionHistory.getVersionableUUID()}
method.
- Specified by:
getVersionableUUID
in interface RemoteVersionHistory
- Returns:
- the uuid of the versionable node
- Throws:
RepositoryException
- if another error occurs.
RemoteException
- on RMI errors
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.