Package org.jboss.dna.graph

Examples of org.jboss.dna.graph.ExecutionContext$NullSecurityContext


     * @throws RepositorySourceException if there is a problem with the configuration
     */
    protected FederatedRepository loadRepository( String name,
                                                  RepositoryContext repositoryContext ) throws RepositorySourceException {
        // All the required properties have been set ...
        ExecutionContext executionContext = repositoryContext.getExecutionContext();
        RepositoryConnectionFactory connectionFactory = repositoryContext.getRepositoryConnectionFactory();
        ValueFactories valueFactories = executionContext.getValueFactories();
        ValueFactory<String> strings = valueFactories.getStringFactory();
        ValueFactory<Long> longs = valueFactories.getLongFactory();
        ProjectionParser projectionParser = ProjectionParser.getInstance();
        NamespaceRegistry registry = executionContext.getNamespaceRegistry();

        try {
            // Read the configuration for the federated repository:
            // Level 1: the node representing the federated repository
            // Level 2: the "dna:workspaces" node
View Full Code Here


     * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.CloneWorkspaceRequest)
     */
    @Override
    public void process( CloneWorkspaceRequest request ) {
        // Find the original workspace that we're cloning ...
        final ExecutionContext context = getExecutionContext();
        String targetWorkspaceName = request.desiredNameOfTargetWorkspace();
        String nameOfWorkspaceToBeCloned = request.nameOfWorkspaceToBeCloned();
        MapWorkspace original = repository.getWorkspace(nameOfWorkspaceToBeCloned);
        MapWorkspace target = repository.getWorkspace(targetWorkspaceName);
        if (original == null) {
View Full Code Here

    /**
     * Create a new configuration, using a default-constructed {@link ExecutionContext}.
     */
    public DnaConfiguration() {
        this(new ExecutionContext());
    }
View Full Code Here

     * when it performs it's work on the enqueued {@link NetChange NetChange runnable objects}.
     *
     * @param change the change describing the node to be processed.
     */
    protected void processChange( NetChange change ) {
        final ExecutionContext context = this.getExecutionContext();
        final Logger logger = context.getLogger(getClass());
        assert logger != null;

        try {
            final String repositorySourceName = change.getRepositorySourceName();
            final String repositoryWorkspaceName = change.getRepositoryWorkspaceName();

            // Figure out which sequencers accept this path,
            // and track which output nodes should be passed to each sequencer...
            final Path nodePath = change.getPath();
            final String nodePathStr = context.getValueFactories().getStringFactory().create(nodePath);
            Map<SequencerCall, Set<RepositoryNodePath>> sequencerCalls = new HashMap<SequencerCall, Set<RepositoryNodePath>>();
            List<Sequencer> allSequencers = this.sequencerLibrary.getInstances();
            List<Sequencer> sequencers = new ArrayList<Sequencer>(allSequencers.size());
            for (Sequencer sequencer : allSequencers) {
                final SequencerConfig config = sequencer.getConfiguration();
                for (SequencerPathExpression pathExpression : config.getPathExpressions()) {
                    for (Property property : change.getModifiedProperties()) {
                        Name propertyName = property.getName();
                        String propertyNameStr = context.getValueFactories().getStringFactory().create(propertyName);
                        String path = nodePathStr + "/@" + propertyNameStr;
                        SequencerPathExpression.Matcher matcher = pathExpression.matcher(path);
                        if (matcher.matches()) {
                            // String selectedPath = matcher.getSelectedPath();
                            RepositoryNodePath outputPath = RepositoryNodePath.parse(matcher.getOutputPath(),
View Full Code Here

    private Workspaces<TestWorkspace> workspaces;

    @SuppressWarnings( "unchecked" )
    @Before
    public void beforeEach() {
        context = new ExecutionContext();
        workspaces = mock(Workspaces.class);
        processor = new TestProcessor("source", context, workspaces, false);
    }
View Full Code Here

    /** Controls whether the results from each test should be printed to System.out */
    private boolean print = false;

    @Before
    public void beforeEach() {
        context = new ExecutionContext();
        typeSystem = context.getValueFactories().getTypeSystem();
        workspaceName1 = "cars";
        workspaceName2 = "aircraft";
        sw = new Stopwatch();

View Full Code Here

    /** Controls whether the results from each test should be printed to System.out */
    private boolean print = false;

    @Before
    public void beforeEach() throws Exception {
        context = new ExecutionContext();
        typeSystem = context.getValueFactories().getTypeSystem();
        sourceName = "sourceA";
        workspaceName1 = "workspace1";
        workspaceName2 = "workspace2";

View Full Code Here

    private ExecutionContext context;
    private ValueFactories factories;

    @Before
    public void beforeEach() {
        this.context = new ExecutionContext();
        this.factories = this.context.getValueFactories();
    }
View Full Code Here

    @Before
    public void beforeEach() throws Exception {
        MockitoAnnotations.initMocks(this);
        xmlContent = new File("src/test/resources/repositoryImporterTestData1.xml").toURI();
        context = new ExecutionContext();
        context.getNamespaceRegistry().register(DnaLexicon.Namespace.PREFIX, DnaLexicon.Namespace.URI);
        context.getNamespaceRegistry().register("jcr", "http://www.jcp.org/jcr/1.0");
        context.getNamespaceRegistry().register("nt", "http://www.jcp.org/jcr/nt/1.0");
        sourceName = "sourceA";
        destinationPath = context.getValueFactories().getPathFactory().create("/a/b");
View Full Code Here

    private NamespaceRegistry registry;
    private TextEncoder encoder;

    @Before
    public void beforeEach() {
        context = new ExecutionContext();
        pathFactory = context.getValueFactories().getPathFactory();
        registry = context.getNamespaceRegistry();
        encoder = new UrlEncoder();
        repositoryPath = pathFactory.create("/a/b/c");
        sourcePath = pathFactory.create("/x/y");
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.ExecutionContext$NullSecurityContext

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.