1 13 14 package org.ejbca.core.model.ca.caadmin; 15 16 import java.io.Serializable ; 17 import java.util.Collection ; 18 import java.util.Date ; 19 20 import org.ejbca.core.model.ca.catoken.CATokenInfo; 21 22 27 public abstract class CAInfo implements Serializable { 28 29 public static final int CATYPE_X509 = 1; 30 31 34 public static final int SELFSIGNED = 1; 35 38 public static final int SIGNEDBYEXTERNALCA = 2; 39 40 44 public static final int SPECIALCAIDBORDER = 10; 45 46 47 50 public static final int REQ_APPROVAL_ADDEDITENDENTITY = 1; 51 52 55 public static final int REQ_APPROVAL_KEYRECOVER = 2; 56 57 public static final int[] AVAILABLE_APPROVALSETTINGS={REQ_APPROVAL_ADDEDITENDENTITY, REQ_APPROVAL_KEYRECOVER}; 58 public static final String [] AVAILABLE_APPROVALSETTINGS_TEXTS={"APPROVEADDEDITENDENTITY","APPROVEKEYRECOVER"}; 59 60 protected String subjectdn; 61 protected int caid; 62 protected String name; 63 protected int status; 64 protected int validity; 65 protected Date expiretime; 66 protected Date updatetime; 67 protected int catype; 68 protected int signedby; 69 protected Collection certificatechain; 70 protected CATokenInfo catokeninfo; 71 protected String description; 72 protected int revokationreason; 73 protected Date revokationdate; 74 protected int certificateprofileid; 75 protected int crlperiod; 76 protected int crlIssueInterval = 0; 77 protected int crlOverlapTime = 10; 78 protected Collection crlpublishers; 79 protected boolean finishuser; 80 protected Collection extendedcaserviceinfos; 81 protected Collection approvalSettings; 82 protected int numOfReqApprovals; 83 84 public CAInfo(){} 85 86 public String getSubjectDN() {return subjectdn;} 87 public int getCAId(){return this.caid;} 88 public String getName() {return this.name;} 89 public int getStatus() {return status;} 90 public int getCAType() {return catype;} 91 public int getSignedBy() {return signedby;} 92 93 public int getValidity() { return validity;} 94 public void setValidity(int validity) { this.validity = validity; } 95 96 public Date getExpireTime() {return this.expiretime;} 97 public Date getUpdateTime() {return this.updatetime;} 98 99 100 103 public Collection getCertificateChain(){ return certificatechain;} 104 public CATokenInfo getCATokenInfo() {return this.catokeninfo;} 105 106 public String getDescription(){ return this.description;} 107 public void setDescription(String description){ this.description = description;} 108 109 public int getRevokationReason(){ return this.revokationreason;} 110 public Date getRevokationDate(){ return this.revokationdate;} 111 112 public int getCertificateProfileId(){ return this.certificateprofileid; } 113 114 public int getCRLPeriod(){ return crlperiod;} 115 public void setCRLPeriod(int crlperiod){ this.crlperiod=crlperiod;} 116 117 public int getCRLIssueInterval(){ return crlIssueInterval;} 118 public void setCRLIssueInterval(int crlissueinterval){ this.crlIssueInterval = crlissueinterval;} 119 120 public int getCRLOverlapTime(){ return crlOverlapTime;} 121 public void setCRLOverlapTime(int crloverlaptime){ this.crlOverlapTime = crloverlaptime;} 122 123 public Collection getCRLPublishers(){ return crlpublishers;} 124 public void setCRLPublishers(Collection crlpublishers){this.crlpublishers=crlpublishers;} 125 126 public boolean getFinishUser(){ return finishuser;} 127 public void setFinishUser(boolean finishuser){ this.finishuser=finishuser;} 128 129 133 public Collection getExtendedCAServiceInfos(){ return this.extendedcaserviceinfos;} 134 public void setExtendedCAServiceInfos(Collection extendedcaserviceinfos){ this.extendedcaserviceinfos = extendedcaserviceinfos;} 135 136 142 public Collection getApprovalSettings() {return approvalSettings;} 143 147 public void setApprovalSettings(Collection approvalSettings) {this.approvalSettings = approvalSettings;} 148 149 153 public boolean isApprovalRequired(int action){ 154 return approvalSettings.contains(new Integer (action)); 155 } 156 157 158 162 public int getNumOfReqApprovals() {return numOfReqApprovals;} 163 166 public void setNumOfReqApprovals(int numOfReqApprovals) {this.numOfReqApprovals = numOfReqApprovals;} 167 168 } | Popular Tags |