public void fullyDownloadStorage(StorageData storageData,CmrRepositoryDefinition cmrRepositoryDefinition,boolean compressBefore,SubMonitor subMonitor) throws BusinessException, IOException, SerializationException {
  LocalStorageData localStorageData=null;
  for (  LocalStorageData lsd : mountedAvailableStorages.keySet()) {
    if (ObjectUtils.equals(lsd.getId(),storageData.getId())) {
      localStorageData=lsd;
      break;
    }
  }
  if (null == localStorageData) {
    mountStorage(storageData,cmrRepositoryDefinition,true,compressBefore,subMonitor);
    return;
  }
  if (localStorageData.isFullyDownloaded()) {
    throw new BusinessException("Download the storage " + storageData + ".",StorageErrorCodeEnum.STORAGE_ALREADY_DOWNLOADED);
  }
  Path directory=getStoragePath(localStorageData);
  subMonitor.setTaskName("Downloading storage data files for storage '" + storageData.getName() + "'..");
  dataRetriever.downloadAndSaveStorageFiles(cmrRepositoryDefinition,storageData,directory,compressBefore,true,subMonitor,StorageFileType.DATA_FILE,StorageFileType.CACHED_DATA_FILE);
  downloadedStorages.add(localStorageData);
  localStorageData.setFullyDownloaded(true);
  writeLocalStorageDataToDisk(localStorageData);
}

public void fullyDownloadStorage ( StorageData storageData , CmrRepositoryDefinition cmrRepositoryDefinition , boolean compressBefore , SubMonitor subMonitor ) throws BusinessException , IOException , SerializationException { LocalStorageData localStorageData = null ; for ( LocalStorageData lsd : mountedAvailableStorages . keySet ( ) ) { if ( ObjectUtils . equals ( lsd . getId ( ) , storageData . getId ( ) ) ) { localStorageData = lsd ; break ; } } if ( null == localStorageData ) { mountStorage ( storageData , cmrRepositoryDefinition , true , compressBefore , subMonitor ) ; return ; } if ( localStorageData . isFullyDownloaded ( ) ) { throw new BusinessException ( "Download the storage " + storageData + "." , StorageErrorCodeEnum . STORAGE_ALREADY_DOWNLOADED ) ; } Path directory = getStoragePath ( localStorageData ) ; subMonitor . setTaskName ( "Downloading storage data files for storage '" + storageData . getName ( ) + "'.." ) ; dataRetriever . downloadAndSaveStorageFiles ( cmrRepositoryDefinition , storageData , directory , compressBefore , true , subMonitor , StorageFileType . DATA_FILE , StorageFileType . CACHED_DATA_FILE ) ; downloadedStorages . add ( localStorageData ) ; localStorageData . setFullyDownloaded ( true ) ; writeLocalStorageDataToDisk ( localStorageData ) ; }
fully downloads selected storage .
