com.webmethods.sc.directory
Interface IDirectoryPrincipal

All Superinterfaces:
IDirectoryObject
All Known Subinterfaces:
IDirectoryGroup, IDirectoryRole, IDirectoryUser

public interface IDirectoryPrincipal
extends IDirectoryObject

Base interface for all directory principal object: users, groups and roles


Nested Class Summary
static class IDirectoryPrincipal.ATTR_NAMES
          Well known attribute names for the principal attribute providers
 
Field Summary
static int TYPE_GROUP
           
static int TYPE_ROLE
           
static int TYPE_USER
           
 
Method Summary
 Map getAllAttributes()
          Returns all principal attributes aggregated from all defined principal attribute providers for this principal type
 Object getAttribute(String attributeName)
          Returns principal attribute value.
 IDirectoryService getDirectoryService()
          Returns directory service principal belongs to.
 String getDN()
          Unique DN for this directory principal
 String getEmail()
          Get the email attribute for this principal
 String getName()
          Get the name of this directory principal, meaning the identifying attribute.
 int getType()
           
 
Methods inherited from interface com.webmethods.sc.directory.IDirectoryObject
getDirectorySession, getID
 

Field Detail

TYPE_USER

static final int TYPE_USER
See Also:
Constant Field Values

TYPE_GROUP

static final int TYPE_GROUP
See Also:
Constant Field Values

TYPE_ROLE

static final int TYPE_ROLE
See Also:
Constant Field Values
Method Detail

getDirectoryService

IDirectoryService getDirectoryService()
                                      throws DirectoryException
Returns directory service principal belongs to. This call is not valid for IDirectoryRole and will return null in this case

Returns:
directory service.
Throws:
DirectoryException

getDN

String getDN()
             throws DirectoryException
Unique DN for this directory principal

Returns:
the principal's dn
Throws:
DirectoryException

getType

int getType()
            throws DirectoryException
Returns:
a IDirSystem#TYPE_USER or IDirSystem#TYPE_GROUP or IDirSystem#TYPE_ROLE
Throws:
DirectoryException

getName

String getName()
               throws DirectoryException
Get the name of this directory principal, meaning the identifying attribute. No assumption should be made about which attribute is returned

Returns:
a readable name for this directory principal
Throws:
DirectoryException

getEmail

String getEmail()
                throws DirectoryException
Get the email attribute for this principal

Returns:
the value of the email attribute, or null if no value exists
Throws:
DirectoryException

getAttribute

Object getAttribute(String attributeName)
                    throws DirectoryException
Returns principal attribute value. This will lookup an attribute across all directory attributes providers for this principal type

Parameters:
attributeName -
Returns:
attribute value or null
Throws:
DirectoryException

getAllAttributes

Map getAllAttributes()
                     throws DirectoryException
Returns all principal attributes aggregated from all defined principal attribute providers for this principal type

Returns:
Throws:
DirectoryException