public class ServerSession extends ServerObject implements RemoteSession
Session interface.
This class makes a local session available as an RMI service using the
RemoteSession
interface.javax.jcr.Session,
RemoteSession,
Serialized Form| 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(java.lang.String token)
Remote version of the
Session.addLockToken(String)
method. |
byte[] |
exportDocumentView(java.lang.String path,
boolean binaryAsLink,
boolean noRecurse)
Exports the identified repository subtree as a document view XML
stream.
|
byte[] |
exportSystemView(java.lang.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. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the named attribute.
|
java.lang.String[] |
getAttributeNames()
Remote version of the
Session.getAttributeNames()
method. |
RemoteItem |
getItem(java.lang.String path)
Remote version of the
Session.getItem(String)
method. |
java.lang.String[] |
getLockTokens()
Remote version of the
Session.getLockTokens()
method. |
java.lang.String |
getNamespacePrefix(java.lang.String uri)
Remote version of the
Session.getNamespacePrefix(String)
method. |
java.lang.String[] |
getNamespacePrefixes()
Remote version of the
Session.getNamespacePrefixes()
method. |
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Remote version of the
Session.getNamespaceURI(String)
method. |
RemoteNode |
getNode(java.lang.String path)
Remote version of the
Session.getNode(String)
method. |
RemoteNode |
getNodeByIdentifier(java.lang.String id)
Remote version of the
Session.getNodeByIdentifier(String)
method. |
RemoteNode |
getNodeByUUID(java.lang.String uuid)
Remote version of the
Session.getNodeByUUID(String)
method. |
RemoteProperty |
getProperty(java.lang.String path)
Remote version of the
Session.getProperty(String)
method. |
RemoteNode |
getRootNode()
Remote version of the
Session.getRootNode() method. |
java.lang.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(java.lang.String path,
java.lang.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(java.lang.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(java.lang.String path)
Remote version of the
Session.itemExists(String)
method. |
void |
logout()
Remote version of the
Session.logout()
method. |
void |
move(java.lang.String from,
java.lang.String to)
Remote version of the
Session.move(String,String)
method. |
boolean |
nodeExists(java.lang.String path)
Remote version of the
Session.nodeExists(String)
method. |
boolean |
propertyExists(java.lang.String path)
Remote version of the
Session.propertyExists(String)
method. |
void |
refresh(boolean keepChanges)
Remote version of the
Session.refresh(boolean)
method. |
void |
removeItem(java.lang.String path)
Remote version of the
Session.removeItem(String)
method. |
void |
removeLockToken(java.lang.String token)
Remote version of the
Session.removeLockToken(String)
method. |
void |
save()
Remote version of the
Session.save() method. |
void |
setNamespacePrefix(java.lang.String prefix,
java.lang.String uri)
Remote version of the
Session.setNamespacePrefix(String,String)
method. |
clone, exportObject, exportObject, exportObject, unexportObjectpublic ServerSession(Session session,
RemoteAdapterFactory factory)
throws java.rmi.RemoteException
session - local sessionfactory - remote adapter factoryjava.rmi.RemoteException - on RMI errorspublic java.lang.String getUserID()
throws java.rmi.RemoteException
Session.getUserID() method.getUserID in interface RemoteSessionjava.rmi.RemoteException - on RMI errorsjavax.jcr.Session#getUserID()public java.lang.Object getAttribute(java.lang.String name)
throws java.rmi.RemoteException
getAttribute in interface RemoteSessionname - attribute namejava.rmi.RemoteException - on RMI errorsjavax.jcr.Session#getAttribute(java.lang.String)public java.lang.String[] getAttributeNames()
throws java.rmi.RemoteException
Session.getAttributeNames()
method.getAttributeNames in interface RemoteSessionjava.rmi.RemoteException - on RMI errorspublic RemoteSession impersonate(Credentials credentials) throws RepositoryException, java.rmi.RemoteException
Session.impersonate(Credentials)
method.impersonate in interface RemoteSessioncredentials - credentials for the new sessionRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic RemoteWorkspace getWorkspace() throws java.rmi.RemoteException
Session.getWorkspace() method.getWorkspace in interface RemoteSessionjava.rmi.RemoteException - on RMI errorsjavax.jcr.Session#getWorkspace()public boolean hasPermission(java.lang.String path,
java.lang.String actions)
throws RepositoryException,
java.rmi.RemoteException
Session.hasPermission(String,String)
method.hasPermission in interface RemoteSessionpath - item pathactions - actionstrue if permission is granted,
false otherwiseRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic java.lang.String getNamespacePrefix(java.lang.String uri)
throws RepositoryException,
java.rmi.RemoteException
Session.getNamespacePrefix(String)
method.getNamespacePrefix in interface RemoteSessionuri - namespace uriRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic java.lang.String[] getNamespacePrefixes()
throws RepositoryException,
java.rmi.RemoteException
Session.getNamespacePrefixes()
method.getNamespacePrefixes in interface RemoteSessionRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic java.lang.String getNamespaceURI(java.lang.String prefix)
throws RepositoryException,
java.rmi.RemoteException
Session.getNamespaceURI(String)
method.getNamespaceURI in interface RemoteSessionprefix - namespace prefixRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic void setNamespacePrefix(java.lang.String prefix,
java.lang.String uri)
throws RepositoryException,
java.rmi.RemoteException
Session.setNamespacePrefix(String,String)
method.setNamespacePrefix in interface RemoteSessionprefix - namespace prefixuri - namespace uriRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic boolean itemExists(java.lang.String path)
throws RepositoryException,
java.rmi.RemoteException
Session.itemExists(String)
method.itemExists in interface RemoteSessionpath - item pathtrue if the item exists,
false otherwiseRepositoryException - on repository exceptionjava.rmi.RemoteException - on RMI errorspublic boolean nodeExists(java.lang.String path)
throws RepositoryException,
java.rmi.RemoteException
Session.nodeExists(String)
method.nodeExists in interface RemoteSessionpath - node pathtrue if the node exists,
false otherwiseRepositoryException - on repository exceptionjava.rmi.RemoteException - on RMI errorspublic boolean propertyExists(java.lang.String path)
throws RepositoryException,
java.rmi.RemoteException
Session.propertyExists(String)
method.propertyExists in interface RemoteSessionpath - property pathtrue if the property exists,
false otherwiseRepositoryException - on repository exceptionjava.rmi.RemoteException - on RMI errorspublic RemoteNode getNodeByIdentifier(java.lang.String id) throws RepositoryException, java.rmi.RemoteException
Session.getNodeByIdentifier(String)
method.getNodeByIdentifier in interface RemoteSessionid - node identifierRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic RemoteNode getNodeByUUID(java.lang.String uuid) throws RepositoryException, java.rmi.RemoteException
Session.getNodeByUUID(String)
method.getNodeByUUID in interface RemoteSessionuuid - node uuidRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic RemoteNode getRootNode() throws RepositoryException, java.rmi.RemoteException
Session.getRootNode() method.getRootNode in interface RemoteSessionRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic RemoteItem getItem(java.lang.String path) throws RepositoryException, java.rmi.RemoteException
Session.getItem(String)
method.getItem in interface RemoteSessionpath - item pathRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic RemoteNode getNode(java.lang.String path) throws RepositoryException, java.rmi.RemoteException
Session.getNode(String)
method.getNode in interface RemoteSessionpath - node pathRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic RemoteProperty getProperty(java.lang.String path) throws RepositoryException, java.rmi.RemoteException
Session.getProperty(String)
method.getProperty in interface RemoteSessionpath - property pathRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic boolean hasPendingChanges()
throws RepositoryException,
java.rmi.RemoteException
Session.hasPendingChanges()
method.hasPendingChanges in interface RemoteSessiontrue if the session has pending changes,
false otherwiseRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic void removeItem(java.lang.String path)
throws RepositoryException,
java.rmi.RemoteException
Session.removeItem(String)
method.removeItem in interface RemoteSessionpath - item pathRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic void move(java.lang.String from,
java.lang.String to)
throws RepositoryException,
java.rmi.RemoteException
Session.move(String,String)
method.move in interface RemoteSessionfrom - source pathto - destination pathRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic void save()
throws RepositoryException,
java.rmi.RemoteException
Session.save() method.save in interface RemoteSessionRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic void refresh(boolean keepChanges)
throws RepositoryException,
java.rmi.RemoteException
Session.refresh(boolean)
method.refresh in interface RemoteSessionkeepChanges - flag to keep transient changesRepositoryException - on repository errorsjava.rmi.RemoteException - on RMI errorspublic void logout()
throws java.rmi.RemoteException
Session.logout()
method.logout in interface RemoteSessionjava.rmi.RemoteException - on RMI errorspublic boolean isLive()
throws java.rmi.RemoteException
Session.isLive()
method.isLive in interface RemoteSessiontrue if the session is live,
false otherwisejava.rmi.RemoteException - on RMI errorspublic void importXML(java.lang.String path,
byte[] xml,
int mode)
throws java.io.IOException,
RepositoryException,
java.rmi.RemoteException
ByteArrayInputStream and feed
it to the normal importXML method.importXML in interface RemoteSessionpath - node pathxml - imported XML documentmode - UUID handling modejava.io.IOException - on IO errorsjava.rmi.RemoteException - on RMI errorsRepositoryException - on repository errorsjavax.jcr.Session#importXML(java.lang.String, java.io.InputStream, int)public void addLockToken(java.lang.String token)
throws java.rmi.RemoteException
Session.addLockToken(String)
method.addLockToken in interface RemoteSessiontoken - lock tokenjava.rmi.RemoteException - on RMI errorspublic java.lang.String[] getLockTokens()
throws java.rmi.RemoteException
Session.getLockTokens()
method.getLockTokens in interface RemoteSessionjava.rmi.RemoteException - on RMI errorspublic void removeLockToken(java.lang.String token)
throws java.rmi.RemoteException
Session.removeLockToken(String)
method.removeLockToken in interface RemoteSessiontoken - lock tokenjava.rmi.RemoteException - on RMI errorspublic byte[] exportDocumentView(java.lang.String path,
boolean binaryAsLink,
boolean noRecurse)
throws java.io.IOException,
RepositoryException,
java.rmi.RemoteException
ByteArrayOutputStream to capture
the XML data written by the normal exportDocView method.exportDocumentView in interface RemoteSessionpath - node pathbinaryAsLink - skip binary flagnoRecurse - no recursion flagjava.io.IOException - on IO errorsjava.rmi.RemoteException - on RMI errorsRepositoryException - on repository errorsjavax.jcr.Session#exportDocumentViewpublic byte[] exportSystemView(java.lang.String path,
boolean binaryAsLink,
boolean noRecurse)
throws java.io.IOException,
RepositoryException,
java.rmi.RemoteException
ByteArrayOutputStream to capture
the XML data written by the normal exportSysView method.exportSystemView in interface RemoteSessionpath - node pathbinaryAsLink - binary skip flagnoRecurse - no recursion flagjava.io.IOException - on IO errorsjava.rmi.RemoteException - on RMI errorsRepositoryException - on repository errorsjavax.jcr.Session#exportSystemViewpublic RemoteAccessControlManager getAccessControlManager() throws UnsupportedRepositoryOperationException, RepositoryException, java.rmi.RemoteException
Session.getAccessControlManager() method.getAccessControlManager in interface RemoteSessionUnsupportedRepositoryOperationException - if the remote session
does not support this methodRepositoryException - if an error occurred getting the access
control managerjava.rmi.RemoteException - on RMI errors"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"