boolean () { if(arguments.length < 1) { logger.error(getUsage()); return false; } if(arguments.length == 1) { command = arguments[0]; if(command.compareTo("version") == 0) { System.out.println("ILIAS java server version \"" + version + "\""); return true; } } command = arguments[1]; if(command.compareTo("start") == 0) { if(arguments.length != 2) { logger.error("Usage: java -jar ilServer.jar PATH_TO_SERVER_INI start"); return false; } return startServer(); } else if(command.compareTo("stop") == 0) { if(arguments.length != 2) { logger.error("Usage: java -jar ilServer.jar PATH_TO_SERVER_INI stop"); return false; } return stopServer(); } else if(command.compareTo("createIndex") == 0) { if(arguments.length != 3) { logger.error("Usage java -jar ilServer.jar PATH_TO_SERVER_INI createIndex CLIENT_KEY"); return false; } return createIndexer(); } else if(command.compareTo("updateIndex") == 0) { if(arguments.length < 3) { logger.error("Usage java -jar ilServer.jar PATH_TO_SERVER_INI updateIndex CLIENT_KEY"); return false; } return updateIndexer(); } else if(command.compareTo("search") == 0) { if(arguments.length != 4) { logger.error("Usage java -jar ilServer.jar PATH_TO_SERVER_INI CLIENT_KEY search QUERY_STRING"); return false; } return startSearch(); } else if(command.compareTo("status") == 0) { if(arguments.length != 2) { logger.error("Usage java -jar ilServer.jar PATH_TO_SERVER_INI status"); return false; } return getStatus(); } else { logger.error(getUsage()); return false; } }