Package org.switchyard.config.model.composite

Examples of org.switchyard.config.model.composite.ComponentImplementationModel


        for(ComponentModel component : components) {
            System.out.println("RouteScanner found component: " + component.getName());
            // Verify component details
            assertEquals(SingleRouteService.class.getSimpleName(), component.getName());
            assertTrue(component.getServices().size() == 1);
            ComponentImplementationModel implementation = component.getImplementation();
            assertTrue(implementation instanceof CamelComponentImplementationModel);
            checkCamelImplementation((CamelComponentImplementationModel)implementation);
        }
    }
View Full Code Here


            if (DoStuffRules.class.getSimpleName().equals(c.getName())) {
                component = c;
                break;
            }
        }
        ComponentImplementationModel implementation = component.getImplementation();
        Assert.assertTrue(implementation instanceof RulesComponentImplementationModel);
        RulesComponentImplementationModel rules = (RulesComponentImplementationModel)implementation;
        Assert.assertEquals("rules", rules.getType());
        OperationModel operation = rules.getOperations().getOperations().get(0);
        Assert.assertEquals("theEventId", operation.getEventId());
View Full Code Here

    }
   
    private V1ClojureComponentImplementationModel getImplModel(final String config) throws Exception {
        final SwitchYardModel model = new ModelPuller<SwitchYardModel>().pull(config, getClass());
        final ComponentModel componentModel = model.getComposite().getComponents().get(0);
        final ComponentImplementationModel implementation = componentModel.getImplementation();
        return (V1ClojureComponentImplementationModel) implementation;
    }
View Full Code Here

            if (DoStuffProcess.class.getSimpleName().equals(c.getName())) {
                component = c;
                break;
            }
        }
        ComponentImplementationModel implementation = component.getImplementation();
        Assert.assertTrue(implementation instanceof BPMComponentImplementationModel);
        BPMComponentImplementationModel bpm = (BPMComponentImplementationModel)implementation;
        Assert.assertEquals("bpm", bpm.getType());
        Assert.assertTrue(bpm.isPersistent());
        Assert.assertEquals("theProcessId", bpm.getProcessId());
View Full Code Here

    @Test
    public void testReadComplete() throws Exception {
        SwitchYardModel switchyard = _puller.pull(COMPLETE_XML, getClass());
        CompositeModel composite = switchyard.getComposite();
        ComponentModel component = composite.getComponents().get(0);
        ComponentImplementationModel implementation = component.getImplementation();
        Assert.assertTrue(implementation instanceof BeanComponentImplementationModel);
        BeanComponentImplementationModel bci = (BeanComponentImplementationModel)implementation;
        Assert.assertEquals("bean", bci.getType());
        Assert.assertEquals("org.switchyard.example.m1app.SimpleBean", bci.getClazz());
        Configuration config = bci.getModelConfiguration();
View Full Code Here

    @Test
    public void test() throws Exception {
        scan(new File("./target/test-classes").toURI().toURL());
        List<ComponentModel> components = _scannedModel.getComposite().getComponents();
        for(ComponentModel component : components) {
            ComponentImplementationModel implementation = component.getImplementation();
            Assert.assertTrue(implementation instanceof BeanComponentImplementationModel);
            checkBeanModel((BeanComponentImplementationModel)implementation);
        }
    }
View Full Code Here

        boolean ltsFound = false;
        boolean stsFound = false;
       
        for(ComponentModel component : components) {
            if(component.getName().equals("SecureService")) {
                ComponentImplementationModel impl = component.getImplementation();
                Assert.assertTrue(impl.hasPolicyRequirement(SecurityPolicy.AUTHORIZATION.getQName()));
                ComponentServiceModel svc = component.getServices().get(0);
                Assert.assertTrue(svc.hasPolicyRequirement(SecurityPolicy.CLIENT_AUTHENTICATION.getQName()));
                Assert.assertTrue(svc.hasPolicyRequirement(SecurityPolicy.CONFIDENTIALITY.getQName()));
                ComponentReferenceModel ref = component.getReferences().get(0);
                Assert.assertTrue(ref.hasPolicyRequirement(SecurityPolicy.AUTHORIZATION.getQName()));
View Full Code Here

        }
        return interfaceModel.getInterface();
    }
   
    private String getComponentImplementationType(ComponentModel componentModel) {
        ComponentImplementationModel implementationModel = componentModel.getImplementation();
        if (implementationModel == null) {
            return null;
        }
        return implementationModel.getType();
    }
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.composite.ComponentImplementationModel

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.