com.softwareag.mdm.service.directory
Class DirectoryHandler

java.lang.Object
  extended bycom.softwareag.mdm.service.directory.DirectoryHandler

public final class DirectoryHandler
extends Object

An instance of this class holds and wraps the current specific directory implementation so as to add preprocessing and post verifications to the directory methods' implementations. It has also additional methods.

The current directory of a repository is returned by the static method getInstance(Repository).

Warning:

A normal use of webMethods MDM APIs does not require to access to this class since authentication and permissions management are transparent from the developer point of view (they are "container-managed"). However this class may be useful when Master Data Management has specific functional dependencies on the directory (for example a service needs all the users defined or it has to display a specific profile).


Method Summary
 UserReference authenticateUserFromArray(Object[] args)
           
 UserReference authenticateUserFromHttpRequest(HttpServletRequest request)
           
 UserReference authenticateUserFromLoginPassword(String aLogin, String aPassword)
           
 String displayBuiltInRole(Role aBuiltInRole, Locale aLocale)
           
 String displayProfile(Profile aProfile, Locale aLocale)
          Returns a label for the profile specified.
 String displaySpecificRole(Role aSpecificRole, Locale aLocale)
           
 String displayUser(UserReference aUserReference, Locale aLocale)
           
 Directory getDirectoryImplementation()
          Returns the underlying implementation of the directory.
static DirectoryHandler getInstance(Repository aRepository)
          Returns the directory instance that is associated with the repository specified.
 List getProfiles(ProfileListContext aProfileContext)
           
 String getUserEmail(UserReference aUserReference)
           
 boolean isProfileDefined(Profile aProfile)
          Returns true if the profile specified is defined in the directory.
 boolean isProfileIncluded(Profile aProfile, Profile anotherProfile)
          Returns true when aProfile is equals to or included in anotherProfile.
 boolean isRoleStrictlyIncluded(Role aRole, Role anotherRole)
           
 boolean isSpecificRoleDefined(Role aSpecificRole)
           
 boolean isUserDefined(UserReference aUserReference)
           
 boolean isUserInRole(UserReference aUser, Role aRole)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DirectoryHandler getInstance(Repository aRepository)
                                    throws Exception
Returns the directory instance that is associated with the repository specified.

Warning: a normal use of webMethods MDM APIs does not require to access to this class since authentication and permissions management are transparent from the developer point of view (they are "container-managed"). However this class may be useful when Master Data Management has specific functional dependencies on the directory (for example a service needs all the users defined or it has to display a specific profile).

Throws:
Exception
See Also:
getDirectoryImplementation()

authenticateUserFromLoginPassword

public UserReference authenticateUserFromLoginPassword(String aLogin,
                                                       String aPassword)
See Also:
Directory.authenticateUserFromLoginPassword(String, String)

authenticateUserFromHttpRequest

public UserReference authenticateUserFromHttpRequest(HttpServletRequest request)
                                              throws AuthenticationException
Throws:
AuthenticationException
See Also:
Directory.authenticateUserFromHttpRequest(HttpServletRequest)

authenticateUserFromArray

public UserReference authenticateUserFromArray(Object[] args)
See Also:
Directory.authenticateUserFromArray(Object[])

isProfileDefined

public boolean isProfileDefined(Profile aProfile)
Returns true if the profile specified is defined in the directory.

The implementation of this method does the following:


isUserDefined

public boolean isUserDefined(UserReference aUserReference)
See Also:
Directory.isUserDefined(UserReference)

isSpecificRoleDefined

public boolean isSpecificRoleDefined(Role aSpecificRole)
See Also:
Directory.isSpecificRoleDefined(Role)

isProfileIncluded

public boolean isProfileIncluded(Profile aProfile,
                                 Profile anotherProfile)
Returns true when aProfile is equals to or included in anotherProfile.

The implementation of this method returns true:


isRoleStrictlyIncluded

public boolean isRoleStrictlyIncluded(Role aRole,
                                      Role anotherRole)
See Also:
Directory.isRoleStrictlyIncluded(Role, Role)

isUserInRole

public boolean isUserInRole(UserReference aUser,
                            Role aRole)
See Also:
Directory.isUserInRole(UserReference, Role)

getProfiles

public List getProfiles(ProfileListContext aProfileContext)
Throws:
DirectoryException - If the list returned by the directory implementation has incorrect elements.
See Also:
Directory.getProfiles(ProfileListContext)

getUserEmail

public String getUserEmail(UserReference aUserReference)
See Also:
Directory.getUserEmail(UserReference)

displayProfile

public String displayProfile(Profile aProfile,
                             Locale aLocale)
Returns a label for the profile specified. This label is displayed in the Manager tool.

The implementation of this method does the following:


displaySpecificRole

public String displaySpecificRole(Role aSpecificRole,
                                  Locale aLocale)
See Also:
Directory.displaySpecificRole(Role, Locale)

displayUser

public String displayUser(UserReference aUserReference,
                          Locale aLocale)
See Also:
Directory.displayUser(UserReference, Locale)

getDirectoryImplementation

public Directory getDirectoryImplementation()
Returns the underlying implementation of the directory.


displayBuiltInRole

public String displayBuiltInRole(Role aBuiltInRole,
                                 Locale aLocale)
See Also:
Directory.displayBuiltInRole(Role, Locale)


(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.