Package org.switchyard.config.model.resource

Examples of org.switchyard.config.model.resource.ResourceModel


            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());
            */
 
View Full Code Here


        if (resourceAnnotations == null || resourceAnnotations.length == 0) {
            return null;
        }
        ResourcesModel resourcesModel = new V1ResourcesModel(knowledgeNamespace.uri());
        for (Resource resourceAnnotation : resourceAnnotations) {
            ResourceModel resourceModel = new V1ResourceModel(knowledgeNamespace.uri());
            String location = resourceAnnotation.location();
            if (!UNDEFINED.equals(location)) {
                resourceModel.setLocation(location);
            }
            String type = resourceAnnotation.type();
            if (!UNDEFINED.equals(type)) {
                resourceModel.setType(ResourceType.valueOf(type));
            }
            ResourceDetailModel resourceDetailModel = toResourceDetailModel(resourceAnnotation.detail(), knowledgeNamespace);
            if (resourceDetailModel != null) {
                resourceModel.setDetail(resourceDetailModel);
            }
            resourcesModel.addResource(resourceModel);
        }
        return resourcesModel;
    }
View Full Code Here

            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());
            */
 
View Full Code Here

     * @param desc the descriptor
     */
    public V1ResourcesModel(Configuration config, Descriptor desc) {
        super(config, desc);
        for (Configuration resource_config : config.getChildren(RESOURCE)) {
            ResourceModel resource = (ResourceModel)readModel(resource_config);
            if (resource != null) {
                _resources.add(resource);
            }
        }
        setModelChildrenOrder(RESOURCE);
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.resource.ResourceModel

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.