Source Code Cross Referenced for CAInfo.java in  » Authentication-Authorization » ejbca » org » ejbca » core » model » ca » caadmin » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Authentication Authorization » ejbca » org.ejbca.core.model.ca.caadmin 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*************************************************************************
002:         *                                                                       *
003:         *  EJBCA: The OpenSource Certificate Authority                          *
004:         *                                                                       *
005:         *  This software is free software; you can redistribute it and/or       *
006:         *  modify it under the terms of the GNU Lesser General Public           *
007:         *  License as published by the Free Software Foundation; either         *
008:         *  version 2.1 of the License, or any later version.                    *
009:         *                                                                       *
010:         *  See terms of license at gnu.org.                                     *
011:         *                                                                       *
012:         *************************************************************************/package org.ejbca.core.model.ca.caadmin;
013:
014:        import java.io.Serializable;
015:        import java.util.Collection;
016:        import java.util.Date;
017:
018:        import org.ejbca.core.model.ca.catoken.CATokenInfo;
019:
020:        /**
021:         * Holds nonsensitive information about a CA.
022:         *
023:         * @version $Id: CAInfo.java,v 1.12 2008/02/26 15:37:14 herrvendil Exp $
024:         */
025:        public class CAInfo implements  Serializable {
026:
027:            private static final long serialVersionUID = 1L;
028:
029:            public static final int CATYPE_X509 = 1;
030:
031:            /** 
032:             * Constants indicating that the CA is selfsigned.
033:             */
034:            public static final int SELFSIGNED = 1;
035:            /**
036:             * Constant indicating that the CA is signed by an external CA.
037:             */
038:            public static final int SIGNEDBYEXTERNALCA = 2;
039:
040:            /**
041:             * Constant indicating where the special caid border is. All CAs with CA id not below this value
042:             * should be created
043:             */
044:            public static final int SPECIALCAIDBORDER = 10;
045:
046:            /**
047:             * Constants indicating approvalsettings for this CA
048:             */
049:            public static final int REQ_APPROVAL_ADDEDITENDENTITY = 1;
050:
051:            /**
052:             * Constants indicating approvalsettings for key recover this CA
053:             */
054:            public static final int REQ_APPROVAL_KEYRECOVER = 2;
055:
056:            /**
057:             * Constants indicating approvalsettings for revocations this CA
058:             */
059:            public static final int REQ_APPROVAL_REVOCATION = 3;
060:
061:            /**
062:             * Constants indicating approval settings for activation of CA tokens
063:             */
064:            public static final int REQ_APPROVAL_ACTIVATECATOKEN = 4;
065:
066:            public static final int[] AVAILABLE_APPROVALSETTINGS = {
067:                    REQ_APPROVAL_ADDEDITENDENTITY, REQ_APPROVAL_KEYRECOVER,
068:                    REQ_APPROVAL_REVOCATION, REQ_APPROVAL_ACTIVATECATOKEN };
069:            public static final String[] AVAILABLE_APPROVALSETTINGS_TEXTS = {
070:                    "APPROVEADDEDITENDENTITY", "APPROVEKEYRECOVER",
071:                    "APPROVEREVOCATION", "APACTIVATECATOKEN" };
072:
073:            protected String subjectdn;
074:            protected int caid;
075:            protected String name;
076:            protected int status;
077:            protected int validity;
078:            protected Date expiretime;
079:            protected Date updatetime;
080:            protected int catype;
081:            protected int signedby;
082:            protected Collection certificatechain;
083:            protected CATokenInfo catokeninfo;
084:            protected String description;
085:            protected int revokationreason;
086:            protected Date revokationdate;
087:            protected int certificateprofileid;
088:            /** Default value 24 hours */
089:            protected int crlperiod = 24;
090:            /** Default value 0 */
091:            protected int crlIssueInterval = 0;
092:            /** Default value 10 minutes */
093:            protected int crlOverlapTime = 10;
094:            /** Default value 0 = disabled */
095:            protected int deltacrlperiod = 0;
096:            protected Collection crlpublishers;
097:            protected boolean finishuser;
098:            protected Collection extendedcaserviceinfos;
099:            protected Collection approvalSettings;
100:            protected int numOfReqApprovals;
101:
102:            public CAInfo() {
103:            }
104:
105:            public String getSubjectDN() {
106:                return subjectdn;
107:            }
108:
109:            public int getCAId() {
110:                return this .caid;
111:            }
112:
113:            public String getName() {
114:                return this .name;
115:            }
116:
117:            public int getStatus() {
118:                return status;
119:            }
120:
121:            public int getCAType() {
122:                return catype;
123:            }
124:
125:            public int getSignedBy() {
126:                return signedby;
127:            }
128:
129:            public int getValidity() {
130:                return validity;
131:            }
132:
133:            public void setValidity(int validity) {
134:                this .validity = validity;
135:            }
136:
137:            public Date getExpireTime() {
138:                return this .expiretime;
139:            }
140:
141:            public Date getUpdateTime() {
142:                return this .updatetime;
143:            }
144:
145:            /** Retrieves the certificate chain for the CA. The returned certificate chain MUST have the
146:             * RootCA certificate in the last position and the CAs certificate in the first.
147:             */
148:            public Collection getCertificateChain() {
149:                return certificatechain;
150:            }
151:
152:            public CATokenInfo getCATokenInfo() {
153:                return this .catokeninfo;
154:            }
155:
156:            public String getDescription() {
157:                return this .description;
158:            }
159:
160:            public void setDescription(String description) {
161:                this .description = description;
162:            }
163:
164:            public int getRevokationReason() {
165:                return this .revokationreason;
166:            }
167:
168:            public Date getRevokationDate() {
169:                return this .revokationdate;
170:            }
171:
172:            public int getCertificateProfileId() {
173:                return this .certificateprofileid;
174:            }
175:
176:            public int getCRLPeriod() {
177:                return crlperiod;
178:            }
179:
180:            public void setCRLPeriod(int crlperiod) {
181:                this .crlperiod = crlperiod;
182:            }
183:
184:            public int getDeltaCRLPeriod() {
185:                return deltacrlperiod;
186:            }
187:
188:            public void setDeltaCRLPeriod(int deltacrlperiod) {
189:                this .deltacrlperiod = deltacrlperiod;
190:            }
191:
192:            public int getCRLIssueInterval() {
193:                return crlIssueInterval;
194:            }
195:
196:            public void setCRLIssueInterval(int crlissueinterval) {
197:                this .crlIssueInterval = crlissueinterval;
198:            }
199:
200:            public int getCRLOverlapTime() {
201:                return crlOverlapTime;
202:            }
203:
204:            public void setCRLOverlapTime(int crloverlaptime) {
205:                this .crlOverlapTime = crloverlaptime;
206:            }
207:
208:            public Collection getCRLPublishers() {
209:                return crlpublishers;
210:            }
211:
212:            public void setCRLPublishers(Collection crlpublishers) {
213:                this .crlpublishers = crlpublishers;
214:            }
215:
216:            public boolean getFinishUser() {
217:                return finishuser;
218:            }
219:
220:            public void setFinishUser(boolean finishuser) {
221:                this .finishuser = finishuser;
222:            }
223:
224:            /** Lists the extended CA services.
225:             * 
226:             * @return Collection of ExtendedCAServiceInfo
227:             */
228:            public Collection getExtendedCAServiceInfos() {
229:                return this .extendedcaserviceinfos;
230:            }
231:
232:            public void setExtendedCAServiceInfos(
233:                    Collection extendedcaserviceinfos) {
234:                this .extendedcaserviceinfos = extendedcaserviceinfos;
235:            }
236:
237:            /**
238:             * Returns a collection of Integers (CAInfo.REQ_APPROVAL_ constants) of which
239:             * action that requires approvals, default none 
240:             * 
241:             * Never null
242:             */
243:            public Collection getApprovalSettings() {
244:                return approvalSettings;
245:            }
246:
247:            /**
248:             * Collection of Integers (CAInfo.REQ_APPROVAL_ constants) of which
249:             * action that requires approvals
250:             */
251:            public void setApprovalSettings(Collection approvalSettings) {
252:                this .approvalSettings = approvalSettings;
253:            }
254:
255:            /**
256:             * Returns true if the action requires approvals.
257:             * @param action, on of the CAInfo.REQ_APPROVAL_ constants
258:             */
259:            public boolean isApprovalRequired(int action) {
260:                return approvalSettings.contains(new Integer(action));
261:            }
262:
263:            /**
264:             * Returns the number of different administrators that needs to approve
265:             * an action, default 1.
266:             */
267:            public int getNumOfReqApprovals() {
268:                return numOfReqApprovals;
269:            }
270:
271:            /**
272:             * The number of different administrators that needs to approve
273:             */
274:            public void setNumOfReqApprovals(int numOfReqApprovals) {
275:                this.numOfReqApprovals = numOfReqApprovals;
276:            }
277:
278:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.