public interface HippoSession
extends javax.jcr.Session
Session
based session. Any session as obtained from the Hippo Repository 2 can be cased to
a HippoSession allowing access to the extensions to the JCR API.Modifier and Type | Field and Description |
---|---|
static String |
NO_SYSTEM_IMPERSONATION
Deprecated.
this attribute name and usage will be removed again when the limitation as described above has been fixed.
|
Modifier and Type | Method and Description |
---|---|
javax.jcr.Node |
copy(javax.jcr.Node srcNode,
String destAbsNodePath)
Deprecated.
Use
JcrUtils.copy(javax.jcr.Session, String, String) instead |
javax.jcr.Session |
createSecurityDelegate(javax.jcr.Session session,
DomainRuleExtension... domainExtensions)
Create a new Session that contains the union of access control rules
of this Session and the provided session, with the optional addition
of custom domain rules.
|
void |
disableVirtualLayers()
Disable virtual layers.
|
void |
exportDereferencedView(String absPath,
ContentHandler contentHandler,
boolean binaryAsLink,
boolean noRecurse)
Export a dereferenced view of a node.
|
void |
exportDereferencedView(String absPath,
OutputStream out,
boolean binaryAsLink,
boolean noRecurse)
Export a dereferenced view of a node.
|
File |
exportEnhancedSystemViewPackage(String parentAbsPath,
boolean recurse) |
ClassLoader |
getSessionClassLoader()
This call is not (yet) part of the API, but under evaluation.
Probably it will change into getSessionClassLoader(Node) or similar.
|
User |
getUser()
Get the
User object identified by this session's user id. |
XAResource |
getXAResource()
Retrieves an
XAResource object that the transaction manager
will use to manage this XASession object's participation in
a distributed transaction. |
void |
importDereferencedXML(String parentAbsPath,
InputStream in,
ContentResourceLoader referredResourceLoader,
int uuidBehavior,
int referenceBehavior,
int mergeBehavior)
|
void |
importDereferencedXML(String parentAbsPath,
InputStream in,
int uuidBehavior,
int referenceBehavior,
int mergeBehavior)
|
ImportResult |
importEnhancedSystemViewXML(String parentAbsPath,
InputStream in,
int uuidBehavior,
int referenceBehavior,
ContentResourceLoader referredResourceLoader)
Import an enhanced system view xml file.
|
void |
localRefresh()
This method discards all pending changes currently recorded in this
Session ,
including the built-up virtual node states. |
javax.jcr.NodeIterator |
pendingChanges()
Largely a conveniance method for
pendingChanges(Session.getRootNode(), "nt:base", false) however
will also return the root node if modified. |
javax.jcr.NodeIterator |
pendingChanges(javax.jcr.Node node,
String nodeType)
Conveniance method for
pendingChanges(node,nodeType,false) |
javax.jcr.NodeIterator |
pendingChanges(javax.jcr.Node node,
String nodeType,
boolean prune)
Obtains an iterator over the set of nodes that potentially contain
changes, starting (and not including) the indicated node.
|
addLockToken, checkPermission, exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getAccessControlManager, getAttribute, getAttributeNames, getImportContentHandler, getItem, getLockTokens, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNode, getNodeByIdentifier, getNodeByUUID, getProperty, getRepository, getRetentionManager, getRootNode, getUserID, getValueFactory, getWorkspace, hasCapability, hasPendingChanges, hasPermission, impersonate, importXML, isLive, itemExists, logout, move, nodeExists, propertyExists, refresh, removeItem, removeLockToken, save, setNamespacePrefix
static final String NO_SYSTEM_IMPERSONATION
Session.impersonate(Credentials)
call. If this attribute is defined, the SystemPrincipal will not be added
to the impersonated session when using the System session to impersonate another session.javax.jcr.Node copy(javax.jcr.Node srcNode, String destAbsNodePath) throws javax.jcr.RepositoryException
JcrUtils.copy(javax.jcr.Session, String, String)
insteadsrcNode
- the node to copydestAbsNodePath
- the absolute path of the to be created target
node which will be a copy of srcNodejavax.jcr.RepositoryException
- a generic error while accessing the repositoryjavax.jcr.NodeIterator pendingChanges(javax.jcr.Node node, String nodeType, boolean prune) throws javax.jcr.NamespaceException, javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.RepositoryException
Node.isNodeType(nodeType)
returns
true are included in the resulting set. If the prune boolean value is
true, then the nodes matching in the hierarchy first are returned. If
matching modified node exists beneath the nodes, these are not
included.node
- The starting node for which to look for changes, will not
be included in result, may be null to indicate to search whole treenodeType
- Only nodes that are (derived) of this nodeType are
included in the result, may be null to indicate no filtering on nodeTypeprune
- Wheter only to return the first matching modified node in
a subtree (true), or provide a depth search for all modified
nodes (false)javax.jcr.NamespaceException
- an invalid nodeType was passedjavax.jcr.RepositoryException
- a generic error while accessing the repositoryjavax.jcr.nodetype.NoSuchNodeTypeException
- an invalid nodeType was passedjavax.jcr.NodeIterator pendingChanges(javax.jcr.Node node, String nodeType) throws javax.jcr.NamespaceException, javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.RepositoryException
pendingChanges(node,nodeType,false)
node
- The starting node for which to look for changes, will not
be included in result, may be null to indicate to search whole treenodeType
- Only nodes that are (derived) of this nodeType are
included in the result, may be null to indicate no filtering on nodeTypejavax.jcr.NamespaceException
- an invalid nodeType was passedjavax.jcr.RepositoryException
- a generic error while accessing the repositoryjavax.jcr.nodetype.NoSuchNodeTypeException
- an invalid nodeType was passedpendingChanges(Node,String,boolean)
javax.jcr.NodeIterator pendingChanges() throws javax.jcr.RepositoryException
pendingChanges(Session.getRootNode(), "nt:base", false)
however
will also return the root node if modified.javax.jcr.RepositoryException
pendingChanges(Node,String,boolean)
void exportDereferencedView(String absPath, OutputStream out, boolean binaryAsLink, boolean noRecurse) throws IOException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
absPath
- the absolute path to the subtree to be exportedout
- the output stream to which the resulting XML should be outputtedbinaryAsLink
- whether to include binariesnoRecurse
- whether to output just a single node or the whole subtreeIOException
- in case of an error writing to the output streamjavax.jcr.RepositoryException
- a generic error while accessing the repositoryjavax.jcr.PathNotFoundException
- in case the absPath parameter does not point to a valid nodeSession.exportSystemView(String,OutputStream,boolean,boolean)
void exportDereferencedView(String absPath, ContentHandler contentHandler, boolean binaryAsLink, boolean noRecurse) throws javax.jcr.PathNotFoundException, SAXException, javax.jcr.RepositoryException
absPath
- the absolute path to the subtree to be exportedcontentHandler
- The org.xml.sax.ContentHandler
to
which the SAX events representing the XML serialization of the subgraph
will be output.binaryAsLink
- whether to include binariesnoRecurse
- whether to output just a single node or the whole subtreejavax.jcr.RepositoryException
- a generic error while accessing the repositoryjavax.jcr.PathNotFoundException
- in case the absPath parameter does not point to a valid nodeSAXException
Session.exportSystemView(String,OutputStream,boolean,boolean)
@Deprecated void importDereferencedXML(String parentAbsPath, InputStream in, int uuidBehavior, int referenceBehavior, int mergeBehavior) throws IOException, javax.jcr.PathNotFoundException, javax.jcr.ItemExistsException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.version.VersionException, javax.jcr.InvalidSerializedDataException, javax.jcr.lock.LockException, javax.jcr.RepositoryException
parentAbsPath
- the parent node below which to inin
- the input stream from which to read the XMLuuidBehavior
- how to handle deserialized UUIDs in the input stream ImportUUIDBehavior
mergeBehavior
- an options flag containing one of the values of ImportMergeBehavior
indicating how to merge nodes that already existreferenceBehavior
- an options flag containing one of the values of ImportReferenceBehavior
indicating how to handle referencesIOException
- if incoming stream is not a valid XML document.javax.jcr.PathNotFoundException
- in case the parentAbsPath parameter does not point to a valid nodejavax.jcr.ItemExistsException
- in case the to be imported node already exist below the parent and same-name siblings are not allowed, or when the merge behavior does not allow merging on an existing node and the node does existjavax.jcr.nodetype.ConstraintViolationException
- when imported node is marked protected accoring to the node definition of the parentjavax.jcr.InvalidSerializedDataException
javax.jcr.version.VersionException
- when the parent node is not in checked-out statusjavax.jcr.lock.LockException
- when the parent node is lockedjavax.jcr.RepositoryException
- a generic error while accessing the repositoryexportDereferencedView(String,OutputStream,boolean,boolean)
,
Session.importXML(java.lang.String, java.io.InputStream, int)
,
ImportReferenceBehavior
,
ImportMergeBehavior
@Deprecated void importDereferencedXML(String parentAbsPath, InputStream in, ContentResourceLoader referredResourceLoader, int uuidBehavior, int referenceBehavior, int mergeBehavior) throws IOException, javax.jcr.PathNotFoundException, javax.jcr.ItemExistsException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.version.VersionException, javax.jcr.InvalidSerializedDataException, javax.jcr.lock.LockException, javax.jcr.RepositoryException
parentAbsPath
- the parent node below which to inin
- the input stream from which to read the XMLreferredResourceLoader
- the content resouce loader to load the referred imported content resourcesuuidBehavior
- how to handle deserialized UUIDs in the input stream ImportUUIDBehavior
mergeBehavior
- an options flag containing one of the values of ImportMergeBehavior
indicating how to merge nodes that already existreferenceBehavior
- an options flag containing one of the values of ImportReferenceBehavior
indicating how to handle referencesIOException
- if incoming stream is not a valid XML document.javax.jcr.PathNotFoundException
- in case the parentAbsPath parameter does not point to a valid nodejavax.jcr.ItemExistsException
- in case the to be imported node already exist below the parent and same-name siblings are not allowed, or when the merge behavior does not allow merging on an existing node and the node does existjavax.jcr.nodetype.ConstraintViolationException
- when imported node is marked protected accoring to the node definition of the parentjavax.jcr.InvalidSerializedDataException
javax.jcr.version.VersionException
- when the parent node is not in checked-out statusjavax.jcr.lock.LockException
- when the parent node is lockedjavax.jcr.RepositoryException
- a generic error while accessing the repositoryexportDereferencedView(String,OutputStream,boolean,boolean)
,
Session.importXML(java.lang.String, java.io.InputStream, int)
,
ImportReferenceBehavior
,
ImportMergeBehavior
ImportResult importEnhancedSystemViewXML(String parentAbsPath, InputStream in, int uuidBehavior, int referenceBehavior, ContentResourceLoader referredResourceLoader) throws IOException, javax.jcr.RepositoryException
parentAbsPath
- the parent node below which to inin
- the input stream from which to read the XMLuuidBehavior
- how to handle deserialized UUIDs in the input stream ImportUUIDBehavior
referenceBehavior
- an options flag containing one of the values of ImportReferenceBehavior
indicating how to handle referencesreferredResourceLoader
- the content resouce loader to load the referred imported content resourcesIOException
- if incoming stream is not a valid XML document.javax.jcr.RepositoryException
- a generic error while accessing the repositoryexportDereferencedView(String,OutputStream,boolean,boolean)
,
Session.importXML(java.lang.String, java.io.InputStream, int)
,
ImportReferenceBehavior
File exportEnhancedSystemViewPackage(String parentAbsPath, boolean recurse) throws IOException, javax.jcr.RepositoryException
IOException
javax.jcr.RepositoryException
XAResource getXAResource()
XAResource
object that the transaction manager
will use to manage this XASession object's participation in
a distributed transaction.XAResource
object.ClassLoader getSessionClassLoader() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- a generic error while accessing the repositoryUser getUser() throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
User
object identified by this session's user id.User
object identified by this session's user id.javax.jcr.ItemNotFoundException
- if the user could not be found in the repository.javax.jcr.RepositoryException
javax.jcr.Session createSecurityDelegate(javax.jcr.Session session, DomainRuleExtension... domainExtensions) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
void localRefresh()
Session
,
including the built-up virtual node states. The difference with Session.refresh(boolean false)
is
that after this method returns, the state of the items is not guaranteed to reflect the current
persistent storage because in a clustered environment, the cluster node is not synced as a result of this call.void disableVirtualLayers()
Copyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.