Package org.objectweb.celtix.tools.common.toolspec.parser

Examples of org.objectweb.celtix.tools.common.toolspec.parser.CommandDocument


            ex.printStackTrace();
        }
    }

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

        if (!doc.hasParameter("xsdurl")) {
            errors.add(new ErrorVisitor.UserError("XSD 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

            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

            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

     * 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();
        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

            throw new ToolException(ex.getMessage(), ex.getCause());
        }      
    }

    private void initialise(ProcessorEnvironment env) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (env.optionSet(ToolCorbaConstants.CFG_IDLFILE)) {
            String idl = doc.getParameter(ToolCorbaConstants.CFG_IDLFILE);
            env.put(ToolCorbaConstants.CFG_IDLFILE, idl);
        }
        if (env.optionSet(ToolCorbaConstants.CFG_TNS)) {
            env.put(ToolCorbaConstants.CFG_TNS, doc.getParameter(ToolCorbaConstants.CFG_TNS));
        }       
        if (env.optionSet(ToolConstants.CFG_OUTPUTDIR)) {
            env.put(ToolConstants.CFG_OUTPUTDIR, doc.getParameter(ToolConstants.CFG_OUTPUTDIR));
        }
        if (env.optionSet(ToolCorbaConstants.CFG_ADDRESS)) {
            env.put(ToolCorbaConstants.CFG_ADDRESS, doc.getParameter(ToolCorbaConstants.CFG_ADDRESS));
        }
       
        //need to add all the other options
    }
View Full Code Here

            }
        }
    }

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

        if (!doc.hasParameter(ToolCorbaConstants.CFG_IDLFILE)) {
            errors.add(new ErrorVisitor.UserError("IDL file has to be specified"));
        }
        if ((doc.hasParameter(ToolCorbaConstants.CFG_SCHEMA))
            && (doc.hasParameter(ToolCorbaConstants.CFG_IMPORTSCHEMA))) {
            errors.add(new ErrorVisitor.UserError("Options -n & -T cannot be used together"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here

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

                CommandDocument doc = super.getCommandDocument();
                if (doc.hasParameter("corba")) {
                    env.put(ToolCorbaConstants.CFG_CORBA, Boolean.TRUE);
                }
                if (doc.hasParameter("idl")) {
                    env.put(ToolCorbaConstants.CFG_IDL, Boolean.TRUE);
                }

                initialise(env);
                validate(env);
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.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.