|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.orchestranetworks.service.directory.Directory
Defines the users' directory that is used by EBX.Platform for user authentication and roles management.
The way to specify and deploy a specific directory is described by DirectoryFactory class comment.
The default implementation is DirectoryDefault.
| Constructor Summary | |
Directory()
|
|
| Method Summary | |
UserReference |
authenticateUserFromArray(Object[] args)
Authenticates a user by an open array. |
UserReference |
authenticateUserFromHttpRequest(HttpServletRequest request)
Authenticates a user for the purpose of a single sign-on policy. |
abstract UserReference |
authenticateUserFromLoginPassword(String aLogin,
String aPassword)
Authenticates a user by his login and password. |
String |
displayBuiltInRole(Role aBuiltInRole,
Locale aLocale)
Returns a label for the specified built-in role. |
String |
displaySpecificRole(Role aSpecificRole,
Locale aLocale)
Returns a label for this specific role. |
String |
displayUser(UserReference aUserReference,
Locale aLocale)
Returns a label for the specified user. |
String |
displayUserWithSalutation(UserReference aUserReference,
Locale aLocale)
Returns a label for the specified user so that it can be used for a salutation. |
abstract List |
getProfiles(ProfileListContext aProfileContext)
Returns the profiles according to the specified context. |
String |
getUserEmail(UserReference aUserReference)
Returns the e-mail address of the specified user, null if it is unknown.
|
List |
getUsersInRole(Role aRole)
Returns all users that belong to the specified role. |
boolean |
isRoleStrictlyIncluded(Role aRole,
Role anotherRole)
Returns true when aRole is included
in anotherRole.
|
abstract boolean |
isSpecificRoleDefined(Role aSpecificRole)
Returns true if the specific role actually exists in this
directory. |
abstract boolean |
isUserDefined(UserReference aUserReference)
Returns true if the specified user actually exists in this
directory. |
abstract boolean |
isUserInRole(UserReference aUser,
Role aRole)
Returns true if the user has the specified role.
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Directory()
| Method Detail |
public abstract UserReference authenticateUserFromLoginPassword(String aLogin,
String aPassword)
throws AuthenticationException
Note: for EBX.Manager, the full authentication process is detailed on the class
UIHttpManagerComponent. This method can also be called by a client application
through Repository.createSessionFromLoginPassword(String, String).
null if login does not exist or password is incorrect.
AuthenticationException - if authentication fails for a reason that is more specific than an unknown login or
an incorrect password (for example, a security violation or a physical access failure).
public UserReference authenticateUserFromHttpRequest(HttpServletRequest request)
throws AuthenticationException
If the implementation of this method does not return null,
the user enters directly into the EBX.Manager session
(he does not have to submit his login and password).
More precisely, this method is called each time an initial HTTP request is sent to the Manager:
null, the login/password page is returned
as the HTTP response.Notes:
UIHttpManagerComponent.
Repository.createSessionFromHttpRequest(HttpServletRequest).
null.
It shall be overridden if a single sign-on behaviour is needed.
Profile.forUserWithSpecificPrivilege(String, ServiceKey).
null if the authentication features are not provided in the request
(in which case a login/password is asked from the user).
AuthenticationException - if authentication cannot complete.public UserReference authenticateUserFromArray(Object[] args)
Note: this method is only called through Repository.createSessionFromArray(Object[]),
that is, only by a specific client application.
The default implementation of this method always returns null.
null if no user can be authenticated.public abstract boolean isUserDefined(UserReference aUserReference)
true if the specified user actually exists in this
directory.
DirectoryHandler.isProfileDefined(Profile)public abstract boolean isSpecificRoleDefined(Role aSpecificRole)
true if the specific role actually exists in this
directory.
DirectoryHandler.isProfileDefined(Profile)
public abstract boolean isUserInRole(UserReference aUser,
Role aRole)
true if the user has the specified role.
The method must return false if the user does not exist.
The following built-in roles are not passed to this method because their meaning does not depend on a specific directory:
DirectoryHandler.isProfileIncluded(Profile, Profile)
public boolean isRoleStrictlyIncluded(Role aRole,
Role anotherRole)
true when aRole is included
in anotherRole.
The default implementation of this method returns false.
It should be overridden if role inclusion is somehow implemented in the
underlying directory.
DirectoryHandler.isProfileIncluded(Profile, Profile)public abstract List getProfiles(ProfileListContext aProfileContext)
The profiles to return have some restrictions:
ProfileListContext.isForDefiningPermission()),
the list must not contain the ADMINISTRATOR built-in role.
ProfileListContext.isForSelectingBranchOwner()
and ProfileListContext.isForSelectingInstanceOwner()),
the list must not contain the built-in roles OWNER and DISTRIBUTOR.
ProfileListContext.isForWorkflow(),
the list must not contain the built-in roles OWNER and DISTRIBUTOR.
List of profilespublic List getUsersInRole(Role aRole)
Default implementation throws an exception: this method must be overridden.
UserReference, each responding true
to method isUserInRole(UserReference, Role).public String getUserEmail(UserReference aUserReference)
null if it is unknown.
The default implementation of this method returns always null.
public String displayUser(UserReference aUserReference,
Locale aLocale)
Implementation recommendations:
identifier of the user.
The default implementation of this method simply displays the
identifier of the user
(and mentions that it is "unknown", if the user is not defined).
DirectoryHandler.displayProfile(Profile, Locale)
public String displayUserWithSalutation(UserReference aUserReference,
Locale aLocale)
The default implementation of this method invokes the method
displayUser(UserReference, Locale).
A better specific implementation could display the social title with first and last names, for example "Mr. Andrew Smith".
public String displayBuiltInRole(Role aBuiltInRole,
Locale aLocale)
The default implementation of this method returns a localized label.
DirectoryHandler.displayProfile(Profile, Locale)
public String displaySpecificRole(Role aSpecificRole,
Locale aLocale)
Any implementation of this method should handle the case where the role does not exist any more in the directory (because it has been deleted). In this case, it is expected for this method to return a particular label indicating that the specified role is unknown.
The default implementation of this method uses role name.
DirectoryHandler.displayProfile(Profile, Locale)
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
(report a bug)
EBX.Platform 4.8.4 [0722]
Copyright Orchestra Networks 2000-2010. All rights reserved.