Source Code Cross Referenced for TimedAssessmentGradingModel.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » tool » assessment » ui » model » delivery » 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 » ERP CRM Financial » sakai » org.sakaiproject.tool.assessment.ui.model.delivery 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL$
003:         * $Id$
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
007:         *
008:         * Licensed under the Educational Community License, Version 1.0 (the"License");
009:         * you may not use this file except in compliance with the License.
010:         * You may obtain a copy of the License at
011:         *
012:         *      http://www.opensource.org/licenses/ecl1.php
013:         *
014:         * Unless required by applicable law or agreed to in writing, software
015:         * distributed under the License is distributed on an "AS IS" BASIS,
016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:         * See the License for the specific language governing permissions and
018:         * limitations under the License.
019:         *
020:         **********************************************************************************/package org.sakaiproject.tool.assessment.ui.model.delivery;
021:
022:        import java.util.Date;
023:
024:        /**
025:         * <p>Title: </p>
026:         * <p>Description: </p>
027:         * <p>Copyright: Copyright (c) 2004</p>
028:         * <p>Company: </p>
029:         * @author not attributable
030:         * @version 1.0
031:         */
032:
033:        public class TimedAssessmentGradingModel {
034:            private Long assessmentGradingId;
035:            private int timeLimit; // in seconds
036:            private int timeLeft; // in seconds
037:            private Date beginDate;
038:            private Date expirationDate;
039:            private Date bufferedExpirationDate;
040:            private Date localBeginDate;
041:            private Date localExpirationDate;
042:            private boolean submittedForGrade = false;
043:            private String timerId;
044:
045:            /* 30 sec, this is to allow JScript clock to catch up before server submit the
046:             * assessment for grade
047:             */
048:            private int latencyBuffer = 30;
049:
050:            /* timedAG is removed from timedAssessmentQueue immediately if the submission for
051:             * grade is initiated by user OR the AutoSubmit script in the web page. If user exit
052:             * application unexpectedly (e.g.closing browser), server will do the submission 
053:             * when time is up and also clean up the timedAG in queue. So we add a transactionBuffer
054:             * here before server clean up
055:             */
056:            private int transactionBuffer = 30; // 30 sec
057:
058:            public TimedAssessmentGradingModel() {
059:            }
060:
061:            public TimedAssessmentGradingModel(Long assessmentGradingId,
062:                    int timeLimit, int timeLeft, Date beginDate,
063:                    Date localBeginDate, boolean submittedForGrade,
064:                    String timerId) {
065:                this .assessmentGradingId = assessmentGradingId;
066:                this .timeLimit = timeLimit;
067:                this .timeLeft = timeLeft;
068:                this .beginDate = beginDate;
069:                this .expirationDate = new Date(beginDate.getTime() + timeLeft
070:                        * 1000);
071:                this .bufferedExpirationDate = new Date(beginDate.getTime()
072:                        + timeLeft * 1000 + latencyBuffer * 1000);
073:                this .submittedForGrade = submittedForGrade;
074:                this .localBeginDate = localBeginDate;
075:                this .localExpirationDate = new Date(localBeginDate.getTime()
076:                        + timeLeft * 1000);
077:                this .timerId = timerId;
078:            }
079:
080:            public TimedAssessmentGradingModel(Long assessmentGradingId,
081:                    int timeLimit, int timeLeft, int latencyBuffer,
082:                    int transactionBuffer, Date beginDate, Date localBeginDate,
083:                    boolean submittedForGrade, String timerId) {
084:                this .assessmentGradingId = assessmentGradingId;
085:                this .timeLimit = timeLimit;
086:                this .timeLeft = timeLeft;
087:                this .latencyBuffer = latencyBuffer;
088:                this .transactionBuffer = transactionBuffer;
089:                this .beginDate = beginDate;
090:                this .expirationDate = new Date(beginDate.getTime() + timeLeft
091:                        * 1000);
092:                this .bufferedExpirationDate = new Date(beginDate.getTime()
093:                        + timeLeft * 1000 + latencyBuffer * 1000);
094:                this .submittedForGrade = submittedForGrade;
095:                this .localBeginDate = localBeginDate;
096:                this .localExpirationDate = new Date(localBeginDate.getTime()
097:                        + timeLeft * 1000);
098:                this .timerId = timerId;
099:            }
100:
101:            public Long getAssessmentGradingId() {
102:                return assessmentGradingId;
103:            }
104:
105:            public void setAssessmentGradingId(Long assessmentGradingId) {
106:                this .assessmentGradingId = assessmentGradingId;
107:            }
108:
109:            public int getTimeLimit() {
110:                return timeLimit;
111:            }
112:
113:            public void setTimeLimit(int timeLimit) {
114:                this .timeLimit = timeLimit;
115:            }
116:
117:            public int getTimeLeft() {
118:                return timeLeft;
119:            }
120:
121:            public void setTimeLeft(int timeLeft) {
122:                this .timeLeft = timeLeft;
123:            }
124:
125:            public int getLatencyBuffer() {
126:                return latencyBuffer;
127:            }
128:
129:            public void setLatencyBuffer(int latencyBuffer) {
130:                this .latencyBuffer = latencyBuffer;
131:            }
132:
133:            public int getTransactionBuffer() {
134:                return transactionBuffer;
135:            }
136:
137:            public void setTransactionBuffer(int transactionBuffer) {
138:                this .transactionBuffer = transactionBuffer;
139:            }
140:
141:            public Date getBeginDate() {
142:                return beginDate;
143:            }
144:
145:            public void setBeginDate(Date beginDate) {
146:                this .beginDate = beginDate;
147:            }
148:
149:            public Date getExpirationDate() {
150:                return expirationDate;
151:            }
152:
153:            public void setExpirationDate(Date expirationDate) {
154:                this .expirationDate = expirationDate;
155:            }
156:
157:            public Date getBufferedExpirationDate() {
158:                return bufferedExpirationDate;
159:            }
160:
161:            public void setBufferedExpirationDate(Date bufferedExpirationDate) {
162:                this .bufferedExpirationDate = bufferedExpirationDate;
163:            }
164:
165:            public Date getLocalBeginDate() {
166:                return localBeginDate;
167:            }
168:
169:            public void setLocalBeginDate(Date localBeginDate) {
170:                this .localBeginDate = localBeginDate;
171:            }
172:
173:            public Date getLocalExpirationDate() {
174:                return localExpirationDate;
175:            }
176:
177:            public void setLocalExpirationDate(Date localExpirationDate) {
178:                this .localExpirationDate = localExpirationDate;
179:            }
180:
181:            public boolean getSubmittedForGrade() {
182:                return submittedForGrade;
183:            }
184:
185:            public void setSubmittedForGrade(boolean submittedForGrade) {
186:                this .submittedForGrade = submittedForGrade;
187:            }
188:
189:            public String getTimerId() {
190:                return timerId;
191:            }
192:
193:            public void setTimerId(String timerId) {
194:                this.timerId = timerId;
195:            }
196:
197:        }
w___w___w__._j_a_va_2__s_.___c_o___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.