Init parameter values map with the static default values for all not-hidden parameters of a report

@param report          report
@param parameterValues map of parameter values
@throws QueryException if could not get default parameter values
498423
public static void initStaticNotHiddenDefaultParameterValues(Report report,
                                                           Map<String, Object> parameterValues) throws QueryException {
        Map<String, QueryParameter> params = getUsedParametersMap(report);
        for (QueryParameter qp : params.values()) {
            if (!qp.isHidden()) {
                initStaticDefaultParameterValues(qp, parameterValues);
            }
        }
    }
259547
public static void init(final Map<String, String> _values)
    {
        if (AppConfigHandler.HANDLER == null) {
            AppConfigHandler.HANDLER = new AppConfigHandler(_values);
        }
    }
639606
public void initValuesNa() {
        // just set some default as not used
        setRequestPort("0");
        setHeaderMetadata(new ParallecHeader());
        setHttpMethod(HttpMethod.NA);
        setEntityBody(PcConstants.COMMAND_VAR_DEFAULT_REQUEST_CONTENT);
        setRequestUrlPostfix("");
        this.httpPollerProcessor = null;
        this.isPollable = false;
        this.asyncHttpClient = null;
        this.responseHeaderMeta = null;
    }
858503
public static boolean checkForParametersWithDefaultSource(Report report) {
    	Map<String, QueryParameter> params = getUsedParametersMap(report);
        for (QueryParameter qp : params.values()) {
        	if ((qp.getDefaultSource() != null) && !qp.getDefaultSource().equals("")) {
        		return true;
        	}
        }
        return false;
    }
1094009
private List<String> defaultValue(Map<Class<? extends Annotation>, ParameterInfo<?>> annotations) {
    ParameterInfo<?> defaultInfo = annotations.get(DefaultValue.class);
    if (defaultInfo == null) {
      return Collections.emptyList();
    }

    DefaultValue defaultValue = defaultInfo.getAnnotation();
    return Collections.singletonList(defaultValue.value());
  }
975271
protected void addQueryParameters(Query query, Map<String, Object> parameters) {
		
		// Si la MAP est nulle
		if(parameters == null || parameters.size() == 0) return;
		
		// Parcours
		for(Entry<String, Object> entry : parameters.entrySet()) {
			
			// Ajout
			query.setParameter(entry.getKey(), entry.getValue());
		}
	}
1223949
public void setEnumerationValues(java.util.Collection<EnumerationValue> enumerationValues) {
        if (enumerationValues == null) {
            this.enumerationValues = null;
            return;
        }

        this.enumerationValues = new java.util.ArrayList<EnumerationValue>(enumerationValues);
    }
137408
public static void applyPageConfig(MultivaluedMap<String, String> queryParams, Query query) {
        Integer maxRows = getSingleIntegerParam(queryParams.get(PER_PAGE_PARAM_NAME));

        if (maxRows == null && DEFAULT_PER_PAGE != null && DEFAULT_PER_PAGE > 0) {
            maxRows = DEFAULT_PER_PAGE;
        }

        if (maxRows != null) {
            if (maxRows <= 0) {
                maxRows = SYS_DEFAULT_PER_PAGE;
            }
            if (MAX_PER_PAGE != -1 && maxRows > MAX_PER_PAGE) {
                maxRows = MAX_PER_PAGE;
            }
            query.setMaxRows(maxRows);
        }

        Integer firstRow = getSingleIntegerParam(queryParams.get(PAGE_PARAM_NAME));
        if (firstRow != null && maxRows != null) {
            if (firstRow < 1) {
                firstRow = 1;
            }
            firstRow--;
            firstRow = firstRow * maxRows;
            query.setFirstRow(firstRow);
        }
    }
41856
public void setResultValues(java.util.Collection<InsightResultValue> resultValues) {
        if (resultValues == null) {
            this.resultValues = null;
            return;
        }

        this.resultValues = new java.util.ArrayList<InsightResultValue>(resultValues);
    }
