KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > security > User


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.security;
21
22 import java.util.Date JavaDoc;
23
24 import com.sslexplorer.policyframework.Principal;
25
26 /**
27  * @author Lee David Painter
28  *
29  * The attributes of a user who has logged into the system.
30  */

31 public interface User extends Principal, Comparable JavaDoc {
32
33     // User attributes keys
34

35     /**
36      * Constant for home directory
37      */

38     public static final String JavaDoc USER_ATTR_HOME_DIRECTORY = "homeDirectory";
39     
40     /**
41      * Constant home drive
42      */

43     public static final String JavaDoc USER_ATTR_HOME_DRIVE = "homeDrive";
44     
45     /**
46      * Constants for user enabled
47      */

48     public static final String JavaDoc USER_ATTR_ENABLED = "sslexplorerUserEnabled";
49     
50     /**
51      * Constant for startup property profile
52      */

53     public static final String JavaDoc USER_STARTUP_PROFILE = "startupProfile";
54
55     /**
56      * If the user database supports password changing, it may return a date the
57      * password was last changed. Todays date should be returned if this
58      * information is not available and the logon controller will assume the
59      * password does not need changing.
60      *
61      * @uml.property name="lastPasswordChange" multiplicity="(0 1)"
62      * @return Date
63      */

64     public Date JavaDoc getLastPasswordChange();
65     
66     /**
67      * If the user database supports password changing, it may return
68      * true if the password requires changing.
69      *
70      * @uml.property name="requiresPasswordChange" multiplicity="(0 1)"
71      * @return Date
72      */

73     public boolean requiresPasswordChange();
74
75     /**
76      * The unique name of the user
77      *
78      * @return String
79      *
80      * @uml.property name="principalName" multiplicity="(0 1)"
81      */

82     public String JavaDoc getPrincipalName();
83
84     /**
85      * The users email address
86      *
87      * @return String
88      *
89      * @uml.property name="email" multiplicity="(0 1)"
90      */

91     public String JavaDoc getEmail();
92
93     /**
94      * The users full name.
95      *
96      * @return String
97      *
98      * @uml.property name="fullname" multiplicity="(0 1)"
99      */

100     public String JavaDoc getFullname();
101
102
103     /**
104      * Determine the users home network place (or <code>null</code> if no home
105      * is available for this user).
106      *
107      * @return String
108      *
109      * @uml.property name="homeNetworkPlaceUri" multiplicity="(0 1)"
110      */

111     public String JavaDoc getHomeNetworkPlaceUri();
112
113     /**
114      * Get a list of all the roles the user is in
115      *
116      * @return roles
117      */

118     public Role[] getRoles();
119 }
Popular Tags