01: /**********************************************************************************
02: * $URL$
03: * $Id$
04: ***********************************************************************************
05: *
06: * Copyright (c) 2004, 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.api.qti;
21:
22: import org.w3c.dom.Document;
23:
24: import org.sakaiproject.tool.assessment.data.ifc.assessment.AssessmentIfc;
25: import org.sakaiproject.tool.assessment.data.ifc.assessment.ItemDataIfc;
26:
27: public interface QTIServiceAPI {
28: /**
29: * Import an assessment XML document in QTI format, extract & persist the data.
30: * @param document the assessment XML document in QTI format
31: * @param qtiVersion either 1=QTI VERSION 1.2 or 2=QTI Version 2.0
32: * @return a persisted assessment
33: */
34: public AssessmentIfc createImportedAssessment(Document document,
35: int qtiVersion);
36:
37: /**
38: * Import an item XML document in QTI format, extract & persist the data.
39: * @param document the item XML document in QTI format
40: * @param qtiVersion either 1=QTI VERSION 1.2 or 2=QTI Version 2.0
41: * @return a persisted item
42: */
43: public ItemDataIfc createImportedItem(Document document,
44: int qtiVersion);
45:
46: /**
47: * Get an assessment in Document form.
48: *
49: * Note: this service requires a Faces context.
50: *
51: * @param assessmentId the assessment's Id
52: * @param qtiVersion either 1=QTI VERSION 1.2 or 2=QTI Version 2.0
53: * @return the Document with the assessment data
54: */
55: public Document getExportedAssessment(String assessmentId,
56: int qtiVersion);
57:
58: /**
59: * Get an item in Document form.
60: *
61: * Note: this service requires a Faces context.
62: *
63: * @param itemId the item's Id
64: * @param qtiVersion either 1=QTI VERSION 1.2 or 2=QTI Version 2.0
65: * @return the Document with the assessment data
66: */
67: public Document getExportedItem(String itemId, int qtiVersion);
68:
69: /**
70: * Get an item bank in Document form.
71: *
72: * Note: this service requires a Faces context.
73: *
74: * @param itemIds an array of item ids
75: * @param qtiVersion either 1=QTI VERSION 1.2 or 2=QTI Version 2.0
76: * @return the Document with the item bank
77: */
78: public Document getExportedItemBank(String itemIds[], int qtiVersion);
79:
80: }
|