adminsession.setUserStatus(administrator, userView.getUsername(), UserDataConstants.STATUS_GENERATED);
adminsession.setUserStatus(administrator, userView.getUsername(), UserDataConstants.STATUS_GENERATED, false);
    public boolean unrevokeCert(BigInteger serno, String issuerdn, String username) throws Exception {      log.debug(">unrevokeCert()");      boolean success = true;      try{     	      	 RevokedCertInfo revinfo = certificatesession.isRevoked(administrator, issuerdn, serno);     	      	 if ( revinfo != null && revinfo.getReason() == RevokedCertInfo.REVOKATION_REASON_CERTIFICATEHOLD ){     		  	    	 //-- Find the UserView for the username, we must change his status 	    	 UserView userView = findUser(username); 	    	  			 CertificateProfile certificateProfile = certificatesession.getCertificateProfile(administrator, userView.getCertificateProfileId()); 			 Collection publisherList = certificateProfile.getPublisherList(); 			 			 //-- Try to change the certificate status 			 certificatesession.setRevokeStatus(administrator, issuerdn, serno, publisherList, RevokedCertInfo.NOT_REVOKED); 			 	         if ( !certificatesession.checkIfAllRevoked(administrator, userView.getUsername()) ) { 	        	 UserDataVO vo = adminsession.findUser(administrator, userView.getUsername()); 	        	 // Don't change status if it is already the same 	        	 if (vo.getStatus() != UserDataConstants.STATUS_GENERATED) { 	 	        	 adminsession.setUserStatus(administrator, userView.getUsername(), UserDataConstants.STATUS_GENERATED); 	        		  	        	 } 		     } 		             	 }         }catch( AuthorizationDeniedException e){        success = false;      }      log.debug("<unrevokeCert(): " + success);      return success;    }