Class SessionContext

    • Constructor Detail

      • SessionContext

        public SessionContext​(RepositoryContext repositoryContext,
                              SessionImpl session,
                              WorkspaceConfig workspaceConfig)
                       throws RepositoryException
        Creates a component context for the given session.
        Parameters:
        repositoryContext - repository context of the session
        session - the session
        workspaceConfig - workspace configuration
        Throws:
        RepositoryException - if the workspace can not be accessed
    • Method Detail

      • getRepositoryContext

        public RepositoryContext getRepositoryContext()
        Returns the repository context of the session.
        Returns:
        repository context
      • getRepository

        public RepositoryImpl getRepository()
        Returns this repository.
        Returns:
        repository
      • getRootNodeId

        public NodeId getRootNodeId()
        Returns the root node identifier of the repository.
        Returns:
        root node identifier
      • getDataStore

        public DataStore getDataStore()
        Returns the data store of this repository, or null if a data store is not configured.
        Returns:
        data store, or null
      • getNodeTypeRegistry

        public NodeTypeRegistry getNodeTypeRegistry()
        Returns the node type registry of this repository.
        Returns:
        node type registry
      • getSessionImpl

        public SessionImpl getSessionImpl()
        Returns this session.
        Returns:
        session
      • getSessionState

        public SessionState getSessionState()
        Returns the state of this session.
        Returns:
        session state
      • getValueFactory

        public ValueFactory getValueFactory()
        Returns the value factory of this session.
        Returns:
        value factory
      • getItemValidator

        public ItemValidator getItemValidator()
        Returns the item validator of this session.
        Returns:
        item validator
      • getNodeTypeManager

        public NodeTypeManagerImpl getNodeTypeManager()
        Returns the node type manager of this session.
        Returns:
        node type manager
      • getPrivilegeManager

        public PrivilegeManagerImpl getPrivilegeManager()
        Returns the privilege manager of this session.
        Returns:
        the privilege manager.
      • getNamespaceRegistry

        public NamespaceRegistry getNamespaceRegistry()
        Returns a namespace registry instance which asserts that the editing session is allowed to modify the namespace registry.
        Returns:
      • getWorkspace

        public WorkspaceImpl getWorkspace()
        Returns the workspace of this session.
        Returns:
        workspace
      • setItemManager

        public void setItemManager​(ItemManager itemManager)
      • setAccessManager

        public void setAccessManager​(AccessManager accessManager)
      • getJCRName

        public String getJCRName​(Name name)
                          throws NamespaceException
        Description copied from interface: NameResolver
        Returns the qualified JCR name String for the given Name object.
        Specified by:
        getJCRName in interface NameResolver
        Parameters:
        name - A Name object.
        Returns:
        The qualified JCR name String consisting of prefix:localName or localName in case of the empty namespace.
        Throws:
        NamespaceException - if the namespace URI can not be resolved
      • toString

        public String toString()
        Dumps the session internals to a string.
        Overrides:
        toString in class Object
        Returns:
        string representation of session internals