if (rev.getStatus() != CertificateData.CERT_REVOKED) { rev.setStatus(CertificateData.CERT_REVOKED);
if (rev.getStatus() != CertificateDataBean.CERT_REVOKED) { rev.setStatus(CertificateDataBean.CERT_REVOKED);
    public void setRevokeStatus(Admin admin, String username, Collection publishers, int reason) {        debug(">setRevokeStatus(),  username=" + username);        X509Certificate certificate = null;        // Strip dangerous chars        username = StringTools.strip(username);        try {            Collection certs = findCertificatesByUsername(admin, username);            // Revoke all certs            if (!certs.isEmpty()) {                Iterator j = certs.iterator();                while (j.hasNext()) {                    CertificateDataPK revpk = new CertificateDataPK();                    certificate = (X509Certificate) j.next();                    revpk.fingerprint = CertTools.getFingerprintAsString(certificate);                    CertificateDataLocal rev = certHome.findByPrimaryKey(revpk);                    if (rev.getStatus() != CertificateData.CERT_REVOKED) {                        rev.setStatus(CertificateData.CERT_REVOKED);                        rev.setRevocationDate(new Date());                        rev.setRevocationReason(reason);                        getLogSession().log(admin, certificate, LogEntry.MODULE_CA, new java.util.Date(), null, certificate, LogEntry.EVENT_INFO_REVOKEDCERT, ("Reason :" + reason));                        // Revoke in all related publishers                        if (publishers != null) {                            getPublisherSession().revokeCertificate(admin, publishers, certificate, reason);                        }                    }                }            }        } catch (FinderException e) {            getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_CA, new java.util.Date(), null, null, LogEntry.EVENT_ERROR_REVOKEDCERT, ("Couldn't find certificate with username :" + username));            throw new EJBException(e);        }        debug("<setRevokeStatus(),  username=" + username);    } // setRevokeStatus