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, getNodeTypeArray
protected 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.Session
public String getUserID()
getUserID
in interface javax.jcr.Session
public Object getAttribute(String name)
getAttribute
in interface javax.jcr.Session
public String[] getAttributeNames()
getAttributeNames
in interface javax.jcr.Session
public javax.jcr.Workspace getWorkspace()
getWorkspace
in interface javax.jcr.Session
public javax.jcr.Session impersonate(javax.jcr.Credentials credentials) throws javax.jcr.RepositoryException
impersonate
in interface javax.jcr.Session
javax.jcr.RepositoryException
public javax.jcr.Node getRootNode() throws javax.jcr.RepositoryException
getRootNode
in interface javax.jcr.Session
javax.jcr.RepositoryException
public javax.jcr.Node getNodeByIdentifier(String id) throws javax.jcr.RepositoryException
getNodeByIdentifier
in interface javax.jcr.Session
javax.jcr.RepositoryException
public javax.jcr.Node getNodeByUUID(String uuid) throws javax.jcr.RepositoryException
getNodeByUUID
in interface javax.jcr.Session
javax.jcr.RepositoryException
public javax.jcr.Item getItem(String path) throws javax.jcr.RepositoryException
getItem
in interface javax.jcr.Session
javax.jcr.RepositoryException
public javax.jcr.Node getNode(String path) throws javax.jcr.RepositoryException
getNode
in interface javax.jcr.Session
javax.jcr.RepositoryException
public javax.jcr.Property getProperty(String path) throws javax.jcr.RepositoryException
getProperty
in interface javax.jcr.Session
javax.jcr.RepositoryException
public boolean itemExists(String path) throws javax.jcr.RepositoryException
itemExists
in interface javax.jcr.Session
javax.jcr.RepositoryException
public boolean nodeExists(String path) throws javax.jcr.RepositoryException
nodeExists
in interface javax.jcr.Session
javax.jcr.RepositoryException
public boolean propertyExists(String path) throws javax.jcr.RepositoryException
propertyExists
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void removeItem(String path) throws javax.jcr.RepositoryException
removeItem
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void move(String from, String to) throws javax.jcr.RepositoryException
move
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void save() throws javax.jcr.RepositoryException
save
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
refresh
in interface javax.jcr.Session
javax.jcr.RepositoryException
public boolean hasPendingChanges() throws javax.jcr.RepositoryException
hasPendingChanges
in interface javax.jcr.Session
javax.jcr.RepositoryException
public javax.jcr.ValueFactory getValueFactory()
SerialValueFactory.getInstance()
.
getValueFactory
in interface javax.jcr.Session
public void checkPermission(String path, String actions) throws AccessControlException, javax.jcr.RepositoryException
checkPermission
in interface javax.jcr.Session
AccessControlException
javax.jcr.RepositoryException
public boolean hasPermission(String path, String actions) throws javax.jcr.RepositoryException
hasPermission
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void importXML(String path, InputStream xml, int mode) throws IOException, javax.jcr.RepositoryException
importXML
in interface javax.jcr.Session
IOException
javax.jcr.RepositoryException
public ContentHandler getImportContentHandler(String path, int mode) throws javax.jcr.RepositoryException
getImportContentHandler
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void setNamespacePrefix(String prefix, String uri) throws javax.jcr.RepositoryException
setNamespacePrefix
in interface javax.jcr.Session
javax.jcr.RepositoryException
public String[] getNamespacePrefixes() throws javax.jcr.RepositoryException
getNamespacePrefixes
in interface javax.jcr.Session
javax.jcr.RepositoryException
public String getNamespaceURI(String prefix) throws javax.jcr.RepositoryException
getNamespaceURI
in interface javax.jcr.Session
javax.jcr.RepositoryException
public String getNamespacePrefix(String uri) throws javax.jcr.RepositoryException
getNamespacePrefix
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void logout()
logout
in interface javax.jcr.Session
public void addLockToken(String name)
addLockToken
in interface javax.jcr.Session
public String[] getLockTokens()
getLockTokens
in interface javax.jcr.Session
public void removeLockToken(String name)
removeLockToken
in interface javax.jcr.Session
public void exportSystemView(String path, ContentHandler handler, boolean binaryAsLink, boolean noRecurse) throws SAXException, javax.jcr.RepositoryException
exportSystemView
in interface javax.jcr.Session
SAXException
javax.jcr.RepositoryException
public void exportSystemView(String path, OutputStream output, boolean binaryAsLink, boolean noRecurse) throws IOException, javax.jcr.RepositoryException
exportSystemView
in interface javax.jcr.Session
IOException
javax.jcr.RepositoryException
public void exportDocumentView(String path, ContentHandler handler, boolean binaryAsLink, boolean noRecurse) throws SAXException, javax.jcr.RepositoryException
exportDocumentView
in interface javax.jcr.Session
SAXException
javax.jcr.RepositoryException
public void exportDocumentView(String path, OutputStream output, boolean binaryAsLink, boolean noRecurse) throws IOException, javax.jcr.RepositoryException
exportDocumentView
in interface javax.jcr.Session
IOException
javax.jcr.RepositoryException
public boolean isLive()
isLive
in interface javax.jcr.Session
public javax.jcr.security.AccessControlManager getAccessControlManager() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
getAccessControlManager
in interface javax.jcr.Session
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
public javax.jcr.retention.RetentionManager getRetentionManager() throws javax.jcr.RepositoryException
getRetentionManager
in interface javax.jcr.Session
javax.jcr.RepositoryException
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.