/** * Removes label from storage and saves new state of the storage data to the disk. * * @param storageData {@link StorageData}. * @param storageLabel Label to remove. * @return True if the label was removed, false otherwise. * @throws IOException If {@link IOException} happens. * @throws SerializationException If {@link SerializationException} happens. * @throws BusinessException If provided storage data does not exist. */ public boolean removeLabelFromStorage( StorageData storageData, AbstractStorageLabel<?> storageLabel) throws IOException, SerializationException, BusinessException { StorageData local = getLocalStorageDataObject(storageData); if (null != local) { boolean removed = local.removeLabel(storageLabel); writeStorageDataToDisk(local); return removed; } return false; }