org.apache.jackrabbit.rmi.remote
Interface RemoteNode

All Superinterfaces:
Remote, RemoteItem
All Known Subinterfaces:
RemoteVersion, RemoteVersionHistory
All Known Implementing Classes:
ServerNode, ServerVersion, ServerVersionHistory

public interface RemoteNode
extends RemoteItem

Remote version of the JCR Node interface. Used by the ServerNode and ClientNode adapters to provide transparent RMI access to remote nodes.

The methods in this interface are documented only with a reference to a corresponding Node method. The remote object will simply forward the method call to the underlying Node instance. Argument and return values, as well as possible exceptions, are copied over the network. Complex return values (like Nodes and Properties) are returned as remote references to the corresponding remote interfaces. Iterator values are transmitted as object arrays. RMI errors are signaled with RemoteExceptions.

Note that only two generic setProperty methods are included in this interface. Clients should implement the type-specific setProperty methods by wrapping the argument values into generic Value objects and calling the generic setProperty methods. Note also that the Value objects must be serializable and implemented using classes available on both the client and server side. The SerialValueFactory class provides two convenience methods to satisfy these requirements.

See Also:
Node, ClientNode, ServerNode

Method Summary
 void addMixin(String name)
          Remote version of the Node.addMixin(String) method.
 RemoteNode addNode(String path)
          Remote version of the Node.addNode(Sring) method.
 RemoteNode addNode(String path, String type)
          Remote version of the Node.addNode(String,String) method.
 boolean canAddMixin(String name)
          Remote version of the Node.canAddMixin(String) method.
 void cancelMerge(String versionUUID)
          Remote version of the Node.cancelMerge(Version) method.
 RemoteVersion checkin()
          Remote version of the Node.checkin() method.
 void checkout()
          Remote version of the Node.checkout() method.
 void doneMerge(String versionUUID)
          Remote version of the Node.doneMerge(Version) method.
 RemoteVersion getBaseVersion()
          Remote version of the Node.getBaseVersion() method.
 String getCorrespondingNodePath(String workspace)
          Remote version of the Node.getCorrespondingNodePath(String) method.
 RemoteNodeDefinition getDefinition()
          Remote version of the Node.getDefinition() method.
 String getIdentifier()
          Remote version of the Node.getIdentifier() method.
 int getIndex()
          Remote version of the Node.getIndex() method.
 RemoteLock getLock()
          Remote version of the Node.getLock() method.
 RemoteNodeType[] getMixinNodeTypes()
          Remote version of the Node.getMixinNodeTypes() method.
 RemoteNode getNode(String path)
          Remote version of the Node.getNode(String) method.
 RemoteIterator getNodes()
          Remote version of the Node.getNodes() method.
 RemoteIterator getNodes(String pattern)
          Remote version of the Node.getNodes(String) method.
 RemoteIterator getNodes(String[] globs)
          Remote version of the Node.getNodes(String[]) method.
 RemoteItem getPrimaryItem()
          Remote version of the Node.getPrimaryItem() method.
 RemoteNodeType getPrimaryNodeType()
          Remote version of the Node.getPrimaryNodeType() method.
 RemoteIterator getProperties()
          Remote version of the Node.getProperties() method.
 RemoteIterator getProperties(String pattern)
          Remote version of the Node.getProperties(String) method.
 RemoteIterator getProperties(String[] globs)
          Remote version of the Node.getProperties(String[]) method.
 RemoteProperty getProperty(String path)
          Remote version of the Node.getProperty(String) method.
 RemoteIterator getReferences()
          Remote version of the Node.getReferences() method.
 RemoteIterator getReferences(String name)
          Remote version of the Node.getReferences(String) method.
 String getUUID()
          Remote version of the Node.getUUID() method.
 RemoteVersionHistory getVersionHistory()
          Remote version of the Node.getVersionHistory() method.
 boolean hasNode(String path)
          Remote version of the Node.hasNode(String) method.
 boolean hasNodes()
          Remote version of the Node.hasNodes() method.
 boolean hasProperties()
          Remote version of the Node.hasProperties() method.
 boolean hasProperty(String path)
          Remote version of the Node.hasProperty() method.
 boolean holdsLock()
          Remote version of the Node.holdsLock() method.
 boolean isCheckedOut()
          Remote version of the Node.isCheckedOut() method.
 boolean isLocked()
          Remote version of the Node.isLocked() method.
 boolean isNodeType(String type)
          Remote version of the Node.isNodeType(String) method.
 RemoteLock lock(boolean isDeep, boolean isSessionScoped)
          Remote version of the Node.lock(boolean,boolean) method.
 RemoteIterator merge(String workspace, boolean bestEffort)
          Remote version of the Node.merge(String,boolean) method.
 void orderBefore(String src, String dst)
          Remote version of the Node.orderBefore(String,String) method.
 void removeMixin(String name)
          Remote version of the Node.removeMixin(String) method.
 void restore(String version, boolean removeExisting)
          Remote version of the Node.restore(String,boolean) method.
 void restore(String versionUUID, String path, boolean removeExisting)
          Remote version of the Node.restore(Version,String,boolean) method.
 void restoreByLabel(String label, boolean removeExisting)
          Remote version of the Node.restoreByLabel(String,boolean) method.
 void restoreByUUID(String versionUUID, boolean removeExisting)
          Remote version of the Node.restore(Version,boolean) method.
 RemoteProperty setProperty(String name, Value value)
          Remote version of the Node.setProperty(String,Value) method.
 RemoteProperty setProperty(String name, Value[] values)
          Remote version of the Node.setProperty(String,Value[]) method.
 RemoteProperty setProperty(String name, Value[] values, int type)
          Remote version of the Node.setProperty(String,Value[],int) method.
 RemoteProperty setProperty(String name, Value value, int type)
          Remote version of the Node.setProperty(String,Value) method.
 void unlock()
          Remote version of the Node.unlock() method.
 void update(String workspace)
          Remote version of the Node.update(String) method.
 
