org.molgenis.navigator.delete.ResourceDeleteServiceImpl Maven / Gradle / Ivy
package org.molgenis.navigator.delete;
import static java.util.Objects.requireNonNull;
import static java.util.stream.Collectors.toList;
import static org.molgenis.data.meta.model.EntityTypeMetadata.ENTITY_TYPE_META_DATA;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.validation.constraints.NotEmpty;
import org.molgenis.data.DataService;
import org.molgenis.data.meta.model.EntityType;
import org.molgenis.data.meta.model.Package;
import org.molgenis.data.meta.model.PackageMetadata;
import org.molgenis.i18n.ContextMessageSource;
import org.molgenis.jobs.Progress;
import org.molgenis.navigator.model.ResourceIdentifier;
import org.molgenis.util.UnexpectedEnumException;
import org.springframework.stereotype.Service;
@Service
public class ResourceDeleteServiceImpl implements ResourceDeleteService {
private final DataService dataService;
private final ContextMessageSource contextMessageSource;
ResourceDeleteServiceImpl(DataService dataService, ContextMessageSource contextMessageSource) {
this.dataService = requireNonNull(dataService);
this.contextMessageSource = requireNonNull(contextMessageSource);
}
@Override
public Void delete(List resources, Progress progress) {
progress.status(contextMessageSource.getMessage("progress-delete-started"));
Set
© 2015 - 2025 Weber Informatics LLC | Privacy Policy