Package org.apache.cxf.tools.common.toolspec.parser

Examples of org.apache.cxf.tools.common.toolspec.parser.CommandDocument


    protected static InputStream getResourceAsStream(String file) {
        return WSDLToJavaContainer.class.getResourceAsStream(file);
    }

    public void checkParams(ErrorVisitor errors) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here


    protected static InputStream getResourceAsStream(String file) {
        return WSDLToJavaContainer.class.getResourceAsStream(file);
    }

    public void checkParams(ErrorVisitor errors) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here

     * get all parameters in a map
     * @param stringArrayKeys, contains keys, whose value should be string array
     */
    protected Map<String, Object> getParametersMap(Set stringArrayKeys) {
        Map<String, Object> map = new HashMap<String, Object>();
        CommandDocument doc = getCommandDocument();
        if (doc == null) {
            return map;
        }
        String[] keys = doc.getParameterNames();
        if (keys == null) {
            return map;
        }
        for (int i = 0; i < keys.length; i++) {
            if (stringArrayKeys.contains(keys[i])) {
                map.put(keys[i], doc.getParameters(keys[i]));
            } else {
                map.put(keys[i], doc.getParameter(keys[i]));
            }
        }
        return map;
    }
View Full Code Here

            ex.printStackTrace();
        }
    }

    public void checkParams(ErrorVisitor errors) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here

    protected static InputStream getResourceAsStream(String file) {
        return WSDLToJavaContainer.class.getResourceAsStream(file);
    }

    public void checkParams(ErrorVisitor errors) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here

            .getClassLoader());
    }

    public void checkParams(ErrorVisitor errs) throws ToolException {

        CommandDocument doc = super.getCommandDocument();

        if (doc.hasParameter("frontend")) {
            String ft = doc.getParameter("frontend");          
            if (!"simple".equalsIgnoreCase(ft) && !"jaxws".equalsIgnoreCase(ft)) {
                Message msg = new Message("INVALID_FORNTEND", LOG, new Object[]{ft});              
                errs.add(new ErrorVisitor.UserError(msg.toString()));
            }
        }
       
       
        if (doc.hasParameter("wrapperbean")) {
            String ft = doc.getParameter("frontend");
            if (ft != null &&  !"jaxws".equalsIgnoreCase(ft)) {
                Message msg = new Message("CANT_GEN_WRAPPERBEAN", LOG);              
                errs.add(new ErrorVisitor.UserError(msg.toString()));
            }
        }
View Full Code Here

        }
    }

    public void checkParams(ErrorVisitor errs) throws ToolException {
        super.checkParams(errs);
        CommandDocument doc = super.getCommandDocument();

        if (doc.hasParameter(ToolConstants.CFG_FRONTEND)) {
            String ft = doc.getParameter(ToolConstants.CFG_FRONTEND);
            if (!ToolConstants.JAXWS_FRONTEND.equals(ft)
                && !ToolConstants.SIMPLE_FRONTEND.equals(ft)) {
                Message msg = new Message("INVALID_FRONTEND", LOG, new Object[] {ft});
                errs.add(new ErrorVisitor.UserError(msg.toString()));
            }
           
            if (ToolConstants.SIMPLE_FRONTEND.equals(ft)
                && doc.getParameter(ToolConstants.CFG_DATABINDING) != null
                && !ToolConstants.
                AEGIS_DATABINDING.equals(doc.getParameter(ToolConstants.CFG_DATABINDING))) {
                Message msg = new Message("INVALID_DATABINDING_FOR_SIMPLE", LOG);
                errs.add(new ErrorVisitor.UserError(msg.toString()));
            }
           
        }

        if (doc.hasParameter(ToolConstants.CFG_WRAPPERBEAN)) {
            String ft = doc.getParameter(ToolConstants.CFG_FRONTEND);
            if (ft != null && !ToolConstants.JAXWS_FRONTEND.equals(ft)) {
                Message msg = new Message("WRAPPERBEAN_WITHOUT_JAXWS", LOG);
                errs.add(new ErrorVisitor.UserError(msg.toString()));
            }
        }
View Full Code Here

    protected static InputStream getResourceAsStream(String file) {
        return WSDLToJavaContainer.class.getResourceAsStream(file);
    }

    public void checkParams(ErrorVisitor errors) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here

            ex.printStackTrace();
        }
    }

    public void checkParams(ErrorVisitor errors) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here

            ex.printStackTrace();
        }
    }

    public void checkParams(ErrorVisitor errors) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.toolspec.parser.CommandDocument

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.