/*
Verify the input parameters.
321195
private void checkInParameters() {
        // TODO Auto-generated method stub
        checkNull(inFlow);
        if (pMode < 0 || pMode > 1) {
            String message = msg.message("distancetooutlet.modeOutRange");
            pm.errorMessage(message);
            throw new IllegalArgumentException(message);
        }

    }
31331
private String checkInputParameter(Expression expression)
    {
        return (expression instanceof InputParameter) ? kunderaQuery.getParametersMap()
                .get((expression).toParsedText()).toString() : expression.toParsedText().toString();
    }
1263568
protected void checkParameters() {
        if (homeDir == null && classpath == null) {
            throw new BuildException("either home attribute or " + "classpath attributes "
                    + " must be defined for task <" + getTaskName() + "/>", getLocation());
        }

        if (pluginList != null) {
            // Make sure that all plugins are actually Jar files.
            String[] pluginFileList = pluginList.list();
            for (String pluginFile : pluginFileList) {
                if (!pluginFile.endsWith(".jar")) {
                    throw new BuildException("plugin file " + pluginFile + " is not a Jar file " + "in task <" + getTaskName()
                    + "/>", getLocation());
                }
            }
        }

        for (SystemProperty systemProperty : systemPropertyList) {
            if (systemProperty.getName() == null || systemProperty.getValue() == null) {
                throw new BuildException("systemProperty elements must have name and value attributes");
            }
        }
    }
1261250
@Override
	protected void validateParameters() {
		super.validateParameters();
		// override some arguments
		parameters.put(OPT_NOPREVIEW, "");
		parameters.put(OPT_RAW, "-");// must be this, then image will be in console!
		parameters.put(OPT_RAW_FORMAT, "rgb");// only support rgb
		parameters.put(OPT_CAMSELECT, Integer.toString(this.camSelect));
		parameters.put(OPT_OUTPUT, "/dev/null");
	}
462432
private boolean parametersAreEqual(MimeType other) {
        if (this.parameters.size() != other.parameters.size()) {
            return false;
        }

        for (String key : this.parameters.keySet()) {
            if (!other.parameters.containsKey(key)) {
                return false;
            }

            if (PARAM_CHARSET.equals(key)) {
                if (!ObjectUtils.nullSafeEquals(getCharset(), other.getCharset())) {
                    return false;
                }
            } else if (!ObjectUtils.nullSafeEquals(this.parameters.get(key), other.parameters.get(key))) {
                return false;
            }
        }

        return true;
    }
494922
private static boolean validParameter(final Parameter p) {
        if (p.getNamespace() == null) {
            return false;
        }
        if (p.getValue() == null) {
            return false;
        }
        return true;
    }
1350211
protected void checkRequiredParameters(CliParserState parserState) {

    CliModeObject mode = parserState.requireCurrentMode(this.cliState);
    // check all required options if active of not for current mode...
    for (CliOptionContainer option : this.cliState.getOptions(mode)) {
      CliOption cliOption = option.getOption();
      if (cliOption.required() && (this.valueMap.get(option) == null)) {
        throw new CliOptionMissingException(cliOption.name(), mode.getTitle());
      }
    }
    // check all required arguments if active or not for current mode...
    for (CliArgumentContainer argument : this.cliState.getArguments(mode)) {
      CliArgument cliArgument = argument.getArgument();
      if (cliArgument.required() && (this.valueMap.get(argument) == null)) {
        throw new CliArgumentMissingException(cliArgument.name(), mode.getTitle());
      }
    }
  }
1139073
private void parseParameters(String input) {
        for (String param : input.split("&")) {
            String[] pair = param.split("=");

            String name = (pair.length > 0) ? pair[0] : null;
            String value = (pair.length > 1) ? pair[1] : null;

            if (name != null) {
                setParameter(name, value);
            }
        }
    }
1078726
def _validate_query_parameters(self, query, action_spec):
        
        processed_params = []
        for param_name, param_value in query.items():
            if param_name in action_spec['parameters'].keys():
                processed_params.append(param_name)

                # Check array
                if action_spec['parameters'][param_name]['type'] == 'array':
                    if not isinstance(param_value, list):  # Not an array
                        return False
                    else:
                        for i in param_value:  # Check type of all elements in array
                            if not self.check_type(i, action_spec['parameters'][param_name]['items']['type']):
                                return False

                elif not self.check_type(param_value, action_spec['parameters'][param_name]['type']):
                    return False

        # Check required
        if not all(param in processed_params for param, spec in action_spec['parameters'].items()
                   if spec['in'] == 'query' and 'required' in spec and spec['required']):
            return False
        return True
133744
@Override
	public void declareParameters(String paramString) {
		checkUnmodifiable();
		parameters.clear();
		paramString = paramString.trim();
		int i1 = paramString.indexOf(',');
		while (i1 >= 0) {
			String p1 = paramString.substring(0, i1).trim();
			updateParameterDeclaration(p1);
			paramString = paramString.substring(i1+1, paramString.length()).trim();
			i1 = paramString.indexOf(',');
		}
		updateParameterDeclaration(paramString);
		resetQuery();
	}
82956
private void validateRequiredParams() {
        String[] uriStrings = getURI().split("\\?");       
        if (uriStrings.length > 0) {
	        List<String> requiredParms = extractRequiredParamsInURI(uriStrings[0]);
	        for (String param: requiredParms) {
	        	Utils.require(commandParams.containsKey(param), "missing param: " + param); 
	        }
        }
        if (metadataJson.containsKey(INPUT_ENTITY)) {
            String paramValue = metadataJson.getString(INPUT_ENTITY);
            if (paramValue != null) {
                JsonObject parametersNode = metadataJson.getJsonObject(PARAMETERS);
                if (parametersNode != null) {
                    if (parametersNode.keySet().size() == 1) {//parent node usually "params" 
                        JsonObject params = parametersNode.getJsonObject(parametersNode.keySet().iterator().next());
                        for (String param: params.keySet()) {
                            JsonObject paramNode = params.getJsonObject(param);                     
                            if (paramNode.keySet().contains(_REQUIRED)) {                                     
                                setCompound(true);
                                Utils.require(commandParams.containsKey(param), "missing param: " + param); 
                            }               
                        }       
                    }
                }
                else {
                    Utils.require(commandParams.containsKey(paramValue), "missing param: " + paramValue);       
                }
            }
        }       
 
    }
345530
private function validateParameterLists(): void
  {
    // Make list with names of parameters used in database.
    $database_parameters_names = [];
    foreach ($this->parameters as $parameter_info)
    {
      $database_parameters_names[] = $parameter_info['parameter_name'];
    }

    // Make list with names of parameters used in dock block of routine.
    $doc_block_parameters_names = [];
    if (isset($this->docBlockPartsSource['parameters']))
    {
      foreach ($this->docBlockPartsSource['parameters'] as $parameter)
      {
        $doc_block_parameters_names[] = $parameter['name'];
      }
    }

    // Check and show warning if any parameters is missing in doc block.
    $tmp = array_diff($database_parameters_names, $doc_block_parameters_names);
    foreach ($tmp as $name)
    {
      $this->io->logNote('Parameter <dbo>%s</dbo> is missing from doc block', $name);
    }

    // Check and show warning if find unknown parameters in doc block.
    $tmp = array_diff($doc_block_parameters_names, $database_parameters_names);
    foreach ($tmp as $name)
    {
      $this->io->logNote('Unknown parameter <dbo>%s</dbo> found in doc block', $name);
    }
  }
871748
private boolean validateParameters() {

        boolean allOk = true;

        StringBuffer validationErrors = new StringBuffer(32);
        CmsMessages messages = Messages.get().getBundle(getLocale());

        // check resource parameter presence
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamResource()) || !getCms().existsResource(getParamResource())) {
            allOk = false;
            validationErrors.append(messages.key(Messages.GUI_PROP_CHANGE_VALIDATE_VFS_RESOURCE_0)).append("<br>");
        }

        // check selected property name
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamPropertyName())) {
            allOk = false;
            validationErrors.append(messages.key(Messages.GUI_PROP_CHANGE_VALIDATE_SELECT_PROPERTY_0)).append("<br>");
        }

        // check old property value to look up
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamOldValue())) {
            allOk = false;
            validationErrors.append(messages.key(Messages.GUI_PROP_CHANGE_VALIDATE_OLD_PROP_VALUE_0)).append("<br>");
        } else {
            try {
                // check if there is a place holder in the expression pattern
                // remove it here, because otherwise this is no valid expression pattern
                String oldValue = getParamOldValue();
                if (oldValue.contains(CmsStringUtil.PLACEHOLDER_START)
                    && oldValue.contains(CmsStringUtil.PLACEHOLDER_END)) {
                    oldValue = oldValue.replace(CmsStringUtil.PLACEHOLDER_START, "");
                    oldValue = oldValue.replace(CmsStringUtil.PLACEHOLDER_END, "");
                }
                // compile regular expression pattern
                Pattern.compile(oldValue);
            } catch (PatternSyntaxException e) {
                allOk = false;
                validationErrors.append(messages.key(Messages.GUI_PROP_CHANGE_VALIDATE_OLD_PROP_PATTERN_0)).append(
                    "<br>");
            }
        }

        // check new property value
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(getParamNewValue())) {
            // if no new value was given, set it to the delete value
            setParamNewValue(CmsProperty.DELETE_VALUE);
        }

        setErrorMessage(validationErrors.toString());
        setValidationErrors(!allOk);
        return allOk;
    }
807100
protected void validate() {
        Assert.checkNotNullParam("endpoint", endpoint);
        Assert.checkNotNullParam("optionMap", optionMap);
        Assert.checkNotNullParam("uri", uri);
    }
477784
def validate(self, input_parameters, context):
        """"""
        errors = {}

        for key, type_handler in self.input_transformations.items():
            if self.raise_on_invalid:
                if key in input_parameters:
                    input_parameters[key] = self.initialize_handler(
                        type_handler,
                        input_parameters[key],
                        context=context
                    )
            else:
                try:
                    if key in input_parameters:
                        input_parameters[key] = self.initialize_handler(
                            type_handler,
                            input_parameters[key],
                            context=context
                        )
                except InvalidTypeData as error:
                    errors[key] = error.reasons or str(error.message)
                except Exception as error:
                    if hasattr(error, 'args') and error.args:
                        errors[key] = error.args[0]
                    else:
                        errors[key] = str(error)
        for require in self.required:
            if not require in input_parameters:
                errors[require] = "Required parameter '{}' not supplied".format(require)
        if not errors and getattr(self, 'validate_function', False):
            errors = self.validate_function(input_parameters)
        return errors
222270
public boolean hasParameter(String parameter) {
    if (info == null || info.parameters == null) {
      return false;
    }
    return info.parameters.containsKey(parameter);
  }
1083105
private static int checkFormalTypeParameters(final String signature, int pos) {
        // FormalTypeParameters:
        // < FormalTypeParameter+ >

        pos = checkChar('<', signature, pos);
        pos = checkFormalTypeParameter(signature, pos);
        while (getChar(signature, pos) != '>') {
            pos = checkFormalTypeParameter(signature, pos);
        }
        return pos + 1;
    }