⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iapprovalsessionlocal.java

📁 一个免费的CA,基于EJB平台的,老师叫我们测试,现把之共享出来让大家参考
💻 JAVA
字号:
/* * Generated by XDoclet - Do not edit! */package org.ejbca.core.ejb.approval;/** * Local interface for ApprovalSession. */public interface IApprovalSessionLocal   extends javax.ejb.EJBLocalObject{   /**    * Method used to add an approval to database. The main key of an approval is the approvalid, which should be unique for one administrator doing one type of action, requesting the same action twice should result in the same approvalId It the approvalId already exists, it will check the status: If status is waiting, approved, or rejected an ApprovalException is thrown otherwise is an new approval requeset added to the database    * @throws ApprovalException    */   public void addApprovalRequest( org.ejbca.core.model.log.Admin admin,org.ejbca.core.model.approval.ApprovalRequest approvalRequest ) throws org.ejbca.core.model.approval.ApprovalException;   /**    * Method used to remove an approval from database.    * @param id, the uniqu id of the approvalrequest, not the same as approvalId    * @throws ApprovalException    */   public void removeApprovalRequest( org.ejbca.core.model.log.Admin admin,int id ) throws org.ejbca.core.model.approval.ApprovalException;   /**    * Method used to approve an approval requests. It does the follwing 1. checks if the approval with the status waiting exists, throws an ApprovalRequestDoesntExistException otherwise 2. check if the administrator is authorized using the follwing rules: 2.1 if getEndEntityProfile is ANY_ENDENTITYPROFILE then check if the admin is authorized to AvailableAccessRules.REGULAR_APPROVECAACTION othervise AvailableAccessRules.REGULAR_APPORVEENDENTITY and APPROVAL_RIGHTS for the end entity profile. 2.2 Checks if the admin is authoried to the approval requests getCAId() 3. looks upp the username of the administrator and checks that no approval have been made by this user earlier. 4. Runs the approval command in the end entity bean.    * @param admin    * @param approvalId    * @param approval    * @throws ApprovalRequestExpiredException    * @throws ApprovalRequestExecutionException    * @throws AuthorizationDeniedException    * @throws ApprovalRequestDoesntExistException    * @throws ApprovalException    * @throws AdminAlreadyApprovedRequestException    */   public void approve( org.ejbca.core.model.log.Admin admin,int approvalId,org.ejbca.core.model.approval.Approval approval ) throws org.ejbca.core.model.approval.ApprovalRequestExpiredException, org.ejbca.core.model.approval.ApprovalRequestExecutionException, org.ejbca.core.model.authorization.AuthorizationDeniedException, org.ejbca.core.model.approval.ApprovalException, org.ejbca.core.model.approval.AdminAlreadyApprovedRequestException;   /**    * Method used to reject a approval requests. It does the follwing 1. checks if the approval with the status waiting exists, throws an ApprovalRequestDoesntExistException otherwise 2. check if the administrator is authorized using the follwing rules: 2.1 if getEndEntityProfile is ANY_ENDENTITYPROFILE then check if the admin is authorized to AvailableAccessRules.REGULAR_APPROVECAACTION othervise AvailableAccessRules.REGULAR_APPORVEENDENTITY and APPROVAL_RIGHTS for the end entity profile. 2.2 Checks if the admin is authoried to the approval requests getCAId() 3. looks upp the username of the administrator and checks that no approval have been made by this user earlier. 4. Runs the approval command in the end entity bean.    * @param admin    * @param approvalId    * @param approval    * @throws ApprovalRequestExpiredException    * @throws AuthorizationDeniedException    * @throws ApprovalRequestDoesntExistException    * @throws ApprovalException    * @throws AdminAlreadyApprovedRequestException    */   public void reject( org.ejbca.core.model.log.Admin admin,int approvalId,org.ejbca.core.model.approval.Approval approval ) throws org.ejbca.core.model.approval.ApprovalRequestExpiredException, org.ejbca.core.model.authorization.AuthorizationDeniedException, org.ejbca.core.model.approval.ApprovalException, org.ejbca.core.model.approval.AdminAlreadyApprovedRequestException;   /**    * Method that goes through exists approvals in database to see if there exists any approved action. If goes through all approvalrequests with the given Id and checks their status, if any have status approved it returns true. This method should be used by action requiring the requesting administrator to poll to see if it have been approved.    * @param admin    * @param approvalId    * @return the number of approvals left, 0 if approved othervis is the ApprovalDataVO.STATUS constants returned indicating the statys.    * @throws ApprovalException if approvalId doesn't exists    * @throws ApprovalRequestExpiredException Throws this exception one time if one of the approvals have expired, once notified it wount throw it anymore.    */   public int isApproved( org.ejbca.core.model.log.Admin admin,int approvalId ) throws org.ejbca.core.model.approval.ApprovalException, org.ejbca.core.model.approval.ApprovalRequestExpiredException;   /**    * Method returning an approval requests with status 'waiting', 'Approved' or 'Reject' returns null if no non expirted have exists    */   public org.ejbca.core.model.approval.ApprovalDataVO findNonExpiredApprovalRequest( org.ejbca.core.model.log.Admin admin,int approvalId ) ;   /**    * Method that takes an approvalId and returns all aprovalrequests for this.    * @param admin    * @param approvalId    * @return and collection of ApprovalDataVO, empty if no approvals exists.    */   public java.util.Collection findApprovalDataVO( org.ejbca.core.model.log.Admin admin,int approvalId ) ;   /**    * Method returning a list of approvals from the give query    * @param admin    * @param query should be a Query object containing ApprovalMatch and TimeMatch    * @param index where the resultset should start. objects only    * @return a List of ApprovalDataVO, never null    * @throws AuthorizationDeniedException    */   public java.util.List query( org.ejbca.core.model.log.Admin admin,org.ejbca.util.query.Query query,int index,int numberofrows ) throws org.ejbca.util.query.IllegalQueryException, org.ejbca.core.model.authorization.AuthorizationDeniedException;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -