Novell exteNd
Director 5.2 API

com.sssw.fw.directory.api
Interface EbiTreeRealm


public interface EbiTreeRealm

Represents a tree-like directory realm.


Method Summary
 Collection getAncestorContainers(EbiContext context, EbiRealmPrincipal prin)
          Enumerates the ancestor containers, all the way up to the root container, of the specified realm principal.
 Collection getChildren(EbiContext context, EbiRealmContainer container, boolean getSubcontainers, boolean getUsers)
          Enumerates objects that are children (immediate descendants) of the specified container.
 Collection getDescendants(EbiContext context, EbiRealmContainer container, boolean getSubcontainers, boolean getUsers)
          Enumerates objects that are descendants of the specified container.
 EbiRealmContainer getParentContainer(EbiContext context, EbiRealmPrincipal prin)
          Gets the parent container for the given container/user.
 EbiRealmContainer getRealmContainer(EbiContext context, String name)
          Gets a container, given its distinguished name.
 EbiRealmUser getRealmUser(EbiContext context, String name)
          Gets a realm user, given its distinguished name.
 EbiRealmContainer getRootContainer(EbiContext context)
          Gets the root container for the realm.
 boolean isDescendant(EbiContext context, EbiRealmContainer container, Principal prin)
          Tells whether the specified principal is descendant of the specified Realm Container.
 

Method Detail

getRootContainer

public EbiRealmContainer getRootContainer(EbiContext context)
                                   throws EboUnrecoverableSystemException
Gets the root container for the realm.
Parameters:
context - context
Returns:
the root container object
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getParentContainer

public EbiRealmContainer getParentContainer(EbiContext context,
                                            EbiRealmPrincipal prin)
                                     throws EboUnrecoverableSystemException
Gets the parent container for the given container/user.
Parameters:
context - context
prin - the realm principal whose parent is to be retrieved
Returns:
the parent container, or null if the realm principal passed in is the root container
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

isDescendant

public boolean isDescendant(EbiContext context,
                            EbiRealmContainer container,
                            Principal prin)
                     throws EboUnrecoverableSystemException
Tells whether the specified principal is descendant of the specified Realm Container.
Parameters:
context - context
container - the Realm Container
prin - the principal
Returns:
true if the specified principal is a descendant of the specified container
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getChildren

public Collection getChildren(EbiContext context,
                              EbiRealmContainer container,
                              boolean getSubcontainers,
                              boolean getUsers)
                       throws EboUnrecoverableSystemException
Enumerates objects that are children (immediate descendants) of the specified container. Note: the method does not enumerate child groups; it enumerates child users and/or containers.
Parameters:
context - context
container - the parent realm container
getSubcontainers - if true, any subcontainers are enumerated
getUsers - if true, any users are enumerated
Returns:
a Collection of EbiRealmPrincipal's (EbiRealmContainer's and/or EbiRealmUser's)
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getDescendants

public Collection getDescendants(EbiContext context,
                                 EbiRealmContainer container,
                                 boolean getSubcontainers,
                                 boolean getUsers)
                          throws EboUnrecoverableSystemException
Enumerates objects that are descendants of the specified container. Note: the method does not enumerate descendant groups; it enumerates descendant users and/or containers.
Parameters:
context - context
container - the ancestor realm container
getSubcontainers - if true, any subcontainers are enumerated
getUsers - if true, any users are enumerated
Returns:
a Collection of EbiRealmPrincipal's (EbiRealmContainer's and/or EbiRealmUser's)
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getRealmContainer

public EbiRealmContainer getRealmContainer(EbiContext context,
                                           String name)
                                    throws EboUnrecoverableSystemException
Gets a container, given its distinguished name.
Parameters:
context - context
name - the distinguished name of the container
Returns:
the container or null if not found
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getRealmUser

public EbiRealmUser getRealmUser(EbiContext context,
                                 String name)
                          throws EboUnrecoverableSystemException
Gets a realm user, given its distinguished name.
Parameters:
context - context
name - the distinguished name of the user
Returns:
the realm user object, or null if the user was not found
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getAncestorContainers

public Collection getAncestorContainers(EbiContext context,
                                        EbiRealmPrincipal prin)
                                 throws EboUnrecoverableSystemException
Enumerates the ancestor containers, all the way up to the root container, of the specified realm principal.
Parameters:
context - context
prin - the principal
Returns:
a Collection of EbiRealmContainer's
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

Novell exteNd
Director 5.2 API