public class ServerSession extends ServerObject implements RemoteSession
Session
interface.
This class makes a local session available as an RMI service using the
RemoteSession
interface.Session
,
RemoteSession
,
Serialized Formref
Constructor and Description |
---|
ServerSession(Session session,
RemoteAdapterFactory factory)
Creates a remote adapter for the given local session.
|
Modifier and Type | Method and Description |
---|---|
void |
addLockToken(String token)
Remote version of the
Session.addLockToken(String)
method. |
byte[] |
exportDocumentView(String path,
boolean binaryAsLink,
boolean noRecurse)
Exports the identified repository subtree as a document view XML
stream.
|
byte[] |
exportSystemView(String path,
boolean binaryAsLink,
boolean noRecurse)
Exports the identified repository subtree as a system view XML
stream.
|
RemoteAccessControlManager |
getAccessControlManager()
Remote version of the
Session.getAccessControlManager() method. |
Object |
getAttribute(String name)
Returns the named attribute.
|
String[] |
getAttributeNames()
Remote version of the
Session.getAttributeNames()
method. |
RemoteItem |
getItem(String path)
Remote version of the
Session.getItem(String)
method. |
String[] |
getLockTokens()
Remote version of the
Session.getLockTokens()
method. |
String |
getNamespacePrefix(String uri)
Remote version of the
Session.getNamespacePrefix(String)
method. |
String[] |
getNamespacePrefixes()
Remote version of the
Session.getNamespacePrefixes()
method. |
String |
getNamespaceURI(String prefix)
Remote version of the
Session.getNamespaceURI(String)
method. |
RemoteNode |
getNode(String path)
Remote version of the
Session.getNode(String)
method. |
RemoteNode |
getNodeByIdentifier(String id)
Remote version of the
Session.getNodeByIdentifier(String)
method. |
RemoteNode |
getNodeByUUID(String uuid)
Remote version of the
Session.getNodeByUUID(String)
method. |
RemoteProperty |
getProperty(String path)
Remote version of the
Session.getProperty(String)
method. |
RemoteNode |
getRootNode()
Remote version of the
Session.getRootNode() method. |
String |
getUserID()
Remote version of the
Session.getUserID() method. |
RemoteWorkspace |
getWorkspace()
Remote version of the
Session.getWorkspace() method. |
boolean |
hasPendingChanges()
Remote version of the
Session.hasPendingChanges()
method. |
boolean |
hasPermission(String path,
String actions)
Remote version of the
Session.hasPermission(String,String)
method. |
RemoteSession |
impersonate(Credentials credentials)
Remote version of the
Session.impersonate(Credentials)
method. |
void |
importXML(String path,
byte[] xml,
int mode)
Imports the system or document view XML data into a subtree of
the identified node.
|
boolean |
isLive()
Remote version of the
Session.isLive()
method. |
boolean |
itemExists(String path)
Remote version of the
Session.itemExists(String)
method. |
void |
logout()
Remote version of the
Session.logout()
method. |
void |
move(String from,
String to)
Remote version of the
Session.move(String,String)
method. |
boolean |
nodeExists(String path)
Remote version of the
Session.nodeExists(String)
method. |
boolean |
propertyExists(String path)
Remote version of the
Session.propertyExists(String)
method. |
void |
refresh(boolean keepChanges)
Remote version of the
Session.refresh(boolean)
method. |
void |
removeItem(String path)
Remote version of the
Session.removeItem(String)
method. |
void |
removeLockToken(String token)
Remote version of the
Session.removeLockToken(String)
method. |
void |
save()
Remote version of the
Session.save() method. |
void |
setNamespacePrefix(String prefix,
String uri)
Remote version of the
Session.setNamespacePrefix(String,String)
method. |
getFactory, getRemoteItem, getRemoteNode, getRemoteNodeTypeArray, getRepositoryException, getSerialValue, getSerialValues
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
public ServerSession(Session session, RemoteAdapterFactory factory) throws RemoteException
session
- local sessionfactory
- remote adapter factoryRemoteException
- on RMI errorspublic String getUserID() throws RemoteException
Session.getUserID()
method.getUserID
in interface RemoteSession
RemoteException
- on RMI errorsSession.getUserID()
public Object getAttribute(String name) throws RemoteException
getAttribute
in interface RemoteSession
name
- attribute nameRemoteException
- on RMI errorsSession.getAttribute(java.lang.String)
public String[] getAttributeNames() throws RemoteException
Session.getAttributeNames()
method.getAttributeNames
in interface RemoteSession
RemoteException
- on RMI errorspublic RemoteSession impersonate(Credentials credentials) throws RepositoryException, RemoteException
Session.impersonate(Credentials)
method.impersonate
in interface RemoteSession
credentials
- credentials for the new sessionRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic RemoteWorkspace getWorkspace() throws RemoteException
Session.getWorkspace()
method.getWorkspace
in interface RemoteSession
RemoteException
- on RMI errorsSession.getWorkspace()
public boolean hasPermission(String path, String actions) throws RepositoryException, RemoteException
Session.hasPermission(String,String)
method.hasPermission
in interface RemoteSession
path
- item pathactions
- actionstrue
if permission is granted,
false
otherwiseRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic String getNamespacePrefix(String uri) throws RepositoryException, RemoteException
Session.getNamespacePrefix(String)
method.getNamespacePrefix
in interface RemoteSession
uri
- namespace uriRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic String[] getNamespacePrefixes() throws RepositoryException, RemoteException
Session.getNamespacePrefixes()
method.getNamespacePrefixes
in interface RemoteSession
RepositoryException
- on repository errorsRemoteException
- on RMI errorspublic String getNamespaceURI(String prefix) throws RepositoryException, RemoteException
Session.getNamespaceURI(String)
method.getNamespaceURI
in interface RemoteSession
prefix
- namespace prefixRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic void setNamespacePrefix(String prefix, String uri) throws RepositoryException, RemoteException
Session.setNamespacePrefix(String,String)
method.setNamespacePrefix
in interface RemoteSession
prefix
- namespace prefixuri
- namespace uriRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic boolean itemExists(String path) throws RepositoryException, RemoteException
Session.itemExists(String)
method.itemExists
in interface RemoteSession
path
- item pathtrue
if the item exists,
false
otherwiseRepositoryException
- on repository exceptionRemoteException
- on RMI errorspublic boolean nodeExists(String path) throws RepositoryException, RemoteException
Session.nodeExists(String)
method.nodeExists
in interface RemoteSession
path
- node pathtrue
if the node exists,
false
otherwiseRepositoryException
- on repository exceptionRemoteException
- on RMI errorspublic boolean propertyExists(String path) throws RepositoryException, RemoteException
Session.propertyExists(String)
method.propertyExists
in interface RemoteSession
path
- property pathtrue
if the property exists,
false
otherwiseRepositoryException
- on repository exceptionRemoteException
- on RMI errorspublic RemoteNode getNodeByIdentifier(String id) throws RepositoryException, RemoteException
Session.getNodeByIdentifier(String)
method.getNodeByIdentifier
in interface RemoteSession
id
- node identifierRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic RemoteNode getNodeByUUID(String uuid) throws RepositoryException, RemoteException
Session.getNodeByUUID(String)
method.getNodeByUUID
in interface RemoteSession
uuid
- node uuidRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic RemoteNode getRootNode() throws RepositoryException, RemoteException
Session.getRootNode()
method.getRootNode
in interface RemoteSession
RepositoryException
- on repository errorsRemoteException
- on RMI errorspublic RemoteItem getItem(String path) throws RepositoryException, RemoteException
Session.getItem(String)
method.getItem
in interface RemoteSession
path
- item pathRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic RemoteNode getNode(String path) throws RepositoryException, RemoteException
Session.getNode(String)
method.getNode
in interface RemoteSession
path
- node pathRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic RemoteProperty getProperty(String path) throws RepositoryException, RemoteException
Session.getProperty(String)
method.getProperty
in interface RemoteSession
path
- property pathRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic boolean hasPendingChanges() throws RepositoryException, RemoteException
Session.hasPendingChanges()
method.hasPendingChanges
in interface RemoteSession
true
if the session has pending changes,
false
otherwiseRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic void removeItem(String path) throws RepositoryException, RemoteException
Session.removeItem(String)
method.removeItem
in interface RemoteSession
path
- item pathRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic void move(String from, String to) throws RepositoryException, RemoteException
Session.move(String,String)
method.move
in interface RemoteSession
from
- source pathto
- destination pathRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic void save() throws RepositoryException, RemoteException
Session.save()
method.save
in interface RemoteSession
RepositoryException
- on repository errorsRemoteException
- on RMI errorspublic void refresh(boolean keepChanges) throws RepositoryException, RemoteException
Session.refresh(boolean)
method.refresh
in interface RemoteSession
keepChanges
- flag to keep transient changesRepositoryException
- on repository errorsRemoteException
- on RMI errorspublic void logout() throws RemoteException
Session.logout()
method.logout
in interface RemoteSession
RemoteException
- on RMI errorspublic boolean isLive() throws RemoteException
Session.isLive()
method.isLive
in interface RemoteSession
true
if the session is live,
false
otherwiseRemoteException
- on RMI errorspublic void importXML(String path, byte[] xml, int mode) throws IOException, RepositoryException, RemoteException
ByteArrayInputStream
and feed
it to the normal importXML method.importXML
in interface RemoteSession
path
- node pathxml
- imported XML documentmode
- UUID handling modeIOException
- on IO errorsRemoteException
- on RMI errorsRepositoryException
- on repository errorsSession.importXML(java.lang.String, java.io.InputStream, int)
public void addLockToken(String token) throws RemoteException
Session.addLockToken(String)
method.addLockToken
in interface RemoteSession
token
- lock tokenRemoteException
- on RMI errorspublic String[] getLockTokens() throws RemoteException
Session.getLockTokens()
method.getLockTokens
in interface RemoteSession
RemoteException
- on RMI errorspublic void removeLockToken(String token) throws RemoteException
Session.removeLockToken(String)
method.removeLockToken
in interface RemoteSession
token
- lock tokenRemoteException
- on RMI errorspublic byte[] exportDocumentView(String path, boolean binaryAsLink, boolean noRecurse) throws IOException, RepositoryException, RemoteException
ByteArrayOutputStream
to capture
the XML data written by the normal exportDocView method.exportDocumentView
in interface RemoteSession
path
- node pathbinaryAsLink
- skip binary flagnoRecurse
- no recursion flagIOException
- on IO errorsRemoteException
- on RMI errorsRepositoryException
- on repository errorsSession.exportDocumentView(java.lang.String, org.xml.sax.ContentHandler, boolean, boolean)
public byte[] exportSystemView(String path, boolean binaryAsLink, boolean noRecurse) throws IOException, RepositoryException, RemoteException
ByteArrayOutputStream
to capture
the XML data written by the normal exportSysView method.exportSystemView
in interface RemoteSession
path
- node pathbinaryAsLink
- binary skip flagnoRecurse
- no recursion flagIOException
- on IO errorsRemoteException
- on RMI errorsRepositoryException
- on repository errorsSession.exportSystemView(java.lang.String, org.xml.sax.ContentHandler, boolean, boolean)
public RemoteAccessControlManager getAccessControlManager() throws UnsupportedRepositoryOperationException, RepositoryException, RemoteException
Session.getAccessControlManager()
method.getAccessControlManager
in interface RemoteSession
UnsupportedRepositoryOperationException
- if the remote session
does not support this methodRepositoryException
- if an error occurred getting the access
control managerRemoteException
- on RMI errorsCopyright © 2004–2021 The Apache Software Foundation. All rights reserved.