Examples of RepositoryContext


Examples of org.jboss.dna.graph.connector.RepositoryContext

        assertThat(workspace.equals(other), is(true));
    }

    @Test
    public void shouldConsiderWorkspacesNotEqualIfDifferentSourceName() {
        RepositoryContext otherReposContext = mock(RepositoryContext.class);
        stub(otherReposContext.getExecutionContext()).toReturn(context);
        CachePolicy otherPolicy = mock(CachePolicy.class);
        FederatedWorkspace other = new FederatedWorkspace(otherReposContext, "diff", workspaceName, projections, otherPolicy);
        assertThat(workspace.equals(other), is(false));
    }
View Full Code Here

Examples of org.jboss.dna.graph.connector.RepositoryContext

        assertThat(workspace.equals(other), is(false));
    }

    @Test
    public void shouldConsiderWorkspacesNotEqualIfDifferentWorkspaceName() {
        RepositoryContext otherReposContext = mock(RepositoryContext.class);
        stub(otherReposContext.getExecutionContext()).toReturn(context);
        CachePolicy otherPolicy = mock(CachePolicy.class);
        FederatedWorkspace other = new FederatedWorkspace(otherReposContext, sourceName, "diff", projections, otherPolicy);
        assertThat(workspace.equals(other), is(false));
    }
View Full Code Here

Examples of org.jboss.dna.graph.connector.RepositoryContext

        assertThat(workspace.equals(other), is(false));
    }

    @Test
    public void shouldConsiderWorkspacesNotEqualIfDifferentProjections() {
        RepositoryContext otherReposContext = mock(RepositoryContext.class);
        stub(otherReposContext.getExecutionContext()).toReturn(context);
        CachePolicy otherPolicy = mock(CachePolicy.class);
        FederatedWorkspace other = new FederatedWorkspace(otherReposContext, sourceName, workspaceName,
                                                          projections.subList(0, 3), otherPolicy);
        assertThat(workspace.equals(other), is(false));
    }
View Full Code Here

Examples of org.jboss.dna.graph.connector.RepositoryContext

                    return connection;
                }
            };

            // Initialize the source with the rest of the environment ...
            source.initialize(new RepositoryContext() {
                public ExecutionContext getExecutionContext() {
                    return context;
                }

                @SuppressWarnings( "synthetic-access" )
View Full Code Here

Examples of org.jboss.dna.graph.connector.RepositoryContext

        configurationSourceName = "configuration";
        repositoryName = "Test Repository";
        configRepositorySource = new InMemoryRepositorySource();
        configRepositorySource.setName("Configuration Repository");

        repositoryContext = new RepositoryContext() {
            @SuppressWarnings( "synthetic-access" )
            public ExecutionContext getExecutionContext() {
                return context;
            }
View Full Code Here

Examples of org.jboss.dna.graph.connectors.RepositoryContext

     * {@link #getRepositoryConfiguration(ExecutionContext, RepositoryConnectionFactory) rebuilt} and updated. Nothing is done,
     * however, if there is currently no {@link #getRepository() repository}.
     */
    protected synchronized void changeRepositoryConfig() {
        if (this.repository != null) {
            RepositoryContext repositoryContext = getRepositoryContext();
            if (repositoryContext != null) {
                // Find in JNDI the repository source registry and the environment ...
                ExecutionContext context = getExecutionContext();
                RepositoryConnectionFactory factory = getRepositoryContext().getRepositoryConnectionFactory();
                // Compute a new repository config and set it on the repository ...
View Full Code Here

Examples of org.jboss.dna.graph.connectors.RepositoryContext

     * {@link #getRepositoryConfiguration(ExecutionContext, RepositoryConnectionFactory) rebuilt} and updated. Nothing is done,
     * however, if there is currently no {@link #getRepository() repository}.
     */
    protected synchronized void changeRepositoryConfig() {
        if (this.repository != null) {
            RepositoryContext repositoryContext = getRepositoryContext();
            if (repositoryContext != null) {
                // Find in JNDI the repository source registry and the environment ...
                ExecutionContext context = getExecutionContext();
                RepositoryConnectionFactory factory = getRepositoryContext().getRepositoryConnectionFactory();
                // Compute a new repository config and set it on the repository ...
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.