01 /*
02 * Group.java
03 *
04 * Copyright (c) 1995-2010, The University of Sheffield. See the file
05 * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
06 *
07 * This file is part of GATE (see http://gate.ac.uk/), and is free
08 * software, licenced under the GNU Library General Public License,
09 * Version 2, June 1991 (in the distribution as file licence.html,
10 * and also available at http://gate.ac.uk/gate/licence.html).
11 *
12 * Marin Dimitrov, 19/Sep/2001
13 *
14 * $Id: Group.java 12006 2009-12-01 17:24:28Z thomas_heitz $
15 */
16
17 package gate.security;
18
19 import java.util.List;
20
21 import gate.persist.PersistenceException;
22
23
24 public interface Group {
25
26 public static final int OBJECT_CHANGE_NAME = 1001;
27 public static final int OBJECT_CHANGE_ADDUSER = 1002;
28 public static final int OBJECT_CHANGE_REMOVEUSER = 1003;
29
30 /** --- */
31 public Long getID();
32
33 /** --- */
34 public String getName();
35
36 /** --- */
37 public List getUsers();
38
39 /** --- */
40 public void setName(String newName, Session s)
41 throws PersistenceException,SecurityException;
42
43 /** --- */
44 public void addUser(Long userID, Session s)
45 throws PersistenceException,SecurityException;
46
47 /** --- */
48 public void addUser(User usr, Session s)
49 throws PersistenceException,SecurityException;
50
51 /** --- */
52 public void removeUser(Long userID, Session s)
53 throws PersistenceException,SecurityException;
54
55 /** --- */
56 public void removeUser(User usr, Session s)
57 throws PersistenceException,SecurityException;
58
59 }
|