Examples of applyAttributes()


Examples of javax.util.jcache.Attributes.applyAttributes()

        if (!isValid()) {
            return;
        }
        Attributes att = region.getAttributes();
        att.reset();
        att.applyAttributes(attributes);
    }

    /**
     * See {@link #resetAttributes(Attributes)}.
     *
 
View Full Code Here

Examples of javax.util.jcache.Attributes.applyAttributes()

        if (!isValid()) {
            return;
        }
        Attributes att = CacheImpl.getCache(true).getRegion(name).getAttributes();
        att.reset();
        att.applyAttributes(attributes);
    }

    /**
     * Will cause all objects within the region of this CacheAccess to be saved
     * to the disk cache. All exceptions encountered will be logged if logging
View Full Code Here

Examples of org.openengsb.core.api.ConnectorInstanceFactory.applyAttributes()

        props.put("composite.strategy.name", "authorization");
        AffirmativeBasedAuthorizationStrategy service = new AffirmativeBasedAuthorizationStrategy();
        service.setUtilsService(serviceUtils);
        registerService(service, props, CompositeConnectorStrategy.class);

        instance = cFactory.applyAttributes(instance,
            ImmutableMap.of("compositeStrategy", "authorization", "queryString", "(location.root=authorization/*)"));
        registerServiceAtLocation(instance, "authorization-root", "root", AuthorizationDomain.class, Domain.class);
        context.putBean("authorizer", instance);

        OpenEngSBShiroAuthenticator openEngSBShiroAuthenticator = new OpenEngSBShiroAuthenticator();
View Full Code Here

Examples of org.openengsb.core.api.ConnectorInstanceFactory.applyAttributes()

                TestDomainInterface newMock = mock(TestDomainInterface.class);
                when(newMock.getInstanceId()).thenReturn((String) invocation.getArguments()[0]);
                return newMock;
            }
        });
        when(factory.applyAttributes(any(Connector.class), anyMap())).thenAnswer(new Answer<Connector>() {
            @Override
            public Connector answer(InvocationOnMock invocation) throws Throwable {
                return (Connector) invocation.getArguments()[0];
            }
        });
View Full Code Here

Examples of org.openengsb.core.api.ConnectorInstanceFactory.applyAttributes()

                testService = newMock;
                when(newMock.getInstanceId()).thenReturn((String) invocation.getArguments()[0]);
                return newMock;
            }
        });
        when(factory.applyAttributes(any(Connector.class), anyMap())).thenAnswer(new Answer<Connector>() {
            @Override
            public Connector answer(InvocationOnMock invocation) throws Throwable {
                return (Connector) invocation.getArguments()[0];
            }
        });
View Full Code Here

Examples of org.openengsb.core.api.ConnectorInstanceFactory.applyAttributes()

                String id = (String) invocation.getArguments()[0];
                when(result.getInstanceId()).thenReturn(id);
                return result;
            }
        });
        when(factory.applyAttributes(any(Connector.class), anyMap())).thenAnswer(new Answer<Connector>() {
            @Override
            public Connector answer(InvocationOnMock invocation) throws Throwable {
                return (Connector) invocation.getArguments()[0];
            }
        });
View Full Code Here

Examples of org.openengsb.core.api.ConnectorInstanceFactory.applyAttributes()

        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

Examples of org.openengsb.core.api.ConnectorInstanceFactory.applyAttributes()

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

        factory.applyAttributes((Connector) authManager, attributes);
    }

    @Test
    public void authenticateUsernamePassword_shouldAuthenticateSuccessful() throws Exception {
        Authentication authenticate = passwordAuthenticator.authenticate("testuser", new Password("password"));
View Full Code Here

Examples of org.openengsb.core.api.ConnectorInstanceFactory.applyAttributes()

        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

Examples of org.openengsb.core.api.ConnectorInstanceFactory.applyAttributes()

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

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

    @Test
    public void checkAdminAccess_shouldGrant() throws Exception {
        MethodInvocation invocation = mock(MethodInvocation.class);
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.