Package org.apache.jackrabbit.rmi.server
Class ServerSession
- 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.ServerSession
-
- All Implemented Interfaces:
Serializable,Remote,RemoteSession
- Direct Known Subclasses:
ServerXASession
@Deprecated public class ServerSession extends ServerObject implements RemoteSession
Deprecated.RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.Remote adapter for the JCR
Sessioninterface. This class makes a local session available as an RMI service using theRemoteSessioninterface.- See Also:
Session,RemoteSession, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.rmi.server.RemoteObject
ref
-
-
Constructor Summary
Constructors Constructor Description ServerSession(Session session, RemoteAdapterFactory factory)Deprecated.Creates a remote adapter for the given local session.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddLockToken(String token)Deprecated.Remote version of theSession.addLockToken(String)method.byte[]exportDocumentView(String path, boolean binaryAsLink, boolean noRecurse)Deprecated.Exports the identified repository subtree as a document view XML stream.byte[]exportSystemView(String path, boolean binaryAsLink, boolean noRecurse)Deprecated.Exports the identified repository subtree as a system view XML stream.RemoteAccessControlManagergetAccessControlManager()Deprecated.Remote version of theSession.getAccessControlManager()method.ObjectgetAttribute(String name)Deprecated.Returns the named attribute.String[]getAttributeNames()Deprecated.Remote version of theSession.getAttributeNames()method.RemoteItemgetItem(String path)Deprecated.Remote version of theSession.getItem(String)method.String[]getLockTokens()Deprecated.Remote version of theSession.getLockTokens()method.StringgetNamespacePrefix(String uri)Deprecated.Remote version of theSession.getNamespacePrefix(String)method.String[]getNamespacePrefixes()Deprecated.Remote version of theSession.getNamespacePrefixes()method.StringgetNamespaceURI(String prefix)Deprecated.Remote version of theSession.getNamespaceURI(String)method.RemoteNodegetNode(String path)Deprecated.Remote version of theSession.getNode(String)method.RemoteNodegetNodeByIdentifier(String id)Deprecated.Remote version of theSession.getNodeByIdentifier(String)method.RemoteNodegetNodeByUUID(String uuid)Deprecated.Remote version of theSession.getNodeByUUID(String)method.RemotePropertygetProperty(String path)Deprecated.Remote version of theSession.getProperty(String)method.RemoteNodegetRootNode()Deprecated.Remote version of theSession.getRootNode()method.StringgetUserID()Deprecated.Remote version of theSession.getUserID()method.RemoteWorkspacegetWorkspace()Deprecated.Remote version of theSession.getWorkspace()method.booleanhasPendingChanges()Deprecated.Remote version of theSession.hasPendingChanges()method.booleanhasPermission(String path, String actions)Deprecated.Remote version of theSession.hasPermission(String,String)method.RemoteSessionimpersonate(Credentials credentials)Deprecated.Remote version of theSession.impersonate(Credentials)method.voidimportXML(String path, byte[] xml, int mode)Deprecated.Imports the system or document view XML data into a subtree of the identified node.booleanisLive()Deprecated.Remote version of theSession.isLive()method.booleanitemExists(String path)Deprecated.Remote version of theSession.itemExists(String)method.voidlogout()Deprecated.Remote version of theSession.logout()method.voidmove(String from, String to)Deprecated.Remote version of theSession.move(String,String)method.booleannodeExists(String path)Deprecated.Remote version of theSession.nodeExists(String)method.booleanpropertyExists(String path)Deprecated.Remote version of theSession.propertyExists(String)method.voidrefresh(boolean keepChanges)Deprecated.Remote version of theSession.refresh(boolean)method.voidremoveItem(String path)Deprecated.Remote version of theSession.removeItem(String)method.voidremoveLockToken(String token)Deprecated.Remote version of theSession.removeLockToken(String)method.voidsave()Deprecated.Remote version of theSession.save()method.voidsetNamespacePrefix(String prefix, String uri)Deprecated.Remote version of theSession.setNamespacePrefix(String,String)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, unexportObject
-
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
-
-
-
Constructor Detail
-
ServerSession
public ServerSession(Session session, RemoteAdapterFactory factory) throws RemoteException
Deprecated.Creates a remote adapter for the given local session.- Parameters:
session- local sessionfactory- remote adapter factory- Throws:
RemoteException- on RMI errors
-
-
Method Detail
-
getUserID
public String getUserID() throws RemoteException
Deprecated.Remote version of theSession.getUserID()method.- Specified by:
getUserIDin interfaceRemoteSession- Returns:
- user id
- Throws:
RemoteException- on RMI errors- See Also:
Session.getUserID()
-
getAttribute
public Object getAttribute(String name) throws RemoteException
Deprecated.Returns the named attribute. Note that only serializable attribute values can be transmitted over the network and that the client should have (or be able to fetch) the object class to access the returned value. Failures to meet these conditions are signalled with RemoteExceptions.- Specified by:
getAttributein interfaceRemoteSession- Parameters:
name- attribute name- Returns:
- attribute value
- Throws:
RemoteException- on RMI errors- See Also:
Session.getAttribute(java.lang.String)
-
getAttributeNames
public String[] getAttributeNames() throws RemoteException
Deprecated.Remote version of theSession.getAttributeNames()method.- Specified by:
getAttributeNamesin interfaceRemoteSession- Returns:
- attribute names
- Throws:
RemoteException- on RMI errors
-
impersonate
public RemoteSession impersonate(Credentials credentials) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.impersonate(Credentials)method.- Specified by:
impersonatein interfaceRemoteSession- Parameters:
credentials- credentials for the new session- Returns:
- new session
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getWorkspace
public RemoteWorkspace getWorkspace() throws RemoteException
Deprecated.Remote version of theSession.getWorkspace()method.- Specified by:
getWorkspacein interfaceRemoteSession- Returns:
- workspace
- Throws:
RemoteException- on RMI errors- See Also:
Session.getWorkspace()
-
hasPermission
public boolean hasPermission(String path, String actions) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.hasPermission(String,String)method.- Specified by:
hasPermissionin interfaceRemoteSession- Parameters:
path- item pathactions- actions- Returns:
trueif permission is granted,falseotherwise- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getNamespacePrefix
public String getNamespacePrefix(String uri) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getNamespacePrefix(String)method.- Specified by:
getNamespacePrefixin interfaceRemoteSession- Parameters:
uri- namespace uri- Returns:
- namespace prefix
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getNamespacePrefixes
public String[] getNamespacePrefixes() throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getNamespacePrefixes()method.- Specified by:
getNamespacePrefixesin interfaceRemoteSession- Returns:
- namespace prefixes
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getNamespaceURI
public String getNamespaceURI(String prefix) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getNamespaceURI(String)method.- Specified by:
getNamespaceURIin interfaceRemoteSession- Parameters:
prefix- namespace prefix- Returns:
- namespace uri
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
setNamespacePrefix
public void setNamespacePrefix(String prefix, String uri) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.setNamespacePrefix(String,String)method.- Specified by:
setNamespacePrefixin interfaceRemoteSession- Parameters:
prefix- namespace prefixuri- namespace uri- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
itemExists
public boolean itemExists(String path) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.itemExists(String)method.- Specified by:
itemExistsin interfaceRemoteSession- Parameters:
path- item path- Returns:
trueif the item exists,falseotherwise- Throws:
RepositoryException- on repository exceptionRemoteException- on RMI errors
-
nodeExists
public boolean nodeExists(String path) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.nodeExists(String)method.- Specified by:
nodeExistsin interfaceRemoteSession- Parameters:
path- node path- Returns:
trueif the node exists,falseotherwise- Throws:
RepositoryException- on repository exceptionRemoteException- on RMI errors
-
propertyExists
public boolean propertyExists(String path) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.propertyExists(String)method.- Specified by:
propertyExistsin interfaceRemoteSession- Parameters:
path- property path- Returns:
trueif the property exists,falseotherwise- Throws:
RepositoryException- on repository exceptionRemoteException- on RMI errors
-
getNodeByIdentifier
public RemoteNode getNodeByIdentifier(String id) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getNodeByIdentifier(String)method.- Specified by:
getNodeByIdentifierin interfaceRemoteSession- Parameters:
id- node identifier- Returns:
- node
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getNodeByUUID
public RemoteNode getNodeByUUID(String uuid) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getNodeByUUID(String)method.- Specified by:
getNodeByUUIDin interfaceRemoteSession- Parameters:
uuid- node uuid- Returns:
- node
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getRootNode
public RemoteNode getRootNode() throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getRootNode()method.- Specified by:
getRootNodein interfaceRemoteSession- Returns:
- root node
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getItem
public RemoteItem getItem(String path) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getItem(String)method.- Specified by:
getItemin interfaceRemoteSession- Parameters:
path- item path- Returns:
- item
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getNode
public RemoteNode getNode(String path) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getNode(String)method.- Specified by:
getNodein interfaceRemoteSession- Parameters:
path- node path- Returns:
- node
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getProperty
public RemoteProperty getProperty(String path) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.getProperty(String)method.- Specified by:
getPropertyin interfaceRemoteSession- Parameters:
path- property path- Returns:
- property
- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
hasPendingChanges
public boolean hasPendingChanges() throws RepositoryException, RemoteExceptionDeprecated.Remote version of theSession.hasPendingChanges()method.- Specified by:
hasPendingChangesin interfaceRemoteSession- Returns:
trueif the session has pending changes,falseotherwise- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
removeItem
public void removeItem(String path) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.removeItem(String)method.- Specified by:
removeItemin interfaceRemoteSession- Parameters:
path- item path- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
move
public void move(String from, String to) throws RepositoryException, RemoteException
Deprecated.Remote version of theSession.move(String,String)method.- Specified by:
movein interfaceRemoteSession- Parameters:
from- source pathto- destination path- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
save
public void save() throws RepositoryException, RemoteExceptionDeprecated.Remote version of theSession.save()method.- Specified by:
savein interfaceRemoteSession- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
refresh
public void refresh(boolean keepChanges) throws RepositoryException, RemoteExceptionDeprecated.Remote version of theSession.refresh(boolean)method.- Specified by:
refreshin interfaceRemoteSession- Parameters:
keepChanges- flag to keep transient changes- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
logout
public void logout() throws RemoteExceptionDeprecated.Remote version of theSession.logout()method.- Specified by:
logoutin interfaceRemoteSession- Throws:
RemoteException- on RMI errors
-
isLive
public boolean isLive() throws RemoteExceptionDeprecated.Remote version of theSession.isLive()method.- Specified by:
isLivein interfaceRemoteSession- Returns:
trueif the session is live,falseotherwise- Throws:
RemoteException- on RMI errors
-
importXML
public void importXML(String path, byte[] xml, int mode) throws IOException, RepositoryException, RemoteException
Deprecated.Imports the system or document view XML data into a subtree of the identified node. Note that the entire XML stream is transferred as a single byte array over the network. This may cause problems with large XML streams. The remote server will wrap the XML data into aByteArrayInputStreamand feed it to the normal importXML method.- Specified by:
importXMLin interfaceRemoteSession- Parameters:
path- node pathxml- imported XML documentmode- UUID handling mode- Throws:
IOException- on IO errorsRemoteException- on RMI errorsRepositoryException- on repository errors- See Also:
Session.importXML(java.lang.String, java.io.InputStream, int)
-
addLockToken
public void addLockToken(String token) throws RemoteException
Deprecated.Remote version of theSession.addLockToken(String)method.- Specified by:
addLockTokenin interfaceRemoteSession- Parameters:
token- lock token- Throws:
RemoteException- on RMI errors
-
getLockTokens
public String[] getLockTokens() throws RemoteException
Deprecated.Remote version of theSession.getLockTokens()method.- Specified by:
getLockTokensin interfaceRemoteSession- Returns:
- lock tokens
- Throws:
RemoteException- on RMI errors
-
removeLockToken
public void removeLockToken(String token) throws RemoteException
Deprecated.Remote version of theSession.removeLockToken(String)method.- Specified by:
removeLockTokenin interfaceRemoteSession- Parameters:
token- lock token- Throws:
RemoteException- on RMI errors
-
exportDocumentView
public byte[] exportDocumentView(String path, boolean binaryAsLink, boolean noRecurse) throws IOException, RepositoryException, RemoteException
Deprecated.Exports the identified repository subtree as a document view XML stream. Note that the entire XML stream is transferred as a single byte array over the network. This may cause problems with large exports. The remote server uses aByteArrayOutputStreamto capture the XML data written by the normal exportDocView method.- Specified by:
exportDocumentViewin interfaceRemoteSession- Parameters:
path- node pathbinaryAsLink- skip binary flagnoRecurse- no recursion flag- Returns:
- exported XML document
- Throws:
IOException- on IO errorsRemoteException- on RMI errorsRepositoryException- on repository errors- See Also:
Session.exportDocumentView(java.lang.String, org.xml.sax.ContentHandler, boolean, boolean)
-
exportSystemView
public byte[] exportSystemView(String path, boolean binaryAsLink, boolean noRecurse) throws IOException, RepositoryException, RemoteException
Deprecated.Exports the identified repository subtree as a system view XML stream. Note that the entire XML stream is transferred as a single byte array over the network. This may cause problems with large exports. The remote server uses aByteArrayOutputStreamto capture the XML data written by the normal exportSysView method.- Specified by:
exportSystemViewin interfaceRemoteSession- Parameters:
path- node pathbinaryAsLink- binary skip flagnoRecurse- no recursion flag- Returns:
- exported XML document
- Throws:
IOException- on IO errorsRemoteException- on RMI errorsRepositoryException- on repository errors- See Also:
Session.exportSystemView(java.lang.String, org.xml.sax.ContentHandler, boolean, boolean)
-
getAccessControlManager
public RemoteAccessControlManager getAccessControlManager() throws UnsupportedRepositoryOperationException, RepositoryException, RemoteException
Deprecated.Remote version of theSession.getAccessControlManager()method.- Specified by:
getAccessControlManagerin interfaceRemoteSession- Throws:
UnsupportedRepositoryOperationException- if the remote session does not support this methodRepositoryException- if an error occurred getting the access control managerRemoteException- on RMI errors
-
-