agave-apps/apps-core/src/main/java/org/iplantc/service/apps/queue/actions/CloneAction.java
/**
     * Verifies that the {@link StorageSystem} is a valid storage system for the user
     * @param storageSystem {@link StorageSystem} to validate 
     * @return provided {@link StorageSystem} if {@code storageSystem} is not null, the user's default {@link StorageSystem} otherwise.
     * @throws SystemUnknownException
     * @throws SystemUnavailableException
     * @throws PermissionException
     */
Verifies that the  StorageSystem is a valid storage system for the user
@param storageSystem  StorageSystem to validate
@return provided  StorageSystem if  storageSystem is not null, the user's default  StorageSystem otherwise.
Verifies that the StorageSystem is a valid storage system for the user @param storageSystem StorageSystem to validate @return provided StorageSystem if storageSystem is not null the user ' s default StorageSystem otherwise .
protected StorageSystem verifyClonedSoftwareStorageSystem(StorageSystem storageSystem) throws SystemUnknownException, SystemUnavailableException, PermissionException
    {
        if (storageSystem == null) {
            if (StringUtils.isNotEmpty(clonedSoftwareStorageSystemId)) {
                throw new SystemUnknownException("No storage system found matching " 
                        + clonedSoftwareStorageSystemId);
            } else {
                storageSystem = this.systemManager.getUserDefaultStorageSystem(getClonedSoftwareOwner());
            }
        }
        if (storageSystem == null) {
            throw new SystemUnknownException("No target deployment system was specified, and the user "
                    + "has no default storage system. Please specify a target deployment system "
                    + "on which to store the cloned app assets or define a default storage system.");
        }
        else if (!storageSystem.isAvailable()) {
            throw new SystemUnknownException("The target deployment system " 
                    + storageSystem.getSystemId() 
                    + " is not currently available. Cloning of apps whose "
                    + "assets reside on this system will fail until " 
                    + "the system comes back online.");
        } 
        else if (storageSystem.getStatus() != SystemStatusType.UP)
        {
            throw new SystemUnavailableException("The target deployment system " 
                    + storageSystem.getSystemId() 
                    + " is currently " + storageSystem.getStatus().name() 
                    + ". Cloning of apps whose assets reside on this system will fail until " 
                    + "the system returns to service.");
        }
        return storageSystem;
    }
protected StorageSystem verifyClonedSoftwareStorageSystem ( StorageSystem storageSystem ) throws SystemUnknownException , SystemUnavailableException , PermissionException { if ( storageSystem == null ) { if ( StringUtils . isNotEmpty ( clonedSoftwareStorageSystemId ) ) { throw new SystemUnknownException ( "No storage system found matching " + clonedSoftwareStorageSystemId ) ; } else { storageSystem = this . systemManager . getUserDefaultStorageSystem ( getClonedSoftwareOwner ( ) ) ; } } if ( storageSystem == null ) { throw new SystemUnknownException ( "No target deployment system was specified, and the user " + "has no default storage system. Please specify a target deployment system " + "on which to store the cloned app assets or define a default storage system." ) ; } else if ( ! storageSystem . isAvailable ( ) ) { throw new SystemUnknownException ( "The target deployment system " + storageSystem . getSystemId ( ) + " is not currently available. Cloning of apps whose " + "assets reside on this system will fail until " + "the system comes back online." ) ; } else if ( storageSystem . getStatus ( ) != SystemStatusType . UP ) { throw new SystemUnavailableException ( "The target deployment system " + storageSystem . getSystemId ( ) + " is currently " + storageSystem . getStatus ( ) . name ( ) + ". Cloning of apps whose assets reside on this system will fail until " + "the system returns to service." ) ; } return storageSystem ; }
Verifies that the {@link StorageSystem} is a valid storage system for the user
 @param storageSystem {@link StorageSystem} to validate
 @return provided {@link StorageSystem} if {@code storageSystem} is not null, the user's default {@link StorageSystem} otherwise.
Verifies that the { @link StorageSystem } is a valid storage system for the user @param storageSystem { @link StorageSystem } to validate @return provided { @link StorageSystem } if { @code storageSystem } is not null the user ' s default { @link StorageSystem } otherwise .
// apps must be saved on a public default storage system // if the public deployment host is unavailable // if the system is in down time or otherwise unavailable...