Class SessionContext

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.namepath.NameMapper, org.apache.jackrabbit.oak.namepath.NamePathMapper, org.apache.jackrabbit.oak.namepath.PathMapper

    public class SessionContext
    extends Object
    implements org.apache.jackrabbit.oak.namepath.NamePathMapper
    Instances of this class are passed to all JCR implementation classes (e.g. SessionImpl, NodeImpl, etc.) and provide access to the session scoped instances generally needed (e.g. NamePathMapper, ValueFactory, etc.).
    • Constructor Detail

      • SessionContext

        public SessionContext​(@NotNull
                              @NotNull 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)
      • SessionContext

        public SessionContext​(@NotNull
                              @NotNull 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,
                              @Nullable
                              @Nullable org.apache.jackrabbit.oak.api.blob.BlobAccessProvider blobAccessProvider,
                              boolean fastQueryResultSize)
    • Method Detail

      • createSession

        protected SessionImpl createSession()
        Factory method for creating the Session instance for this context. Called by getSession() when first accessed. Can be overridden by subclasses to customize the session implementation.
        Returns:
        session instance
      • createWorkspace

        protected WorkspaceImpl createWorkspace()
        Factory method for creating the Workspace instance for this context. Called by getWorkspace() when first accessed. Can be overridden by subclasses to customize the workspace implementation.
        Returns:
        session instance
      • getStatisticManager

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.stats.StatisticManager getStatisticManager()
      • getMeter

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.stats.MeterStats getMeter​(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type)
      • getTimer

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.stats.TimerStats getTimer​(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type)
      • getCount

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.stats.CounterStats getCount​(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type)
      • getRepository

        @NotNull
        public @NotNull Repository getRepository()
      • getSessionDelegate

        @NotNull
        public @NotNull SessionDelegate getSessionDelegate()
      • getSessionLocalMappings

        @NotNull
        public @NotNull Map<String,​String> getSessionLocalMappings()
        Specified by:
        getSessionLocalMappings in interface org.apache.jackrabbit.oak.namepath.NameMapper
      • getPrincipalManager

        @NotNull
        public @NotNull org.apache.jackrabbit.api.security.principal.PrincipalManager getPrincipalManager()
      • getUserManager

        @NotNull
        public @NotNull org.apache.jackrabbit.api.security.user.UserManager getUserManager()
      • getPrivilegeManager

        @NotNull
        public @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeManager getPrivilegeManager()
      • getProtectedItemImporters

        @NotNull
        public @NotNull List<org.apache.jackrabbit.oak.spi.xml.ProtectedItemImporter> getProtectedItemImporters()
      • getBlobAccessProvider

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider getBlobAccessProvider()
      • hasEventListeners

        public boolean hasEventListeners()
      • getOpenScopedLocks

        public Set<String> getOpenScopedLocks()
      • getSessionScopedLocks

        public Set<String> getSessionScopedLocks()
      • getFastQueryResultSize

        public boolean getFastQueryResultSize()
      • getMountInfoProvider

        @Nullable
        public @Nullable org.apache.jackrabbit.oak.spi.mount.MountInfoProvider getMountInfoProvider()
      • getOakNameOrNull

        @Nullable
        public @Nullable String getOakNameOrNull​(@NotNull
                                                 @NotNull String jcrName)
        Specified by:
        getOakNameOrNull in interface org.apache.jackrabbit.oak.namepath.NameMapper
      • getJcrName

        @NotNull
        public @NotNull String getJcrName​(@NotNull
                                          @NotNull String oakName)
        Specified by:
        getJcrName in interface org.apache.jackrabbit.oak.namepath.NameMapper
      • getOakPath

        @Nullable
        public @Nullable String getOakPath​(String jcrPath)
        Specified by:
        getOakPath in interface org.apache.jackrabbit.oak.namepath.PathMapper
      • getJcrPath

        @NotNull
        public @NotNull String getJcrPath​(String oakPath)
        Specified by:
        getJcrPath in interface org.apache.jackrabbit.oak.namepath.PathMapper
      • getAccessManager

        @NotNull
        public @NotNull AccessManager getAccessManager()
      • getSecurityProvider

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.security.SecurityProvider getSecurityProvider()