Package org.apache.cxf.tools.common

Examples of org.apache.cxf.tools.common.Processor


            tearDown();
        }
    }

    private void processWSDL(ToolContext env, String ft) {
        Processor processor = new JavaToWSDLProcessor();
        processor.setEnvironment(env);
        processor.process();
       
       
        if (ft.equals(ToolConstants.JAXWS_FRONTEND)) {
            if (env.optionSet(ToolConstants.CFG_SERVER) || env.optionSet(ToolConstants.CFG_CLIENT)) {
                processor = new JAXWSFrontEndProcessor();
                processor.setEnvironment(env);
                processor.process();
            }
        } else {              
            processor = new SimpleFrontEndProcessor();
            processor.setEnvironment(env);
            processor.process();
        }
    }
View Full Code Here


        assertNotNull(generators);
        assertEquals(2, generators.size());
        assertTrue(generators.get(0) instanceof AntGenerator);
        assertTrue(generators.get(1) instanceof ImplGenerator);
        */
        Processor processor = profile.getProcessor();
        assertNotNull(processor);
        assertTrue(processor instanceof WSDLToJavaProcessor);

        AbstractWSDLBuilder builder = profile.getWSDLBuilder();
        assertNotNull(builder);
View Full Code Here

        }
        context.put(ToolConstants.SCHEMA_MAP, schemas);
       
        context.put(ToolConstants.PORTTYPE_MAP, interfaces);
        context.put(ClassCollector.class, new ClassCollector());
        Processor processor = frontend.getProcessor();
        if (processor instanceof ClassNameProcessor) {
            processor.setEnvironment(context);
            for (ServiceInfo service : serviceList) {

                context.put(ServiceInfo.class, service);

                ((ClassNameProcessor)processor).processClassNames();

                context.put(ServiceInfo.class, null);
            }
        }
        generateTypes();

        for (ServiceInfo service : serviceList) {

            context.put(ServiceInfo.class, service);

            validate(service);

            // Build the JavaModel from the ServiceModel
            processor.setEnvironment(context);
            processor.process();

            if (!isSuppressCodeGen()) {
                // Generate artifacts
                for (FrontEndGenerator generator : frontend.getGenerators()) {
                    generator.generate(context);
View Full Code Here

            for (String r : reserved) {
                collector.reserveClass(r);
            }
        }
        context.put(ClassCollector.class, collector);
        Processor processor = frontend.getProcessor();
        if (processor instanceof ClassNameProcessor) {
            processor.setEnvironment(context);
            for (ServiceInfo service : serviceList) {

                context.put(ServiceInfo.class, service);

                ((ClassNameProcessor)processor).processClassNames();

                context.put(ServiceInfo.class, null);
            }
        }
        generateTypes();

        for (ServiceInfo service : serviceList) {

            context.put(ServiceInfo.class, service);

            validate(service);

            // Build the JavaModel from the ServiceModel
            processor.setEnvironment(context);
            processor.process();
        }
        if (!isSuppressCodeGen()) {
            // Generate artifacts
            for (FrontEndGenerator generator : frontend.getGenerators()) {
                generator.generate(context);
View Full Code Here

            for (String r : reserved) {
                collector.reserveClass(r);
            }
        }
        context.put(ClassCollector.class, collector);
        Processor processor = frontend.getProcessor();
        if (processor instanceof ClassNameProcessor) {
            processor.setEnvironment(context);
            for (ServiceInfo service : serviceList) {

                context.put(ServiceInfo.class, service);

                ((ClassNameProcessor)processor).processClassNames();

                context.put(ServiceInfo.class, null);
            }
        }
       
        if (context.optionSet(ToolConstants.CFG_NO_TYPES)) {
            context.remove(ToolConstants.CFG_TYPES);
            context.remove(ToolConstants.CFG_ALL);
            context.remove(ToolConstants.CFG_COMPILE);
        }
       
        generateTypes();

        for (ServiceInfo service : serviceList) {

            context.put(ServiceInfo.class, service);

            validate(service);

            // Build the JavaModel from the ServiceModel
            processor.setEnvironment(context);
            processor.process();
        }
        if (!isSuppressCodeGen()) {
            // Generate artifacts
            for (FrontEndGenerator generator : frontend.getGenerators()) {
                generator.generate(context);
View Full Code Here

            for (String r : reserved) {
                collector.reserveClass(r);
            }
        }
        context.put(ClassCollector.class, collector);
        Processor processor = frontend.getProcessor();
        if (processor instanceof ClassNameProcessor) {
            processor.setEnvironment(context);
            for (ServiceInfo service : serviceList) {

                context.put(ServiceInfo.class, service);

                ((ClassNameProcessor)processor).processClassNames();

                context.put(ServiceInfo.class, null);
            }
        }
       
        if (context.optionSet(ToolConstants.CFG_NO_TYPES)) {
            context.remove(ToolConstants.CFG_TYPES);
            context.remove(ToolConstants.CFG_ALL);
            context.remove(ToolConstants.CFG_COMPILE);
        }
       
        generateTypes();

        for (ServiceInfo service : serviceList) {

            context.put(ServiceInfo.class, service);

            validate(service);

            // Build the JavaModel from the ServiceModel
            processor.setEnvironment(context);
            processor.process();
        }
        if (!isSuppressCodeGen()) {
            // Generate artifacts
            for (FrontEndGenerator generator : frontend.getGenerators()) {
                generator.generate(context);
View Full Code Here

                }
            }
            context.put(ToolConstants.SCHEMA_MAP, schemas);
            context.put(ToolConstants.PORTTYPE_MAP, interfaces);
            context.put(ClassCollector.class, new ClassCollector());
            Processor processor = frontend.getProcessor();
            if (processor instanceof ClassNameProcessor) {
                processor.setEnvironment(context);
                for (ServiceInfo service : serviceList) {

                    context.put(ServiceInfo.class, service);

                    ((ClassNameProcessor)processor).processClassNames();

                    context.put(ServiceInfo.class, null);
                }
            }
            generateTypes();

            for (ServiceInfo service : serviceList) {

                context.put(ServiceInfo.class, service);

                validate(service);

                // Build the JavaModel from the ServiceModel
                processor.setEnvironment(context);
                processor.process();


                if (!isSuppressCodeGen()) {
                    // Generate artifacts
                    for (FrontEndGenerator generator : frontend.getGenerators()) {
View Full Code Here

    public JavaToJS(ToolSpec toolspec) throws Exception {
        super(TOOL_NAME, toolspec);
    }
   
    public void execute(boolean exitOnFinish) {
        Processor processor = new JavaToJSProcessor();
        try {
            super.execute(exitOnFinish);
            if (!hasInfoOption()) {
                ToolContext env = new ToolContext();
                env.setParameters(getParametersMap(new HashSet<String>()));
                if (env.get(ToolConstants.CFG_OUTPUTDIR) == null) {
                    env.put(ToolConstants.CFG_OUTPUTDIR, ".");
                }

                if (isVerboseOn()) {
                    env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
                }
                env.put(ToolConstants.CFG_CMD_ARG, getArgument());

                validate(env);
               
                processor.setEnvironment(env);
                processor.process();
            }
        } catch (ToolException ex) {
            if (ex.getCause() instanceof BadUsageException) {
                printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());
            }
View Full Code Here

        }
        return profile;
    }

    private Processor loadProcessor(String fullClzName) {
        Processor processor = null;
        try {
            processor = (Processor) Class.forName(fullClzName).newInstance();
        } catch (Exception e) {
            Message msg = new Message("LOAD_PROCESSOR_FAILED", LOG, fullClzName);
            LOG.log(Level.SEVERE, msg.toString());
View Full Code Here

                }
            }
            context.put(ToolConstants.SCHEMA_MAP, schemas);
            context.put(ToolConstants.PORTTYPE_MAP, interfaces);
            context.put(ClassCollector.class, new ClassCollector());
            Processor processor = frontend.getProcessor();
            if (processor instanceof ClassNameProcessor) {
                processor.setEnvironment(context);
                for (ServiceInfo service : serviceList) {

                    context.put(ServiceInfo.class, service);

                    ((ClassNameProcessor)processor).processClassNames();

                    context.put(ServiceInfo.class, null);
                }
            }
            generateTypes();

            for (ServiceInfo service : serviceList) {

                context.put(ServiceInfo.class, service);

                validate(service);

                // Build the JavaModel from the ServiceModel
                processor.setEnvironment(context);
                processor.process();

                if (!isSuppressCodeGen()) {
                    // Generate artifacts
                    for (FrontEndGenerator generator : frontend.getGenerators()) {
                        generator.generate(context);
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.Processor

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.