|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDirectorySession
Main interface to interact with shared directory management component
Field Summary | |
---|---|
static String |
CURRENT_USER
Identifies currently logged in user to be used in the IDirectorySession.lookupPrincipalByID(String) method. |
Method Summary | |
---|---|
void |
addPrincipalToGroup(String principalID,
String groupID)
Adds a principal to a group. |
void |
addPrincipalToRole(String principalID,
String roleID)
Adds a principal to a role. |
IDirectoryUser |
authenticateUser(String username,
String password)
Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order. |
IDirectoryPagingCookie |
createPagingCookie(String directoryServiceID)
Creates instance of directory paging cookie to be used for IDirectorySession.searchDirectory(String, int, DirectorySearchQuery, IDirectoryPagingCookie)
method. |
IDirectoryPrincipal |
createPrincipal(String directoryServiceID,
int principalType,
String name,
Map properties)
Creates a new principal group or user associated with this specified directory service. |
IDirectoryRole |
createRole(int roleType,
String name,
Map properties)
Deprecated. Use IDirectorySession.createRole(String, String, Map) instead |
IDirectoryRole |
createRole(String roleType,
String name,
Map properties)
Creates new role of the specified type |
void |
deletePrincipal(String principalID)
Deletes a principal by its unique ID |
void |
destroyPagingCookie(IDirectoryPagingCookie directoryPagingCookie)
Destroys directory paging cookie and frees up any associated resources |
Map |
getAttributeExtendedInfo(String principalID,
String principalAttributeProviderID,
String attributeName)
Returns extended information about attributes of the given provider (only if provider supports this |
List |
getAttributeNames(String principalID,
String principalAttributeProviderID)
List defined attribute names for the specified attribute provider |
IDirectoryPrincipalAttributeProvider |
getAttributeProvider(String attributeProviderID)
Gets IDirectoryPrincipalAttributeProvider by its ID |
List |
getAttributeTitles(String principalID,
String principalAttributeProviderID,
Locale locale)
List defined user friendly attribute titles for the specified attribute provider |
ICertificateManager |
getCertificateManager()
Returns instance of certificate manager |
IDirectoryService |
getDirectoryService(String directoryServiceID)
Returns instance of IDirectoryService by its ID. |
List |
getGroupMembership(String principalID)
Retrieve the group membership for this principal |
List |
getMembers(String principalID)
Returns members of the group or role. |
List |
getRoleMembership(String principalID)
Retrieve the role membership for this principal |
List |
listAttributeProviders(int principalType)
Gets all registered principal attribute providers IDirectoryPrincipalAttributeProvider |
List |
listDirectoryServices()
Retrieves the list of all registered IDirectoryService s in the
search order as defined in MWS directory services administration |
List |
listRoles()
Lists all roles defined in the system |
IDirectoryPrincipal |
lookupPrincipalByAlias(String principalAlias)
Attempts to lookup a principal by well known alias |
IDirectoryPrincipal |
lookupPrincipalByDN(String principalDN,
int type)
Attempts to lookup a principal by their dn. |
IDirectoryPrincipal |
lookupPrincipalByID(String principalID)
Attempts to lookup a principal by their unique ID. |
IDirectoryPrincipal |
lookupPrincipalByName(String principalName,
int type)
Attempts to lookup a principal by their name. |
void |
modifyPrincipal(String principalID,
Map attributes)
Sets attribute values for the principal. |
void |
removePrincipalFromGroup(String principalID,
String groupID)
Removes a principal from a group. |
void |
removePrincipalFromRole(String principalID,
String roleID)
Removes a principal from a role. |
List |
searchDirectory(String directoryServiceID,
int principalType,
DirectorySearchQuery query,
IDirectoryPagingCookie directoryPagingCookie)
Search principals in the given directory service. |
Field Detail |
---|
static final String CURRENT_USER
IDirectorySession.lookupPrincipalByID(String)
method.
Currently logged it user is only valid inside My webMethods Server
Method Detail |
---|
List listDirectoryServices() throws DirectoryException
IDirectoryService
s in the
search order as defined in MWS directory services administration
DirectoryException
IDirectoryService getDirectoryService(String directoryServiceID) throws DirectoryException
IDirectoryService
by its ID.
directoryServiceID
-
DirectoryException
- if directory service ID is invalidIDirectoryPrincipal lookupPrincipalByName(String principalName, int type) throws DirectoryException
IDirectoryPrincipal.TYPE_GROUP
or
IDirectoryPrincipal.TYPE_USER
Lookup a role by its name if type
is IDirectoryPrincipal.TYPE_ROLE
principalName
- type
- principal type one of the
IDirectoryPrincipal.TYPE_USER
,
IDirectoryPrincipal.TYPE_GROUP
IDirectoryPrincipal.TYPE_ROLE
DirectoryException
IDirectoryPrincipal lookupPrincipalByDN(String principalDN, int type) throws DirectoryException
IDirectoryPrincipal.TYPE_GROUP
or
IDirectoryPrincipal.TYPE_USER
Lookup a role by its DN if type is
IDirectoryPrincipal.TYPE_ROLE
principalDN
- type
- principal type one of the
IDirectoryPrincipal.TYPE_USER
,
IDirectoryPrincipal.TYPE_GROUP
IDirectoryPrincipal.TYPE_ROLE
DirectoryException
IDirectoryPrincipal lookupPrincipalByID(String principalID) throws DirectoryException
principalID
- unique principal ID
DirectoryException
IDirectoryPrincipal lookupPrincipalByAlias(String principalAlias) throws DirectoryException
principalAlias
- MWS defined principal alias
DirectoryException
IDirectoryPagingCookie createPagingCookie(String directoryServiceID) throws DirectoryException
IDirectorySession.searchDirectory(String, int, DirectorySearchQuery, IDirectoryPagingCookie)
method. Each session may maintain only a single cookie at a time, this
method will destroy any previously created cookie
DirectoryException
void destroyPagingCookie(IDirectoryPagingCookie directoryPagingCookie)
directoryPagingCookie
- List searchDirectory(String directoryServiceID, int principalType, DirectorySearchQuery query, IDirectoryPagingCookie directoryPagingCookie) throws DirectoryException
IDirectorySession.listRoles()
API instead
directoryServiceID
- ID of the directory service to search.principalType
- principal type one of the
IDirectoryPrincipal.TYPE_USER
,
IDirectoryPrincipal.TYPE_GROUP
query
- directory query. If null all principals will be returneddirectoryPagingCookie
- directory paging cookie used for paging/sorting of directory
search results.
DirectoryException
List listRoles() throws DirectoryException
DirectoryException
IDirectoryUser authenticateUser(String username, String password) throws DirectoryException
username
- password
-
DirectoryException
- if there was a problem authenticating this userList listAttributeProviders(int principalType) throws DirectoryException
IDirectoryPrincipalAttributeProvider
principalType
- one of the IDirectoryPrincipal.TYPE_USER
,
IDirectoryPrincipal.TYPE_GROUP
IDirectoryPrincipal.TYPE_ROLE
DirectoryException
IDirectoryPrincipalAttributeProvider getAttributeProvider(String attributeProviderID) throws DirectoryException
IDirectoryPrincipalAttributeProvider
by its ID
DirectoryException
List getAttributeNames(String principalID, String principalAttributeProviderID) throws DirectoryException
principalID
- ID of the principalprincipalAttributeProviderID
- ID of the principal attribute provider
DirectoryException
List getAttributeTitles(String principalID, String principalAttributeProviderID, Locale locale) throws DirectoryException
principalID
- ID of the principalprincipalAttributeProviderID
- ID of the principal attribute providerlocale
- desired locale for attribute titles
DirectoryException
Map getAttributeExtendedInfo(String principalID, String principalAttributeProviderID, String attributeName) throws DirectoryException
principalID
- ID of the principalprincipalAttributeProviderID
- ID of the principal attribute providerattributeName
- attribute name
DirectoryException
IDirectoryPrincipal createPrincipal(String directoryServiceID, int principalType, String name, Map properties) throws DirectoryException
directoryServiceID
- ID of the directory service to create principal ID.type
- of the principal to create one of the
IDirectoryPrincipal.TYPE_USER
,
IDirectoryPrincipal.TYPE_GROUP
name
- of the principal (UID)properties
- name-value pairs
DirectoryException
IDirectoryRole createRole(int roleType, String name, Map properties) throws DirectoryException
IDirectorySession.createRole(String, String, Map)
instead
roleType
- type of the role to create IDirectoryRole
name
- of the role (UID)properties
- name-value pairs of properties assigned to the new role
DirectoryException
IDirectoryRole createRole(String roleType, String name, Map properties) throws DirectoryException
roleType
- type of the role to create IDirectoryRole
nameof
- the role (UID)properties
- name-value pairs of properties assigned to the new role
DirectoryException
void deletePrincipal(String principalID) throws DirectoryException
principalID
-
DirectoryException
void addPrincipalToGroup(String principalID, String groupID) throws DirectoryException
IDirectoryService
principalID
- ID of the principal to be added to the groupgroupID
- ID of the group to add principal to
DirectoryException
void addPrincipalToRole(String principalID, String roleID) throws DirectoryException
IDirectoryRole.ROLE_TYPE_STATIC
role supports this operation
principalID
- ID of the principal to be added to the roleroleID
- ID of the role to add principal to
DirectoryException
void removePrincipalFromGroup(String principalID, String groupID) throws DirectoryException
IDirectoryService
principalID
- ID of the principal to be removed from the groupgroupID
- ID of the group to remove principal from
DirectoryException
void removePrincipalFromRole(String principalID, String roleID) throws DirectoryException
IDirectoryRole.ROLE_TYPE_STATIC
role supports this operation
principalID
- ID of the principal to be removed from the roleroleID
- ID of the role to remove principal from
DirectoryException
List getGroupMembership(String principalID) throws DirectoryException
principalID
- ID of the principal to get group membership for
IDirectoryGroup
principal is member of
DirectoryException
List getRoleMembership(String principalID) throws DirectoryException
principalID
- IF of the principal to get role membership for
IDirectoryRole
principal is member of
DirectoryException
List getMembers(String principalID) throws DirectoryException
IDirectoryRole.ROLE_TYPE_STATIC
role supports this
operation
principalID
- role or group ID
DirectoryException
void modifyPrincipal(String principalID, Map attributes) throws DirectoryException
principalID
- ID of the principal to be updatedattributes
- attribute values to be set
DirectoryException
ICertificateManager getCertificateManager()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |