001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/sam/trunk/component/src/java/org/sakaiproject/tool/assessment/osid/assessment/impl/ItemImpl.java $
003: * $Id: ItemImpl.java 9276 2006-05-10 23:04:20Z daisyf@stanford.edu $
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.osid.assessment.impl;
021:
022: import java.io.IOException;
023: import java.io.ObjectInputStream;
024: import java.io.ObjectOutputStream;
025: import java.io.Serializable;
026:
027: import org.apache.log4j.Category;
028: import org.osid.assessment.AssessmentException;
029: import org.osid.shared.Id;
030: import org.osid.shared.Properties;
031: import org.osid.shared.PropertiesIterator;
032: import org.osid.shared.Type;
033: import org.osid.shared.TypeIterator;
034:
035: public class ItemImpl implements Serializable, org.osid.assessment.Item {
036: static Category errorLogger = Category.getInstance("errorLogger");
037:
038: private static final long serialVersionUID = 7526471155622776147L;
039:
040: private Id id;
041: private String displayName;
042: private String description;
043: private Serializable data;
044: private Type itemType;
045:
046: public ItemImpl() {
047: }
048:
049: public Id getId() {
050: return this .id;
051: }
052:
053: public Type getItemType() {
054: return this .itemType;
055: }
056:
057: public String getDisplayName() {
058: return this .displayName;
059: }
060:
061: public void updateDisplayName(String displayName) {
062: setDisplayName(displayName);
063: }
064:
065: private void setDisplayName(String displayName) {
066: this .displayName = displayName;
067: }
068:
069: public String getDescription() {
070: return this .description;
071: }
072:
073: public void updateDescription(String description) {
074: setDescription(description);
075: }
076:
077: private void setDescription(String description) {
078: this .description = description;
079: }
080:
081: public Serializable getData() {
082: return this .data;
083: }
084:
085: public void updateData(Serializable data) {
086: setData(data);
087: }
088:
089: private void setData(Serializable data) {
090: this .data = data;
091: }
092:
093: public PropertiesIterator getProperties()
094: throws AssessmentException {
095: throw new AssessmentException(AssessmentException.UNIMPLEMENTED);
096: }
097:
098: public Properties getPropertiesByType(Type type)
099: throws AssessmentException {
100: throw new AssessmentException(AssessmentException.UNIMPLEMENTED);
101: }
102:
103: public TypeIterator getPropertyTypes() throws AssessmentException {
104: throw new AssessmentException(AssessmentException.UNIMPLEMENTED);
105: }
106:
107: /**
108: * implements Serializable
109: * @param out
110: * @throws IOException
111: */
112: private void writeObject(ObjectOutputStream out) throws IOException {
113: out.defaultWriteObject();
114: }
115:
116: /**
117: * implements Serializable
118: * @param in
119: * @throws IOException
120: */
121: private void readObject(ObjectInputStream in) throws IOException,
122: ClassNotFoundException {
123: in.defaultReadObject();
124: }
125:
126: }
|