Examples of useWorkspace()


Examples of org.jboss.dna.graph.Graph.useWorkspace()

    protected Graph.Batch changes() {
        if (changes == null) {
            ConfigurationDefinition content = getConfigurationDefinition();
            Graph graph = Graph.create(content.getRepositorySource(), content.getContext());
            if (content.getWorkspace() != null) {
                graph.useWorkspace(content.getWorkspace());
            }
            changes = graph.batch();
        }
        return changes;
    }
View Full Code Here

Examples of org.jboss.dna.graph.Graph.useWorkspace()

            Graph graph = Graph.create(getConfigurationSourceName(), sources, context);
            Path pathToSourcesNode = context.getValueFactories().getPathFactory().create(pathToConfigurationRoot,
                                                                                         DnaLexicon.SOURCES);
            try {
                String workspaceName = getConfigurationWorkspaceName();
                if (workspaceName != null) graph.useWorkspace(workspaceName);

                Subgraph sourcesGraph = graph.getSubgraphOfDepth(3).at(pathToSourcesNode);

                // Iterate over each of the children, and create the RepositorySource ...
                for (Location location : sourcesGraph.getRoot().getChildren()) {
View Full Code Here

Examples of org.jboss.dna.graph.Graph.useWorkspace()

            }

            @SuppressWarnings( "synthetic-access" )
            public Subgraph getConfiguration( int depth ) {
                Graph result = Graph.create(configRepositorySource, context);
                result.useWorkspace(configurationWorkspaceName);
                return result.getSubgraphOfDepth(depth).at("/a/b/Test Repository");
            }
        };

        // Set up the source ...
View Full Code Here

Examples of org.jboss.dna.graph.Graph.useWorkspace()

                                             .getString(context.getNamespaceRegistry());
        assertThat(configPath.endsWith("/"), is(false));
        String wsPath = configPath + "/dna:workspaces/" + federatedWorkspace;
        String projectionPath = wsPath + "/dna:projections/" + projectionName;
        Graph config = Graph.create(configRepositorySource, context);
        config.useWorkspace(configurationWorkspaceName);
        config.create(wsPath).ifAbsent().and();
        config.create(wsPath + "/dna:projections").ifAbsent().and();
        config.createAt(projectionPath)
              .with(DnaLexicon.PROJECTION_RULES, (Object[])projectionRules)
              .with(DnaLexicon.SOURCE_NAME, sourceName)
View Full Code Here

Examples of org.jboss.dna.graph.Graph.useWorkspace()

            });
        }
        // Make sure there's a workspace for it ...
        Graph sourceGraph = Graph.create(sourceName, connectionFactory, context);
        if (sourceGraph.getWorkspaces().contains(workspaceName)) {
            sourceGraph.useWorkspace(workspaceName);
        } else {
            sourceGraph.createWorkspace().named(workspaceName);
        }
        return sourceGraph;
    }
View Full Code Here

Examples of org.jboss.dna.graph.Graph.useWorkspace()

                public Subgraph getConfiguration( int depth ) {
                    Subgraph result = null;
                    if (configSource != null) {
                        Graph config = Graph.create(configSource, getExecutionContext());
                        config.useWorkspace(null); // default workspace
                        result = config.getSubgraphOfDepth(depth).at(source.getName());
                    }
                    return result;
                }
            });
View Full Code Here

Examples of org.jboss.dna.graph.Graph.useWorkspace()

            }

            @SuppressWarnings( "synthetic-access" )
            public Subgraph getConfiguration( int depth ) {
                Graph result = Graph.create(configRepositorySource, context);
                result.useWorkspace("configSpace");
                return result.getSubgraphOfDepth(depth).at("/a/b/Test Repository");
            }
        };

        source = new FederatedRepositorySource();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.