agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/managers/JobRequestProcessorIT.java
/**
	 * Creates a bare bones Form representing a job submission.
	 * @return Map with minimal set of job attributes.
	 */
Creates a bare bones Form representing a job submission.
@return Map with minimal set of job attributes.
Creates a bare bones Form representing a job submission . @return Map with minimal set of job attributes .
private Map<String, Object> createJobRequestMap(Software software)
	{
	    Map<String, Object> jobRequestMap = new HashMap<String, Object>();
		try 
		{
			jobRequestMap.put("name", "processJsonJobWithNotifications");
			jobRequestMap.put("appId", software.getUniqueName());
			for (SoftwareInput input: software.getInputs()) {
				jobRequestMap.put(input.getKey(), input.getDefaultValueAsJsonArray().iterator().next().asText());
			}
			for (SoftwareParameter parameter: software.getParameters()) {
				jobRequestMap.put(parameter.getKey(), parameter.getDefaultValueAsJsonArray().iterator().next().asText());
			}
		} catch (Exception e) {
			Assert.fail("Failed to read in software description to create json job object", e);
		}
		return jobRequestMap;
	}
private Map < String , Object > createJobRequestMap ( Software software ) { Map < String , Object > jobRequestMap = new HashMap < String , Object > ( ) ; try { jobRequestMap . put ( "name" , "processJsonJobWithNotifications" ) ; jobRequestMap . put ( "appId" , software . getUniqueName ( ) ) ; for ( SoftwareInput input : software . getInputs ( ) ) { jobRequestMap . put ( input . getKey ( ) , input . getDefaultValueAsJsonArray ( ) . iterator ( ) . next ( ) . asText ( ) ) ; } for ( SoftwareParameter parameter : software . getParameters ( ) ) { jobRequestMap . put ( parameter . getKey ( ) , parameter . getDefaultValueAsJsonArray ( ) . iterator ( ) . next ( ) . asText ( ) ) ; } } catch ( Exception e ) { Assert . fail ( "Failed to read in software description to create json job object" , e ) ; } return jobRequestMap ; }
Creates a bare bones Form representing a job submission.
Creates a bare bones Form representing a job submission .