Package dovetaildb.dbrepository

Examples of dovetaildb.dbrepository.FileDbRepository.initMeta()


        error("Metadata file does not exist at "+headerFile.getPath());
      }
    } else if ("RAND_KEY".equals(createMode)) {
      if (! headerFile.exists()) {
        FileDbRepository repo = new FileDbRepository(headerFile.getPath());
        repo.initMeta();
        byte[] accesskeyBytes = new byte[24];
        new SecureRandom().nextBytes(accesskeyBytes);
        String accesskey = Base64.encodeBytes(accesskeyBytes, Base64.URL_SAFE);
        String code = "apiplugins.add(Packages.dovetaildb.api.Plugin({'wrapApiService':function(api, req){return req.getParameter(\"accesskey\")==\""+accesskey+"\" ? api : null}}))";
        System.out.println();
View Full Code Here


        repo.setCodeFile("_meta", "lockdown.js", code);
      }
    } else if ("OPEN".equals(createMode)) {
      if (! headerFile.exists()) {
        FileDbRepository repo = new FileDbRepository(headerFile.getPath());
        repo.initMeta();
        repo.force();
      }
    } else {
      error("Invalid create mode: \""+createMode+"\"");
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.