package org.folio.okapi.service.impl;

import io.vertx.core.Future;
import io.vertx.ext.mongo.MongoClient;
import java.util.ArrayList;
import java.util.List;
import org.folio.okapi.bean.ModuleDescriptor;
import org.folio.okapi.common.GenericCompositeFuture;
import org.folio.okapi.service.ModuleStore;

/**
 * Stores ModuleDescriptors in a Mongo database.
 */
public class ModuleStoreMongo implements ModuleStore {

  private static final String COLLECTION = "okapi.modules";
  private final MongoUtil<ModuleDescriptor> util;


  public ModuleStoreMongo(MongoClient cli) {
    this.util = new MongoUtil<>(COLLECTION, cli);
  }

  @Override
  public Future<Void> init(boolean reset) {
    return util.init(reset);
  }

  @Override
  public Future<Void> insert(ModuleDescriptor md) {
    return util.insert(md, md.getId());
  }

  @Override
  public Future<Void> insert(List<ModuleDescriptor> mds) {
    return util.insertBatch(mds);
  }

  @Override
  public Future<List<ModuleDescriptor>> getAll() {
    return util.getAll(ModuleDescriptor.class);
  }

  @Override
  public Future<Boolean> delete(String id) {
    return util.delete(id);
  }

}

@@ -104,36 +104,8 @@
 nt;%0A
-import java.util.ArrayList;%0A
 impo
@@ -173,62 +173,8 @@
 or;%0A
-import org.folio.okapi.common.GenericCompositeFuture;%0A
 impo

Remove unused imports