1 /*
2 * Created on Apr 9, 2007 by scott
3 *
4 * Copyright (c) 2007 Regents of the University of California (Regents). Created
5 * by TELS, Graduate School of Education, University of California at Berkeley.
6 *
7 * This software is distributed under the GNU Lesser General Public License, v2.
8 *
9 * Permission is hereby granted, without written agreement and without license
10 * or royalty fees, to use, copy, modify, and distribute this software and its
11 * documentation for any purpose, provided that the above copyright notice and
12 * the following two paragraphs appear in all copies of this software.
13 *
14 * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE. THE SOFTWAREAND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED
17 * HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE
18 * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
19 *
20 * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
21 * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
22 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
23 * REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26 package net.sf.sail.core.beans.service;
27
28 import net.sf.sail.core.entity.IAgent;
29 import net.sf.sail.core.entity.IAnnotation;
30
31 /**
32 * @author scott
33 *
34 */
35 public interface AnnotationService
36 {
37 /**
38 * Return the list of annotations associated with this entity and
39 * agent.
40 *
41 * @param sailEntity currently this has to be a Pod or Rim
42 * @param agent this is typically a workgroup
43 * @return
44 */
45 public IAnnotation [] getAnnotations(Object sailEntity, IAgent agent);
46
47 /**
48 * Returns the first annotation associated with this entity and
49 * agent which has the requested source.
50 *
51 * @param sailEntity
52 * @param agent
53 * @param source
54 * @return
55 */
56 public IAnnotation getAnnotation(Object sailEntity, IAgent agent,
57 String source);
58
59 /**
60 * Indicates if this annotation server actually return annotations. It is possible
61 * for an annotation service to be registered which is not configured correctly
62 * so it cannot return annotations.
63 *
64 * @return
65 */
66 public boolean isAvailable();
67 }