/** * Creates new storage. * * @param storageData Storage. * @throws IOException if {@link IOException} occurs. * @throws SerializationException If serialization fails. * @throws BusinessException If name for storage is not provided. */ public void createStorage(StorageData storageData) throws IOException, SerializationException, BusinessException { if (null == storageData.getName()) { throw new BusinessException( "Create new storage.", StorageErrorCodeEnum.STORAGE_NAME_IS_NOT_PROVIDED); } storageData.setId(getRandomUUIDString()); storageData.setCmrVersion(cmrVersion); writeStorageDataToDisk(storageData); existingStoragesSet.add(storageData); }