01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/metaobj/tags/sakai_2-4-1/metaobj-api/api/src/java/org/sakaiproject/metaobj/shared/mgt/AgentManager.java $
03: * $Id: AgentManager.java 9469 2006-05-15 14:52:05Z chmaurer@iupui.edu $
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.metaobj.shared.mgt;
21:
22: import java.util.List;
23:
24: import org.sakaiproject.metaobj.shared.model.Agent;
25: import org.sakaiproject.metaobj.shared.model.Id;
26:
27: public interface AgentManager {
28: /**
29: * @param id
30: * @return
31: */
32: public Agent getAgent(Id id);
33:
34: public Agent getAgent(String username);
35:
36: public Agent getWorksiteRole(String roleName);
37:
38: public Agent getWorksiteRole(String roleName, String siteId);
39:
40: public Agent getTempWorksiteRole(String roleName, String siteId);
41:
42: public Agent getAnonymousAgent();
43:
44: public Agent getAdminAgent();
45:
46: /**
47: * if type is null return all records
48: *
49: * @param type added typed list
50: * @param object
51: * @return
52: */
53: public List findByProperty(String type, Object object);
54:
55: /**
56: * @param agent
57: * @return
58: */
59: public Agent createAgent(Agent agent);
60:
61: /**
62: * @param agent
63: */
64: public void deleteAgent(Agent agent);
65:
66: public void updateAgent(Agent agent);
67:
68: /**
69: * @param siteId
70: * @return list of agents that are participants in the given siteId
71: */
72: public List getWorksiteAgents(String siteId);
73:
74: /**
75: * @param siteId
76: * @return list of roles for the given siteId. The list is a collection of type Agent.
77: */
78: public List getWorksiteRoles(String siteId);
79:
80: }
|