agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/launchers/WrapperTemplateMacroResolver.java
/**
     * Replaces all the {@link WrapperTemplateAttributeVariableType} macros in the given {@code wrapperTemplate}.
     *
     * @param wrapperTemplate the template to resolve
     * @return the {@code wrapperTemplate} file path on the remote system, filtered for any job macros
     * @throws JobMacroResolutionException when the execution system or batch queue is not available
     */
Replaces all the  WrapperTemplateAttributeVariableType macros in the given  wrapperTemplate.
@param wrapperTemplate the template to resolve
@return the  wrapperTemplate file path on the remote system, filtered for any job macros
@throws JobMacroResolutionException when the execution system or batch queue is not available
Replaces all the WrapperTemplateAttributeVariableType macros in the given wrapperTemplate . @param wrapperTemplate the template to resolve @return the wrapperTemplate file path on the remote system filtered for any job macros @throws JobMacroResolutionException when the execution system or batch queue is not available
public String resolveJobAttributeMacros(String wrapperTemplate) throws JobMacroResolutionException {
            ExecutionSystem executionSystem = getExecutionSystem();
            if (StringUtils.isBlank(wrapperTemplate)) {
                return null;
            }
            else {
                String resolvedTemplate = wrapperTemplate;
                for (WrapperTemplateAttributeVariableType jobAttributeMacro : WrapperTemplateAttributeVariableType.values()) {
                    String escapedJobAttributeMacro = "${" + jobAttributeMacro.name() + "}";
                    if (resolvedTemplate.contains(escapedJobAttributeMacro)) {
                        resolvedTemplate = StringUtils.replace(resolvedTemplate, escapedJobAttributeMacro, resolveJobAttributeMacro(executionSystem, jobAttributeMacro));
                    }
                }
                return resolvedTemplate;
            }
    }
public String resolveJobAttributeMacros ( String wrapperTemplate ) throws JobMacroResolutionException { ExecutionSystem executionSystem = getExecutionSystem ( ) ; if ( StringUtils . isBlank ( wrapperTemplate ) ) { return null ; } else { String resolvedTemplate = wrapperTemplate ; for ( WrapperTemplateAttributeVariableType jobAttributeMacro : WrapperTemplateAttributeVariableType . values ( ) ) { String escapedJobAttributeMacro = "${" + jobAttributeMacro . name ( ) + "}" ; if ( resolvedTemplate . contains ( escapedJobAttributeMacro ) ) { resolvedTemplate = StringUtils . replace ( resolvedTemplate , escapedJobAttributeMacro , resolveJobAttributeMacro ( executionSystem , jobAttributeMacro ) ) ; } } return resolvedTemplate ; } }
Replaces all the {@link WrapperTemplateAttributeVariableType} macros in the given {@code wrapperTemplate}.
Replaces all the { @link WrapperTemplateAttributeVariableType } macros in the given { @code wrapperTemplate } .
//        try { // checking for existence first so we can skip resolving the value when not necessary //        } catch (SystemUnavailableException e) { //            throw new JobMacroResolutionException("Execution system " + getJob().getSystem() + //                    " is no longer available to resolve batch queue for job " + getJob().getUuid()); //        }