agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/launchers/JobLauncherFactory.java
/**
	 * Ensures the {@link Software#getStorageSystem()} is available and has the {@link Software#getExecutablePath()}
	 * present.
	 * @param software the application whose deployment assets will be validated
	 * @throws SystemUnknownException if the {@link Software#getStorageSystem()} does not exist.
	 * @throws SystemUnavailableException if the {@link Software#getStorageSystem()} is not available and up.
	 * @throws SoftwareUnavailableException if the {@link Software#getExecutablePath()} is not present on the remote system.
	 */
Ensures the  Software#getStorageSystem() is available and has the  Software#getExecutablePath()
present.
@param software the application whose deployment assets will be validated
@throws SystemUnknownException if the  Software#getStorageSystem() does not exist.
@throws SystemUnavailableException if the  Software#getStorageSystem() is not available and up.
@throws SoftwareUnavailableException if the  Software#getExecutablePath() is not present on the remote system.
Ensures the Software#getStorageSystem () is available and has the Software#getExecutablePath () present . @param software the application whose deployment assets will be validated @throws SystemUnknownException if the Software#getStorageSystem () does not exist . @throws SystemUnavailableException if the Software#getStorageSystem () is not available and up . @throws SoftwareUnavailableException if the Software#getExecutablePath () is not present on the remote system .
protected void assertSoftwareWrapperTemplateExists(Software software) throws SystemUnknownException, SystemUnavailableException, SoftwareUnavailableException {
		RemoteDataClient remoteDataClient = null;
		try {
			StorageSystem storageSystem = (StorageSystem) getJobManager().getAvailableSystem(software.getStorageSystem().getSystemId());
			remoteDataClient = storageSystem.getRemoteDataClient();
			remoteDataClient.authenticate();
			if (software.isPubliclyAvailable()) {
				if (!remoteDataClient.doesExist(software.getDeploymentPath())) {
					throw new MissingSoftwareDependencyException("Public app assets were not present at  agave://" +
							remoteDataClient.getHost() + ":" +
							 software.getDeploymentPath() + ". Job cannot run until the assets are restored.");
				}
			} else if (!remoteDataClient.doesExist(software.getDeploymentPath() + '/' + software.getExecutablePath())) {
				throw new MissingSoftwareDependencyException("App wrapper template expected at agave://" +
						remoteDataClient.getHost() + ":" + software.getDeploymentPath() + '/' +
						software.getExecutablePath() + ". Job cannot run until the assets are restored.");
			}
		} catch (SystemUnknownException e) {
			throw new SystemUnknownException("No system found matching id of app deployment system, " +
					software.getStorageSystem().getSystemId() + ".");
		} catch (SystemUnavailableException e) {
			throw new SystemUnavailableException("App deployment system " + software.getStorageSystem().getSystemId() +
					" is currently unavailable.");
		} catch (MissingSoftwareDependencyException e) {
			throw new SoftwareUnavailableException(e);
		} catch (Throwable e) {
			throw new SoftwareUnavailableException("Unable to verify the availability of the wrapper " +
					"template at agave://" + software.getStorageSystem().getStorageConfig().getHost() + ":" +
					software.getDeploymentPath() + '/' + software.getExecutablePath() +
					".Job cannot run until the assets are restored.", e);
		}
		finally {
			try { if (remoteDataClient != null) remoteDataClient.disconnect(); } catch(Exception ignored) {}
		}
	}
protected void assertSoftwareWrapperTemplateExists ( Software software ) throws SystemUnknownException , SystemUnavailableException , SoftwareUnavailableException { RemoteDataClient remoteDataClient = null ; try { StorageSystem storageSystem = ( StorageSystem ) getJobManager ( ) . getAvailableSystem ( software . getStorageSystem ( ) . getSystemId ( ) ) ; remoteDataClient = storageSystem . getRemoteDataClient ( ) ; remoteDataClient . authenticate ( ) ; if ( software . isPubliclyAvailable ( ) ) { if ( ! remoteDataClient . doesExist ( software . getDeploymentPath ( ) ) ) { throw new MissingSoftwareDependencyException ( "Public app assets were not present at  agave://" + remoteDataClient . getHost ( ) + ":" + software . getDeploymentPath ( ) + ". Job cannot run until the assets are restored." ) ; } } else if ( ! remoteDataClient . doesExist ( software . getDeploymentPath ( ) + '/' + software . getExecutablePath ( ) ) ) { throw new MissingSoftwareDependencyException ( "App wrapper template expected at agave://" + remoteDataClient . getHost ( ) + ":" + software . getDeploymentPath ( ) + '/' + software . getExecutablePath ( ) + ". Job cannot run until the assets are restored." ) ; } } catch ( SystemUnknownException e ) { throw new SystemUnknownException ( "No system found matching id of app deployment system, " + software . getStorageSystem ( ) . getSystemId ( ) + "." ) ; } catch ( SystemUnavailableException e ) { throw new SystemUnavailableException ( "App deployment system " + software . getStorageSystem ( ) . getSystemId ( ) + " is currently unavailable." ) ; } catch ( MissingSoftwareDependencyException e ) { throw new SoftwareUnavailableException ( e ) ; } catch ( Throwable e ) { throw new SoftwareUnavailableException ( "Unable to verify the availability of the wrapper " + "template at agave://" + software . getStorageSystem ( ) . getStorageConfig ( ) . getHost ( ) + ":" + software . getDeploymentPath ( ) + '/' + software . getExecutablePath ( ) + ".Job cannot run until the assets are restored." , e ) ; } finally { try { if ( remoteDataClient != null ) remoteDataClient . disconnect ( ) ; } catch ( Exception ignored ) { } } }
Ensures the {@link Software#getStorageSystem()} is available and has the {@link Software#getExecutablePath()}
 present.
Ensures the { @link Software#getStorageSystem () } is available and has the { @link Software#getExecutablePath () } present .
// if the software assets are missing...