agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/launchers/HPCLauncher.java
/**
	 * Filters the app template with the parameter values from the job request
	 * @param appTemplate the app wrapper template content
	 * @return the filtered content
	 * @throws JobException if the parameters cannot be fetched as a JsonObject
	 */
Filters the app template with the parameter values from the job request
@param appTemplate the app wrapper template content
@return the filtered content
@throws JobException if the parameters cannot be fetched as a JsonObject
Filters the app template with the parameter values from the job request @param appTemplate the app wrapper template content @return the filtered content @throws JobException if the parameters cannot be fetched as a JsonObject
protected String resolveJobRequestParameters(String appTemplate) throws JobException {
		JsonNode jobParameters = getJob().getParametersAsJsonObject();
		for (SoftwareParameter param: getSoftware().getParameters())
		{
			if (jobParameters.has(param.getKey()))
			{
				JsonNode jobJsonParam = jobParameters.get(param.getKey());
				String templateVariableValue = parseSoftwareParameterValueIntoTemplateVariableValue(param, jobJsonParam);
				appTemplate = appTemplate.replaceAll("(?i)\\$\\{" + param.getKey() + "\\}", templateVariableValue);
			}
			else if (!param.isVisible())
			{
				String templateVariableValue = parseSoftwareParameterValueIntoTemplateVariableValue(param, param.getDefaultValueAsJsonArray());
				appTemplate = appTemplate.replaceAll("(?i)\\$\\{" + param.getKey() + "\\}", templateVariableValue);
			}
			else
			{
				appTemplate = appTemplate.replaceAll("(?i)\\$\\{" + param.getKey() + "\\}", "");
			}
		}
		return appTemplate;
	}
protected String resolveJobRequestParameters ( String appTemplate ) throws JobException { JsonNode jobParameters = getJob ( ) . getParametersAsJsonObject ( ) ; for ( SoftwareParameter param : getSoftware ( ) . getParameters ( ) ) { if ( jobParameters . has ( param . getKey ( ) ) ) { JsonNode jobJsonParam = jobParameters . get ( param . getKey ( ) ) ; String templateVariableValue = parseSoftwareParameterValueIntoTemplateVariableValue ( param , jobJsonParam ) ; appTemplate = appTemplate . replaceAll ( "(?i)\\$\\{" + param . getKey ( ) + "\\}" , templateVariableValue ) ; } else if ( ! param . isVisible ( ) ) { String templateVariableValue = parseSoftwareParameterValueIntoTemplateVariableValue ( param , param . getDefaultValueAsJsonArray ( ) ) ; appTemplate = appTemplate . replaceAll ( "(?i)\\$\\{" + param . getKey ( ) + "\\}" , templateVariableValue ) ; } else { appTemplate = appTemplate . replaceAll ( "(?i)\\$\\{" + param . getKey ( ) + "\\}" , "" ) ; } } return appTemplate ; }
Filters the app template with the parameter values from the job request
 @param appTemplate the app wrapper template content
 @return the filtered content
 @throws JobException if the parameters cannot be fetched as a JsonObject
Filters the app template with the parameter values from the job request @param appTemplate the app wrapper template content @return the filtered content @throws JobException if the parameters cannot be fetched as a JsonObject
// replace the parameters with their passed in values // serialized the runtime parameters into a string of space-delimited // values after enquoting and adding relevant argument(s) // now actually filter the template for this parameter // serialized the runtime parameters into a string of space-delimited // values after enquoting and adding relevant argument(s) // now actually filter the template for this parameter