Package org.apache.camel

Examples of org.apache.camel.ComponentConfiguration.createParameterJsonSchema()


        EndpointConfiguration conf = comp.createConfiguration("weather:foo?location=Madrid,Spain");

        assertEquals("Madrid,Spain", conf.getParameter("location"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"lat\": { \"type\": \"string\""));
        assertTrue(json.contains("\"location\": { \"type\": \"string\""));
        assertTrue(json.contains("\"mode\": { \"type\": \"string\", \"javaType\": \"org.apache.camel.component.weather.WeatherMode\", \"enum\": [ \"HTML\", \"JSON\", \"XML\" ]"));
View Full Code Here


                + "synchronous=false&contentCache=true");

        assertEquals("true", configuration.getParameter("contentCache"));

        ComponentConfiguration componentConfiguration = component.createComponentConfiguration();
        String json = componentConfiguration.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"resourceUri\": { \"type\": \"string\""));
        assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\""));
    }
View Full Code Here

        assertEquals("true", conf.getParameter("stateful"));
        assertEquals("false", conf.getParameter("deleteJob"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"stateful\": { \"type\": \"boolean\""));
        assertTrue(json.contains("\"deleteJob\": { \"type\": \"boolean\""));
    }
View Full Code Here

        assertEquals("PAYLOAD", conf.getParameter("dataFormat"));
        assertEquals("wsdl/hello_world.wsdl", conf.getParameter("wsdlURL"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"serviceNameString\": { \"type\": \"string\""));
        assertTrue(json.contains("\"isWrapped\": { \"type\": \"boolean\""));
    }
View Full Code Here

        assertEquals("true", conf.getParameter("sendToAll"));
        assertEquals("false", conf.getParameter("useStreaming"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();

        assertTrue(json.contains("\"useStreaming\": { \"type\": \"boolean\""));
        assertTrue(json.contains("\"sendToAll\": { \"type\": \"boolean\""));
    }
View Full Code Here

        EndpointConfiguration conf = comp.createConfiguration("dataset:foo?minRate=3");

        assertEquals("3", conf.getParameter("minRate"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"preloadSize\": { \"type\": \"long\" }"));
        assertTrue(json.contains("\"minRate\": { \"type\": \"int\" }"));
    }
View Full Code Here

        EndpointConfiguration conf = comp.createConfiguration("jms:queue:foo?replyTo=bar");

        assertEquals("bar", conf.getParameter("replyTo"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"replyToDestination\": { \"type\": \"java.lang.String\" }"));
        assertTrue(json.contains("\"transacted\": { \"type\": \"boolean\" }"));
    }
View Full Code Here

    public String componentParameterJsonSchema(String componentName) throws Exception {
        Component component = context.getComponent(componentName);
        if (component != null) {
            ComponentConfiguration configuration = component.createComponentConfiguration();
            return configuration.createParameterJsonSchema();
        } else {
            return null;
        }
    }
View Full Code Here

        EndpointConfiguration conf = comp.createConfiguration("mock:foo?retainFirst=10");

        assertEquals("10", conf.getParameter("retainFirst"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"expectedCount\": { \"type\": \"int\" }"));
        assertTrue(json.contains("\"retainFirst\": { \"type\": \"int\" }"));
    }
View Full Code Here

        EndpointConfiguration conf = comp.createConfiguration("direct-vm:foo?block=false");

        assertEquals("false", conf.getParameter("block"));

        ComponentConfiguration compConf = comp.createComponentConfiguration();
        String json = compConf.createParameterJsonSchema();
        assertNotNull(json);

        assertTrue(json.contains("\"timeout\": { \"type\": \"long\" }"));
        assertTrue(json.contains("\"block\": { \"type\": \"boolean\" }"));
    }
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.