Methods inherited from interface org.apache.jackrabbit.rmi.remote.RemoteItem
getAncestor, getDepth, getName, getParent, getPath, isModified, isNew, refresh, remove, save
 

Method Detail

addNode

RemoteNode addNode(String path)
                   throws RepositoryException,
                          RemoteException
Remote version of the Node.addNode(Sring) method.

Parameters:
path - relative path
Returns:
new node
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

addNode

RemoteNode addNode(String path,
                   String type)
                   throws RepositoryException,
                          RemoteException
Remote version of the Node.addNode(String,String) method.

Parameters:
path - relative path
type - node type name
Returns:
new node
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getProperty

RemoteProperty getProperty(String path)
                           throws RepositoryException,
                                  RemoteException
Remote version of the Node.getProperty(String) method.

Parameters:
path - relative path
Returns:
node property
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getProperties

RemoteIterator getProperties()
                             throws RepositoryException,
                                    RemoteException
Remote version of the Node.getProperties() method.

Returns:
node properties
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getProperties

RemoteIterator getProperties(String pattern)
                             throws RepositoryException,
                                    RemoteException
Remote version of the Node.getProperties(String) method.

Parameters:
pattern - property name pattern
Returns:
matching node properties
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getProperties

RemoteIterator getProperties(String[] globs)
                             throws RepositoryException,
                                    RemoteException
Remote version of the Node.getProperties(String[]) method.

Parameters:
globs - property name globs
Returns:
matching node properties
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getPrimaryItem

RemoteItem getPrimaryItem()
                          throws RepositoryException,
                                 RemoteException
Remote version of the Node.getPrimaryItem() method.

Returns:
primary item
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getIdentifier

String getIdentifier()
                     throws RepositoryException,
                            RemoteException
Remote version of the Node.getIdentifier() method.

Returns:
node identifier
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getUUID

String getUUID()
               throws RepositoryException,
                      RemoteException
Remote version of the Node.getUUID() method.

Returns:
node uuid
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getReferences

RemoteIterator getReferences()
                             throws RepositoryException,
                                    RemoteException
Remote version of the Node.getReferences() method.

Returns:
reference properties
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getReferences

RemoteIterator getReferences(String name)
                             throws RepositoryException,
                                    RemoteException
Remote version of the Node.getReferences(String) method.

Parameters:
name - reference property name
Returns:
reference properties
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getNodes

RemoteIterator getNodes()
                        throws RepositoryException,
                               RemoteException
Remote version of the Node.getNodes() method.

Returns:
child nodes
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getNodes

