Package org.openengsb.core.util

Examples of org.openengsb.core.util.DefaultOsgiUtilsService


    @Before
    public void setUp() throws Exception {
        serviceMock = mockService(TestService.class, "foo");
        outgoingPortMock = mockService(OutgoingPort.class, "jms+json-out");
        callrouter = new DefaultOutgoingPortUtilService(new DefaultOsgiUtilsService(bundleContext));
        requestHandler = new RequestHandlerImpl();
        requestHandler.setUtilsService(new DefaultOsgiUtilsService(bundleContext));

        Map<String, String> metaData = getMetadata("foo");
        methodCall = new MethodCall("test", new Object[0], metaData);
    }
View Full Code Here


                }
            });
        MethodInterceptor securityInterceptor = new ForwardMethodInterceptor();
        serviceRegistrationManagerImpl = new ConnectorRegistrationManager(bundleContext, transformationEngine,
            securityInterceptor, new SecurityAttributeProviderImpl());
        serviceUtils = new DefaultOsgiUtilsService(bundleContext);
        mockedServiceUtils = mock(DefaultOsgiUtilsService.class);
        mockedServiceUtils = mock(DefaultOsgiUtilsService.class);
        testConnector = mock(LinkingSupport.class);
        LinkingSupport testConnector2 = mock(LinkingSupport.class);
        Domain testConnector3 = mock(Domain.class);
View Full Code Here

    }

    @Before
    public void setUp() throws Exception {
        utilsService = new DefaultOsgiUtilsService(bundleContext);
        virtualConnectorProvider = mock(VirtualConnectorProvider.class);
        when(virtualConnectorProvider.createFactory(any(DomainProvider.class))).thenAnswer(
            new Answer<ConnectorInstanceFactory>() {
                @Override
                public ConnectorInstanceFactory answer(InvocationOnMock invocation) throws Throwable {
View Full Code Here

    private UserData testUser2;
    private UserData testUser3;

    @Before
    public void setUp() throws Exception {
        EntryUtils.setUtilsService(new DefaultOsgiUtilsService(bundleContext));
        entityManager = testPersistenceUnit.getEntityManager("openengsb-security");
        setupUserManager();
        testUser2 = new UserData("testUser2");
        entityManager.persist(testUser2);
        testUser3 = new UserData("testUser3");
View Full Code Here

    }

    @Before
    public void setup() throws Exception {
        RequestHandlerImpl requestHandlerImpl = new RequestHandlerImpl();
        requestHandlerImpl.setUtilsService(new DefaultOsgiUtilsService(bundleContext));
        requestHandler = requestHandlerImpl;
    }
View Full Code Here

    protected TaskboxServiceInternal taskboxInternal;
    protected AuditingDomain auditingMock;

    @Before
    public void setUp() throws Exception {
        OsgiHelper.setUtilsService(new DefaultOsgiUtilsService(bundleContext));
        setupRulemanager();

        auditingMock = mock(AuditingDomain.class);
        registerServiceAtLocation(auditingMock, "auditing-root", AuditingDomain.class);
View Full Code Here

@Command(scope = "openengsb", name = "domains", description = "Prints out the available OpenEngSB domains.")
public class DomainInfoCommand extends OsgiCommandSupport {

    @Override
    protected Object doExecute() throws Exception {
        OsgiUtilsService service = new DefaultOsgiUtilsService(getBundleContext());
        List<DomainProvider> serviceList = service.listServices(DomainProvider.class);
        Collections.sort(serviceList, Comparators.forDomainProvider());
        System.out.println("Services");
        for (DomainProvider dp : serviceList) {
            OutputStreamFormater.printValue(dp.getName().getString(Locale.getDefault()),
                dp.getDescription().getString(Locale.getDefault()));
View Full Code Here

        ExampleDomain foo2Service = (ExampleDomain) getServiceUtils().getServiceForLocation("main/foo2");
        assertThat(foo2Service.getInstanceId(), is("test"));
    }

    private OsgiUtilsService getServiceUtils() {
        return new DefaultOsgiUtilsService(getBundleContext());
    }
View Full Code Here

        servicePermissionAccessConnector = serviceAclServiceImpl;

        registerServiceAtLocation(servicePermissionAccessConnector, "authorization/service", AuthorizationDomain.class);
        AffirmativeBasedAuthorizationStrategy strategy = new AffirmativeBasedAuthorizationStrategy();
        strategy.setUtilsService(new DefaultOsgiUtilsService(bundleContext));

        Hashtable<String, Object> props = new Hashtable<String, Object>();
        props.put("composite.strategy.name", "accessControlStrategy");
        registerService(strategy, props, CompositeConnectorStrategy.class);
View Full Code Here

    private ExecutorService executor = Executors.newCachedThreadPool();

    @Override
    public void start(BundleContext context) throws Exception {
        DefaultOsgiUtilsService utilsService = new DefaultOsgiUtilsService(context);
        EntryUtils.setUtilsService(utilsService);
        executor.submit(new UserDataInitializer(utilsService));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.util.DefaultOsgiUtilsService

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.