01: package ru.emdev.EmForge.security;
02:
03: import java.util.Date;
04:
05: import org.acegisecurity.userdetails.UserDetails;
06:
07: /**
08: * EmForge-Specific User Details. Added some extra fields, required for EmForge to standard Acegi UserDetails Interface
09: *
10: * @todo rename to EmForgeUser
11: * @todo the interface should extend {@link EmForgeObject}
12: */
13: public interface EmForgeUserDetails extends UserDetails {
14:
15: /**
16: * gets user's email address
17: *
18: * @return email address
19: */
20: public abstract String getEmail();
21:
22: /**
23: * gets user's display name
24: *
25: * @return displayName attribute if connection with LDAP is extablished, othervise returns user-name
26: */
27: public abstract String getDisplayName();
28:
29: /**
30: * @return User's Manager
31: */
32: public abstract EmForgeUserDetails getManager();
33:
34: /**
35: * @return <code>True</code> if the user is an anonymous, otherwise <code>False</code>
36: */
37: public abstract boolean isAnonymous();
38:
39: /**
40: * @return UserName, should be used for this user for connection to version control
41: */
42: public abstract String getVcUserName();
43:
44: /**
45: * @return Password, should be used for this user for connection to the version control
46: */
47: public abstract String getVcPassword();
48:
49: /**
50: * @return <code>True</code> if user has specified role
51: */
52: public abstract boolean hasRole(String i_roleName);
53:
54: /**
55: * @return User registration date
56: */
57: public abstract Date getRegisteredAt();
58: }
|