Novell exteNd
Director 5.2 API

com.sssw.fw.directory.api
Interface EbiRealmContainer

All Superinterfaces:
EbiRealmPrincipal, Principal

public interface EbiRealmContainer
extends EbiRealmPrincipal

Represents a Container principal in a directory hierarchy.


Field Summary
static String PRIN_TYPE_CONTAINER
          The constant for the Container principal type.
 
Method Summary
 Collection getAncestorContainers(EbiContext context)
          Enumerates any ancestors, all the way up to the Root Realm Container, of this container.
 Collection getChildren(EbiContext context, boolean getSubcontainers, boolean getUsers)
          Enumerates the child objects (immediate descendants) of this Realm Container.
 Collection getDescendants(EbiContext context, boolean getSubcontainers, boolean getUsers)
          Enumerates the descendant objects of this Realm Container.
 EbiRealmContainer getParentContainer(EbiContext context)
          Gets the parent container for this Realm Container.
 boolean isAncestorOf(EbiContext context, Principal prin)
          Checks to see if this Realm Container is an ancestor of the specified principal
 boolean isRoot()
          Tells whether this container is the root one.
 
Methods implemented from interface com.sssw.fw.directory.api.EbiRealmPrincipal
getFullQualifiedName, getPrincipal, getPrincipalType, getRealm, getShortName, getUniqueID
 
Methods implemented from interface java.security.Principal
equals, getName, hashCode, toString
 

Field Detail

PRIN_TYPE_CONTAINER

public static final String PRIN_TYPE_CONTAINER
The constant for the Container principal type.
Method Detail

getChildren

public Collection getChildren(EbiContext context,
                              boolean getSubcontainers,
                              boolean getUsers)
                       throws EboUnrecoverableSystemException
Enumerates the child objects (immediate descendants) of this Realm Container. Note: the method does not enumerate child groups; it enumerates child users and/or containers.
Parameters:
context - context
getSubcontainers - if true, any child containers are included in the returned results
getUsers - if true, any users are included in the returned results
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,
                                 boolean getSubcontainers,
                                 boolean getUsers)
                          throws EboUnrecoverableSystemException
Enumerates the descendant objects of this Realm Container. Note: the method does not enumerate descendant groups; it enumerates descendant users and/or containers.
Parameters:
context - context
getSubcontainers - if true, any descendant containers are included in the returned results
getUsers - if true, any users are included in the returned results
Returns:
a Collection of EbiRealmPrincipal's (EbiRealmContainer's and/or EbiRealmUser's)
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getParentContainer

public EbiRealmContainer getParentContainer(EbiContext context)
                                     throws EboUnrecoverableSystemException
Gets the parent container for this Realm Container.
Parameters:
context - context
Returns:
the parent Realm Container or null if the object on which this method is called, represents the Root Realm Container
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

isAncestorOf

public boolean isAncestorOf(EbiContext context,
                            Principal prin)
                     throws EboUnrecoverableSystemException
Checks to see if this Realm Container is an ancestor of the specified principal
Parameters:
context - context
prin - the principal
Returns:
true if the principal is a child of the container, false otherwise
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

getAncestorContainers

public Collection getAncestorContainers(EbiContext context)
                                 throws EboUnrecoverableSystemException
Enumerates any ancestors, all the way up to the Root Realm Container, of this container.
Parameters:
context - context
Returns:
a Collection of EbiRealmContainer's; the Collection is empty if the object on which this method is called, represents the Root Realm Container
Throws:
EboUnrecoverableSystemException - on an unrecoverable system exception

isRoot

public boolean isRoot()
Tells whether this container is the root one.
Returns:
true if the container is the root, false otherwise

Novell exteNd
Director 5.2 API