| User |

    1   /*
    2    *  User.java
    3    *
    4    *  Copyright (c) 1998-2001, The University of Sheffield.
    5    *
    6    *  This file is part of GATE (see http://gate.ac.uk/), and is free
    7    *  software, licenced under the GNU Library General Public License,
    8    *  Version 2, June 1991 (in the distribution as file licence.html,
    9    *  and also available at http://gate.ac.uk/gate/licence.html).
    10   *
    11   *  Marin Dimitrov, 19/Sep/2001
    12   *
    13   *  $Id: User.java,v 1.6 2001/10/03 14:55:48 marin Exp $
    14   */
    15
    16  package gate.security;
    17
    18  import java.util.*;
    19
    20  import gate.persist.PersistenceException;
    21
    22
    23  public interface User {
    24
    25    /** subtype for ObjectModificationEvent of type OBJECT_MODIFIED
    26     *  @see gate.event.ObjectModificationEvent
    27     *  the event is sent when the name of the user is changed
    28     *  */
    29    public static final int OBJECT_CHANGE_NAME        = 1001;
    30
    31
    32    /** returns the ID of the user
    33     *  user IDs are uniques in the same
    34     *  data store
    35     *  */
    36    public Long getID();
    37
    38    /** returns the name of the user
    39     *  user names are unique in the
    40     *  same data store */
    41    public String getName();
    42
    43    /** returns a list with the groups that the
    44     *  user is member of  */
    45    public List getGroups();
    46
    47    /** changes user name
    48     *  Only members of the ADMIN group have sufficient privileges.
    49     *  fires ObjectModificationEvent  */
    50    public void setName(String newName, Session s)
    51      throws PersistenceException,SecurityException;
    52
    53    /** changes user password
    54     *  Only members of the ADMIN group and the user himself
    55     *  have sufficient privileges */
    56    public void setPassword(String newPass, Session s)
    57      throws PersistenceException,SecurityException;
    58  }
    59

| User |