Esempio n. 1
0
 public void csvLookups(String[] args) {
   context.println("CSV Mapping Files");
   context.println("-------------------");
   for (File f : csvRegistry.getCsvFiles()) {
     context.println(f.getAbsolutePath());
   }
 }
Esempio n. 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);
   }
 }
Esempio n. 3
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());
 }