/** * {@inheritDoc} */ @Override @MethodLog public StorageData createAndOpenStorage(StorageData storageData) throws BusinessException { this.createStorage(storageData); this.openStorage(storageData); return storageData; }
/** * {@inheritDoc} * */ @Override @Transactional @MethodLog public void removeLabelsFromCmr(Collection<AbstractStorageLabel<?>> storageLabels, boolean removeFromStoragesAlso) throws BusinessException { storageLabelDataDao.removeLabels(storageLabels); if (removeFromStoragesAlso) { for (StorageData storageData : getExistingStorages()) { removeLabelsFromStorage(storageData, new ArrayList<>(storageLabels)); } } }
/** * {@inheritDoc} * */ @Override @Transactional @MethodLog public void removeLabelFromCmr(AbstractStorageLabel<?> storageLabel, boolean removeFromStoragesAlso) throws BusinessException { storageLabelDataDao.removeLabel(storageLabel); if (removeFromStoragesAlso) { for (StorageData storageData : getExistingStorages()) { removeLabelFromStorage(storageData, storageLabel); } } }
/** * {@inheritDoc} */ @Override @MethodLog public Collection<AbstractStorageLabel<?>> getAllLabelsInStorages() { Set<AbstractStorageLabel<?>> labels = new HashSet<>(); for (StorageData storageData : getExistingStorages()) { labels.addAll(storageData.getLabelList()); } return labels; }