public static void createApplicationEnvironment(JobDefinitionType value, NameValuePairType[] nameValuePairs, HpcApplicationDeploymentType appDepType) {
if(isParallelJob(appDepType)) {
for (NameValuePairType nv : nameValuePairs) {
EnvironmentType envType = JSDLUtils.getOrCreateSPMDApplication(value).addNewEnvironment();
envType.setName(nv.getName());
envType.setStringValue(nv.getValue());
}
}
else {
for (NameValuePairType nv : nameValuePairs) {
EnvironmentType envType = JSDLUtils.getOrCreatePOSIXApplication(value).addNewEnvironment();
envType.setName(nv.getName());
envType.setStringValue(nv.getValue());
}
}
}