01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/sam/trunk/component/src/java/org/sakaiproject/tool/assessment/osid/shared/impl/AgentImpl.java $
03: * $Id: AgentImpl.java 9276 2006-05-10 23:04:20Z daisyf@stanford.edu $
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.osid.shared.impl;
21:
22: import java.util.ArrayList;
23: import java.util.Collection;
24:
25: import org.osid.agent.Agent;
26: import org.osid.shared.Id;
27: import org.osid.shared.Type;
28: import org.osid.shared.TypeIterator;
29: import org.osid.agent.AgentException;
30: import org.osid.shared.PropertiesIterator;
31: import org.osid.shared.Properties;
32:
33: /**
34: * A Stanford implementation of Agent for AAM/Navigo.
35: *
36: * @author Rachel Gollub
37: */
38: public class AgentImpl implements Agent {
39: private Id id;
40: private String displayName;
41: private Type type;
42: private PropertiesIterator propertiesIterator;
43: private Collection properties;
44:
45: public AgentImpl(String pname, Type ptype, Id pid) {
46: displayName = pname;
47: type = ptype;
48: id = pid;
49: properties = new ArrayList();
50: // need to load it from somewhere later. -daisyf 10/11/04
51: propertiesIterator = new PropertiesIteratorImpl(properties
52: .iterator());
53: }
54:
55: public Id getId() {
56: return id;
57: }
58:
59: public String getDisplayName() {
60: return displayName;
61: }
62:
63: public Type getType() {
64: return type;
65: }
66:
67: public PropertiesIterator getProperties() {
68: return propertiesIterator;
69: }
70:
71: public TypeIterator getPropertiesTypes() throws AgentException {
72: throw new AgentException(AgentException.UNIMPLEMENTED);
73: }
74:
75: public Properties getPropertiesByType(Type propertiesType)
76: throws AgentException {
77: throw new AgentException(AgentException.UNIMPLEMENTED);
78: }
79:
80: public TypeIterator getPropertyTypes() throws AgentException {
81: throw new AgentException(AgentException.UNIMPLEMENTED);
82: }
83:
84: }
|