agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/JobRequestProcessor.java
/**
	 * Processes the execution system
	 * @param jobRequestMap the job request form
	 * @param software the software requested by the job
	 * @return the system on which the job will run
	 * @throws JobProcessingException if the execution system cannot be processed
	 */
Processes the execution system
@param jobRequestMap the job request form
@param software the software requested by the job
@return the system on which the job will run
@throws JobProcessingException if the execution system cannot be processed
Processes the execution system @param jobRequestMap the job request form @param software the software requested by the job @return the system on which the job will run @throws JobProcessingException if the execution system cannot be processed
public ExecutionSystem processExecutionSystemRequest(Map<String, Object> jobRequestMap, Software software)
	throws JobProcessingException 
	{	
		String exeSystemName = (String)jobRequestMap.get("executionSystem");
		if (jobRequestMap.containsKey("executionSystem")) {
			exeSystemName = (String)jobRequestMap.get("executionSystem");
		} else {
			exeSystemName = (String)jobRequestMap.get("executionHost");
		}
		ExecutionSystem executionSystem = software.getExecutionSystem();
		if (StringUtils.length(exeSystemName) > 64) {
			throw new JobProcessingException(400,
					"executionSystem must be less than 80 characters");
		}
		else if (!StringUtils.isEmpty(exeSystemName) && !StringUtils.equals(exeSystemName, executionSystem.getSystemId())) {
			throw new JobProcessingException(403,
					"Invalid execution system. Apps are registered to run on a specific execution system. If specified, " +
					"the execution system must match the execution system in the app description. The execution system " +
					"for " + software.getName() + " is " + software.getExecutionSystem().getSystemId() + ".");
		}
		return executionSystem;
	}
public ExecutionSystem processExecutionSystemRequest ( Map < String , Object > jobRequestMap , Software software ) throws JobProcessingException { String exeSystemName = ( String ) jobRequestMap . get ( "executionSystem" ) ; if ( jobRequestMap . containsKey ( "executionSystem" ) ) { exeSystemName = ( String ) jobRequestMap . get ( "executionSystem" ) ; } else { exeSystemName = ( String ) jobRequestMap . get ( "executionHost" ) ; } ExecutionSystem executionSystem = software . getExecutionSystem ( ) ; if ( StringUtils . length ( exeSystemName ) > 64 ) { throw new JobProcessingException ( 400 , "executionSystem must be less than 80 characters" ) ; } else if ( ! StringUtils . isEmpty ( exeSystemName ) && ! StringUtils . equals ( exeSystemName , executionSystem . getSystemId ( ) ) ) { throw new JobProcessingException ( 403 , "Invalid execution system. Apps are registered to run on a specific execution system. If specified, " + "the execution system must match the execution system in the app description. The execution system " + "for " + software . getName ( ) + " is " + software . getExecutionSystem ( ) . getSystemId ( ) + "." ) ; } return executionSystem ; }
Processes the execution system
 @param jobRequestMap the job request form
 @param software the software requested by the job
 @return the system on which the job will run
 @throws JobProcessingException if the execution system cannot be processed
Processes the execution system @param jobRequestMap the job request form @param software the software requested by the job @return the system on which the job will run @throws JobProcessingException if the execution system cannot be processed