public class ClientSession extends ClientObject implements 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.
|
ACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTY| Constructor and Description |
|---|
ClientSession(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.
|
AccessControlManager |
getAccessControlManager() |
Object |
getAttribute(String name) |
String[] |
getAttributeNames() |
ContentHandler |
getImportContentHandler(String path,
int mode) |
Item |
getItem(String path) |
String[] |
getLockTokens() |
String |
getNamespacePrefix(String uri) |
String[] |
getNamespacePrefixes() |
String |
getNamespaceURI(String prefix) |
Node |
getNode(String path) |
Node |
getNodeByIdentifier(String id) |
Node |
getNodeByUUID(String uuid) |
Property |
getProperty(String path) |
Repository |
getRepository()
Returns the current repository without contacting the remote session.
|
RetentionManager |
getRetentionManager() |
Node |
getRootNode() |
String |
getUserID() |
ValueFactory |
getValueFactory()
Returns the
SerialValueFactory.getInstance(). |
Workspace |
getWorkspace() |
boolean |
hasCapability(String methodName,
Object target,
Object[] arguments) |
boolean |
hasPendingChanges() |
boolean |
hasPermission(String path,
String actions) |
Session |
impersonate(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(Repository repository, RemoteSession remote, LocalAdapterFactory factory)
repository - current repositoryremote - remote repositoryfactory - local adapter factorypublic Repository getRepository()
getRepository in interface Sessionpublic Object getAttribute(String name)
getAttribute in interface Sessionpublic String[] getAttributeNames()
getAttributeNames in interface Sessionpublic Workspace getWorkspace()
getWorkspace in interface Sessionpublic Session impersonate(Credentials credentials) throws RepositoryException
impersonate in interface SessionRepositoryExceptionpublic Node getRootNode() throws RepositoryException
getRootNode in interface SessionRepositoryExceptionpublic Node getNodeByIdentifier(String id) throws RepositoryException
getNodeByIdentifier in interface SessionRepositoryExceptionpublic Node getNodeByUUID(String uuid) throws RepositoryException
getNodeByUUID in interface SessionRepositoryExceptionpublic Item getItem(String path) throws RepositoryException
getItem in interface SessionRepositoryExceptionpublic Node getNode(String path) throws RepositoryException
getNode in interface SessionRepositoryExceptionpublic Property getProperty(String path) throws RepositoryException
getProperty in interface SessionRepositoryExceptionpublic boolean itemExists(String path) throws RepositoryException
itemExists in interface SessionRepositoryExceptionpublic boolean nodeExists(String path) throws RepositoryException
nodeExists in interface SessionRepositoryExceptionpublic boolean propertyExists(String path) throws RepositoryException
propertyExists in interface SessionRepositoryExceptionpublic void removeItem(String path) throws RepositoryException
removeItem in interface SessionRepositoryExceptionpublic void move(String from, String to) throws RepositoryException
move in interface SessionRepositoryExceptionpublic void save()
throws RepositoryException
save in interface SessionRepositoryExceptionpublic void refresh(boolean keepChanges)
throws RepositoryException
refresh in interface SessionRepositoryExceptionpublic boolean hasPendingChanges()
throws RepositoryException
hasPendingChanges in interface SessionRepositoryExceptionpublic ValueFactory getValueFactory()
SerialValueFactory.getInstance().
getValueFactory in interface Sessionpublic void checkPermission(String path, String actions) throws AccessControlException, RepositoryException
checkPermission in interface SessionAccessControlExceptionRepositoryExceptionpublic boolean hasPermission(String path, String actions) throws RepositoryException
hasPermission in interface SessionRepositoryExceptionpublic void importXML(String path, InputStream xml, int mode) throws IOException, RepositoryException
importXML in interface SessionIOExceptionRepositoryExceptionpublic ContentHandler getImportContentHandler(String path, int mode) throws RepositoryException
getImportContentHandler in interface SessionRepositoryExceptionpublic void setNamespacePrefix(String prefix, String uri) throws RepositoryException
setNamespacePrefix in interface SessionRepositoryExceptionpublic String[] getNamespacePrefixes() throws RepositoryException
getNamespacePrefixes in interface SessionRepositoryExceptionpublic String getNamespaceURI(String prefix) throws RepositoryException
getNamespaceURI in interface SessionRepositoryExceptionpublic String getNamespacePrefix(String uri) throws RepositoryException
getNamespacePrefix in interface SessionRepositoryExceptionpublic void addLockToken(String name)
addLockToken in interface Sessionpublic String[] getLockTokens()
getLockTokens in interface Sessionpublic void removeLockToken(String name)
removeLockToken in interface Sessionpublic void exportSystemView(String path, ContentHandler handler, boolean binaryAsLink, boolean noRecurse) throws SAXException, RepositoryException
exportSystemView in interface SessionSAXExceptionRepositoryExceptionpublic void exportSystemView(String path, OutputStream output, boolean binaryAsLink, boolean noRecurse) throws IOException, RepositoryException
exportSystemView in interface SessionIOExceptionRepositoryExceptionpublic void exportDocumentView(String path, ContentHandler handler, boolean binaryAsLink, boolean noRecurse) throws SAXException, RepositoryException
exportDocumentView in interface SessionSAXExceptionRepositoryExceptionpublic void exportDocumentView(String path, OutputStream output, boolean binaryAsLink, boolean noRecurse) throws IOException, RepositoryException
exportDocumentView in interface SessionIOExceptionRepositoryExceptionpublic AccessControlManager getAccessControlManager() throws UnsupportedRepositoryOperationException, RepositoryException
getAccessControlManager in interface SessionUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic RetentionManager getRetentionManager() throws RepositoryException
getRetentionManager in interface SessionRepositoryExceptionpublic boolean hasCapability(String methodName, Object target, Object[] arguments) throws RepositoryException
hasCapability in interface SessionRepositoryExceptionCopyright © 2004–2020 The Apache Software Foundation. All rights reserved.