Package com.volantis.map.common.param

Examples of com.volantis.map.common.param.MissingParameterException


        return params.getProperty(name);
    }

    private void checkParameter(String name) throws MissingParameterException {
        if (!params.containsKey(name)) {
            throw new MissingParameterException("Missing parameter: " + name);
        }
    }
View Full Code Here


        String result;
        Object value = objects.get(name);
        if (value instanceof String) {
            result = (String)value;
        } else if (null != value) {
            throw new MissingParameterException("incompatible-parameter",
                    new String[] { name, "string", value.getClass().getName() });
        } else {
            throw new MissingParameterException("missing-parameter", name);
        }
        return result;
    }
View Full Code Here

        if (value instanceof Float) {
            result = (Float)value;
        } else if (value instanceof String) {
            result = Float.valueOf((String)value);
        } else if (value != null ) {
            throw new MissingParameterException("incompatible-parameter",
                    new String[] { name, "float", value.getClass().getName() });
        } else {
            throw new MissingParameterException("missing-parameter", name);       
        }
        return result;
    }
View Full Code Here

        if (value instanceof Integer) {
            result = (Integer)value;
        } else if (value instanceof String) {
            result =Integer.valueOf((String)value);
        } else if (value != null ) {
            throw new MissingParameterException("incompatible-parameter",
                    new String[] { name, "int", value.getClass().getName() });
        } else {
            throw new MissingParameterException("missing-parameter", name);
        }
        return result;
    }
View Full Code Here

        if (value instanceof Boolean) {
            result = (Boolean)value;
        } else if (value instanceof String) {
            result =Boolean.valueOf((String)value);
        } else if (value != null ) {
            throw new MissingParameterException("incompatible-parameter",
                    new String[] { name, "boolean", value.getClass().getName() });
        } else {
            throw new MissingParameterException("missing-parameter", name);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of com.volantis.map.common.param.MissingParameterException

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.