Package org.modeshape.jcr

Examples of org.modeshape.jcr.ExecutionContext$ContextFactories


                    public WorkspaceCache call() throws Exception {
                        // Create/get the Infinispan workspaceCache that we'll use within the WorkspaceCache, using the
                        // workspaceCache manager's
                        // default configuration ...
                        Cache<NodeKey, CachedNode> nodeCache = cacheForWorkspace(name);
                        ExecutionContext context = context();

                        // Compute the root key for this workspace ...
                        String workspaceKey = NodeKey.keyForWorkspaceName(name);
                        NodeKey rootKey = new NodeKey(sourceKey, workspaceKey, rootNodeId);

                        // Create the root document for this workspace ...
                        EditableDocument rootDoc = Schematic.newDocument();
                        DocumentTranslator trans = new DocumentTranslator(context, documentStore, Long.MAX_VALUE);
                        trans.setProperty(rootDoc,
                                          context.getPropertyFactory().create(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.ROOT),
                                          null, null);
                        trans.setProperty(rootDoc, context.getPropertyFactory().create(JcrLexicon.UUID, rootKey.toString()),
                                          null, null);

                        WorkspaceCache workspaceCache = new WorkspaceCache(context, getKey(), name, systemWorkspaceCache,
                                                                           documentStore, translator, rootKey, nodeCache,
                                                                           changeBus);
View Full Code Here


       
        this.workspaceNames.add(wsName);
        refreshRepositoryMetadata(true);

        Cache<NodeKey, CachedNode> nodeCache = cacheForWorkspace(name);
        ExecutionContext context = context();
       
        //the name of the external connector is used for source name and workspace name
       
        String sourceKey = NodeKey.keyForSourceName(conName);
        String workspaceKey = NodeKey.keyForWorkspaceName(conName);
View Full Code Here

    public ExecutionContext authenticate( Credentials credentials,
                                          String repositoryName,
                                          String workspaceName,
                                          ExecutionContext repositoryContext,
                                          Map<String, Object> sessionAttributes ) {
        ExecutionContext result = null;
        for (AuthenticationProvider provider : providers) {
            try {
                // The session attributes from prior, failed authenticators should be cleared ...
                sessionAttributes.clear();
                result = provider.authenticate(credentials, repositoryName, workspaceName, repositoryContext, sessionAttributes);
View Full Code Here

    private TypeSystem typeSystem;
    private BasicSqlQueryParser parser;

    @Before
    public void beforeEach() {
        typeSystem = new ExecutionContext().getValueFactories().getTypeSystem();
        parser = new BasicSqlQueryParser();
    }
View Full Code Here

    private ChooseJoinAlgorithm nestedRule;
    private QueryContext context;

    @Before
    public void beforeEach() {
        context = new QueryContext(new ExecutionContext(), mock(RepositoryCache.class), Collections.singleton("workspace"),
                                   mock(Schemata.class), mock(RepositoryIndexes.class), mock(NodeTypes.class),
                                   mock(BufferManager.class));
        bestRule = ChooseJoinAlgorithm.USE_BEST_JOIN_ALGORITHM;
        nestedRule = ChooseJoinAlgorithm.USE_ONLY_NESTED_JOIN_ALGORITHM;
    }
View Full Code Here

    @Before
    public void beforeEach() {
        rule = RewriteAsRangeCriteria.INSTANCE;
        rules = new LinkedList<OptimizerRule>();
        rules.add(rule);
        context = new QueryContext(new ExecutionContext(), mock(RepositoryCache.class), Collections.singleton("workspace"),
                                   mock(Schemata.class), mock(RepositoryIndexes.class), mock(NodeTypes.class),
                                   mock(BufferManager.class));
        print = false;
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.ExecutionContext$ContextFactories

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.