Source Code Cross Referenced for ApprovalDataVO.java in  » Authentication-Authorization » ejbca » org » ejbca » core » model » approval » 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.approval 
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.approval;
013:
014:        import java.io.Serializable;
015:        import java.util.Collection;
016:        import java.util.Date;
017:
018:        import org.ejbca.core.model.SecConst;
019:
020:        /**
021:         * Value Object containing all the information about an approval
022:         * such as approvalid, approvaltype, endentityprofileid, caid, 
023:         * reqadmincertissuerdn, reqadmincertsn, status, approvals (Collection),
024:         * requestdata, requestdate, expiredate, remainingapprovals
025:         * 
026:         * @author Philip Vendil
027:         * @version $Id: ApprovalDataVO.java,v 1.7 2008/02/26 15:37:12 herrvendil Exp $
028:         */
029:
030:        public class ApprovalDataVO implements  Serializable {
031:
032:            private static final long serialVersionUID = -1L;
033:
034:            // Status constants
035:            public static final int STATUS_WAITINGFORAPPROVAL = -1;
036:            public static final int STATUS_APPROVED = 0;
037:            public static final int STATUS_REJECTED = -2;
038:            public static final int STATUS_EXPIRED = -3;
039:            public static final int STATUS_EXPIREDANDNOTIFIED = -4; // Used to mark that the requestor havebee notified that the request havebeen expired.
040:            public static final int STATUS_EXECUTED = -5;
041:            public static final int STATUS_EXECUTIONFAILED = -6;
042:            public static final int STATUS_EXECUTIONDENIED = -7;
043:
044:            // Approval types
045:
046:            public static final int APPROVALTYPE_DUMMY = 0;
047:            public static final int APPROVALTYPE_VIEWHARDTOKENDATA = 1;
048:            public static final int APPROVALTYPE_ADDENDENTITY = 2;
049:            public static final int APPROVALTYPE_EDITENDENTITY = 3;
050:            public static final int APPROVALTYPE_CHANGESTATUSENDENTITY = 4;
051:            public static final int APPROVALTYPE_KEYRECOVERY = 5;
052:            public static final int APPROVALTYPE_GENERATETOKEN = 6;
053:            public static final int APPROVALTYPE_REVOKEENDENTITY = 7;
054:            public static final int APPROVALTYPE_REVOKEANDDELETEENDENTITY = 8;
055:            public static final int APPROVALTYPE_REVOKECERTIFICATE = 9;
056:            public static final int APPROVALTYPE_ACTIVATECATOKEN = 10;
057:
058:            //IMPORTANT REMEMBER TO SET THE RESOURCES IN BOTH INTERNAL AND ADMINWEB LANGUAGE FILES
059:            public static final String[] APPROVALTYPENAMES = { "DUMMY",
060:                    "APVIEWHARDTOKENDATA", "APADDENDENTITY", "APEDITENDENTITY",
061:                    "APCHANGESTATUSENDENTITY", "APKEYRECOVERY",
062:                    "APGENERATETOKEN", "APREVOKEENDENTITY",
063:                    "APREVOKEDELETEENDENTITY", "APREVOKECERTIFICATE",
064:                    "APACTIVATECATOKEN" };
065:
066:            /**
067:             * Used to indicate that the approcal is applicable to any ca.
068:             */
069:            public static final int ANY_CA = SecConst.ALLCAS;
070:
071:            /**
072:             * Used to indicate that the approcal is applicable to any end entity profile.
073:             */
074:            public static final int ANY_ENDENTITYPROFILE = SecConst.PROFILE_NO_PROFILE;
075:
076:            private int id = 0;
077:            private int approvalId = 0;
078:            private int approvalType = 0;
079:            private int endEntityProfileiId = 0;
080:            private int cAId = 0;
081:            private String reqadmincertissuerdn = null;
082:            private String reqadmincertsn = null;
083:            private int status = 0;
084:            private Collection approvals = null;
085:            private ApprovalRequest approvalRequest = null;
086:            private Date requestDate = null;
087:            private Date expireDate = null;
088:            private int remainingApprovals = 0;
089:
090:            /**
091:             * @param id unique row id
092:             * @param approvalId    Constructed from action data as actiontype, admin, username etc. It should
093:             *                      result in the same approvalid if the admin tries to request the same action twice.
094:             * @param approvalType  Type of action that should be approved, should be one of ApprovalDataVO.APPROVALTYPE_ 
095:             *                      constants ex: ApprovalDataVO.APPROVALTYPE_VIEWHARDTOKENDATA
096:             * @param endEntityProfileiId For RA specific approval requests should the related end entity profile id be specified
097:             *                       for non ra request should this field be set to ApprovalDataVO.ANY_ENDENTITYPROFILE
098:             * @param cAId          For CA specific approval requests should the related ca id be specified
099:             *                       for non ca request should this field be set to ApprovalDataVO.ANY_CA
100:             * @param reqadmincertissuerdn The issuerdn of the administrator certificate that generated the request.
101:             * @param reqadmincertsn The serialnumber of the administrator certificate that generated the request. String in Hex
102:             * @param status        Should be one of ApprovalDataVO.STATUS_ constants
103:             * @param approvals     Collection of created Approvals (never null)
104:             * @param approvalRequest The ApprovalRequest
105:             * @param requestDate   Date the request for approval were added
106:             * @param expireDate    Date the request for action or the approvel action will expire, Long.MAX_VALUE 
107:             *                      means that the request/approval never expires
108:             * @param remainingApprovals Indicates the number of approvals that remains in order to execute the action.
109:             */
110:            public ApprovalDataVO(int id, int approvalId, int approvalType,
111:                    int endEntityProfileiId, int cAId,
112:                    String reqadmincertissuerdn, String reqadmincertsn,
113:                    int status, Collection approvals,
114:                    ApprovalRequest approvalRequest, Date requestDate,
115:                    Date expireDate, int remainingApprovals) {
116:                super ();
117:                this .id = id;
118:                this .approvalId = approvalId;
119:                this .approvalType = approvalType;
120:                this .endEntityProfileiId = endEntityProfileiId;
121:                this .cAId = cAId;
122:                this .reqadmincertissuerdn = reqadmincertissuerdn;
123:                this .reqadmincertsn = reqadmincertsn;
124:                this .status = status;
125:                this .approvals = approvals;
126:                this .approvalRequest = approvalRequest;
127:                this .requestDate = requestDate;
128:                this .expireDate = expireDate;
129:                this .remainingApprovals = remainingApprovals;
130:            }
131:
132:            /**
133:             *  Constructed from action data as actiontype, admin, username etc. It should
134:             *  result in the same approvalid if the admin tries to request the same action twice.
135:             * 
136:             * @return Returns the approvalId.
137:             */
138:            public int getApprovalId() {
139:                return approvalId;
140:            }
141:
142:            /**
143:             * The ApprovalRequest
144:             * 
145:             * @return Returns the approvalRequest.
146:             */
147:            public ApprovalRequest getApprovalRequest() {
148:                return approvalRequest;
149:            }
150:
151:            /**
152:             * Collection of created Approvals (never null)
153:             * 
154:             * @return Returns the approvals.
155:             */
156:            public Collection getApprovals() {
157:                return approvals;
158:            }
159:
160:            /**
161:             * Type of action that should be approved, should be one of ApprovalDataVO.APPROVALTYPE_ 
162:             * constants ex: ApprovalDataVO.APPROVALTYPE_VIEWHARDTOKENDATA
163:             * 
164:             * @return Returns the approvalType.
165:             */
166:            public int getApprovalType() {
167:                return approvalType;
168:            }
169:
170:            /**
171:             * For CA specific approval requests should the related ca id be specified
172:             * for non ca request should this field be set to ApprovalDataVO.ANY_CA
173:             *                       
174:             * @return Returns the cAId.
175:             */
176:            public int getCAId() {
177:                return cAId;
178:            }
179:
180:            /**
181:             *  For RA specific approval requests should the related end entity profile id be specified
182:             *  for non ra request should this field be set to ApprovalDataVO.ANY_ENDENTITYPROFILE
183:             *                       
184:             * @return Returns the endEntityProfileiId.
185:             */
186:            public int getEndEntityProfileiId() {
187:                return endEntityProfileiId;
188:            }
189:
190:            /**
191:             * Date the request for action or the approvel action will expire, Long.MAX_VALUE 
192:             * means that the request/approval never expires
193:             * 
194:             * @return Returns the expireDate.
195:             */
196:            public Date getExpireDate() {
197:                return expireDate;
198:            }
199:
200:            /**
201:             * @return Returns the id.
202:             */
203:            public int getId() {
204:                return id;
205:            }
206:
207:            /**
208:             * Indicates the number of approvals that remains in order to execute the action
209:             * @return Returns the remainingApprovals.
210:             */
211:            public int getRemainingApprovals() {
212:                return remainingApprovals;
213:            }
214:
215:            /**
216:             * The issuerdn of the administrator certificate that generated the request.
217:             * 
218:             * @return Returns the reqadmincertissuerdn.
219:             */
220:            public String getReqadmincertissuerdn() {
221:                return reqadmincertissuerdn;
222:            }
223:
224:            /**
225:             * The serialnumber of the administrator certificate that generated the request. String in Hex
226:             * 
227:             * @return Returns the reqadmincertsn.
228:             */
229:            public String getReqadmincertsn() {
230:                return reqadmincertsn;
231:            }
232:
233:            /**
234:             * Date the request for approval were added
235:             * 
236:             * @return Returns the requestDate.
237:             */
238:            public Date getRequestDate() {
239:                return requestDate;
240:            }
241:
242:            /**
243:             * Should be one of ApprovalDataVO.STATUS_ constants
244:             * 
245:             * @return Returns the status.
246:             */
247:            public int getStatus() {
248:                return status;
249:            }
250:
251:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.