1 13 package org.ejbca.core.model.approval; 14 15 import java.io.Serializable ; 16 import java.util.Collection ; 17 import java.util.Date ; 18 19 import org.ejbca.core.model.SecConst; 20 21 22 23 32 33 public class ApprovalDataVO implements Serializable { 34 35 private static final long serialVersionUID = -1L; 36 37 public static final int STATUS_WAITINGFORAPPROVAL = -1; 39 public static final int STATUS_APPROVED = 0; 40 public static final int STATUS_REJECTED = -2; 41 public static final int STATUS_EXPIRED = -3; 42 public static final int STATUS_EXPIREDANDNOTIFIED = -4; public static final int STATUS_EXECUTED = -5; 44 public static final int STATUS_EXECUTIONFAILED = -6; 45 public static final int STATUS_EXECUTIONDENIED = -7; 46 47 48 50 public static final int APPROVALTYPE_DUMMY = 0; 51 public static final int APPROVALTYPE_VIEWHARDTOKENDATA = 1; 52 public static final int APPROVALTYPE_ADDENDENTITY = 2; 53 public static final int APPROVALTYPE_EDITENDENTITY = 3; 54 public static final int APPROVALTYPE_CHANGESTATUSENDENTITY = 4; 55 public static final int APPROVALTYPE_KEYRECOVERY = 5; 56 57 public static final String [] APPROVALTYPENAMES = {"DUMMY","APVIEWHARDTOKENDATA","APADDENDENTITY","APEDITENDENTITY", 59 "APCHANGESTATUSENDENTITY", "APKEYRECOVERY"}; 60 61 64 public static final int ANY_CA = SecConst.ALLCAS; 65 66 69 public static final int ANY_ENDENTITYPROFILE = SecConst.PROFILE_NO_PROFILE; 70 71 72 private int id = 0; 73 private int approvalId = 0; 74 private int approvalType = 0; 75 private int endEntityProfileiId = 0; 76 private int cAId = 0; 77 private String reqadmincertissuerdn = null; 78 private String reqadmincertsn = null; 79 private int status = 0; 80 private Collection approvals = null; 81 private ApprovalRequest approvalRequest = null; 82 private Date requestDate = null; 83 private Date expireDate = null; 84 private int remainingApprovals = 0; 85 86 87 88 108 public ApprovalDataVO(int id, int approvalId, int approvalType, int endEntityProfileiId, int cAId, String reqadmincertissuerdn, String reqadmincertsn, int status, Collection approvals, ApprovalRequest approvalRequest, Date requestDate, Date expireDate, int remainingApprovals) { 109 super(); 110 this.id = id; 111 this.approvalId = approvalId; 112 this.approvalType = approvalType; 113 this.endEntityProfileiId = endEntityProfileiId; 114 this.cAId = cAId; 115 this.reqadmincertissuerdn = reqadmincertissuerdn; 116 this.reqadmincertsn = reqadmincertsn; 117 this.status = status; 118 this.approvals = approvals; 119 this.approvalRequest = approvalRequest; 120 this.requestDate = requestDate; 121 this.expireDate = expireDate; 122 this.remainingApprovals = remainingApprovals; 123 } 124 130 public int getApprovalId() { 131 return approvalId; 132 } 133 138 public ApprovalRequest getApprovalRequest() { 139 return approvalRequest; 140 } 141 142 147 public Collection getApprovals() { 148 return approvals; 149 } 150 151 157 public int getApprovalType() { 158 return approvalType; 159 } 160 161 167 public int getCAId() { 168 return cAId; 169 } 170 171 177 public int getEndEntityProfileiId() { 178 return endEntityProfileiId; 179 } 180 181 187 public Date getExpireDate() { 188 return expireDate; 189 } 190 191 194 public int getId() { 195 return id; 196 } 197 198 202 public int getRemainingApprovals() { 203 return remainingApprovals; 204 } 205 206 211 public String getReqadmincertissuerdn() { 212 return reqadmincertissuerdn; 213 } 214 215 220 public String getReqadmincertsn() { 221 return reqadmincertsn; 222 } 223 224 229 public Date getRequestDate() { 230 return requestDate; 231 } 232 233 238 public int getStatus() { 239 return status; 240 } 241 242 243 244 245 } 246 | Popular Tags |