logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error removing administratorgroup " + admingroupname + "."); }catch(RemoteException re){}
logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error removing administratorgroup " + admingroupname + "."); }catch(RemoteException re){ error("Can't write log: ",re); }
    public void removeAdminGroup(Admin admin, String admingroupname){      try{         AdminGroupDataLocal ugl = admingrouphome.findByPrimaryKey(admingroupname);                  // Remove groups user entities.         AdminEntity[] adminentities = ugl.getAdminEntitiesAsArray();               for(int i=0; i < adminentities.length;i++){           ugl.removeAdminEntity(adminentities[i].getMatchWith(),adminentities[i].getMatchType(), adminentities[i].getMatchValue());         }        // Remove groups accessrules.           AccessRule[] accessrules = ugl.getAccessRulesAsArray();                   for(int i=0; i < accessrules.length;i++){           ugl.removeAccessRule(accessrules[i].getResource());         }                           ugl.remove();         logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_INFO_EDITEDADMINISTRATORPRIVILEGES,"Administratorgroup " + admingroupname + " removed.");               }catch(Exception e){         try{           logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error removing administratorgroup " + admingroupname + ".");               }catch(RemoteException re){}      }    } // removeAdminGroup