RemoteIterator getNodes(String pattern)
                        throws RepositoryException,
                               RemoteException
Remote version of the Node.getNodes(String) method.

Parameters:
pattern - node name pattern
Returns:
matching child nodes
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getNodes

RemoteIterator getNodes(String[] globs)
                        throws RepositoryException,
                               RemoteException
Remote version of the Node.getNodes(String[]) method.

Parameters:
globs - node name globs
Returns:
matching child nodes
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

hasNode

boolean hasNode(String path)
                throws RepositoryException,
                       RemoteException
Remote version of the Node.hasNode(String) method.

Parameters:
path - relative path
Returns:
true if the identified node exists, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

hasProperty

boolean hasProperty(String path)
                    throws RepositoryException,
                           RemoteException
Remote version of the Node.hasProperty() method.

Parameters:
path - relative path
Returns:
true if the identified property exists, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

hasNodes

boolean hasNodes()
                 throws RepositoryException,
                        RemoteException
Remote version of the Node.hasNodes() method.

Returns:
true if this node has child nodes, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

hasProperties

boolean hasProperties()
                      throws RepositoryException,
                             RemoteException
Remote version of the Node.hasProperties() method.

Returns:
true if this node has properties, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getPrimaryNodeType

RemoteNodeType getPrimaryNodeType()
                                  throws RepositoryException,
                                         RemoteException
Remote version of the Node.getPrimaryNodeType() method.

Returns:
primary node type
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getMixinNodeTypes

RemoteNodeType[] getMixinNodeTypes()
                                   throws RepositoryException,
                                          RemoteException
Remote version of the Node.getMixinNodeTypes() method.

Returns:
mixin node types
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

isNodeType

boolean isNodeType(String type)
                   throws RepositoryException,
                          RemoteException
Remote version of the Node.isNodeType(String) method.

Parameters:
type - node type name
Returns:
true if this node is an instance of the identified type, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getNode

RemoteNode getNode(String path)
                   throws RepositoryException,
                          RemoteException
Remote version of the Node.getNode(String) method.

Parameters:
path - relative path
Returns:
node
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

orderBefore

void orderBefore(String src,
                 String dst)
                 throws RepositoryException,
                        RemoteException
Remote version of the Node.orderBefore(String,String) method.

Parameters:
src - source path
dst - destination path
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

setProperty

RemoteProperty setProperty(String name,
                           Value value)
                           throws RepositoryException,
                                  RemoteException
Remote version of the Node.setProperty(String,Value) method.

Parameters:
name - property name
value - property value
Returns:
property
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

setProperty

RemoteProperty setProperty(String name,
                           Value value,
                           int type)
                           throws RepositoryException,
                                  RemoteException
Remote version of the Node.setProperty(String,Value) method.

Parameters:
name - property name
value - property value
type - property type
Returns:
property
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

setProperty

RemoteProperty setProperty(String name,
                           Value[] values)
                           throws RepositoryException,
                                  RemoteException
Remote version of the Node.setProperty(String,Value[]) method.

Parameters:
name - property name
values - property values
Returns:
property
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

addMixin

void addMixin(String name)
              throws RepositoryException,
                     RemoteException
Remote version of the Node.addMixin(String) method.

Parameters:
name - mixin type name
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

removeMixin

void removeMixin(String name)
                 throws RepositoryException,
                        RemoteException
Remote version of the Node.removeMixin(String) method.

Parameters:
name - mixin type name
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

canAddMixin

boolean canAddMixin(String name)
                    throws RepositoryException,
                           RemoteException
Remote version of the Node.canAddMixin(String) method.

Parameters:
name - mixin type name
Returns:
true if the mixin type can be added, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getDefinition

RemoteNodeDefinition getDefinition()
                                   throws RepositoryException,
                                          RemoteException
Remote version of the Node.getDefinition() method.

Returns:
node definition
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

checkin

RemoteVersion checkin()
                      throws RepositoryException,
                             RemoteException
Remote version of the Node.checkin() method.

Returns:
checked in version
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

checkout

void checkout()
              throws RepositoryException,
                     RemoteException
Remote version of the Node.checkout() method.

Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

update

void update(String workspace)
            throws RepositoryException,
                   RemoteException
Remote version of the Node.update(String) method.

Parameters:
workspace - source workspace name
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

