Package org.ejbca.core.model.approval

Examples of org.ejbca.core.model.approval.ApprovalRequestExpiredException


   * Method that rejects an approval.
   * After someone have rejected the request no-one else can approve it
   */
  private void reject(final ApprovalData approvalData, final Approval approval) throws ApprovalRequestExpiredException,  ApprovalException {
    if(approvalData.haveRequestOrApprovalExpired()){
      throw new ApprovalRequestExpiredException();
    }
    if(approvalData.getStatus() != ApprovalDataVO.STATUS_WAITINGFORAPPROVAL){
      throw new ApprovalException("Wrong status of approval request.");
    }
    final int numberofapprovalsleft = approvalData.getRemainingapprovals() -1;
View Full Code Here


        setApprovalRequest(approvalData, ar);
        if (step == ar.getNumberOfApprovalSteps()-1) {
          approvalData.setStatus(ApprovalDataVO.STATUS_EXPIRED);
        }
      } else {
        throw new ApprovalRequestExpiredException("Error step " + step + " of approval with id " + approvalData.getApprovalid() + " have alread been performed");
      }
    }
  }
View Full Code Here

      if(approvalData.getStatus() != ApprovalDataVO.STATUS_EXPIREDANDNOTIFIED &&
          approvalData.getStatus() != ApprovalDataVO.STATUS_EXECUTED &&
          approvalData.getStatus() != ApprovalDataVO.STATUS_EXECUTIONDENIED &&
          approvalData.getStatus() != ApprovalDataVO.STATUS_EXECUTIONFAILED){
        approvalData.setStatus(ApprovalDataVO.STATUS_EXPIREDANDNOTIFIED);
        throw new ApprovalRequestExpiredException();
      }
      return ApprovalDataVO.STATUS_EXPIREDANDNOTIFIED;
    }
    if(approvalData.getStatus() == ApprovalDataVO.STATUS_WAITINGFORAPPROVAL){
      return approvalData.getRemainingapprovals();
View Full Code Here

   * @throws ApprovalRequestExecutionException
   * @throws ApprovalException
   */
  private void approve(final ApprovalData approvalData, final Approval approval) throws ApprovalRequestExpiredException, ApprovalRequestExecutionException, ApprovalException {
    if(approvalData.haveRequestOrApprovalExpired()){
      throw new ApprovalRequestExpiredException();
    }
    if(approvalData.getStatus() != ApprovalDataVO.STATUS_WAITINGFORAPPROVAL){
      throw new ApprovalException("Wrong status of approval request.");
    }
    final int numberofapprovalsleft = approvalData.getRemainingapprovals() -1;
View Full Code Here

TOP

Related Classes of org.ejbca.core.model.approval.ApprovalRequestExpiredException

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.