Examples of ParameterNotFoundException


Examples of org.opengis.parameter.ParameterNotFoundException

         */
        if (groups.isEmpty()) {
            final GeneralParameterDescriptor check =
                    ((ParameterDescriptorGroup) descriptor).descriptor(name);
            if (!(check instanceof ParameterDescriptorGroup)) {
                throw new ParameterNotFoundException(Errors.format(
                          ErrorKeys.MISSING_PARAMETER_$1, name), name);
            }
        }
        return groups;
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

            throws ParameterNotFoundException, InvalidParameterCardinalityException
    {
        final GeneralParameterDescriptor check =
                ((ParameterDescriptorGroup) descriptor).descriptor(name);
        if (!(check instanceof ParameterDescriptorGroup)) {
            throw new ParameterNotFoundException(Errors.format(
                      ErrorKeys.MISSING_PARAMETER_$1, name), name);
        }
        int count = 0;
        for (final Iterator it=values.iterator(); it.hasNext();) {
            final GeneralParameterValue value = (GeneralParameterValue) it.next();
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

            final ParameterValue value = (ParameterValue) values.get(i);
            if (AbstractIdentifiedObject.nameMatches(value.getDescriptor(), name)) {
                return value;
            }
        }
        throw new ParameterNotFoundException(Errors.format(
                  ErrorKeys.MISSING_PARAMETER_$1, name), name);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

    /**
     * Always throws an exception, since JAI's {@linkplain ParameterList parameter list}
     * don't have subgroups.
     */
    public List<ParameterValueGroup> groups(final String name) throws ParameterNotFoundException {
        throw new ParameterNotFoundException(Errors.format(
                  ErrorKeys.MISSING_PARAMETER_$1, name), name);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

    /**
     * Always throws an exception, since JAI's {@linkplain ParameterList parameter list}
     * don't have subgroups.
     */
    public ParameterValueGroup addGroup(final String name) throws ParameterNotFoundException {
        throw new ParameterNotFoundException(Errors.format(
                  ErrorKeys.MISSING_PARAMETER_$1, name), name);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

            if (subgroups==null || subgroups.isEmpty()) {
                break;
            }
            parameters = subgroups.remove(0).descriptors();
        }
        throw new ParameterNotFoundException(Errors.format(
                  ErrorKeys.MISSING_PARAMETER_$1, name), name);
    }
View Full Code Here

Examples of org.rhq.enterprise.gui.legacy.exception.ParameterNotFoundException

    public static String getRequiredRequestParameter(ServletRequest request, String name) {
        logWarningIfParameterHasMultipleValues(request, name);
        String value = request.getParameter(name);
        if (value == null) {
            throw new ParameterNotFoundException("Required request parameter '" + name + "' does not exist.");
        }

        return value;
    }
View Full Code Here

Examples of org.rhq.enterprise.gui.legacy.exception.ParameterNotFoundException

    }

    public static int getRequiredIntRequestParameter(ServletRequest request, String name) {
        String value = getRequiredRequestParameter(request, name);
        if (value.length() == 0) {
            throw new ParameterNotFoundException("Required request parameter '" + name + "' has an empty value.");
        }

        int intValue;
        try {
            intValue = Integer.parseInt(value);
        } catch (NumberFormatException e) {
            throw new ParameterNotFoundException("Request parameter '" + name + "' has value '" + value
                + "', which is not a valid integer.");
        }

        return intValue;
    }
View Full Code Here

Examples of org.rhq.enterprise.gui.legacy.exception.ParameterNotFoundException

        if (null == alertDefinition) {
            String alertDefinitionParameter = request.getParameter(Constants.ALERT_DEFINITION_PARAM);

            if (null == alertDefinitionParameter) {
                throw new ParameterNotFoundException(Constants.ALERT_DEFINITION_PARAM);
            } else {
                Subject user = RequestUtils.getSubject(request);
                int alertDefinitionId = Integer.parseInt(alertDefinitionParameter);
                alertDefinition = LookupUtil.getAlertDefinitionManager()
                    .getAlertDefinitionById(user, alertDefinitionId);
View Full Code Here

Examples of org.rhq.enterprise.gui.legacy.exception.ParameterNotFoundException

     * @throws ParameterNotFoundException If the parameter name is not found in the request
     */
    public static String getStringParameter(HttpServletRequest request, String name) throws ParameterNotFoundException {
        String[] values = request.getParameterValues(name);
        if (values == null) {
            throw new ParameterNotFoundException(name + " not found");
        } else if (values[0].length() == 0) {
            throw new ParameterNotFoundException(name + " was empty");
        } else {
            return values[0]; // Just return the first value
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.