Package org.switchyard.component.common.knowledge.config.model

Examples of org.switchyard.component.common.knowledge.config.model.RemoteModel


                if (manifestModel.getContainer() == null) {
                    ResourcesModel resourcesModel = manifestModel.getResources();
                    if (resourcesModel != null) {
                        return new KnowledgeBuilderSessionFactory(model, loader, domain, propertyOverrides);
                    }
                    RemoteModel remoteModel = manifestModel.getRemote();
                    if (remoteModel != null) {
                        return new KnowledgeRemoteSessionFactory(model, loader, domain, propertyOverrides);
                    }
                }
            }
View Full Code Here


    }

    private RemoteRuntimeEngineFactory buildRemoteRuntimeEngineFactory() {
        RemoteRuntimeEngineFactory factory = null;
        ClassLoader loader = getLoader();
        RemoteModel remoteModel = getModel().getManifest().getRemote();
        if (remoteModel instanceof RemoteJmsModel) {
            RemoteJmsRuntimeEngineFactoryBuilder builder = RemoteJmsRuntimeEngineFactory.newBuilder();
            InitialContext ctx = configRemoteJms(builder, (RemoteJmsModel)remoteModel, loader);
            try {
                factory = builder.build();
View Full Code Here

        Assert.assertEquals("theLog", logger.getLog());
        Assert.assertEquals(LoggerType.CONSOLE, logger.getType());
        ManifestModel manifest = rules.getManifest();
        ContainerModel container = manifest.getContainer();
        ResourcesModel resources = manifest.getResources();
        RemoteModel remote = manifest.getRemote();
        if (CONTAINER_XML.equals(xml)) {
            ReleaseId rid = Containers.toReleaseId(container.getReleaseId());
            Assert.assertEquals("theGroupId", rid.getGroupId());
            Assert.assertEquals("theArtifactId", rid.getArtifactId());
            Assert.assertEquals("theVersion", rid.getVersion());
            Assert.assertEquals("theBase", container.getBaseName());
            Assert.assertEquals("theSession", container.getSessionName());
            Assert.assertTrue(container.isScan());
            Assert.assertEquals(Long.valueOf(1000), container.getScanInterval());
            Assert.assertNull(resources);
        } else if (RESOURCES_XML.equals(xml)) {
            Assert.assertNull(container);
            ResourceModel drlResource = resources.getResources().get(0);
            Assert.assertEquals("foo.drl", drlResource.getLocation());
            Assert.assertEquals(ResourceType.valueOf("DRL"), drlResource.getType());
            ResourceModel dslResource = resources.getResources().get(1);
            Assert.assertEquals("bar.dsl", dslResource.getLocation());
            Assert.assertEquals(ResourceType.valueOf("DSL"), dslResource.getType());
            ResourceModel dtableResource = resources.getResources().get(2);
            Assert.assertEquals("foobar.xls", dtableResource.getLocation());
            Assert.assertEquals(ResourceType.valueOf("DTABLE"), dtableResource.getType());
            ResourceDetail dtableDetail = dtableResource.getDetail();
            Assert.assertEquals("XLS", dtableDetail.getInputType());
            Assert.assertEquals("MySheet", dtableDetail.getWorksheetName());
            /* SWITCHYARD-1662
            Assert.assertEquals(true, dtableDetail.isUsingExternalTypes());
            */
        } else if (REMOTEJMS_XML.equals(xml) || REMOTEREST_XML.equals(xml)) {
            Assert.assertNull(container);
            Assert.assertNull(resources);
            Assert.assertEquals("groupId:artifactId:0.0.1", remote.getDeploymentId());
            Assert.assertEquals("kermit", remote.getUserName());
            Assert.assertEquals("the-frog-1", remote.getPassword());
            Assert.assertEquals(5, remote.getTimeout().intValue());
            ExtraJaxbClassesModel extraJaxbClasses = remote.getExtraJaxbClasses();
            Assert.assertNotNull(extraJaxbClasses);
            List<ExtraJaxbClassModel> extraJaxbClassList = extraJaxbClasses.getExtraJaxbClasses();
            Assert.assertEquals(2, extraJaxbClassList.size());
            Assert.assertEquals(Object.class, extraJaxbClassList.get(0).getClazz(loader));
            Assert.assertEquals(String.class, extraJaxbClassList.get(1).getClazz(loader));
View Full Code Here

        Assert.assertEquals("theLog", logger.getLog());
        Assert.assertEquals(LoggerType.CONSOLE, logger.getType());
        ManifestModel manifest = bpm.getManifest();
        ContainerModel container = manifest.getContainer();
        ResourcesModel resources = manifest.getResources();
        RemoteModel remote = manifest.getRemote();
        if (CONTAINER_XML.equals(xml)) {
            Assert.assertNull(resources);
            Assert.assertNull(remote);
            ReleaseId rid = Containers.toReleaseId(container.getReleaseId());
            Assert.assertEquals("theGroupId", rid.getGroupId());
            Assert.assertEquals("theArtifactId", rid.getArtifactId());
            Assert.assertEquals("theVersion", rid.getVersion());
            Assert.assertEquals("theBase", container.getBaseName());
            Assert.assertEquals("theSession", container.getSessionName());
            Assert.assertTrue(container.isScan());
            Assert.assertEquals(Long.valueOf(1000), container.getScanInterval());
        } else if (RESOURCES_XML.equals(xml)) {
            Assert.assertNull(container);
            Assert.assertNull(remote);
            ResourceModel bpmn2Resource = resources.getResources().get(0);
            Assert.assertEquals("foobar.bpmn", bpmn2Resource.getLocation());
            Assert.assertEquals(ResourceType.valueOf("BPMN2"), bpmn2Resource.getType());
            ResourceModel dtableResource = resources.getResources().get(1);
            Assert.assertEquals("foobar.xls", dtableResource.getLocation());
            Assert.assertEquals(ResourceType.valueOf("DTABLE"), dtableResource.getType());
            ResourceDetail dtableDetail = dtableResource.getDetail();
            Assert.assertEquals("XLS", dtableDetail.getInputType());
            Assert.assertEquals("MySheet", dtableDetail.getWorksheetName());
            /* SWITCHYARD-1662
            Assert.assertEquals(true, dtableDetail.isUsingExternalTypes());
            */
        } else if (REMOTEJMS_XML.equals(xml) || REMOTEREST_XML.equals(xml)) {
            Assert.assertNull(container);
            Assert.assertNull(resources);
            Assert.assertEquals("groupId:artifactId:0.0.1", remote.getDeploymentId());
            Assert.assertEquals("kermit", remote.getUserName());
            Assert.assertEquals("the-frog-1", remote.getPassword());
            Assert.assertEquals(5, remote.getTimeout().intValue());
            ExtraJaxbClassesModel extraJaxbClasses = remote.getExtraJaxbClasses();
            Assert.assertNotNull(extraJaxbClasses);
            List<ExtraJaxbClassModel> extraJaxbClassList = extraJaxbClasses.getExtraJaxbClasses();
            Assert.assertEquals(2, extraJaxbClassList.size());
            Assert.assertEquals(Object.class, extraJaxbClassList.get(0).getClazz(loader));
            Assert.assertEquals(String.class, extraJaxbClassList.get(1).getClazz(loader));
View Full Code Here

TOP

Related Classes of org.switchyard.component.common.knowledge.config.model.RemoteModel

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.