Examples of LdapServiceReferenceFilter


Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

        assertTrue(registry.remove(entry1));
    }
   
    public void testSuppliedFilter() {

        serviceRegistryMap.setFilter(new LdapServiceReferenceFilter("(mapkey=bean1)"));
        serviceRegistryMap.init();

        //this one will match
        registry.addService("bean1", "module1", new StaticServiceBeanReference("some service1"), null, Collections.singletonMap("mapkey", "bean1"), classLoader);
       
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

       
        ServiceRegistryEntry s = registry.getService(null, classes, true);
        assertSame(service, s.getServiceBeanReference().getService());
        assertEquals(attributes, s.getAttributes());
       
        assertFalse(registry.getServices(new LdapServiceReferenceFilter("(attribute1=*)"), classes, false).isEmpty());
        assertFalse(registry.getServices(new LdapServiceReferenceFilter("(attribute1=*)"), classes, true).isEmpty());
       
        exporter.destroy();
        assertNull(registry.getService("myBean", classes, false));
    }
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

        supportedTypes = new Class[]{ List.class };
        map.setProxyTypes(supportedTypes);
    }
   
    public void testNoMapKey() throws Exception {
        LdapServiceReferenceFilter filter = new LdapServiceReferenceFilter("(name=myname)");
        map.setFilter(filter);
       
        ServiceRegistryEntry ref = new StaticServiceRegistryEntry("service", "mybean", "mymodule", ClassUtils.getDefaultClassLoader());
        List<ServiceRegistryEntry> singletonList = Collections.singletonList(ref);
        expect(serviceRegistry.getServices(filter, supportedTypes, false)).andReturn(singletonList);
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    }

    public void testWithMapKey() throws Exception {
        List<String> service = new ArrayList<String>();
       
        LdapServiceReferenceFilter filter = new LdapServiceReferenceFilter("(name=myname)");
        map.setFilter(filter);
       
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put("mapkey", "key");
        ServiceRegistryEntry ref = new StaticServiceRegistryEntry(service, "mybean", "mymodule", null, attributes, ClassUtils.getDefaultClassLoader());
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    }
   
    public void testWithNonFinalClass() throws Exception {
        ValueClass service = new ValueClass();
       
        LdapServiceReferenceFilter filter = new LdapServiceReferenceFilter("(name=myname)");
        map.setFilter(filter);
        map.setProxyTypes(null);
       
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put("mapkey", "key");
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

        verify(serviceRegistry);
    }
   
    public void testWithFinalClass() throws Exception {
       
        LdapServiceReferenceFilter filter = new LdapServiceReferenceFilter("(name=myname)");
        map.setFilter(filter);
        map.setProxyTypes(null);
       
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put("mapkey", "key");
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

        serviceRegistry = new DelegatingServiceRegistry();
        set.setServiceRegistry(serviceRegistry);
        supportedTypes = new Class[]{ List.class };
        set.setProxyTypes(supportedTypes);
       
        filter = new LdapServiceReferenceFilter("(name=*)");
        set.setFilter(filter);
       
        classLoader = ClassUtils.getDefaultClassLoader();
    }
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

        serviceRegistry = new DelegatingServiceRegistry();
        list.setServiceRegistry(serviceRegistry);
        supportedTypes = new Class[]{ List.class };
        list.setProxyTypes(supportedTypes);
       
        filter = new LdapServiceReferenceFilter("(name=*)");
        list.setFilter(filter);
       
        classLoader = ClassUtils.getDefaultClassLoader();
    }
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    public void init() {
        Assert.notNull(this.serviceRegistry, "serviceRegistry cannot be null");

        if (this.filter == null) {
            Assert.notNull(this.filterExpression, "filterExpression and filter both cannot be null");
            this.filter = new LdapServiceReferenceFilter(filterExpression);
        }

        this.serviceRegistryMonitor = new ServiceRegistryMonitor();
        this.serviceRegistryMonitor.setServiceRegistry(serviceRegistry);
        this.serviceRegistryMonitor.setServiceActivityNotifiable(this);
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.