public static void main(String[] args) { try { OA2Commands oa2Commands = new OA2Commands(null); oa2Commands.start(args); CLIDriver cli = new CLIDriver(oa2Commands); cli.start(); } catch (Throwable t) { t.printStackTrace(); } }
protected void runComponent(String componentName) throws Exception { CommonCommands commonCommands = null; if (componentName.equals(CLIENTS)) { commonCommands = getNewClientStoreCommands(); } if (componentName.equals(CLIENT_APPROVALS)) { commonCommands = getNewClientApprovalStoreCommands(); } if (componentName.equals(COPY)) { commonCommands = getNewCopyCommands(); } if (commonCommands != null) { CLIDriver cli = new CLIDriver(commonCommands); cli.start(); } }
public static void main(String[] args) throws Exception { CommandsTest c = new CommandsTest(); FooCommands foo = new FooCommands(); CLIDriver cliDriver = new CLIDriver(c, foo); cliDriver.start(); }
public static void main(String[] args) { try { OA2Tester testCommands = new OA2Tester(null); testCommands.start(args); OA2TestCommands usc = new OA2TestCommands(testCommands.getMyLogger(), (ClientEnvironment) testCommands.getEnvironment()); CLIDriver cli = new CLIDriver(usc); cli.start(); } catch (Exception e) { e.printStackTrace(); } }
@Override public boolean use(InputLine inputLine) throws Exception { String indent = " "; if (inputLine.hasArg("test")) { OA2TestCommands usc = new OA2TestCommands(getMyLogger(), (ClientEnvironment) getEnvironment()); CLIDriver cli = new CLIDriver(usc); cli.start(); return true; } return false; } }
if (args == null || args.length == 0) { cli.start(); return;
@Override public boolean use(InputLine inputLine) throws Exception { CommonCommands commands = null; if (inputLine.hasArg(CLIENTS)) { commands = getNewClientStoreCommands(); } if (inputLine.hasArg(CLIENT_APPROVALS)) { commands = getNewClientApprovalStoreCommands(); } if (inputLine.hasArg(COPY)) { commands = getNewCopyCommands(); } if (commands != null) { CLIDriver cli = new CLIDriver(commands); cli.start(); return true; } if (super.use(inputLine)) { return true; } return false; }
@Override public boolean use(InputLine inputLine) throws Exception { CommonCommands commands = null; if (inputLine.hasArg(ADMINS)) { commands = getAdminClientCommands(); } if (inputLine.hasArg(KEYS)) { commands = new SigningCommands(getOA2SE()); } if (inputLine.hasArg(PERMISSIONS)) { commands = getPermissionCommands(); } if (commands != null) { CLIDriver cli = new CLIDriver(commands); cli.start(); return true; } if (super.use(inputLine)) { return true; } return false; } }