Package org.apache.jackrabbit.rmi.server
Class ServerItem
- 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
-
- All Implemented Interfaces:
Serializable
,Remote
,RemoteItem
- Direct Known Subclasses:
ServerNode
,ServerProperty
public class ServerItem extends ServerObject implements RemoteItem
Remote adapter for the JCRItem
interface. This class makes a local item available as an RMI service using theRemoteItem
interface. Used mainly as the base class for theServerProperty
andServerNode
adapters.- See Also:
Item
,RemoteItem
, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.rmi.server.RemoteObject
ref
-
-
Constructor Summary
Constructors Constructor Description ServerItem(Item item, RemoteAdapterFactory factory)
Creates a remote adapter for the given local item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RemoteItem
getAncestor(int level)
Remote version of theItem.getAncestor(int)
method.int
getDepth()
Remote version of theItem.getDepth()
method.String
getName()
Remote version of theItem.getName()
method.RemoteNode
getParent()
Remote version of theItem.getParent()
method.String
getPath()
Remote version of theItem.getPath()
method.boolean
isModified()
Remote version of theItem.isModified()
method.boolean
isNew()
Remote version of theItem.isNew()
method.void
refresh(boolean keepChanges)
Remote version of theItem.refresh(boolean)
method.void
remove()
Remote version of theItem.remove()
method.void
save()
Remote version of theItem.save()
method.-
Methods inherited from class org.apache.jackrabbit.rmi.server.ServerObject
getFactory, getRemoteItem, getRemoteNode, getRemoteNodeTypeArray, getRepositoryException, getSerialValue, getSerialValues
-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
-
-
-
Constructor Detail
-
ServerItem
public ServerItem(Item item, RemoteAdapterFactory factory) throws RemoteException
Creates a remote adapter for the given local item.- Parameters:
item
- local item to be adaptedfactory
- remote adapter factory- Throws:
RemoteException
- on RMI errors
-
-
Method Detail
-
getPath
public String getPath() throws RepositoryException, RemoteException
Remote version of theItem.getPath()
method.- Specified by:
getPath
in interfaceRemoteItem
- Returns:
- item path
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getName
public String getName() throws RepositoryException, RemoteException
Remote version of theItem.getName()
method.- Specified by:
getName
in interfaceRemoteItem
- Returns:
- item name
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
save
public void save() throws RepositoryException, RemoteException
Remote version of theItem.save()
method.- Specified by:
save
in interfaceRemoteItem
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getAncestor
public RemoteItem getAncestor(int level) throws RepositoryException, RemoteException
Remote version of theItem.getAncestor(int)
method.- Specified by:
getAncestor
in interfaceRemoteItem
- Parameters:
level
- ancestor level- Returns:
- ancestor item
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getDepth
public int getDepth() throws RepositoryException, RemoteException
Remote version of theItem.getDepth()
method.- Specified by:
getDepth
in interfaceRemoteItem
- Returns:
- item depth
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getParent
public RemoteNode getParent() throws RepositoryException, RemoteException
Remote version of theItem.getParent()
method.- Specified by:
getParent
in interfaceRemoteItem
- Returns:
- parent node
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
isModified
public boolean isModified() throws RemoteException
Remote version of theItem.isModified()
method.- Specified by:
isModified
in interfaceRemoteItem
- Returns:
true
if the item is modified,false
otherwise- Throws:
RemoteException
- on RMI errors
-
isNew
public boolean isNew() throws RemoteException
Remote version of theItem.isNew()
method.- Specified by:
isNew
in interfaceRemoteItem
- Returns:
true
if the item is new,false
otherwise- Throws:
RemoteException
- on RMI errors
-
refresh
public void refresh(boolean keepChanges) throws RepositoryException, RemoteException
Remote version of theItem.refresh(boolean)
method.- Specified by:
refresh
in interfaceRemoteItem
- Parameters:
keepChanges
- flag to keep transient changes- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
remove
public void remove() throws RepositoryException, RemoteException
Remote version of theItem.remove()
method.- Specified by:
remove
in interfaceRemoteItem
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
-