01: /**********************************************************************************
02: * $URL$
03: * $Id$
04: ***********************************************************************************
05: *
06: * Copyright (c) 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the"License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.tool.assessment.shared.impl.assessment;
21:
22: import org.apache.commons.logging.Log;
23: import org.apache.commons.logging.LogFactory;
24:
25: import org.sakaiproject.tool.assessment.data.ifc.assessment.SectionDataIfc;
26: import org.sakaiproject.tool.assessment.facade.SectionFacade;
27: import org.sakaiproject.tool.assessment.services.SectionService;
28: import org.sakaiproject.tool.assessment.services.assessment.AssessmentServiceException;
29: import org.sakaiproject.tool.assessment.shared.api.assessment.SectionServiceAPI;
30:
31: /**
32: * SectionServiceImpl implements a shared interface to get/set section
33: * information.
34: * @author Ed Smiley <esmiley@stanford.edu>
35: */
36: public class SectionServiceImpl implements SectionServiceAPI {
37: private static Log log = LogFactory
38: .getLog(SectionServiceImpl.class);
39:
40: public SectionServiceImpl() {
41: }
42:
43: // our API just uses our internal service. SectionFacade implements
44: // SectionDataIfc. If we want, we can always replace this internal
45: // service and use its implementation as our own.
46: public SectionDataIfc getSection(Long secId, String agentId) {
47: SectionFacade section = null;
48: try {
49: SectionService service = new SectionService();
50: section = service.getSection(secId, agentId);
51: } catch (Exception e) {
52: throw new AssessmentServiceException(e);
53: }
54:
55: return section;
56: }
57:
58: }
|