ActivateCATokenApprovalRequest ar = new ActivateCATokenApprovalRequest(cainfo.getName(), authorizationcode, admin, numOfApprovalsRequired, caid,
ApprovalDataVO.ANY_ENDENTITYPROFILE);
if (ApprovalExecutorUtil.requireApproval(ar, NONAPPROVABLECLASSNAMES_ACTIVATECATOKEN)) {
approvalSession.addApprovalRequest(admin, ar, gc);
String msg = intres.getLocalizedMessage("ra.approvalcaactivation");
throw new WaitingForApprovalException(msg);
}
if (caid >= 0 && caid <= CAInfo.SPECIALCAIDBORDER) {
String msg = intres.getLocalizedMessage("caadmin.erroractivatetoken", Integer.valueOf(caid));
logSession.log(admin, caid, LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_CAEDITED, msg);
throw new CATokenAuthenticationFailedException(msg);