723222
private void setParameters(Map<Parameter, Object> parameterMap, Query q)
    {
        if (parameterMap != null && !parameterMap.isEmpty())
        {
            for (Parameter parameter : parameterMap.keySet())
            {
                Object paramObject = parameterMap.get(parameter);
                if (parameter.getName() != null)
                {
                    if (paramObject instanceof Collection)
                    {
                        q.setParameterList(parameter.getName(), (Collection) paramObject);
                    }
                    else
                    {
                        q.setParameter(parameter.getName(), paramObject);
                    }
                }
                else if (parameter.getPosition() != null)
                {
                    if (paramObject instanceof Collection)
                    {
                        q.setParameterList(Integer.toString(parameter.getPosition()), (Collection) paramObject);
                    }
                    else
                    {
                        q.setParameter(Integer.toString(parameter.getPosition()), paramObject);
                    }
                }
            }
        }
    }
677029
public void setReport(Report report) {
		this.report = report;
		if (this.report.getQuery() != null) {
			this.report.getQuery().setDialect(dialect);
		}
	}
1292798
public void setFilterValues(LinkedHashMap<String, String> filterValues) {

        m_filterValues = new LinkedHashMap<String, String>(filterValues);
    }
1174506
public static void initAllRuntimeParameterValues(QueryParameter param,
                                                  List<IdName> values, Map<String, Object> parameterValues) throws QueryException {

        if (param.getSelection().equals(QueryParameter.SINGLE_SELECTION)) {
            parameterValues.put(param.getName(), values.get(0));
        } else {
            Object[] val = new Object[values.size()];
            for (int k = 0, size = values.size(); k < size; k++) {
                val[k] = values.get(k);
            }
            parameterValues.put(param.getName(), val);
        }
    }
531116
@Override
    public void visit(JunitXmlReport report) {

        int testsPassed = report.getTests() - report.getFailures() - report.getErrors();

        Map<String, Pair<Integer, CodeQualityMetricStatus>> metricsMap = new HashMap<>();
        metricsMap.put(TOTAL_NO_OF_TESTS, Pair.of(report.getTests(), CodeQualityMetricStatus.Ok));
        metricsMap.put(TEST_FAILURES, Pair.of(report.getFailures(), report.getFailures() > 0 ? CodeQualityMetricStatus.Warning : CodeQualityMetricStatus.Ok));
        metricsMap.put(TEST_ERRORS, Pair.of(report.getErrors(), report.getErrors() > 0 ? CodeQualityMetricStatus.Alert : CodeQualityMetricStatus.Ok));
        metricsMap.put(TEST_SUCCESS_DENSITY, Pair.of(testsPassed, CodeQualityMetricStatus.Ok));

        if (null != report.getTimestamp()) {
            long timestamp = Math.max(quality.getTimestamp(), report.getTimestamp().toGregorianCalendar().getTimeInMillis());
            quality.setTimestamp(timestamp);
        }
        quality.setType(CodeQualityType.StaticAnalysis);

        // finally produce the result
        this.sumMetrics(metricsMap);

    }
1110919
private void applyDefaultValues(Map<String, Object> parameterValues) {
    for (Parameter<?> parameter : allParameters) {
      parameterValues.put(parameter.getName(), getParameterDefaultValue(parameter));
    }
  }
498475
public void initialiseParamValues(final Step step) {
        final HashMap<String, String> map = new HashMap<String, String>();

        final String[] paramValues = Util.getArgs(this.parent.getPattern(),
            step.getLine(), null);

        if (paramValues != null) {
            for (int i = 0; i < paramValues.length; i++) {
                map.put(this.parent.getParamNames().get(i), paramValues[i]);
            }
        }
        this.paramValueMap = new ExampleParameter(step.getSourceLineNumber(),
            map);
    }
993271
public void parametersAreDefined(Report report) throws ParameterNotFoundException {
        String[] paramNames;
        String sql = report.getSql();
        if (sql == null) {
            sql = report.getQuery().toString();
        }
        Query query = new Query(sql);
        paramNames = query.getParameterNames();

        List<QueryParameter> parameters = report.getParameters();

        for (String paramName : paramNames) {
            QueryParameter param = null;
            for (QueryParameter p : parameters) {
                if (paramName.equals(p.getName())) {
                    param = p;
                }
            }
            if (param == null) {
                throw new ParameterNotFoundException(paramName);
            }
        }
    }