protected void remove() { getSlash(); for (User user : super.getUsersSet()) { this.removeUsers(user.getUsername()); user.remove(); } deleteDomainObject(); }
protected void removeUsers(String username) throws IllegalRemovalException, UserUnknownException { hasUser(username); if (username.equals(ROOT_USER)) throw new IllegalRemovalException(username); else { User toRemove = getUserByUsername(username); toRemove.remove(); super.removeUsers(toRemove); } }