public void updatePermission(Permission permission) throws SystemException {
try {
this.getPermissionDAO().updatePermission(permission);
List permissions = new ArrayList(_permissions);
for (int i=0; i<permissions.size(); i++) {
Permission currentPerm = (Permission) permissions.get(i);
if (permission.getName().equalsIgnoreCase(currentPerm.getName())) {
_permissions.remove(currentPerm);
break;
}
}
_permissions.add(permission);