class SW360MetaDataUpdater {

    public SW360Release deleteAttachments(SW360Release release, Predicate<SW360SparseAttachment> filter) {
        Set<String> deleteAttachmentIds = release.getEmbedded().getAttachments().stream()
                .filter(filter)
                .map(SW360SparseAttachment::getId)
                .collect(Collectors.toSet());
        return deleteAttachmentIds.isEmpty() ? release :
                releaseClientAdapter.deleteAttachments(release, deleteAttachmentIds);
    }

    public  SW360MetaDataUpdater(SW360Connection connection);

}