Package org.apache.cxf.tools.common.model

Examples of org.apache.cxf.tools.common.model.JavaModel


    public void process() throws ToolException {      
        List<ServiceInfo> services = (List<ServiceInfo>)context.get(ToolConstants.SERVICE_LIST);
        ServiceInfo serviceInfo = services.get(0);
       
        JavaInterface jinf = JavaFirstUtil.serviceInfo2JavaInf(serviceInfo);
        JavaModel jm = new JavaModel();
        jm.addInterface("inf", jinf);
        jinf.setJavaModel(jm);
        context.put(JavaModel.class, jm);
        generators.add(new SimpleSEIGenerator());
        generators.add(new SimpleImplGenerator());
        generators.add(new SimpleServerGenerator());
View Full Code Here


    }


    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }     
       
        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setAttributes("seiClass", env.get(ToolConstants.SEI_CLASS));
View Full Code Here

    }


    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }
       
        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setAttributes("seiClass", env.get(ToolConstants.SEI_CLASS));
View Full Code Here

    }


    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }
       
        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setCommonAttributes();
View Full Code Here

    }

    public void generate(ToolContext penv) throws ToolException {

        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setAttributes("implClass", env.get(ToolConstants.IMPL_CLASS));
View Full Code Here

    }


    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }
       
        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setCommonAttributes();
View Full Code Here

    }

    public void generate(ToolContext penv) throws ToolException {

        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);
       
        if (passthrough()) {
            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();

        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setAttributes("address", (String)penv.get(ToolConstants.CFG_ADDRESS));
View Full Code Here

        return true;
    }

    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);

        if (passthrough()) {
            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();
        QName service = (QName)env.get(ToolConstants.SERVICE_NAME);
        QName port = (QName)env.get(ToolConstants.PORT_NAME);
        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
View Full Code Here

        return true;
    }

    public void generate(ToolContext penv) throws ToolException {
        this.env = penv;
        JavaModel javaModel = env.get(JavaModel.class);

        if (passthrough()) {
            return;
        }

        Map<String, JavaInterface> interfaces = javaModel.getInterfaces();
        QName service = (QName)env.get(ToolConstants.SERVICE_NAME);
        for (JavaInterface intf : interfaces.values()) {
            clearAttributes();
            setAttributes("intf", intf);
            setAttributes("service", service);
View Full Code Here

                                  intf.getPackageName() + "." + intf.getName());
    }

    public void process(ServiceInfo serviceInfo) throws ToolException {
        operationMap.clear();
        JavaModel jmodel = context.get(JavaModel.class);


        InterfaceInfo interfaceInfo = serviceInfo.getInterface();

        if (interfaceInfo == null) {
            return;
        }

        JavaInterface intf = new InterfaceMapper(context).map(interfaceInfo);
        intf.setJavaModel(jmodel);
       
        JAXWSBinding jaxwsBinding = null;
        if (serviceInfo.getDescription() != null) {
            jaxwsBinding = serviceInfo.getDescription().getExtensor(JAXWSBinding.class);
        }
        JAXWSBinding infBinding = interfaceInfo.getExtensor(JAXWSBinding.class);
        if (infBinding != null && infBinding.getPackage() != null) {
            intf.setPackageName(infBinding.getPackage());
        } else if (jaxwsBinding != null && jaxwsBinding.getPackage() != null) {
            intf.setPackageName(jaxwsBinding.getPackage());
        }
       
        if (infBinding != null && !infBinding.getPackageJavaDoc().equals("")) {
            intf.setPackageJavaDoc(infBinding.getPackageJavaDoc());
        } else if (jaxwsBinding != null && !jaxwsBinding.getPackageJavaDoc().equals("")) {
            intf.setPackageJavaDoc(jaxwsBinding.getPackageJavaDoc());
        }


        String name = intf.getName();
        if (infBinding != null
            && infBinding.getJaxwsClass() != null
            && infBinding.getJaxwsClass().getClassName() != null) {
            name = infBinding.getJaxwsClass().getClassName();
            intf.setClassJavaDoc(infBinding.getJaxwsClass().getComments());
        }
        intf.setName(name);

        Element handler = (Element)context.get(ToolConstants.HANDLER_CHAIN);
        intf.setHandlerChains(handler);


        Collection<OperationInfo> operations = interfaceInfo.getOperations();

        for (OperationInfo operation : operations) {
            if (isOverloading(operation.getName())) {
                LOG.log(Level.WARNING, "SKIP_OVERLOADED_OPERATION", operation.getName());
                continue;
            }
            OperationProcessor operationProcessor = new OperationProcessor(context);
            operationProcessor.process(intf, operation);
        }

        jmodel.setLocation(intf.getLocation());
        jmodel.addInterface(intf.getName(), intf);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.model.JavaModel

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.