Package org.ejbca.core.model.hardtoken

Examples of org.ejbca.core.model.hardtoken.HardTokenDoesntExistsException


        logAdminName(admin,logger);
        try {
    try{
      hardTokenData = hardTokenSession.getHardToken(admin, hardTokenSN, viewPUKData);
      if(hardTokenData == null){
        throw new HardTokenDoesntExistsException("Error, hard token with SN " + hardTokenSN + " doesn't exist.");
      }
      ejbhelper.isAuthorizedToHardTokenData(admin, hardTokenData.getUsername(), viewPUKData);
    }catch(AuthorizationDeniedException e){
      boolean genNewRequest = false;
      if(WebServiceConfiguration.getApprovalForHardTokenData()){
View Full Code Here


            logSession.log(admin, caid, LogConstants.MODULE_HARDTOKEN, new java.util.Date(), htd.getUsername(), null, LogConstants.EVENT_INFO_HARDTOKENDATA,
                    msg);
        } catch (Exception e) {
            String msg = intres.getLocalizedMessage("hardtoken.errorchangetoken", tokensn);
            logSession.log(admin, caid, LogConstants.MODULE_HARDTOKEN, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_HARDTOKENDATA, msg);
            throw new HardTokenDoesntExistsException("Tokensn : " + tokensn);
        }
        log.trace("<changeHardToken()");
    }
View Full Code Here

        org.ejbca.core.ejb.hardtoken.HardTokenData htd = org.ejbca.core.ejb.hardtoken.HardTokenData.findByTokenSN(entityManager, tokensn);
        if (htd == null) {
            String msg = intres.getLocalizedMessage("hardtoken.errorremovetoken", tokensn);
            logSession.log(admin, caid, LogConstants.MODULE_HARDTOKEN, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_HARDTOKENDATA, msg);
            throw new HardTokenDoesntExistsException("Tokensn : " + tokensn);
        }
        caid = htd.getSignificantIssuerDN().hashCode();
        entityManager.remove(htd);
        // Remove all certificate mappings.
        removeHardTokenCertificateMappings(admin, tokensn);
View Full Code Here

TOP

Related Classes of org.ejbca.core.model.hardtoken.HardTokenDoesntExistsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.