Class ProxySession<T extends javax.jcr.Session>
java.lang.Object
org.apache.sling.jcr.base.internal.mount.ProxySession<T>
- All Implemented Interfaces:
javax.jcr.Session
- Direct Known Subclasses:
ProxyJackrabbitSession
-
Field Summary
Fields inherited from interface javax.jcr.Session
ACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTY
-
Constructor Summary
ConstructorDescriptionProxySession
(ProxyRepository repository, T jcr, javax.jcr.Session mount, Set<String> mountPoints) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLockToken
(String lt) javax.jcr.Node
javax.jcr.Node
void
checkPermission
(String absPath, String actions) void
exportDocumentView
(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) void
exportDocumentView
(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) void
exportSystemView
(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) void
exportSystemView
(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) javax.jcr.security.AccessControlManager
getAttribute
(String name) String[]
getImportContentHandler
(String parentAbsPath, int uuidBehavior) javax.jcr.Item
String[]
getNamespacePrefix
(String uri) String[]
getNamespaceURI
(String prefix) javax.jcr.Node
javax.jcr.Node
javax.jcr.Node
getNodeByUUID
(String uuid) javax.jcr.NodeIterator
javax.jcr.Property
getProperty
(String absPath) javax.jcr.Repository
javax.jcr.retention.RetentionManager
javax.jcr.Node
javax.jcr.ValueFactory
javax.jcr.Workspace
boolean
hasCapability
(String methodName, Object target, Object[] arguments) boolean
hasNodes
(javax.jcr.Node node) boolean
boolean
hasPermission
(String absPath, String actions) javax.jcr.Session
impersonate
(javax.jcr.Credentials credentials) void
importXML
(String parentAbsPath, InputStream in, int uuidBehavior) boolean
isLive()
boolean
itemExists
(String absPath) void
logout()
void
boolean
nodeExists
(String absPath) boolean
propertyExists
(String absPath) void
refresh
(boolean keepChanges) void
void
removeItem
(String absPath) void
void
save()
void
setNamespacePrefix
(String prefix, String uri) <F> F
unwrap
(F source) <F> F
wrap
(F source) javax.jcr.NodeIterator
wrap
(javax.jcr.NodeIterator iter) javax.jcr.PropertyIterator
wrap
(javax.jcr.PropertyIterator iter) javax.jcr.query.RowIterator
wrap
(javax.jcr.query.RowIterator iter)
-
Field Details
-
jcr
-
mount
protected final javax.jcr.Session mount
-
-
Constructor Details
-
ProxySession
public ProxySession(ProxyRepository repository, T jcr, javax.jcr.Session mount, Set<String> mountPoints)
-
-
Method Details
-
wrap
public <F> F wrap(F source) -
unwrap
public <F> F unwrap(F source) -
wrap
public javax.jcr.NodeIterator wrap(javax.jcr.NodeIterator iter) -
wrap
public javax.jcr.PropertyIterator wrap(javax.jcr.PropertyIterator iter) -
wrap
public javax.jcr.query.RowIterator wrap(javax.jcr.query.RowIterator iter) -
getRepository
public javax.jcr.Repository getRepository()- Specified by:
getRepository
in interfacejavax.jcr.Session
-
getUserID
- Specified by:
getUserID
in interfacejavax.jcr.Session
-
getAttributeNames
- Specified by:
getAttributeNames
in interfacejavax.jcr.Session
-
getAttribute
- Specified by:
getAttribute
in interfacejavax.jcr.Session
-
getRootNode
public javax.jcr.Node getRootNode() throws javax.jcr.RepositoryException- Specified by:
getRootNode
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
getNodes
public javax.jcr.NodeIterator getNodes(String path, javax.jcr.NodeIterator childs) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-
hasNodes
public boolean hasNodes(javax.jcr.Node node) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-
impersonate
public javax.jcr.Session impersonate(javax.jcr.Credentials credentials) throws javax.jcr.LoginException, javax.jcr.RepositoryException - Specified by:
impersonate
in interfacejavax.jcr.Session
- Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException
-
getNodeByUUID
public javax.jcr.Node getNodeByUUID(String uuid) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException - Specified by:
getNodeByUUID
in interfacejavax.jcr.Session
- Throws:
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
-
getNodeByIdentifier
public javax.jcr.Node getNodeByIdentifier(String id) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException - Specified by:
getNodeByIdentifier
in interfacejavax.jcr.Session
- Throws:
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
-
getItem
public javax.jcr.Item getItem(String absPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException - Specified by:
getItem
in interfacejavax.jcr.Session
- Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
-
getNode
public javax.jcr.Node getNode(String absPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException - Specified by:
getNode
in interfacejavax.jcr.Session
- Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
-
getProperty
public javax.jcr.Property getProperty(String absPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException - Specified by:
getProperty
in interfacejavax.jcr.Session
- Throws:
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
-
itemExists
- Specified by:
itemExists
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
nodeExists
- Specified by:
nodeExists
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
propertyExists
- Specified by:
propertyExists
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
removeItem
public void removeItem(String absPath) throws javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException - Specified by:
removeItem
in interfacejavax.jcr.Session
- Throws:
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException
-
save
public void save() throws javax.jcr.AccessDeniedException, javax.jcr.ItemExistsException, javax.jcr.ReferentialIntegrityException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.InvalidItemStateException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.RepositoryException- Specified by:
save
in interfacejavax.jcr.Session
- Throws:
javax.jcr.AccessDeniedException
javax.jcr.ItemExistsException
javax.jcr.ReferentialIntegrityException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.InvalidItemStateException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.RepositoryException
-
refresh
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException - Specified by:
refresh
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
refresh
public void refresh(String path, javax.jcr.Item item, boolean keepChanges) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-
hasPendingChanges
public boolean hasPendingChanges() throws javax.jcr.RepositoryException- Specified by:
hasPendingChanges
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
getValueFactory
public javax.jcr.ValueFactory getValueFactory() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException- Specified by:
getValueFactory
in interfacejavax.jcr.Session
- Throws:
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
-
hasPermission
- Specified by:
hasPermission
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
checkPermission
public void checkPermission(String absPath, String actions) throws AccessControlException, javax.jcr.RepositoryException - Specified by:
checkPermission
in interfacejavax.jcr.Session
- Throws:
AccessControlException
javax.jcr.RepositoryException
-
hasCapability
public boolean hasCapability(String methodName, Object target, Object[] arguments) throws javax.jcr.RepositoryException - Specified by:
hasCapability
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
getImportContentHandler
public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws javax.jcr.PathNotFoundException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.RepositoryException - Specified by:
getImportContentHandler
in interfacejavax.jcr.Session
- Throws:
javax.jcr.PathNotFoundException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
-
importXML
public void importXML(String parentAbsPath, InputStream in, int uuidBehavior) 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 - Specified by:
importXML
in interfacejavax.jcr.Session
- 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
-
exportSystemView
public void exportSystemView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) throws javax.jcr.PathNotFoundException, SAXException, javax.jcr.RepositoryException - Specified by:
exportSystemView
in interfacejavax.jcr.Session
- Throws:
javax.jcr.PathNotFoundException
SAXException
javax.jcr.RepositoryException
-
exportSystemView
public void exportSystemView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException - Specified by:
exportSystemView
in interfacejavax.jcr.Session
- Throws:
IOException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
-
exportDocumentView
public void exportDocumentView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) throws javax.jcr.PathNotFoundException, SAXException, javax.jcr.RepositoryException - Specified by:
exportDocumentView
in interfacejavax.jcr.Session
- Throws:
javax.jcr.PathNotFoundException
SAXException
javax.jcr.RepositoryException
-
exportDocumentView
public void exportDocumentView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException - Specified by:
exportDocumentView
in interfacejavax.jcr.Session
- Throws:
IOException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
-
setNamespacePrefix
public void setNamespacePrefix(String prefix, String uri) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException - Specified by:
setNamespacePrefix
in interfacejavax.jcr.Session
- Throws:
javax.jcr.NamespaceException
javax.jcr.RepositoryException
-
getNamespacePrefixes
- Specified by:
getNamespacePrefixes
in interfacejavax.jcr.Session
- Throws:
javax.jcr.RepositoryException
-
getNamespaceURI
public String getNamespaceURI(String prefix) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException - Specified by:
getNamespaceURI
in interfacejavax.jcr.Session
- Throws:
javax.jcr.NamespaceException
javax.jcr.RepositoryException
-
getNamespacePrefix
public String getNamespacePrefix(String uri) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException - Specified by:
getNamespacePrefix
in interfacejavax.jcr.Session
- Throws:
javax.jcr.NamespaceException
javax.jcr.RepositoryException
-
logout
public void logout()- Specified by:
logout
in interfacejavax.jcr.Session
-
isLive
public boolean isLive()- Specified by:
isLive
in interfacejavax.jcr.Session
-
addLockToken
- Specified by:
addLockToken
in interfacejavax.jcr.Session
-
getLockTokens
- Specified by:
getLockTokens
in interfacejavax.jcr.Session
-
removeLockToken
- Specified by:
removeLockToken
in interfacejavax.jcr.Session
-
getAccessControlManager
public javax.jcr.security.AccessControlManager getAccessControlManager() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException- Specified by:
getAccessControlManager
in interfacejavax.jcr.Session
- Throws:
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
-
getRetentionManager
public javax.jcr.retention.RetentionManager getRetentionManager() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException- Specified by:
getRetentionManager
in interfacejavax.jcr.Session
- Throws:
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
-
move
public void move(String srcAbsPath, String destAbsPath) throws javax.jcr.ItemExistsException, javax.jcr.PathNotFoundException, javax.jcr.version.VersionException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.lock.LockException, javax.jcr.RepositoryException - Specified by:
move
in interfacejavax.jcr.Session
- Throws:
javax.jcr.ItemExistsException
javax.jcr.PathNotFoundException
javax.jcr.version.VersionException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
-
getWorkspace
public javax.jcr.Workspace getWorkspace()- Specified by:
getWorkspace
in interfacejavax.jcr.Session
-
addNode
public javax.jcr.Node addNode(String parent, String path, String name) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-
addNode
public javax.jcr.Node addNode(String parent, String path, String name, String type) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-