Package org.apache.sling.jcr.base.internal.mount

## 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`

    public class ProxySession<T extends javax.jcr.Session>
    extends Object
    implements javax.jcr.Session

### Field Summary

Fields
`T` `jcr`
`protected javax.jcr.Session` `mount`

### Fields inherited from interface javax.jcr.Session

`ACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTY`

### Constructor Summary

Constructors
`ProxySession​(ProxyRepository repository, T jcr, javax.jcr.Session mount, Set<String> mountPoints)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addLockToken​(String lt)`
`javax.jcr.Node` `addNode​(String parent, String path, String name)`
`javax.jcr.Node` `addNode​(String parent, String path, String name, String type)`
`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` `getAccessControlManager()`
`Object` `getAttribute​(String name)`
`String[]` `getAttributeNames()`
`ContentHandler` `getImportContentHandler​(String parentAbsPath, int uuidBehavior)`
`javax.jcr.Item` `getItem​(String absPath)`
`String[]` `getLockTokens()`
`String` `getNamespacePrefix​(String uri)`
`String[]` `getNamespacePrefixes()`
`String` `getNamespaceURI​(String prefix)`
`javax.jcr.Node` `getNode​(String absPath)`
`javax.jcr.Node` `getNodeByIdentifier​(String id)`
`javax.jcr.Node` `getNodeByUUID​(String uuid)`
`javax.jcr.NodeIterator` `getNodes​(String path, javax.jcr.NodeIterator childs)`
`javax.jcr.Property` `getProperty​(String absPath)`
`javax.jcr.Repository` `getRepository()`
`javax.jcr.retention.RetentionManager` `getRetentionManager()`
`javax.jcr.Node` `getRootNode()`
`String` `getUserID()`
`javax.jcr.ValueFactory` `getValueFactory()`
`javax.jcr.Workspace` `getWorkspace()`
`boolean` `hasCapability​(String methodName, Object target, Object[] arguments)`
`boolean` `hasNodes​(javax.jcr.Node node)`
`boolean` `hasPendingChanges()`
`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` `move​(String srcAbsPath, String destAbsPath)`
`boolean` `nodeExists​(String absPath)`
`boolean` `propertyExists​(String absPath)`
`void` `refresh​(boolean keepChanges)`
`void` `refresh​(String path, javax.jcr.Item item, boolean keepChanges)`
`void` `removeItem​(String absPath)`
`void` `removeLockToken​(String lt)`
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### jcr

    public final T extends javax.jcr.Session jcr

#### mount

    protected final javax.jcr.Session mount

### Constructor Detail

#### ProxySession

    public ProxySession​(ProxyRepository repository,
                        T jcr,
                        javax.jcr.Session mount,
                        Set<String> mountPoints)

### Method Detail

#### 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 interface `javax.jcr.Session`

#### getUserID

    public String getUserID()

Specified by:
  `getUserID` in interface `javax.jcr.Session`

#### getAttributeNames

    public String[] getAttributeNames()

Specified by:
  `getAttributeNames` in interface `javax.jcr.Session`

#### getAttribute

    public Object getAttribute​(String name)

Specified by:
  `getAttribute` in interface `javax.jcr.Session`

#### getRootNode

    public javax.jcr.Node getRootNode()
                               throws javax.jcr.RepositoryException

Specified by:
  `getRootNode` in interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.jcr.Session`
Throws:
  `javax.jcr.PathNotFoundException`
  `javax.jcr.RepositoryException`

#### itemExists

    public boolean itemExists​(String absPath)
                       throws javax.jcr.RepositoryException

Specified by:
  `itemExists` in interface `javax.jcr.Session`
Throws:
  `javax.jcr.RepositoryException`

#### nodeExists

    public boolean nodeExists​(String absPath)
                       throws javax.jcr.RepositoryException

Specified by:
  `nodeExists` in interface `javax.jcr.Session`
Throws:
  `javax.jcr.RepositoryException`

#### propertyExists

    public boolean propertyExists​(String absPath)
                           throws javax.jcr.RepositoryException

Specified by:
  `propertyExists` in interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.jcr.Session`
Throws:
  `javax.jcr.RepositoryException`

#### getValueFactory

    public javax.jcr.ValueFactory getValueFactory()
                                           throws javax.jcr.UnsupportedRepositoryOperationException,
                                                  javax.jcr.RepositoryException

Specified by:
  `getValueFactory` in interface `javax.jcr.Session`
Throws:
  `javax.jcr.UnsupportedRepositoryOperationException`
  `javax.jcr.RepositoryException`

#### hasPermission

    public boolean hasPermission​(String absPath,
                                 String actions)
                          throws javax.jcr.RepositoryException

Specified by:
  `hasPermission` in interface `javax.jcr.Session`
Throws:
  `javax.jcr.RepositoryException`

#### checkPermission

    public void checkPermission​(String absPath,
                                String actions)
                         throws AccessControlException,
                                javax.jcr.RepositoryException

Specified by:
  `checkPermission` in interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.jcr.Session`
Throws:
  `javax.jcr.NamespaceException`
  `javax.jcr.RepositoryException`

#### getNamespacePrefixes

    public String[] getNamespacePrefixes()
                                  throws javax.jcr.RepositoryException

Specified by:
  `getNamespacePrefixes` in interface `javax.jcr.Session`
Throws:
  `javax.jcr.RepositoryException`

#### getNamespaceURI

    public String getNamespaceURI​(String prefix)
                           throws javax.jcr.NamespaceException,
                                  javax.jcr.RepositoryException

Specified by:
  `getNamespaceURI` in interface `javax.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 interface `javax.jcr.Session`
Throws:
  `javax.jcr.NamespaceException`
  `javax.jcr.RepositoryException`

#### logout

    public void logout()

Specified by:
  `logout` in interface `javax.jcr.Session`

#### isLive

    public boolean isLive()

Specified by:
  `isLive` in interface `javax.jcr.Session`

#### addLockToken

    public void addLockToken​(String lt)

Specified by:
  `addLockToken` in interface `javax.jcr.Session`

#### getLockTokens

    public String[] getLockTokens()

Specified by:
  `getLockTokens` in interface `javax.jcr.Session`

#### removeLockToken

    public void removeLockToken​(String lt)

Specified by:
  `removeLockToken` in interface `javax.jcr.Session`

#### getAccessControlManager

    public javax.jcr.security.AccessControlManager getAccessControlManager()
                                                                    throws javax.jcr.UnsupportedRepositoryOperationException,
                                                                           javax.jcr.RepositoryException

Specified by:
  `getAccessControlManager` in interface `javax.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 interface `javax.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 interface `javax.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 interface `javax.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`