class ParameterUtils {

    public static String convertParameterPlaceholders(String parameterString, Map<String, String> parameterMap) {
        if (StringUtils.isEmpty(parameterString) || parameterMap == null) {
            return parameterString;
        }

        //Get current time, schedule execute time
        String cronTimeStr = parameterMap.get(Constants.PARAMETER_DATETIME);

        Date cronTime = null;

        if (StringUtils.isNotEmpty(cronTimeStr)) {
            cronTime = DateUtils.parse(cronTimeStr, Constants.PARAMETER_FORMAT_TIME);
        } else {
            cronTime = new Date();
        }

        // replace variable ${} form,refers to the replacement of system variables and custom variables
        parameterString = PlaceholderUtils.replacePlaceholders(parameterString, parameterMap, true);

        // replace time $[...] form, eg. $[yyyyMMdd]
        if (cronTime != null) {
            parameterString = TimePlaceholderUtils.replacePlaceholders(parameterString, cronTime, true);
        }

        return parameterString;
    }

    private  ParameterUtils();

}