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


001:        /**********************************************************************************
002:         * $URL$
003:         * $Id$
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 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.shared.impl.grading;
021:
022:        import org.sakaiproject.tool.assessment.data.dao.assessment.PublishedAssessmentData;
023:        import org.sakaiproject.tool.assessment.data.ifc.assessment.PublishedAssessmentIfc;
024:        import org.sakaiproject.tool.assessment.data.ifc.grading.AssessmentGradingIfc;
025:        import org.sakaiproject.tool.assessment.facade.PublishedAssessmentFacade;
026:        import org.sakaiproject.tool.assessment.services.assessment.PublishedAssessmentService;
027:        import org.sakaiproject.tool.assessment.services.gradebook.GradebookServiceHelper;
028:        import org.sakaiproject.tool.assessment.shared.api.grading.GradebookServiceAPI;
029:        import org.sakaiproject.tool.assessment.services.GradingServiceException;
030:
031:        /**
032:         * The GradebookServiceAPI describes an interface for gradebook information
033:         * for published assessments.  Implemented by wrapping GradebookServiceHelper().
034:         * Right that is a stub implementation, but this is designed to continue to work
035:         * if it isn't.
036:         *
037:         * @author Ed Smiley <esmiley@stanford.edu>
038:         */
039:        public class GradebookServiceImpl implements  GradebookServiceAPI {
040:            //private static Log log = LogFactory.getLog(GradebookServiceImpl.class);
041:
042:            public boolean isAssignmentDefined(String assessmentTitle) {
043:                try {
044:                    return GradebookServiceHelper
045:                            .isAssignmentDefined(assessmentTitle);
046:                } catch (Exception ex) {
047:                    throw new GradingServiceException(ex);
048:                }
049:            }
050:
051:            /**
052:             * Add this published assessment to the site.
053:             * @param publishedAssessment, must be castable to PublishedAssessmentData
054:             * @return true if added
055:             */
056:            public boolean addToGradebook(
057:                    PublishedAssessmentIfc publishedAssessment) {
058:                try {
059:                    // this a little convoluted
060:                    // our internal data representation uses OSIDs which declare an
061:                    // 'any type' data property, but our OOB standard has data that is
062:                    // a PublishedAssessmentData which is the implementation of
063:                    // PublishedAssessmentIfc
064:                    Long id = publishedAssessment.getPublishedAssessmentId();
065:                    PublishedAssessmentService pubService = new PublishedAssessmentService();
066:                    PublishedAssessmentFacade pubFacade = pubService
067:                            .getPublishedAssessment(id.toString());
068:                    PublishedAssessmentIfc data = pubFacade.getData();
069:                    return GradebookServiceHelper
070:                            .addToGradebook((PublishedAssessmentData) data);
071:                } catch (Exception ex) {
072:                    throw new GradingServiceException(ex);
073:                }
074:            }
075:
076:            /**
077:             * Remove published assessment.
078:             * @param siteId the site id
079:             * @param publishedAssessmentId teh published assessment id
080:             */
081:            public void removeExternalAssessment(String siteId,
082:                    String publishedAssessmentId) {
083:                try {
084:                    GradebookServiceHelper.removeExternalAssessment(siteId,
085:                            publishedAssessmentId);
086:                } catch (Exception ex) {
087:                    throw new GradingServiceException(ex);
088:                }
089:            }
090:
091:            /**
092:             * @todo fix
093:             * Update the assessment for the agent's grade.
094:             * @param ag the assessment grading data
095:             * @param agentIdString agent id
096:             */
097:            public void updateExternalAssessment(AssessmentGradingIfc ag,
098:                    String agentIdString) {
099:                try {
100:                    //      GradingService service = new GradingService();
101:                    //      AssessmentGradingData data = service.load(ag.getAssessmentGradingId().toString());
102:                    //      helper.updateExternalAssessment(data, agentIdString);
103:                } catch (Exception ex) {
104:                    throw new GradingServiceException(ex);
105:                }
106:            }
107:
108:            /**
109:             * Determine if a gradebook exists for the site.
110:             * @param siteId the site id
111:             * @return
112:             */
113:            public boolean gradebookExists(String siteId) {
114:                try {
115:                    return GradebookServiceHelper.gradebookExists(siteId);
116:                } catch (Exception ex) {
117:                    throw new GradingServiceException(ex);
118:                }
119:            }
120:
121:            /**
122:             * Update the score in the gradebook.
123:             * @param ag the assessment grading interface
124:             */
125:            public void updateExternalAssessmentScore(AssessmentGradingIfc ag) {
126:                try {
127:                    GradebookServiceHelper.updateExternalAssessmentScore(ag);
128:                } catch (Exception ex) {
129:                    throw new GradingServiceException(ex);
130:                }
131:            }
132:
133:        }
w___w__w__.___j__a_va2__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.