wt.org
Interface OrganizationServicesManager

All Known Implementing Classes:
StandardOrganizationServicesManager

public interface OrganizationServicesManager

This interface provides API definitions to manage participants in LDAP and database.

Supported API: true

Extendable: false


Method Summary
 boolean addMember(WTGroup group, WTPrincipal principal)
          Adds a principal to a group.
 WTPrincipal[] addMembers(WTGroup group, WTPrincipal[] principals)
          Adds principals to a group.
 WTPrincipal createPrincipal(WTPrincipal principal)
          This API persists the principal object in the database.
 WTGroup delete(WTGroup group)
          The API is used to delete a group from the database and its corresponding entry in LDAP.
 WTUser delete(WTUser user)
          The API is used to delete a user object from the database and its corresponding entry in LDAP.
 WTPrincipal disablePrincipal(WTPrincipal principal)
          This API is used to disable a principal in the database.
 WTPrincipal enablePrincipal(WTPrincipal principal)
          This API is used to enable a previously disabled principal.
 Enumeration findLikeActiveAndDisabledUsers(Class principalClass, String criteria, DirectoryContextProvider[] contexts)
          This API returns a resultset containing all the active and disabled users.
 Enumeration findLikeDisabledUsers(String criteria)
          Provides a result set of all disabled users that match the search criteria provided as a parameter.
 Enumeration findLikeGroups(String pattern, DirectoryContextProvider context)
          This method will search the given directory context for groups whose name matches the name pattern provided.
 Enumeration findLikeOrganizations(String attributeName, String pattern, DirectoryContextProvider context)
          This API returns all the organizations matching the name provided as a pattern.
 Enumeration findLikeOrganizations(String attributeName, String pattern, DirectoryContextProvider context, boolean querySubtree)
          This API returns all the organizations matching the name provided as a pattern.
 Enumeration findLikeOrganizations(String attributeName, String pattern, DirectoryContextProvider context, boolean querySubtree, boolean applyAccessFilter)
          This API returns all the organizations matching the name provided as a pattern.
 Enumeration findLikeUsers(String attributeName, String pattern, DirectoryContextProvider context)
          This API returns all the users matching the name provided as a pattern.
 WTUser getAuthenticatedUser(String auth_name)
          

Supported API: true
 String[] getDirectoryServiceNames()
          

Supported API: true
 WTGroup getGroup(String name, DirectoryContextProvider context)
          This method will search for groups whose name attribute matches the given name in the given directory context.
 Enumeration getGroups(String name, DirectoryContextProvider context)
          

Supported API: true
 WTOrganization getOrganization(String name, DirectoryContextProvider context)
          

Supported API: true
 WTOrganization getOrganization(WTPrincipal principal)
          Returns the organization with which a principal is associated.
 Enumeration getOrganizations(String name, DirectoryContextProvider context)
          

Supported API: true
 WTPrincipal getPrincipal(ObjectIdentifier reference)
          Gets the user or group for the specified principal reference.
 WTPrincipal getPrincipal(String name, Class type, DirectoryContextProvider context)
          This method will search for a principal with the given name in the given organization.
 Enumeration getPrincipal(String name, DirectoryContextProvider context)
          This method will search for principals with the given name in the given organization.
 WTPrincipal getPrincipalByDN(String dn)
          Returns the principal identified by a specific directory distinguished name, or null if no such principal exists.
 WTPrincipalReference getPrincipalReference(String name, Class type, DirectoryContextProvider context)
          This method will search for a principal with the given name in the given organization, and return its reference.
 Enumeration getPrincipalReference(String name, DirectoryContextProvider context)
          This method will search for principals with the given name in the given organization, and references to them will be returned.
 WTUser getUser(String name, DirectoryContextProvider context)
          

Supported API: true
 Enumeration getUsers(String name, DirectoryContextProvider context)
          

Supported API: true
 boolean isMember(WTGroup group, WTPrincipal principal)
          

Supported API: true
 boolean isMember(WTPrincipalReference group, WTPrincipal principal)
          

Supported API: true
 Enumeration members(WTGroup group)
          

Supported API: true
 Enumeration members(WTGroup group, boolean flatten)
          

