01: /*--------------------------------------------------------------------------*
02: | Copyright (C) 2006 Gereon Fassbender |
03: | |
04: | This program is free software; you can redistribute it and/or modify |
05: | it under the terms of the GNU General Public License as published by the |
06: | Free Software Foundation. A copy of the license has been included with |
07: | these distribution in the COPYING file, if not go to www.fsf.org |
08: | |
09: | As a special exception, you are granted the permissions to link this |
10: | program with every library, which license fulfills the Open Source |
11: | Definition as published by the Open Source Initiative (OSI). |
12: *--------------------------------------------------------------------------*/
13: package org.rapla.entities;
14:
15: /**
16: The User-Class is mainly for authentication-purpose
17: */
18: public interface User extends Entity, RaplaObject, Named {
19: final RaplaType TYPE = new RaplaType(User.class, "user");
20:
21: /** returns the loginname */
22: String getUsername();
23:
24: /** returns the complete name of user */
25: String getName();
26:
27: /** returns the email of the user */
28: String getEmail();
29:
30: /** returns if the user has admin-privilige */
31: boolean isAdmin();
32:
33: void setUsername(String username);
34:
35: void setName(String name);
36:
37: void setEmail(String email);
38:
39: void setAdmin(boolean isAdmin);
40:
41: void addGroup(Category group);
42:
43: boolean removeGroup(Category group);
44:
45: Category[] getGroups();
46:
47: boolean belongsTo(Category group);
48:
49: public static User[] USER_ARRAY = new User[0];
50: }
|