28         Options options = 
new Options();
    30         Option input = 
new Option(
"oxd_id", 
"oxd_id", 
true, 
"oxd_id is unique identifier within oxd database (returned by register_site and setup_client commands)");
    31         input.setRequired(
true);
    32         options.addOption(input);
    34         CommandLineParser parser = 
new DefaultParser();
    35         HelpFormatter formatter = 
new HelpFormatter();
    40             cmd = parser.parse(options, args);
    41             oxdId = cmd.getOptionValue(
"oxd_id");
    43             Injector injector = ServerLauncher.getInjector();
    45             injector.getInstance(ConfigurationService.class).load();
    46             injector.getInstance(PersistenceService.class).create();
    48             RpService rpService = injector.getInstance(RpService.class);
    51             print(oxdId, rpService.getRp(oxdId));
    52         } 
catch (ParseException e) {
    53             System.out.println(e.getMessage());
    54             formatter.printHelp(
"utility-name", options);
    56         } 
catch (RuntimeException e) {
    59         } 
catch (Throwable e) {
    60             System.out.println(
"Failed to run oxd CLI (make sure oxd-server was run at least one time and database file is created). Error: " + e.getMessage());
 static void tryToConnectToRunningOxd(String oxdId)
Definition: Cli.java:74
static void switchOffLogging()
Definition: Cli.java:66
static void print(String oxdId, Object rp)
Definition: Cli.java:95