Пример #1
0
 @ScriptUsage(
     description = "unload csv lookup mapping file",
     arguments = {
       @ScriptArgument(
           name = "path",
           type = "string",
           description = "registered csv file path",
           autocompletion = PathAutoCompleter.class)
     })
 public void unloadCsvLookup(String[] args) {
   File f = new File(args[0]);
   csvRegistry.unloadCsvFile(f);
   context.println("unloaded" + f.getAbsolutePath());
 }
Пример #2
0
 @ScriptUsage(
     description = "reload csv lookup mapping file",
     arguments = {
       @ScriptArgument(
           name = "path",
           type = "string",
           description =
               "csv (comma separated value) file path. first line should be column headers.",
           autocompletion = PathAutoCompleter.class)
     })
 public void reloadCsvLookup(String[] args) throws IOException {
   try {
     File f = new File(args[0]);
     csvRegistry.unloadCsvFile(f);
     csvRegistry.loadCsvFile(f);
     context.println("reloaded");
   } catch (IllegalStateException e) {
     context.println(e);
   }
 }