agave-apps/apps-core/src/main/java/org/iplantc/service/apps/queue/actions/PublishAction.java
/**
     * Builds the remote path to which the zipped {@link Software#getDeploymentPath()} will be deployed on
     * the public {@link StorageSystem}. 
     * @param publishedSoftwareStorageSystem
     * @param publishedSoftwareDataClient
     * @return agave paths to the app on the remote system.
     * 
     * @throws IOException
     * @throws RemoteDataException
     */
Builds the remote path to which the zipped  Software#getDeploymentPath() will be deployed on
the public  StorageSystem.
@param publishedSoftwareStorageSystem
@param publishedSoftwareDataClient
@return agave paths to the app on the remote system.


Builds the remote path to which the zipped Software#getDeploymentPath () will be deployed on the public StorageSystem . @param publishedSoftwareStorageSystem @param publishedSoftwareDataClient @return agave paths to the app on the remote system .
protected String resolveAndCreatePublishedDeploymentPath(StorageSystem publishedSoftwareStorageSystem, RemoteDataClient publishedSoftwareDataClient) 
    throws IOException, RemoteDataException 
    {
        String remotePublicAppsFolder = publishedSoftwareStorageSystem.getStorageConfig().getPublicAppsDir();
        if (StringUtils.isEmpty(remotePublicAppsFolder)) {
            remotePublicAppsFolder = Settings.PUBLIC_APPS_DEFAULT_DIRECTORY;
        }
        if (remotePublicAppsFolder.endsWith("/")) {
            remotePublicAppsFolder = StringUtils.substring(remotePublicAppsFolder, 0, -1);
        }
        String bundlePath = remotePublicAppsFolder + "/" + publishedSoftware.getUniqueName() + ".zip";
        publishedSoftware.setDeploymentPath(bundlePath);
        publishedSoftware.setStorageSystem(publishedSoftwareStorageSystem);
        if (!publishedSoftwareDataClient.doesExist(remotePublicAppsFolder)) {
            publishedSoftwareDataClient.mkdirs(remotePublicAppsFolder);
        }
        return bundlePath;
    }
protected String resolveAndCreatePublishedDeploymentPath ( StorageSystem publishedSoftwareStorageSystem , RemoteDataClient publishedSoftwareDataClient ) throws IOException , RemoteDataException { String remotePublicAppsFolder = publishedSoftwareStorageSystem . getStorageConfig ( ) . getPublicAppsDir ( ) ; if ( StringUtils . isEmpty ( remotePublicAppsFolder ) ) { remotePublicAppsFolder = Settings . PUBLIC_APPS_DEFAULT_DIRECTORY ; } if ( remotePublicAppsFolder . endsWith ( "/" ) ) { remotePublicAppsFolder = StringUtils . substring ( remotePublicAppsFolder , 0 , - 1 ) ; } String bundlePath = remotePublicAppsFolder + "/" + publishedSoftware . getUniqueName ( ) + ".zip" ; publishedSoftware . setDeploymentPath ( bundlePath ) ; publishedSoftware . setStorageSystem ( publishedSoftwareStorageSystem ) ; if ( ! publishedSoftwareDataClient . doesExist ( remotePublicAppsFolder ) ) { publishedSoftwareDataClient . mkdirs ( remotePublicAppsFolder ) ; } return bundlePath ; }
Builds the remote path to which the zipped {@link Software#getDeploymentPath()} will be deployed on
 the public {@link StorageSystem}.
Builds the remote path to which the zipped { @link Software#getDeploymentPath () } will be deployed on the public { @link StorageSystem } .
// resolve the path to the folder for public apps on the public default storage system // note that this may change over time, but it's saved with the app, so that's fine.