|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.commons.AbstractSession
public abstract class AbstractSession
Abstract base class for implementing the JCR Session interface.
| Constructor Summary | |
|---|---|
AbstractSession()
|
|
| Method Summary | |
|---|---|
void |
exportDocumentView(String absPath,
OutputStream out,
boolean skipBinary,
boolean noRecurse)
Calls Session.exportDocumentView(String, ContentHandler, boolean, boolean)
with the given arguments and a ContentHandler that serializes
SAX events to the given output stream. |
void |
exportSystemView(String absPath,
OutputStream out,
boolean skipBinary,
boolean noRecurse)
Calls Session.exportSystemView(String, ContentHandler, boolean, boolean)
with the given arguments and a ContentHandler that serializes
SAX events to the given output stream. |
Item |
getItem(String absPath)
Returns the node or property at the given path. |
Session |
impersonate(Credentials credentials)
Logs in the same workspace with the given credentials. |
void |
importXML(String parentAbsPath,
InputStream in,
int uuidBehavior)
Parses the given input stream as an XML document and processes the SAX events using the ContentHandler returned by
Session.getImportContentHandler(String, int). |
boolean |
itemExists(String absPath)
Calls getItem(String) with the given path and returns
true if the call succeeds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jcr.Session |
|---|
addLockToken, checkPermission, exportDocumentView, exportSystemView, getAttribute, getAttributeNames, getImportContentHandler, getLockTokens, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNodeByUUID, getRepository, getRootNode, getUserID, getValueFactory, getWorkspace, hasPendingChanges, isLive, logout, move, refresh, removeLockToken, save, setNamespacePrefix |
| Constructor Detail |
|---|
public AbstractSession()
| Method Detail |
|---|
public void exportDocumentView(String absPath,
OutputStream out,
boolean skipBinary,
boolean noRecurse)
throws IOException,
RepositoryException
Session.exportDocumentView(String, ContentHandler, boolean, boolean)
with the given arguments and a ContentHandler that serializes
SAX events to the given output stream.
exportDocumentView in interface SessionabsPath - passed throughout - output stream to which the SAX events are serializedskipBinary - passed throughnoRecurse - passed through
IOException - if the SAX serialization failed
RepositoryException - if another error occurs
public void exportSystemView(String absPath,
OutputStream out,
boolean skipBinary,
boolean noRecurse)
throws IOException,
RepositoryException
Session.exportSystemView(String, ContentHandler, boolean, boolean)
with the given arguments and a ContentHandler that serializes
SAX events to the given output stream.
exportSystemView in interface SessionabsPath - passed throughout - output stream to which the SAX events are serializedskipBinary - passed throughnoRecurse - passed through
IOException - if the SAX serialization failed
RepositoryException - if another error occurs
public void importXML(String parentAbsPath,
InputStream in,
int uuidBehavior)
throws IOException,
RepositoryException
ContentHandler returned by
Session.getImportContentHandler(String, int).
importXML in interface SessionparentAbsPath - passed throughin - input stream to be parsed as XML and importeduuidBehavior - passed through
IOException - if an I/O error occurs
RepositoryException - if another error occurs
public Item getItem(String absPath)
throws PathNotFoundException,
RepositoryException
The default implementation:
PathNotFoundException if the given path
does not start with a slash.
Node.getNode(String) on the root node with the
part of the given path after the first slash
Node.getProperty(String) similarly in case the
above call fails with a PathNotFoundException
getItem in interface SessionabsPath - absolute path
PathNotFoundException - if the given path is invalid or not found
RepositoryException - if another error occurs
public boolean itemExists(String absPath)
throws RepositoryException
getItem(String) with the given path and returns
true if the call succeeds. Returns false
if a PathNotFoundException was thrown. Other exceptions are
passed through.
itemExists in interface SessionabsPath - absolute path
true if an item exists at the given path,
false otherwise
RepositoryException - if an error occurs
public Session impersonate(Credentials credentials)
throws RepositoryException
The default implementation:
Repository instance using
Session.getRepository()
Session.getWorkspace()
Workspace#getName()
Repository#login(Credentials, String) on the
retrieved repository with the given credentials and the retrieved
workspace name.
impersonate in interface Sessioncredentials - login credentials
RepositoryException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||