private String getDBUrl(JsonValue config) {
   File dbFolder = IdentityServer.getFileForWorkingPath("db/openidm");
   String orientDbFolder = dbFolder.getAbsolutePath();
   orientDbFolder = orientDbFolder.replace('\\', '/'); // OrientDB does not handle backslashes well
   return config
       .get(OrientDBRepoService.CONFIG_DB_URL)
       .defaultTo("local:" + orientDbFolder)
       .asString();
 }
Example #2
0
 private void init(JsonValue configuration) {
   JsonValue additionalPolicies = configuration.get("additionalFiles");
   if (!additionalPolicies.isNull()) {
     configuration.remove("additionalFiles");
     List<String> list = new ArrayList<String>();
     for (JsonValue policy : additionalPolicies) {
       try {
         list.add(FileUtil.readFile(IdentityServer.getFileForProjectPath(policy.asString())));
       } catch (Exception e) {
         logger.error("Error loading additional policy script " + policy.asString(), e);
       }
     }
     configuration.add("additionalPolicies", list);
   }
 }