public class ClientSession extends ClientObject implements javax.jcr.Session
RemoteSession
interface. This class makes a remote session locally available using
the JCR Session interface.Session,
RemoteSession| Modifier and Type | Field and Description |
|---|---|
protected RemoteSession |
remote
The adapted remote session.
|
| Constructor and Description |
|---|
ClientSession(javax.jcr.Repository repository,
RemoteSession remote,
LocalAdapterFactory factory)
Creates a client adapter for the given remote session.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLockToken(String name) |
void |
checkPermission(String path,
String actions) |
void |
exportDocumentView(String path,
ContentHandler handler,
boolean binaryAsLink,
boolean noRecurse)
Exports the XML document view of the specified repository location
to the given XML content handler.
|
void |
exportDocumentView(String path,
OutputStream output,
boolean binaryAsLink,
boolean noRecurse)
Exports the XML document view of the specified repository location
to the given output stream.
|
void |
exportSystemView(String path,
ContentHandler handler,
boolean binaryAsLink,
boolean noRecurse)
Exports the XML system view of the specified repository location
to the given XML content handler.
|
void |
exportSystemView(String path,
OutputStream output,
boolean binaryAsLink,
boolean noRecurse)
Exports the XML system view of the specified repository location
to the given output stream.
|
javax.jcr.security.AccessControlManager |
getAccessControlManager() |
Object |
getAttribute(String name) |
String[] |
getAttributeNames() |
ContentHandler |
getImportContentHandler(String path,
int mode) |
javax.jcr.Item |
getItem(String path) |
String[] |
getLockTokens() |
String |
getNamespacePrefix(String uri) |
String[] |
getNamespacePrefixes() |
String |
getNamespaceURI(String prefix) |
javax.jcr.Node |
getNode(String path) |
javax.jcr.Node |
getNodeByIdentifier(String id) |
javax.jcr.Node |
getNodeByUUID(String uuid) |
javax.jcr.Property |
getProperty(String path) |
javax.jcr.Repository |
getRepository()
Returns the current repository without contacting the remote session.
|
javax.jcr.retention.RetentionManager |
getRetentionManager() |
javax.jcr.Node |
getRootNode() |
String |
getUserID() |
javax.jcr.ValueFactory |
getValueFactory()
Returns the
SerialValueFactory.getInstance(). |
javax.jcr.Workspace |
getWorkspace() |
boolean |
hasCapability(String methodName,
Object target,
Object[] arguments) |
boolean |
hasPendingChanges() |
boolean |
hasPermission(String path,
String actions) |
javax.jcr.Session |
impersonate(javax.jcr.Credentials credentials) |
void |
importXML(String path,
InputStream xml,
int mode) |
boolean |
isLive() |
boolean |
itemExists(String path) |
void |
logout() |
void |
move(String from,
String to) |
boolean |
nodeExists(String path) |
boolean |
propertyExists(String path) |
void |
refresh(boolean keepChanges) |
void |
removeItem(String path) |
void |
removeLockToken(String name) |
void |
save() |
void |
setNamespacePrefix(String prefix,
String uri) |
getFactory, getItem, getNode, getNodeTypeArrayprotected final RemoteSession remote
public ClientSession(javax.jcr.Repository repository,
RemoteSession remote,
LocalAdapterFactory factory)
repository - current repositoryremote - remote repositoryfactory - local adapter factorypublic javax.jcr.Repository getRepository()
getRepository in interface javax.jcr.Sessionpublic String getUserID()
getUserID in interface javax.jcr.Sessionpublic Object getAttribute(String name)
getAttribute in interface javax.jcr.Sessionpublic String[] getAttributeNames()
getAttributeNames in interface javax.jcr.Sessionpublic javax.jcr.Workspace getWorkspace()
getWorkspace in interface javax.jcr.Sessionpublic javax.jcr.Session impersonate(javax.jcr.Credentials credentials)
throws javax.jcr.RepositoryException
impersonate in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic javax.jcr.Node getRootNode()
throws javax.jcr.RepositoryException
getRootNode in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic javax.jcr.Node getNodeByIdentifier(String id) throws javax.jcr.RepositoryException
getNodeByIdentifier in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic javax.jcr.Node getNodeByUUID(String uuid) throws javax.jcr.RepositoryException
getNodeByUUID in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic javax.jcr.Item getItem(String path) throws javax.jcr.RepositoryException
getItem in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic javax.jcr.Node getNode(String path) throws javax.jcr.RepositoryException
getNode in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property getProperty(String path) throws javax.jcr.RepositoryException
getProperty in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic boolean itemExists(String path) throws javax.jcr.RepositoryException
itemExists in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic boolean nodeExists(String path) throws javax.jcr.RepositoryException
nodeExists in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic boolean propertyExists(String path) throws javax.jcr.RepositoryException
propertyExists in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic void removeItem(String path) throws javax.jcr.RepositoryException
removeItem in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic void move(String from, String to) throws javax.jcr.RepositoryException
move in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic void save()
throws javax.jcr.RepositoryException
save in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic void refresh(boolean keepChanges)
throws javax.jcr.RepositoryException
refresh in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic boolean hasPendingChanges()
throws javax.jcr.RepositoryException
hasPendingChanges in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic javax.jcr.ValueFactory getValueFactory()
SerialValueFactory.getInstance().
getValueFactory in interface javax.jcr.Sessionpublic void checkPermission(String path, String actions) throws AccessControlException, javax.jcr.RepositoryException
checkPermission in interface javax.jcr.SessionAccessControlExceptionjavax.jcr.RepositoryExceptionpublic boolean hasPermission(String path, String actions) throws javax.jcr.RepositoryException
hasPermission in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic void importXML(String path, InputStream xml, int mode) throws IOException, javax.jcr.RepositoryException
importXML in interface javax.jcr.SessionIOExceptionjavax.jcr.RepositoryExceptionpublic ContentHandler getImportContentHandler(String path, int mode) throws javax.jcr.RepositoryException
getImportContentHandler in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic void setNamespacePrefix(String prefix, String uri) throws javax.jcr.RepositoryException
setNamespacePrefix in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic String[] getNamespacePrefixes() throws javax.jcr.RepositoryException
getNamespacePrefixes in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic String getNamespaceURI(String prefix) throws javax.jcr.RepositoryException
getNamespaceURI in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic String getNamespacePrefix(String uri) throws javax.jcr.RepositoryException
getNamespacePrefix in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionpublic void logout()
logout in interface javax.jcr.Sessionpublic void addLockToken(String name)
addLockToken in interface javax.jcr.Sessionpublic String[] getLockTokens()
getLockTokens in interface javax.jcr.Sessionpublic void removeLockToken(String name)
removeLockToken in interface javax.jcr.Sessionpublic void exportSystemView(String path, ContentHandler handler, boolean binaryAsLink, boolean noRecurse) throws SAXException, javax.jcr.RepositoryException
exportSystemView in interface javax.jcr.SessionSAXExceptionjavax.jcr.RepositoryExceptionpublic void exportSystemView(String path, OutputStream output, boolean binaryAsLink, boolean noRecurse) throws IOException, javax.jcr.RepositoryException
exportSystemView in interface javax.jcr.SessionIOExceptionjavax.jcr.RepositoryExceptionpublic void exportDocumentView(String path, ContentHandler handler, boolean binaryAsLink, boolean noRecurse) throws SAXException, javax.jcr.RepositoryException
exportDocumentView in interface javax.jcr.SessionSAXExceptionjavax.jcr.RepositoryExceptionpublic void exportDocumentView(String path, OutputStream output, boolean binaryAsLink, boolean noRecurse) throws IOException, javax.jcr.RepositoryException
exportDocumentView in interface javax.jcr.SessionIOExceptionjavax.jcr.RepositoryExceptionpublic boolean isLive()
isLive in interface javax.jcr.Sessionpublic javax.jcr.security.AccessControlManager getAccessControlManager()
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
getAccessControlManager in interface javax.jcr.Sessionjavax.jcr.UnsupportedRepositoryOperationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.retention.RetentionManager getRetentionManager()
throws javax.jcr.RepositoryException
getRetentionManager in interface javax.jcr.Sessionjavax.jcr.RepositoryExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.