/** * Creates a component context for the given session. * * @param repositoryContext repository context of the session * @param session the session * @param workspaceConfig workspace configuration * @throws RepositoryException if the workspace can not be accessed */ public SessionContext( RepositoryContext repositoryContext, SessionImpl session, WorkspaceConfig workspaceConfig) throws RepositoryException { assert repositoryContext != null; assert session != null; this.repositoryContext = repositoryContext; this.session = session; this.state = new SessionState(this); this.valueFactory = new ValueFactoryImpl(session, repositoryContext.getDataStore()); this.itemValidator = new ItemValidator(this); this.nodeTypeManager = new NodeTypeManagerImpl(this); this.privilegeManager = new PrivilegeManagerImpl(repositoryContext.getPrivilegeRegistry(), session); this.nsRegistry = new PermissionAwareNamespaceRegistry(); this.workspace = new WorkspaceImpl(this, workspaceConfig); }
/** * Creates a component context for the given session. * * @param repositoryContext repository context of the session * @param session the session * @param workspaceConfig workspace configuration * @throws RepositoryException if the workspace can not be accessed */ public SessionContext( RepositoryContext repositoryContext, SessionImpl session, WorkspaceConfig workspaceConfig) throws RepositoryException { assert repositoryContext != null; assert session != null; this.repositoryContext = repositoryContext; this.session = session; this.state = new SessionState(this); this.valueFactory = new ValueFactoryImpl(session, repositoryContext.getDataStore()); this.itemValidator = new ItemValidator(this); this.nodeTypeManager = new NodeTypeManagerImpl(this); this.privilegeManager = new PrivilegeManagerImpl(repositoryContext.getPrivilegeRegistry(), session); this.nsRegistry = new PermissionAwareNamespaceRegistry(); this.workspace = new WorkspaceImpl(this, workspaceConfig); }