Novell exteNd
Director 5.2 API

com.sssw.fw.directory.api
Interface EbiAuthUserContext


public interface EbiAuthUserContext

Represents a context for an authenticated user. The primary purpose of the authenticated user context (AUC) object is to carry the list principal memberships for the user such as group memberships and directory tree container memberships.


Method Summary
 String[] getContainerNames()
          Returns names of all the containers to which the authenticated user belongs.
 Collection getContainers()
          Returns the list of all directory tree containers to which the user belongs, all the way up to the root container.
 String[] getGroupNames()
          Returns names of all the groups to which the authenticated user belongs.
 Collection getGroups()
          Returns the list of all groups to which the user belongs.
 String[] getPrincipalNames()
          Returns names of all the principals to which the authenticated user belongs.
 Collection getPrincipals()
          Returns the list of all principal memberships for the user.
 boolean hasContainer(EbiRealmContainer container)
          Tells whether the authenticated user context has a specific container in its list of container memberships for the authenticated user.
 boolean hasContainers()
          Tells whether the authenticated user belongs to at least one container.
 boolean hasGroup(EbiRealmGroup group)
          Tells whether the authenticated user context has a specific group in its list of group memberships for the authenticated user.
 boolean hasGroups()
          Tells whether the authenticated user belongs to at least one group.
 boolean hasPrincipals()
          Tells whether the authenticated user belongs to at least one group or container.
 

Method Detail

getPrincipals

public Collection getPrincipals()
Returns the list of all principal memberships for the user.
Returns:
a Collection of principals, each of which is a subinterface of EbiRealmPrincipal.

getGroups

public Collection getGroups()
Returns the list of all groups to which the user belongs.
Returns:
a Collection of groups each of which is a EbiRealmGroup.

getContainers

public Collection getContainers()
Returns the list of all directory tree containers to which the user belongs, all the way up to the root container.
Returns:
a Collection of container objects each of which is a EbiRealmContainer.

hasGroups

public boolean hasGroups()
Tells whether the authenticated user belongs to at least one group.
Returns:
true if the authenticated user belongs to at least one group

hasGroup

public boolean hasGroup(EbiRealmGroup group)
Tells whether the authenticated user context has a specific group in its list of group memberships for the authenticated user. In other words, tells whether the user belongs to the group.
Parameters:
group - the group to check
Returns:
true if the AUC has the specified group it its list of group memberships, false otherwise

hasContainers

public boolean hasContainers()
Tells whether the authenticated user belongs to at least one container.
Returns:
true if the authenticated user belongs to at least one container

hasPrincipals

public boolean hasPrincipals()
Tells whether the authenticated user belongs to at least one group or container.
Returns:
true if the authenticated user belongs to at least one group or container

hasContainer

public boolean hasContainer(EbiRealmContainer container)
Tells whether the authenticated user context has a specific container in its list of container memberships for the authenticated user. In other words, tells whether the user belongs to the container.
Parameters:
container - the container to check
Returns:
true if the AUC has the specified container it its list of container memberships, false otherwise

getPrincipalNames

public String[] getPrincipalNames()
Returns names of all the principals to which the authenticated user belongs.
Returns:
an array of principal names, or null if there are no memberships

getGroupNames

public String[] getGroupNames()
Returns names of all the groups to which the authenticated user belongs.
Returns:
an array of group names, or null if there are no group memberships

getContainerNames

public String[] getContainerNames()
Returns names of all the containers to which the authenticated user belongs.
Returns:
an array of container names, or null if there are no container memberships

Novell exteNd
Director 5.2 API