private static void selectPerson() { if (Permission.getPermission("ConsoleController.selectPerson")) { boolean valid = false; int id = -1; while (!valid) { try { System.out.print("Enter ID:"); id = Integer.parseInt(br.readLine()); if (id != -1) { valid = true; } } catch (NumberFormatException e) { } catch (IOException e) { } finally { if (!valid) { System.out.println("Invalid Format!"); } } } AccessController.selectPerson(id); } }
private static void cleanGuests() { if (Permission.getPermission("ConsoleController.cleanGuests")) { PersonDatabase.cleanGuests(); } }