1 /* 2 * Copyright (c) 2005 Regents of the University of California (Regents). Created 3 * by TELS, Graduate School of Education, University of California at Berkeley. 4 * 5 * This software is distributed under the GNU Lesser General Public License, v2. 6 * 7 * Permission is hereby granted, without written agreement and without license 8 * or royalty fees, to use, copy, modify, and distribute this software and its 9 * documentation for any purpose, provided that the above copyright notice and 10 * the following two paragraphs appear in all copies of this software. 11 * 12 * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 13 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 14 * PURPOSE. THE SOFTWAREAND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED 15 * HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE 16 * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 * 18 * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, 19 * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, 20 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 21 * REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 */ 23 package net.sf.sail.core.beans.service; 24 25 import java.io.PrintStream; 26 27 import net.sf.sail.core.beans.SessionContext; 28 import net.sf.sail.core.entity.AgentSet; 29 import net.sf.sail.core.entity.IAgent; 30 import net.sf.sail.core.entity.ISock; 31 import net.sf.sail.core.entity.Rim; 32 import net.sf.sail.core.entity.Role; 33 import net.sf.sail.core.entity.UnsupportedRimShapeException; 34 import net.sf.sail.core.entity.User; 35 36 37 /** 38 * The service that beans call upon to record data through rims into socks. 39 * 40 * @see net.sf.sail.test.data.IAgent 41 * @see net.sf.sail.test.data.Rim 42 * @author turadg 43 */ 44 public interface AgentService { 45 46 public <T> ISock<T> getSock(Rim<T> rim, IAgent agent) throws UnsupportedRimShapeException; 47 48 /** 49 * This should return the agents that are currently active on this session 50 * @param role 51 * @return 52 */ 53 public AgentSet getAgentsInRole(Role role); 54 55 public IAgent createAgent(Role role); 56 57 public AgentSet getAgentsOfUser(User user); 58 59 public void dump(SessionContext session, PrintStream out); 60 }