Examples of ParameterNotFoundException


Examples of org.apache.stratos.cartridge.agent.exception.ParameterNotFoundException

    if (System.getProperty(parameterName) != null) {
      return System.getProperty(parameterName);
    }

    String message = "Cannot find the value of required parameter: "+parameterName;
    throw new ParameterNotFoundException(message);
  }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

        }
        if (fallback >= 0) {
            if (ambiguity < 0) {
                return (ParameterValue<?>) values.get(fallback);
            }
            throw new ParameterNotFoundException(Errors.format(Errors.Keys.AmbiguousName_3,
                    values.descriptor(fallback).getName(), values.descriptor(ambiguity).getName(), name), name);
        }
        /*
         * No existing parameter found. The parameter may be optional. Check if a descriptor exists.
         * If such a descriptor is found, create the parameter, add it to the values list and returns it.
         */
        final GeneralParameterDescriptor descriptor = values.descriptor.descriptor(name);
        if (descriptor instanceof ParameterDescriptor<?> && descriptor.getMaximumOccurs() != 0) {
            final ParameterValue<?> value = ((ParameterDescriptor<?>) descriptor).createValue();
            values.addUnchecked(value);
            return value;
        }
        throw new ParameterNotFoundException(Errors.format(Errors.Keys.ParameterNotFound_2,
                values.descriptor.getName(), name), name);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

         * it is simply an optional group not yet defined), then returns an empty list.
         */
        if (groups.isEmpty()) {
            final ParameterDescriptorGroup descriptor = values.descriptor;
            if (!(descriptor.descriptor(name) instanceof ParameterDescriptorGroup)) {
                throw new ParameterNotFoundException(Errors.format(
                        Errors.Keys.ParameterNotFound_2, descriptor.getName(), name), name);
            }
        }
        return groups;
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

    {
        final ParameterValueList values = this.values; // Protect against accidental changes.
        final ParameterDescriptorGroup descriptor = values.descriptor;
        final GeneralParameterDescriptor child = descriptor.descriptor(name);
        if (!(child instanceof ParameterDescriptorGroup)) {
            throw new ParameterNotFoundException(Errors.format(
                    Errors.Keys.ParameterNotFound_2, descriptor.getName(), name), name);
        }
        final ParameterValueGroup value = ((ParameterDescriptorGroup) child).createValue();
        values.add(value);
        return value;
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

            final ParameterDescriptor<Integer> param = descriptors.getDimensionDescriptor(i);
            if (IdentifiedObjects.isHeuristicMatchForName(param, name)) {
                return dimensions[i];
            }
        }
        throw (ParameterNotFoundException) new ParameterNotFoundException(Errors.format(
                Errors.Keys.ParameterNotFound_2, getName(), name), name).initCause(cause);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

    /**
     * Always throws an exception since this group does not contain subgroups.
     */
    @Override
    public List<ParameterValueGroup> groups(final String name) throws ParameterNotFoundException {
        throw new ParameterNotFoundException(Errors.format(Errors.Keys.ParameterNotFound_2, getName(), name), name);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

    /**
     * Always throws an exception since this group does not contain subgroups.
     */
    @Override
    public ParameterValueGroup addGroup(String name) throws ParameterNotFoundException, IllegalStateException {
        throw new ParameterNotFoundException(Errors.format(Errors.Keys.ParameterNotFound_2, getName(), name), name);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

            }
        }
        if (fallback != null && ambiguity == null) {
            return fallback;
        }
        throw new ParameterNotFoundException(ambiguity != null
                ? Errors.format(Errors.Keys.AmbiguousName_3, fallback.getName(), ambiguity.getName(), name)
                : Errors.format(Errors.Keys.ParameterNotFound_2, getName(), name), name);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

        for (final ParameterDescriptor<Integer> param : dimensions) {
            if (IdentifiedObjects.isHeuristicMatchForName(param, name)) {
                return param;
            }
        }
        throw (ParameterNotFoundException) new ParameterNotFoundException(Errors.format(
                Errors.Keys.ParameterNotFound_2, caller.getName(), name), name).initCause(cause);
    }
View Full Code Here

Examples of org.opengis.parameter.ParameterNotFoundException

                    values.add(value);
                    return value;
                }
            }
        }
        throw new ParameterNotFoundException(Errors.format(
                  ErrorKeys.MISSING_PARAMETER_$1, name), name);
    }
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.