try{ logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error adding administrator entity " + matchvalue + " to administratorgroup " + admingroupname + "."); }catch( RemoteException re){}
error("Can't add admin entity: ",e); try{ logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error adding administrator entity " + matchvalue + " to administratorgroup " + admingroupname + "."); }catch( RemoteException re){ error("Can't write log: ",re); }
    public void addAdminEntity(Admin admin, String admingroupname, int matchwith, int matchtype, String matchvalue){               try{        if(matchwith == AdminEntity.WITH_SERIALNUMBER){          try{              matchvalue = new RegularExpression.RE(" ",false).replace(matchvalue,"");           }catch(Exception e){}          }                  (admingrouphome.findByPrimaryKey(admingroupname)).addAdminEntity(matchwith, matchtype, matchvalue);        authorization.buildAccessTree(getAdminGroups(admin));        logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_INFO_EDITEDADMINISTRATORPRIVILEGES,"Added administrator entity " + matchvalue + " to administratorgroup " + admingroupname + ".");              }catch(Exception e){        try{            logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error adding administrator entity " + matchvalue + " to administratorgroup " + admingroupname + ".");          }catch( RemoteException re){}              }    } // addAdminEntity