public class SessionContext extends Object implements org.apache.jackrabbit.oak.namepath.NamePathMapper
SessionImpl
, NodeImpl
, etc.) and provide access to
the session scoped instances generally needed (e.g. NamePathMapper
,
ValueFactory
, etc.).Constructor and Description |
---|
SessionContext(@NotNull javax.jcr.Repository repository,
@NotNull org.apache.jackrabbit.oak.stats.StatisticManager statisticManager,
@NotNull org.apache.jackrabbit.oak.spi.security.SecurityProvider securityProvider,
@NotNull org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard,
@NotNull Map<String,Object> attributes,
@NotNull SessionDelegate delegate,
int observationQueueLength,
org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter commitRateLimiter) |
SessionContext(@NotNull javax.jcr.Repository repository,
@NotNull org.apache.jackrabbit.oak.stats.StatisticManager statisticManager,
@NotNull org.apache.jackrabbit.oak.spi.security.SecurityProvider securityProvider,
@NotNull org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard,
@NotNull Map<String,Object> attributes,
@NotNull SessionDelegate delegate,
int observationQueueLength,
org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter commitRateLimiter,
org.apache.jackrabbit.oak.spi.mount.MountInfoProvider mountInfoProvider,
boolean fastQueryResultSize) |
Modifier and Type | Method and Description |
---|---|
protected SessionImpl |
createSession()
Factory method for creating the
Session instance for this
context. |
protected WorkspaceImpl |
createWorkspace()
Factory method for creating the
Workspace instance for this
context. |
@NotNull javax.jcr.security.AccessControlManager |
getAccessControlManager() |
@NotNull AccessManager |
getAccessManager() |
Map<String,Object> |
getAttributes() |
@NotNull org.apache.jackrabbit.oak.stats.CounterStats |
getCount(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type) |
boolean |
getFastQueryResultSize() |
@NotNull String |
getJcrName(@NotNull String oakName) |
@NotNull String |
getJcrPath(String oakPath) |
@NotNull org.apache.jackrabbit.oak.stats.MeterStats |
getMeter(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type) |
@Nullable org.apache.jackrabbit.oak.spi.mount.MountInfoProvider |
getMountInfoProvider() |
@NotNull String |
getOakName(@NotNull String jcrName) |
@Nullable String |
getOakNameOrNull(@NotNull String jcrName) |
@Nullable String |
getOakPath(String jcrPath) |
@NotNull String |
getOakPathOrThrow(String jcrPath)
Returns the Oak path for the given JCR path, or throws a
RepositoryException if the path can not be mapped. |
@NotNull String |
getOakPathOrThrowNotFound(String jcrPath)
Returns the Oak path for the given JCR path, or throws a
PathNotFoundException if the path can not be mapped. |
@NotNull javax.jcr.observation.ObservationManager |
getObservationManager() |
Set<String> |
getOpenScopedLocks() |
@NotNull org.apache.jackrabbit.api.security.principal.PrincipalManager |
getPrincipalManager() |
@NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeManager |
getPrivilegeManager() |
@NotNull List<org.apache.jackrabbit.oak.spi.xml.ProtectedItemImporter> |
getProtectedItemImporters() |
@NotNull javax.jcr.Repository |
getRepository() |
@NotNull org.apache.jackrabbit.oak.spi.security.SecurityProvider |
getSecurityProvider() |
SessionImpl |
getSession() |
@NotNull SessionDelegate |
getSessionDelegate() |
@NotNull Map<String,String> |
getSessionLocalMappings() |
Set<String> |
getSessionScopedLocks() |
@NotNull org.apache.jackrabbit.oak.stats.StatisticManager |
getStatisticManager() |
@NotNull org.apache.jackrabbit.oak.stats.TimerStats |
getTimer(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type) |
@NotNull org.apache.jackrabbit.api.security.user.UserManager |
getUserManager() |
javax.jcr.ValueFactory |
getValueFactory() |
WorkspaceImpl |
getWorkspace() |
boolean |
hasEventListeners() |
public SessionContext(@NotNull @NotNull javax.jcr.Repository repository, @NotNull @NotNull org.apache.jackrabbit.oak.stats.StatisticManager statisticManager, @NotNull @NotNull org.apache.jackrabbit.oak.spi.security.SecurityProvider securityProvider, @NotNull @NotNull org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard, @NotNull @NotNull Map<String,Object> attributes, @NotNull @NotNull SessionDelegate delegate, int observationQueueLength, org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter commitRateLimiter)
public SessionContext(@NotNull @NotNull javax.jcr.Repository repository, @NotNull @NotNull org.apache.jackrabbit.oak.stats.StatisticManager statisticManager, @NotNull @NotNull org.apache.jackrabbit.oak.spi.security.SecurityProvider securityProvider, @NotNull @NotNull org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard, @NotNull @NotNull Map<String,Object> attributes, @NotNull @NotNull SessionDelegate delegate, int observationQueueLength, org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter commitRateLimiter, org.apache.jackrabbit.oak.spi.mount.MountInfoProvider mountInfoProvider, boolean fastQueryResultSize)
public final SessionImpl getSession()
public final WorkspaceImpl getWorkspace()
protected SessionImpl createSession()
Session
instance for this
context. Called by getSession()
when first accessed. Can be
overridden by subclasses to customize the session implementation.protected WorkspaceImpl createWorkspace()
Workspace
instance for this
context. Called by getWorkspace()
when first accessed. Can be
overridden by subclasses to customize the workspace implementation.@NotNull public @NotNull org.apache.jackrabbit.oak.stats.StatisticManager getStatisticManager()
@NotNull public @NotNull org.apache.jackrabbit.oak.stats.MeterStats getMeter(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type)
@NotNull public @NotNull org.apache.jackrabbit.oak.stats.TimerStats getTimer(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type)
@NotNull public @NotNull org.apache.jackrabbit.oak.stats.CounterStats getCount(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type)
@NotNull public @NotNull javax.jcr.Repository getRepository()
@NotNull public @NotNull SessionDelegate getSessionDelegate()
@NotNull public @NotNull Map<String,String> getSessionLocalMappings()
getSessionLocalMappings
in interface org.apache.jackrabbit.oak.namepath.NameMapper
public javax.jcr.ValueFactory getValueFactory()
@NotNull public @NotNull javax.jcr.security.AccessControlManager getAccessControlManager() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@NotNull public @NotNull org.apache.jackrabbit.api.security.principal.PrincipalManager getPrincipalManager()
@NotNull public @NotNull org.apache.jackrabbit.api.security.user.UserManager getUserManager()
@NotNull public @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeManager getPrivilegeManager()
@NotNull public @NotNull List<org.apache.jackrabbit.oak.spi.xml.ProtectedItemImporter> getProtectedItemImporters()
@NotNull public @NotNull javax.jcr.observation.ObservationManager getObservationManager() throws javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.UnsupportedRepositoryOperationException
public boolean hasEventListeners()
public boolean getFastQueryResultSize()
@Nullable public @Nullable org.apache.jackrabbit.oak.spi.mount.MountInfoProvider getMountInfoProvider()
@NotNull public @NotNull String getOakName(@NotNull @NotNull String jcrName) throws javax.jcr.RepositoryException
getOakName
in interface org.apache.jackrabbit.oak.namepath.NameMapper
javax.jcr.RepositoryException
@Nullable public @Nullable String getOakNameOrNull(@NotNull @NotNull String jcrName)
getOakNameOrNull
in interface org.apache.jackrabbit.oak.namepath.NameMapper
@NotNull public @NotNull String getJcrName(@NotNull @NotNull String oakName)
getJcrName
in interface org.apache.jackrabbit.oak.namepath.NameMapper
@Nullable public @Nullable String getOakPath(String jcrPath)
getOakPath
in interface org.apache.jackrabbit.oak.namepath.PathMapper
@NotNull public @NotNull String getJcrPath(String oakPath)
getJcrPath
in interface org.apache.jackrabbit.oak.namepath.PathMapper
@NotNull public @NotNull String getOakPathOrThrow(String jcrPath) throws javax.jcr.RepositoryException
RepositoryException
if the path can not be mapped.jcrPath
- JCR pathjavax.jcr.RepositoryException
- if the path can not be mapped@NotNull public @NotNull String getOakPathOrThrowNotFound(String jcrPath) throws javax.jcr.PathNotFoundException
PathNotFoundException
if the path can not be mapped.jcrPath
- JCR pathjavax.jcr.PathNotFoundException
- if the path can not be mapped@NotNull public @NotNull AccessManager getAccessManager() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@NotNull public @NotNull org.apache.jackrabbit.oak.spi.security.SecurityProvider getSecurityProvider()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.