Supported API: true
 WTPrincipal move(WTPrincipal principal, DirectoryContextProvider newContext)
          

Supported API: true
 DirectoryContextProvider newDirectoryContextProvider(DirectoryContextProvider baseContext, String[] searchScopes)
          

Supported API: true
 DirectoryContextProvider newDirectoryContextProvider(String[] services, String[] searchScopes)
          

Supported API: true
 Enumeration parentGroups(WTPrincipal principal)
          

Supported API: true
 Enumeration queryPrincipals(Class principalClass, String criteria, DirectoryContextProvider context)
          

Supported API: true
 Enumeration queryPrincipals(Class principalClass, String criteria, DirectoryContextProvider[] contexts)
          

Supported API: true
 boolean removeMember(WTGroup group, WTPrincipal principal)
          Removes a principal from a group.
 boolean removeMember(WTGroup group, WTPrincipal principal, boolean bValidate)
          Removes a principal from a group.
 boolean removeMembers(WTGroup group, WTPrincipal[] principals)
          Removes principals from a group.
 boolean removeMembers(WTGroup group, WTPrincipal[] principals, boolean bValidate)
          Removes principals from a group.
 WTPrincipal rename(WTPrincipal principal, String newName)
          

Supported API: true
 WTPrincipal repairPrincipal(String oldName, String newDn, String oldEnteredDn)
          This method tries and repairs the principal given the "oldName" (name that is currently in the database and possibly will continue to be -- ie.
 WTPrincipal updatePrincipal(WTPrincipal principal)
          

Supported API: true
 

Method Detail

getPrincipal

WTPrincipal getPrincipal(ObjectIdentifier reference)
                         throws WTException
Gets the user or group for the specified principal reference.

Supported API: true

Parameters:
reference -
Returns:
WTPrincipal
Throws:
WTException

getPrincipal

Enumeration getPrincipal(String name,
                         DirectoryContextProvider context)
                         throws WTException
This method will search for principals with the given name in the given organization.

Supported API: true

Parameters:
name -
context -
Returns:
Enumeration
Throws:
WTException

getPrincipal

WTPrincipal getPrincipal(String name,
                         Class type,
                         DirectoryContextProvider context)
                         throws WTException
This method will search for a principal with the given name in the given organization. If more than one principal is found, an exception is thrown.

Supported API: true

Parameters:
name -
type -
context -
Returns:
WTPrincipal
Throws:
WTException

getPrincipalByDN

WTPrincipal getPrincipalByDN(String dn)
                             throws WTException
Returns the principal identified by a specific directory distinguished name, or null if no such principal exists.

Supported API: true

Parameters:
dn -
Returns:
WTPrincipal
Throws:
WTException

getPrincipalReference

Enumeration getPrincipalReference(String name,
                                  DirectoryContextProvider context)
                                  throws WTException
This method will search for principals with the given name in the given organization, and references to them will be returned.

Supported API: true

Parameters:
name -
context -
Returns:
Enumeration
Throws:
WTException

getPrincipalReference

WTPrincipalReference getPrincipalReference(String name,
                                           Class type,
                                           DirectoryContextProvider context)
                                           throws WTException
This method will search for a principal with the given name in the given organization, and return its reference. If more than one principal is found, an exception is thrown.

Supported API: true

Parameters:
name -
type -
context -
Returns:
WTPrincipalReference
Throws:
WTException

queryPrincipals

Enumeration queryPrincipals(Class principalClass,
                            String criteria,
                            DirectoryContextProvider context)
                            throws WTException


Supported API: true

Parameters:
principalClass -
criteria -
context -
Returns:
Enumeration
Throws:
WTException

queryPrincipals

Enumeration queryPrincipals(Class principalClass,
                            String criteria,
                            DirectoryContextProvider[] contexts)
                            throws WTException


Supported API: true

Parameters:
principalClass -
criteria -
contexts -
Returns:
Enumeration
Throws:
WTException

createPrincipal

WTPrincipal createPrincipal(WTPrincipal principal)
                            throws WTException
This API persists the principal object in the database. In addition it also creates a corresponding entry in LDAP if necessary.

Supported API: true

Parameters:
principal -
Returns:
WTPrincipal
Throws:
WTException

disablePrincipal

WTPrincipal disablePrincipal(WTPrincipal principal)
                             throws WTException
This API is used to disable a principal in the database. When a principal is deleted, it is not completely removed from the database. Instead it is disabled in the database. The process of disabling the principal object is by renaming the principal in the database to its object identifier and setting the disabled bit.

Supported API: true

Parameters:
principal -
Returns:
WTPrincipal
Throws:
WTException

enablePrincipal

WTPrincipal enablePrincipal(WTPrincipal principal)
                            throws WTException
This API is used to enable a previously disabled principal. The API renames the principal in the database from the current object identifier name to the actual name of the principal that needs to be displayed on the UI. In addition it also resets the disabled bit in the database. NOTE: This API does not recreate a previously deleted entry in LDAP corresponding to this principal. The API should only be used to enable the database entry for the principal after verifying that a corresponding entry for the principal exists in LDAP. Once the principal is enabled, the Principal Administrator maintenance page should be used to reconnect the principal to the corresponding LDAP node.

Supported API: true

Parameters:
principal -
Returns:
WTPrincipal
Throws:
WTException

updatePrincipal

WTPrincipal updatePrincipal(WTPrincipal principal)
                            throws WTException


Supported API: true

Parameters:
principal -
Returns:
WTPrincipal
Throws:
WTException

rename

WTPrincipal rename(WTPrincipal principal,
                   String newName)
                   throws WTException


Supported API: true

Parameters:
principal -
newName -
Returns:
WTPrincipal
Throws:
WTException

move

WTPrincipal move(WTPrincipal principal,
                 DirectoryContextProvider newContext)
                 throws WTException


Supported API: true

Parameters:
principal -
newContext -
Returns:
WTPrincipal
Throws:
WTException

getAuthenticatedUser

WTUser getAuthenticatedUser(String auth_name)
                            throws WTException


Supported API: true

Parameters:
auth_name -
Returns:
WTUser
Throws:
WTException

getUser

WTUser getUser(String name,
               DirectoryContextProvider context)
               throws WTException


Supported API: true

Parameters:
name -
context -
Returns:
WTUser
Throws:
WTException

getUsers

Enumeration getUsers(String name,
                     DirectoryContextProvider context)
                     throws WTException


Supported API: true

Parameters:
name -
context -
Returns:
Enumeration
Throws:
WTException

findLikeUsers

Enumeration findLikeUsers(String attributeName,
                          String pattern,
                          DirectoryContextProvider context)
                          throws WTException
This API returns all the users matching the name provided as a pattern. For this API the attribute name would typically be "name". The pattern would be the user name that is being searched for. The pattern would also accept a wild card search. Org services package documentation has a detailed description on how to create a DirectoryContexttProvider that needs to be passed into this API.

Supported API: true

Parameters:
attributeName -
pattern -
context -
Returns:
Enumeration
Throws:
WTException

delete

WTUser delete(WTUser user)
              throws WTException
The API is used to delete a user object from the database and its corresponding entry in LDAP. Users are not completely deleted from the database. Instead when a user object is deleted, the correspodning user name in the database is renamed to the format of the user's object identifier and the disabled bit is set.

Supported API: true

Parameters:
user -
Returns:
WTUser
Throws:
WTException

getGroup

WTGroup getGroup(String name,
                 DirectoryContextProvider context)
                 throws WTException
This method will search for groups whose name attribute matches the given name in the given directory context.

Supported API: true

Parameters:
name -
context -
Returns:
WTGroup
Throws:
WTException

getGroups

Enumeration getGroups(String name,
                      DirectoryContextProvider context)
                      throws WTException


Supported API: true

Parameters:
name -
context -
Returns:
Enumeration
Throws:
WTException

findLikeGroups

Enumeration findLikeGroups(String pattern,
                           DirectoryContextProvider context)
                           throws WTException
This method will search the given directory context for groups whose name matches the name pattern provided. The "pattern" parameter could be something like "name=group1" or "name=g*.

Supported API: true

Parameters:
pattern -
context -
Returns:
Enumeration
Throws:
WTException

delete

WTGroup delete(WTGroup group)
               throws WTException
The API is used to delete a group from the database and its corresponding entry in LDAP. Groups are not completely deleted from the database. Instead when a group is deleted, the corresponding group name in the database is renamed to the format of the groups's object identifier and the disabled bit is set..

Supported API: true

Parameters:
group -
Returns:
WTGroup
Throws:
WTException

addMember

boolean addMember(WTGroup group,
                  WTPrincipal principal)
                  throws WTException,
                         UserNotFoundException
Adds a principal to a group. Returns 'true' if principal was successfully added to the group, 'false' otherwise.

Supported API: true

Parameters:
group -
principal -
Returns:
boolean
Throws:
WTException
UserNotFoundException

addMembers

WTPrincipal[] addMembers(WTGroup group,
                         WTPrincipal[] principals)
                         throws WTException
Adds principals to a group. Returns an array containing principals that were newly added as members of the group..

Supported API: true

Parameters:
group -
principals -
Returns:
WTPrincipal[]
Throws:
WTException

removeMember

boolean removeMember(WTGroup group,
                     WTPrincipal principal)
                     throws WTException,
                            UserNotFoundException
Removes a principal from a group. Returns true if principal belonged to the group, false otherwise.

Supported API: true

Parameters:
group -
principal -
Returns:
boolean
Throws:
WTException
UserNotFoundException

isMember

boolean isMember(WTGroup group,
                 WTPrincipal principal)
                 throws WTException


Supported API: true

Parameters:
group -
principal -
Returns:
boolean
Throws:
WTException

isMember

boolean isMember(WTPrincipalReference group,
                 WTPrincipal principal)
                 throws WTException


Supported API: true

Parameters:
group -
principal -
Returns:
boolean
Throws:
WTException

members

Enumeration members(WTGroup group)
                    throws WTException


Supported API: true

Parameters:
group -
Returns:
Enumeration
Throws:
WTException

members

Enumeration members(WTGroup group,
                    boolean flatten)
                    throws WTException


Supported API: true

Parameters:
group -
flatten -
Returns:
Enumeration
Throws:
WTException

parentGroups

Enumeration parentGroups(WTPrincipal principal)
                         throws WTException


Supported API: true

Parameters:
principal -
Returns:
Enumeration
Throws:
WTException

getOrganization

WTOrganization getOrganization(WTPrincipal principal)
                               throws WTException
Returns the organization with which a principal is associated.

Supported API: true

Parameters:
principal -
Returns:
WTOrganization
Throws:
WTException

getOrganization

WTOrganization getOrganization(String name,
                               DirectoryContextProvider context)
                               throws WTException


Supported API: true

Parameters:
name -
context -
Returns:
WTOrganization
Throws:
WTException

getOrganizations

Enumeration getOrganizations(String name,
                             DirectoryContextProvider context)
                             throws WTException


Supported API: true

Parameters:
name -
context -
Returns:
Enumeration
Throws:
WTException

findLikeOrganizations

Enumeration findLikeOrganizations(String attributeName,
                                  String pattern,
                                  DirectoryContextProvider context)
                                  throws WTException
This API returns all the organizations matching the name provided as a pattern. For this API the attribute name would typically be "name". The pattern would be the organization name that is being searched for. The pattern would also accept a wild card search.

Supported API: true

Parameters:
attributeName -
pattern -
context -
Returns:
Enumeration
Throws:
WTException

findLikeOrganizations

Enumeration findLikeOrganizations(String attributeName,
                                  String pattern,
                                  DirectoryContextProvider context,
                                  boolean querySubtree)
                                  throws WTException
This API returns all the organizations matching the name provided as a pattern. For this API the attribute name would typically be "name". The pattern would be the organization name that is being searched for. The pattern also accepts a wild card search. Typically organizations are stored directly in the default search base i.e. within a one level search scope of the base where organizations are searched. On some occasions, there could be a new search base that may be created as a sub node of the default search base, to hold all the organizations. In this case a subtree search scope is necessary to retrieve the organizations. So if the parameter querySubTree is set to true, it seaches with the search scope of subtree, else it searches with a default search scope of one-level.

Supported API: true

Parameters:
attributeName -
pattern -
context -
querySubtree -
Returns:
Enumeration
Throws:
WTException

findLikeOrganizations

Enumeration findLikeOrganizations(String attributeName,
                                  String pattern,
                                  DirectoryContextProvider context,
                                  boolean querySubtree,
                                  boolean applyAccessFilter)
                                  throws WTException
This API returns all the organizations matching the name provided as a pattern. For this API the attribute name would typically be "name". The pattern would be the organization name that is being searched for. The pattern also accepts a wild card search. Typically organizations are stored directly in the default search base i.e. within a one level search scope of the base where organizations are searched. On some occasions, there could be a new search base that may be created as a sub node of the default search base, to hold all the organizations. In this case a subtree search scope is necessary to retrieve the organizations. So if the parameter querySubTree is set to true, it seaches with the search scope of subtree, else it searches with a default search scope of one-level. If the boolean value applyAccessFilter is set to true, then the only organizations that the user has access to would be returned, else all organizations that match the search criteria would be returned.

Supported API: true

Parameters:
attributeName -
pattern -
context -
querySubtree -
applyAccessFilter -
Returns:
Enumeration
Throws:
WTException

getDirectoryServiceNames

String[] getDirectoryServiceNames()
                                  throws WTException


Supported API: true

Returns:
String []
Throws:
WTException

repairPrincipal

WTPrincipal repairPrincipal(String oldName,
                            String newDn,
                            String oldEnteredDn)
                            throws WTException
This method tries and repairs the principal given the "oldName" (name that is currently in the database and possibly will continue to be -- ie. only the UFID has changed) and the new DN (Distinguished name in the DIrectory).

Supported API: true

Parameters:
oldName -
newDn -
oldEnteredDn -
Returns:
WTPrincipal
Throws:
WTException

newDirectoryContextProvider

DirectoryContextProvider newDirectoryContextProvider(DirectoryContextProvider baseContext,
                                                     String[] searchScopes)
                                                     throws WTException


Supported API: true

Parameters:
baseContext -
searchScopes -
Returns:
DirectoryContextProvider
Throws:
WTException

newDirectoryContextProvider

DirectoryContextProvider newDirectoryContextProvider(String[] services,
                                                     String[] searchScopes)
                                                     throws WTException


Supported API: true

Parameters:
services -
searchScopes -
Returns:
DirectoryContextProvider
Throws:
WTException

removeMembers

boolean removeMembers(WTGroup group,
                      WTPrincipal[] principals)
                      throws WTException,
                             UserNotFoundException
Removes principals from a group. Returns true if principals belonged to the group, false otherwise.

Supported API: true

Parameters:
group -
principals -
Returns:
boolean
Throws:
WTException
UserNotFoundException

findLikeActiveAndDisabledUsers

Enumeration findLikeActiveAndDisabledUsers(Class principalClass,
                                           String criteria,
                                           DirectoryContextProvider[] contexts)
                                           throws WTException
This API returns a resultset containing all the active and disabled users. The "criteria" parameter could be something like "name=user1" or email="user1@email.com". Org services package documentation has a detailed description on how to create a DirectoryContexttProvider that needs to be passed into this API.

Supported API: true

Parameters:
principalClass -
criteria -
contexts -
Returns:
Enumeration
Throws:
WTException

findLikeDisabledUsers

Enumeration findLikeDisabledUsers(String criteria)
                                  throws WTException
Provides a result set of all disabled users that match the search criteria provided as a parameter. The search crteira should be along the lines "name = user1" or "name = u*" or "name=*"

Supported API: true

Parameters:
criteria -
Returns:
Enumeration
Throws:
WTException

removeMember

boolean removeMember(WTGroup group,
                     WTPrincipal principal,
                     boolean bValidate)
                     throws WTException,
                            UserNotFoundException
Removes a principal from a group. Returns true if principal belonged to the group, false otherwise.

Supported API: true

Parameters:
group -
principal -
bValidate -
Returns:
boolean
Throws:
WTException
UserNotFoundException

removeMembers

boolean removeMembers(WTGroup group,
                      WTPrincipal[] principals,
                      boolean bValidate)
                      throws WTException,
                             UserNotFoundException
Removes principals from a group. Returns true if principals belonged to the group, false otherwise.

Supported API: true

Parameters:
group -
principals -
bValidate -
Returns:
boolean
Throws:
WTException
UserNotFoundException