public boolean isAffected(ModuleAction action) throws NotEmptyException { if (action == null) throw new NotEmptyException("action cannot be empty"); for (ModuleAction item : moduleActions) if (item.equals(action)) return true; return false; }
public void removeAction(ModuleAction action) throws AccessNotAllowedException, NotEmptyException { if (action == null) throw new NotEmptyException("action cannot be empty"); if (Tools.hasRight("REMOVE_ACTION_FROM_MODULE")) { for (ModuleAction gp : moduleActions) if (gp.equals(action)) { gp.remove(); break; } } else throw new AccessNotAllowedException("You can't remove action from module"); }