Package org.openengsb.core.api

Examples of org.openengsb.core.api.ConnectorInstanceFactory


    protected ConnectorInstanceFactory getConnectorFactoryForDescription(ConnectorDescription description) {
        Filter connectorFilter = FilterUtils.makeFilter(ConnectorInstanceFactory.class,
                String.format("(&(%s=%s)(%s=%s))",
                        Constants.DOMAIN_KEY, description.getDomainType(),
                        Constants.CONNECTOR_KEY, description.getConnectorType()));
        ConnectorInstanceFactory service =
            serviceUtils.getOsgiServiceProxy(connectorFilter, ConnectorInstanceFactory.class);
        return service;
    }
View Full Code Here


        onetimeAuthenticator = authenticator2;

        DomainProvider provider = createDomainProviderMock(AuthenticationDomain.class, "authentication");
        CompositeConnectorProvider compositeConnectorProvider = new CompositeConnectorProvider();
        compositeConnectorProvider.setBundleContext(bundleContext);
        ConnectorInstanceFactory factory = compositeConnectorProvider.createFactory(provider);
        authManager = (AuthenticationDomain) factory.createNewInstance("authProvider");

        DefaultAuthenticationProviderStrategy strategy = new DefaultAuthenticationProviderStrategy();
        strategy.setUtilsService(new DefaultOsgiUtilsService(bundleContext));

        Hashtable<String, Object> props = new Hashtable<String, Object>();
        props.put("composite.strategy.name", "authManagerStrategy");
        registerService(strategy, props, CompositeConnectorStrategy.class);

        HashMap<String, String> attributes = new HashMap<String, String>();
        attributes.put("compositeStrategy", "authManagerStrategy");
        attributes.put("queryString", "(location.foo=authenticator/*)");

        factory.applyAttributes((Connector) authManager, attributes);
    }
View Full Code Here

        updated.setProperties(properties);
        registrationManager.updateRegistration(connectorId, updated);

        serviceUtils.getService("(foo=bar)", 100L);
        Filter filter = FilterUtils.makeFilter(ConnectorInstanceFactory.class, "(connector=testc)");
        ConnectorInstanceFactory factory = (ConnectorInstanceFactory) serviceUtils.getService(filter);
        verify(factory).applyAttributes(any(Connector.class), eq(newAttrs));
    }
View Full Code Here

        attributes.put("queryString", "(location.foo=authorization/*)");

        DomainProvider provider = createDomainProviderMock(AuthorizationDomain.class, "accessControl");
        CompositeConnectorProvider compositeConnectorProvider = new CompositeConnectorProvider();
        compositeConnectorProvider.setBundleContext(bundleContext);
        ConnectorInstanceFactory factory = compositeConnectorProvider.createFactory(provider);
        accessControl = (AuthorizationDomain) factory.createNewInstance("authProvider");

        factory.applyAttributes((Connector) accessControl, attributes);

        SecurityInterceptor interceptor = new SecurityInterceptor();
        interceptor.setAuthorizer(accessControl);
    }
View Full Code Here

        attributes.put("queryString", "(location.foo=authorization/*)");

        DomainProvider provider = createDomainProviderMock(AuthorizationDomain.class, "accessControl");
        CompositeConnectorProvider compositeConnectorProvider = new CompositeConnectorProvider();
        compositeConnectorProvider.setBundleContext(bundleContext);
        ConnectorInstanceFactory factory = compositeConnectorProvider.createFactory(provider);
        accessControl = (AuthorizationDomain) factory.createNewInstance("authProvider");

        factory.applyAttributes((Connector) accessControl, attributes);
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.ConnectorInstanceFactory

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.