hardtokenissuerhome.findByCertificateSN(certificatesn.toString(16), bcdn); }catch(FinderException f){ try{ hardtokenissuerhome.create(findFreeHardTokenIssuerId(), alias, certificatesn, bcdn, issuerdata); returnval = true; }catch(Exception g){} }
hardtokenissuerhome.create(findFreeHardTokenIssuerId(), alias, admingroupid, issuerdata); returnval = true; }catch(Exception g){}
    public boolean addHardTokenIssuer(Admin admin, String alias, BigInteger certificatesn, String certissuerdn, HardTokenIssuer issuerdata){       debug(">addHardTokenIssuer(alias: " + alias + ")");       boolean returnval=false;       String bcdn = CertTools.stringToBCDNString(certissuerdn);       try{          hardtokenissuerhome.findByAlias(alias);       }catch(FinderException e){         try{           hardtokenissuerhome.findByCertificateSN(certificatesn.toString(16), bcdn);         }catch(FinderException f){           try{             hardtokenissuerhome.create(findFreeHardTokenIssuerId(), alias, certificatesn, bcdn, issuerdata);             returnval = true;           }catch(Exception g){}         }       }            if(returnval)         getLogSession().log(admin, bcdn.hashCode(), LogEntry.MODULE_HARDTOKEN, new java.util.Date(),null, null, LogEntry.EVENT_INFO_HARDTOKENISSUERDATA,"Hard token issuer " + alias + " added.");       else         getLogSession().log(admin, bcdn.hashCode(), LogEntry.MODULE_HARDTOKEN,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_HARDTOKENISSUERDATA,"Error adding hard token issuer "+ alias);              debug("<addHardTokenIssuer()");       return returnval;    } // addHardTokenIssuer