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(forRemoval=true) public class ServerSession extends ServerObject implements RemoteSession
Deprecated, for removal: This API element is subject to removal in a future version.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
Session
interface. This class makes a local session available as an RMI service using theRemoteSession
interface.- 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, for removal: This API element is subject to removal in a future version.Creates a remote adapter for the given local session.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addLockToken(String token)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.addLockToken(String)
method.byte[]
exportDocumentView(String path, boolean binaryAsLink, boolean noRecurse)
Deprecated, for removal: This API element is subject to removal in a future version.Exports the identified repository subtree as a document view XML stream.byte[]
exportSystemView(String path, boolean binaryAsLink, boolean noRecurse)
Deprecated, for removal: This API element is subject to removal in a future version.Exports the identified repository subtree as a system view XML stream.RemoteAccessControlManager
getAccessControlManager()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getAccessControlManager()
method.Object
getAttribute(String name)
Deprecated, for removal: This API element is subject to removal in a future version.Returns the named attribute.String[]
getAttributeNames()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getAttributeNames()
method.RemoteItem
getItem(String path)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getItem(String)
method.String[]
getLockTokens()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getLockTokens()
method.String
getNamespacePrefix(String uri)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNamespacePrefix(String)
method.String[]
getNamespacePrefixes()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNamespacePrefixes()
method.String
getNamespaceURI(String prefix)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNamespaceURI(String)
method.RemoteNode
getNode(String path)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNode(String)
method.RemoteNode
getNodeByIdentifier(String id)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNodeByIdentifier(String)
method.RemoteNode
getNodeByUUID(String uuid)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNodeByUUID(String)
method.RemoteProperty
getProperty(String path)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getProperty(String)
method.RemoteNode
getRootNode()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getRootNode()
method.String
getUserID()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getUserID()
method.RemoteWorkspace
getWorkspace()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getWorkspace()
method.boolean
hasPendingChanges()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.hasPendingChanges()
method.boolean
hasPermission(String path, String actions)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.hasPermission(String,String)
method.RemoteSession
impersonate(Credentials credentials)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.impersonate(Credentials)
method.void
importXML(String path, byte[] xml, int mode)
Deprecated, for removal: This API element is subject to removal in a future version.Imports the system or document view XML data into a subtree of the identified node.boolean
isLive()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.isLive()
method.boolean
itemExists(String path)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.itemExists(String)
method.void
logout()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.logout()
method.void
move(String from, String to)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.move(String,String)
method.boolean
nodeExists(String path)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.nodeExists(String)
method.boolean
propertyExists(String path)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.propertyExists(String)
method.void
refresh(boolean keepChanges)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.refresh(boolean)
method.void
removeItem(String path)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.removeItem(String)
method.void
removeLockToken(String token)
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.removeLockToken(String)
method.void
save()
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.save()
method.void
setNamespacePrefix(String prefix, String uri)
Deprecated, for removal: This API element is subject to removal in a future version.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, 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, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.Remote version of theSession.getUserID()
method.- Specified by:
getUserID
in interfaceRemoteSession
- Returns:
- user id
- Throws:
RemoteException
- on RMI errors- See Also:
Session.getUserID()
-
getAttribute
public Object getAttribute(String name) throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.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:
getAttribute
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.getAttributeNames()
method.- Specified by:
getAttributeNames
in interfaceRemoteSession
- Returns:
- attribute names
- Throws:
RemoteException
- on RMI errors
-
impersonate
public RemoteSession impersonate(Credentials credentials) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.impersonate(Credentials)
method.- Specified by:
impersonate
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.getWorkspace()
method.- Specified by:
getWorkspace
in interfaceRemoteSession
- Returns:
- workspace
- Throws:
RemoteException
- on RMI errors- See Also:
Session.getWorkspace()
-
hasPermission
public boolean hasPermission(String path, String actions) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.hasPermission(String,String)
method.- Specified by:
hasPermission
in interfaceRemoteSession
- Parameters:
path
- item pathactions
- actions- Returns:
true
if permission is granted,false
otherwise- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getNamespacePrefix
public String getNamespacePrefix(String uri) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNamespacePrefix(String)
method.- Specified by:
getNamespacePrefix
in interfaceRemoteSession
- Parameters:
uri
- namespace uri- Returns:
- namespace prefix
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getNamespacePrefixes
public String[] getNamespacePrefixes() throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNamespacePrefixes()
method.- Specified by:
getNamespacePrefixes
in interfaceRemoteSession
- Returns:
- namespace prefixes
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getNamespaceURI
public String getNamespaceURI(String prefix) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNamespaceURI(String)
method.- Specified by:
getNamespaceURI
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.setNamespacePrefix(String,String)
method.- Specified by:
setNamespacePrefix
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.itemExists(String)
method.- Specified by:
itemExists
in interfaceRemoteSession
- Parameters:
path
- item path- Returns:
true
if the item exists,false
otherwise- Throws:
RepositoryException
- on repository exceptionRemoteException
- on RMI errors
-
nodeExists
public boolean nodeExists(String path) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.nodeExists(String)
method.- Specified by:
nodeExists
in interfaceRemoteSession
- Parameters:
path
- node path- Returns:
true
if the node exists,false
otherwise- Throws:
RepositoryException
- on repository exceptionRemoteException
- on RMI errors
-
propertyExists
public boolean propertyExists(String path) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.propertyExists(String)
method.- Specified by:
propertyExists
in interfaceRemoteSession
- Parameters:
path
- property path- Returns:
true
if the property exists,false
otherwise- Throws:
RepositoryException
- on repository exceptionRemoteException
- on RMI errors
-
getNodeByIdentifier
public RemoteNode getNodeByIdentifier(String id) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNodeByIdentifier(String)
method.- Specified by:
getNodeByIdentifier
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNodeByUUID(String)
method.- Specified by:
getNodeByUUID
in interfaceRemoteSession
- Parameters:
uuid
- node uuid- Returns:
- node
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getRootNode
public RemoteNode getRootNode() throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getRootNode()
method.- Specified by:
getRootNode
in interfaceRemoteSession
- Returns:
- root node
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
getItem
public RemoteItem getItem(String path) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getItem(String)
method.- Specified by:
getItem
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.getNode(String)
method.- Specified by:
getNode
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.getProperty(String)
method.- Specified by:
getProperty
in interfaceRemoteSession
- Parameters:
path
- property path- Returns:
- property
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
hasPendingChanges
public boolean hasPendingChanges() throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.hasPendingChanges()
method.- Specified by:
hasPendingChanges
in interfaceRemoteSession
- Returns:
true
if the session has pending changes,false
otherwise- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
removeItem
public void removeItem(String path) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.removeItem(String)
method.- Specified by:
removeItem
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.move(String,String)
method.- Specified by:
move
in interfaceRemoteSession
- Parameters:
from
- source pathto
- destination path- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
save
public void save() throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.save()
method.- Specified by:
save
in interfaceRemoteSession
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
refresh
public void refresh(boolean keepChanges) throws RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.refresh(boolean)
method.- Specified by:
refresh
in interfaceRemoteSession
- Parameters:
keepChanges
- flag to keep transient changes- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors
-
logout
public void logout() throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.logout()
method.- Specified by:
logout
in interfaceRemoteSession
- Throws:
RemoteException
- on RMI errors
-
isLive
public boolean isLive() throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.isLive()
method.- Specified by:
isLive
in interfaceRemoteSession
- Returns:
true
if the session is live,false
otherwise- Throws:
RemoteException
- on RMI errors
-
importXML
public void importXML(String path, byte[] xml, int mode) throws IOException, RepositoryException, RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.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 aByteArrayInputStream
and feed it to the normal importXML method.- Specified by:
importXML
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.addLockToken(String)
method.- Specified by:
addLockToken
in interfaceRemoteSession
- Parameters:
token
- lock token- Throws:
RemoteException
- on RMI errors
-
getLockTokens
public String[] getLockTokens() throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.getLockTokens()
method.- Specified by:
getLockTokens
in interfaceRemoteSession
- Returns:
- lock tokens
- Throws:
RemoteException
- on RMI errors
-
removeLockToken
public void removeLockToken(String token) throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Remote version of theSession.removeLockToken(String)
method.- Specified by:
removeLockToken
in 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, for removal: This API element is subject to removal in a future version.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 aByteArrayOutputStream
to capture the XML data written by the normal exportDocView method.- Specified by:
exportDocumentView
in 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, for removal: This API element is subject to removal in a future version.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 aByteArrayOutputStream
to capture the XML data written by the normal exportSysView method.- Specified by:
exportSystemView
in 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, for removal: This API element is subject to removal in a future version.Remote version of theSession.getAccessControlManager()
method.- Specified by:
getAccessControlManager
in interfaceRemoteSession
- Throws:
UnsupportedRepositoryOperationException
- if the remote session does not support this methodRepositoryException
- if an error occurred getting the access control managerRemoteException
- on RMI errors
-
-