merge

RemoteIterator merge(String workspace,
                     boolean bestEffort)
                     throws RepositoryException,
                            RemoteException
Remote version of the Node.merge(String,boolean) method.

Parameters:
workspace - source workspace name
bestEffort - best effort flag
Returns:
nodes that failed to merge
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

cancelMerge

void cancelMerge(String versionUUID)
                 throws RepositoryException,
                        RemoteException
Remote version of the Node.cancelMerge(Version) method.

Parameters:
versionUUID - The UUID of the version whose labels are to be returned.
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

doneMerge

void doneMerge(String versionUUID)
               throws RepositoryException,
                      RemoteException
Remote version of the Node.doneMerge(Version) method.

Parameters:
versionUUID - The UUID of the version whose labels are to be returned.
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getCorrespondingNodePath

String getCorrespondingNodePath(String workspace)
                                throws RepositoryException,
                                       RemoteException
Remote version of the Node.getCorrespondingNodePath(String) method.

Parameters:
workspace - workspace name
Returns:
corresponding node path
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getIndex

int getIndex()
             throws RepositoryException,
                    RemoteException
Remote version of the Node.getIndex() method.

Returns:
node index
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

restore

void restore(String version,
             boolean removeExisting)
             throws RepositoryException,
                    RemoteException
Remote version of the Node.restore(String,boolean) method.

Parameters:
version - version name
removeExisting - flag to remove conflicting nodes
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

restoreByUUID

void restoreByUUID(String versionUUID,
                   boolean removeExisting)
                   throws RepositoryException,
                          RemoteException
Remote version of the Node.restore(Version,boolean) method.

This method has been rename to prevent a naming clash with restore(String, boolean).

Parameters:
versionUUID - The UUID of the version whose labels are to be returned.
removeExisting - flag to remove conflicting nodes
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

restore

void restore(String versionUUID,
             String path,
             boolean removeExisting)
             throws RepositoryException,
                    RemoteException
Remote version of the Node.restore(Version,String,boolean) method.

Parameters:
versionUUID - The UUID of the version whose labels are to be returned.
path - the path to which the version is to be restored
removeExisting - flag to remove conflicting nodes
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

restoreByLabel

void restoreByLabel(String label,
                    boolean removeExisting)
                    throws RepositoryException,
                           RemoteException
Remote version of the Node.restoreByLabel(String,boolean) method.

Parameters:
label - version label
removeExisting - flag to remove conflicting nodes
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

unlock

void unlock()
            throws RepositoryException,
                   RemoteException
Remote version of the Node.unlock() method.

Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

holdsLock

boolean holdsLock()
                  throws RepositoryException,
                         RemoteException
Remote version of the Node.holdsLock() method.

Returns:
true if this node holds a lock, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

isLocked

boolean isLocked()
                 throws RepositoryException,
                        RemoteException
Remote version of the Node.isLocked() method.

Returns:
true if this node is locked, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

isCheckedOut

boolean isCheckedOut()
                     throws RepositoryException,
                            RemoteException
Remote version of the Node.isCheckedOut() method.

Returns:
true if this node is checked out, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getVersionHistory

RemoteVersionHistory getVersionHistory()
                                       throws RepositoryException,
                                              RemoteException
Remote version of the Node.getVersionHistory() method.

Returns:
the remote version history.
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getBaseVersion

RemoteVersion getBaseVersion()
                             throws RepositoryException,
                                    RemoteException
Remote version of the Node.getBaseVersion() method.

Returns:
the remote base version
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

setProperty

RemoteProperty setProperty(String name,
                           Value[] values,
                           int type)
                           throws RepositoryException,
                                  RemoteException
Remote version of the Node.setProperty(String,Value[],int) method.

Parameters:
name - property name
values - property values
type - property type
Returns:
property
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

lock

RemoteLock lock(boolean isDeep,
                boolean isSessionScoped)
                throws RepositoryException,
                       RemoteException
Remote version of the Node.lock(boolean,boolean) method.

Parameters:
isDeep - flag to create a deep lock
isSessionScoped - flag to create a session-scoped lock
Returns:
lock
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getLock

RemoteLock getLock()
                   throws RepositoryException,
                          RemoteException
Remote version of the Node.getLock() method.

Returns:
lock
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors


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