Novell
exteNd Director 4.1

com.sssw.fw.directory.api
Interface EbiRealm

All Known Subinterfaces:
EbiDirectoryManager, EbiSilverServerRealm, EbiUserManagerRealm, EbiWeblogicRealm, EbiWebsphereRealm, EbiWriteableRealm

public interface EbiRealm

Interface that custom realms need to implement if they wish to provide read only directory services. The directory manager loads instances of realms that implement this interface as well as the sub-interface EbiWriteableRealm.


Method Summary
 Principal authUserPassword(EbiContext context, String user, String password)
          Authenticates a user using password authentication
 Principal getAnonymous()
          Returns the "anonymous" principal
 Principal getAuthenticatedUser(EbiContext context)
          Returns the authenticated user from the session or request
 Collection getChildGroups(EbiContext context, EbiRealmGroup groupPrinc)
          Gets a collection of child groups for a specified group.
 Principal getEbiRealmUserByUniqueID(EbiContext context, String uniqueID, String userType)
          Retrieves a Principal based on unique ID.
 Collection getEbiRealmUsersByUniqueIDs(EbiContext context, String[] uniqueIDs, String userType)
          Retrieves a Collection of Principals based on unique IDs.
 Group getGroup(EbiContext context, String name)
          Return the specified group
 Collection getGroupMembershipList(EbiContext context, Principal userPrinc)
          Returns a collection of groups that the user is a member of
 Collection getGroups(EbiContext context)
          Returns a collection of groups
 Collection getParentGroups(EbiContext context, EbiRealmGroup groupPrinc)
          Gets a collection of parent groups for a specified group.
 Collection getRealmGroups(EbiContext context)
          Gets the groups from a specified realm that do not have parent groups.
 String getRealmName()
          Returns the name of the realm
 Principal getUser(EbiContext context, String name)
          Return the specified user
 Collection getUsers(EbiContext context)
          Returns a collection of Principals
 boolean isAnonymous(Principal princ)
          Checks to see if a principal is "anonymous".
 boolean isNestedGroupSupported()
          Returns true if the realm supports nested groups, false otherwise.
 void logoff(EbiContext context)
          Logs off the current user from the session
 

Method Detail

getRealmName

public String getRealmName()
Returns the name of the realm
Returns:
a string representing the realm name

getUsers

public Collection getUsers(EbiContext context)
                    throws EboException
Returns a collection of Principals
Parameters:
context - an EbiContext object
Returns:
a collection of Principals or null if none exist

getUser

public Principal getUser(EbiContext context,
                         String name)
                  throws EboException
Return the specified user
Parameters:
context - an EbiContext object
name - the user id to retrieve
Returns:
a Principal or null if not found

getGroups

public Collection getGroups(EbiContext context)
                     throws EboException
Returns a collection of groups
Parameters:
context - an EbiContext object
Returns:
a collection of Groups or null if none exist

getGroup

public Group getGroup(EbiContext context,
                      String name)
               throws EboException
Return the specified group
Parameters:
context - an EbiContext object
name - the group name to retrieve
Returns:
the specified group or null if it doesn't exist

getGroupMembershipList

public Collection getGroupMembershipList(EbiContext context,
                                         Principal userPrinc)
                                  throws EboException
Returns a collection of groups that the user is a member of
Parameters:
context - an EbiContext object
userPrinc - the user principal to check for membership
Returns:
a collection of groups that the user is a member of or null

authUserPassword

public Principal authUserPassword(EbiContext context,
                                  String user,
                                  String password)
                           throws EboUnrecoverableSystemException,
                                  EboSecurityException
Authenticates a user using password authentication
Parameters:
user - the user name to authenticate
password - the password used as the credentials
Returns:
a Principal that represents the authenticated user

getEbiRealmUserByUniqueID

public Principal getEbiRealmUserByUniqueID(EbiContext context,
                                           String uniqueID,
                                           String userType)
                                    throws EboException
Retrieves a Principal based on unique ID.
Parameters:
context - an EbiContext object
uniqueID - the unique ID to use to locate the user/group
userType - either a user or group as defined in com.sssw.fw.api.EbiConstants
Returns:
the principal associated with the uniqueID or null if it doesn't exist
See Also:
EbiConstants.FW_PRINCIPAL_GROUP, EbiConstants.FW_PRINCIPAL_USER

getEbiRealmUsersByUniqueIDs

public Collection getEbiRealmUsersByUniqueIDs(EbiContext context,
                                              String[] uniqueIDs,
                                              String userType)
                                       throws EboException
Retrieves a Collection of Principals based on unique IDs.
Parameters:
context - an EbiContext object
uniqueIDs - an array of unique IDs to use to locate the users/groups
userType - either a user or group as defined in com.sssw.fw.api.EbiConstants
Returns:
a collection of principals associated with the uniqueID or null if none are found
See Also:
EbiConstants.FW_PRINCIPAL_GROUP, EbiConstants.FW_PRINCIPAL_USER

isAnonymous

public boolean isAnonymous(Principal princ)
Checks to see if a principal is "anonymous".
Parameters:
princ - the principal to check
Returns:
true if the specified principal is "anonymous", false otherwise

getAnonymous

public Principal getAnonymous()
Returns the "anonymous" principal
Returns:
the principal object that represent an "anonymous" user

getRealmGroups

public Collection getRealmGroups(EbiContext context)
                          throws EboException
Gets the groups from a specified realm that do not have parent groups.
Parameters:
context - an EbiContext object.
Returns:
a collection of groups that do not have parent groups. If the specified realm do not support nested groups, the returned collection will contain all groups managed by the realm.

getParentGroups

public Collection getParentGroups(EbiContext context,
                                  EbiRealmGroup groupPrinc)
                           throws EboException
Gets a collection of parent groups for a specified group. Returns null if no parent groups exist.
Parameters:
groupPrinc - a group principal.
Returns:
the parent group principals if there are any.

getChildGroups

public Collection getChildGroups(EbiContext context,
                                 EbiRealmGroup groupPrinc)
                          throws EboException
Gets a collection of child groups for a specified group. Returns null if no child groups exist.
Parameters:
groupPrinc - a group principal.
Returns:
the child group principals if there are any.

isNestedGroupSupported

public boolean isNestedGroupSupported()
Returns true if the realm supports nested groups, false otherwise.

logoff

public void logoff(EbiContext context)
            throws EboException
Logs off the current user from the session
Parameters:
context - an EbiContext

getAuthenticatedUser

public Principal getAuthenticatedUser(EbiContext context)
Returns the authenticated user from the session or request
Parameters:
context - an EbiContext

Novell
exteNd Director 4.1