agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/JobRequestProcessor.java
/**
	 * Processes the archive system value in the job request form
	 * @param jobRequestMap the job request form
	 * @return the system to which the job will be archived.
	 * @throws JobProcessingException if the user does not have access
	 * @throws SystemException if the sytem is not found, or offline
	 */
Processes the archive system value in the job request form
@param jobRequestMap the job request form
@return the system to which the job will be archived.
@throws JobProcessingException if the user does not have access
@throws SystemException if the sytem is not found, or offline
Processes the archive system value in the job request form @param jobRequestMap the job request form @return the system to which the job will be archived . @throws JobProcessingException if the user does not have access @throws SystemException if the sytem is not found or offline
protected RemoteSystem processArchiveSystemRequest(boolean archiveOutput, Map<String, Object> jobRequestMap) 
	throws JobProcessingException, SystemException {
		RemoteSystem archiveSystem;
		SystemManager systemManager = new SystemManager();
		if (archiveOutput && jobRequestMap.containsKey("archiveSystem"))
	    {
			String archiveSystemId = (String)jobRequestMap.get("archiveSystem");
			archiveSystem = new SystemDao().findUserSystemBySystemId(getUsername(), archiveSystemId, RemoteSystemType.STORAGE);
			if (archiveSystem == null) {
				throw new JobProcessingException(400,
						"No storage system found matching " + archiveSystem + " for " + getUsername());
			}
		}
		else
		{
            archiveSystem = systemManager.getUserDefaultStorageSystem(getUsername());
            if (archiveOutput && archiveSystem == null) {
				throw new JobProcessingException(400,
						"Invalid archiveSystem. No archiveSystem was provided and you "
						+ "have no public or private default storage system configured. "
						+ "Please specify a valid system id for archiveSystem or configure "
						+ "a default storage system.");
			}
		}
		return archiveSystem;
	}
protected RemoteSystem processArchiveSystemRequest ( boolean archiveOutput , Map < String , Object > jobRequestMap ) throws JobProcessingException , SystemException { RemoteSystem archiveSystem ; SystemManager systemManager = new SystemManager ( ) ; if ( archiveOutput && jobRequestMap . containsKey ( "archiveSystem" ) ) { String archiveSystemId = ( String ) jobRequestMap . get ( "archiveSystem" ) ; archiveSystem = new SystemDao ( ) . findUserSystemBySystemId ( getUsername ( ) , archiveSystemId , RemoteSystemType . STORAGE ) ; if ( archiveSystem == null ) { throw new JobProcessingException ( 400 , "No storage system found matching " + archiveSystem + " for " + getUsername ( ) ) ; } } else { archiveSystem = systemManager . getUserDefaultStorageSystem ( getUsername ( ) ) ; if ( archiveOutput && archiveSystem == null ) { throw new JobProcessingException ( 400 , "Invalid archiveSystem. No archiveSystem was provided and you " + "have no public or private default storage system configured. " + "Please specify a valid system id for archiveSystem or configure " + "a default storage system." ) ; } } return archiveSystem ; }
Processes the archive system value in the job request form
 @param jobRequestMap the job request form
 @return the system to which the job will be archived.
Processes the archive system value in the job request form @param jobRequestMap the job request form @return the system to which the job will be archived .
// lookup the user system // grab the user's default storage system