agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/dao/AbstractDaoTest.java
/**
     * Copies job assets to a remote {@link StorageSystem} using the {@code software.getDeploymentPath()}.
     *
     * @param software the app for which to stage the assets
     * @throws Exception if the copy fails
     */
Copies job assets to a remote  StorageSystem using the  software.getDeploymentPath().
@param software the app for which to stage the assets
@throws Exception if the copy fails
Copies job assets to a remote StorageSystem using the software . getDeploymentPath () . @param software the app for which to stage the assets @throws Exception if the copy fails
protected void stageRemoteSoftwareAssets(Software software) throws Exception
    {
        RemoteSystem storageSystem = software.getStorageSystem();
        RemoteDataClient storageDataClient = null;
        try 
        {
            storageDataClient = storageSystem.getRemoteDataClient();
            storageDataClient.authenticate();
            if (!storageDataClient.doesExist(software.getDeploymentPath())) {
                storageDataClient.mkdirs(FilenameUtils.getPath(software.getDeploymentPath()));
                storageDataClient.put(SOFTWARE_SYSTEM_TEMPLATE_DIR + File.separator + software.getUniqueName(), FilenameUtils.getPath(software.getDeploymentPath()));
            }
            else
            {
                for (File localSoftwareAssetPath: new File(SOFTWARE_SYSTEM_TEMPLATE_DIR + File.separator + software.getUniqueName()).listFiles()) {
                    if (!storageDataClient.doesExist(software.getDeploymentPath() + File.separator + localSoftwareAssetPath.getName())) {
                        storageDataClient.put(localSoftwareAssetPath.getAbsolutePath(), FilenameUtils.getPath(software.getDeploymentPath()) + File.separator + localSoftwareAssetPath.getName());
                    }
                }
            }
        }
        finally {
            try {
                if (storageDataClient != null) {
                    storageDataClient.disconnect();
                }
            } catch (Exception ignored) {}
        }
    }
protected void stageRemoteSoftwareAssets ( Software software ) throws Exception { RemoteSystem storageSystem = software . getStorageSystem ( ) ; RemoteDataClient storageDataClient = null ; try { storageDataClient = storageSystem . getRemoteDataClient ( ) ; storageDataClient . authenticate ( ) ; if ( ! storageDataClient . doesExist ( software . getDeploymentPath ( ) ) ) { storageDataClient . mkdirs ( FilenameUtils . getPath ( software . getDeploymentPath ( ) ) ) ; storageDataClient . put ( SOFTWARE_SYSTEM_TEMPLATE_DIR + File . separator + software . getUniqueName ( ) , FilenameUtils . getPath ( software . getDeploymentPath ( ) ) ) ; } else { for ( File localSoftwareAssetPath : new File ( SOFTWARE_SYSTEM_TEMPLATE_DIR + File . separator + software . getUniqueName ( ) ) . listFiles ( ) ) { if ( ! storageDataClient . doesExist ( software . getDeploymentPath ( ) + File . separator + localSoftwareAssetPath . getName ( ) ) ) { storageDataClient . put ( localSoftwareAssetPath . getAbsolutePath ( ) , FilenameUtils . getPath ( software . getDeploymentPath ( ) ) + File . separator + localSoftwareAssetPath . getName ( ) ) ; } } } } finally { try { if ( storageDataClient != null ) { storageDataClient . disconnect ( ) ; } } catch ( Exception ignored ) { } } }
Copies job assets to a remote {@link StorageSystem} using the {@code software.getDeploymentPath()}.
Copies job assets to a remote { @link StorageSystem } using the { @code software . getDeploymentPath () } .