Class StandardOrganizationServicesManager
- All Implemented Interfaces:
Serializable,wt.fc._NetFactor,NetFactor,OrganizationServicesManager,wt.services.Manager
Use the newStandardOrganizationServicesManager static factory method(s), not the
StandardOrganizationServicesManager constructor, to construct instances of this class. Instances must be
constructed using the static factory(s), in order to ensure proper initialization of the instance.
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddMember(WTGroup group, WTPrincipal principal) Adds a principal to a group.addMembers(WTGroup group, WTPrincipal[] principals) Adds principals to a group.createPrincipal(WTPrincipal principal) This API persists the principal object in the database.The API is used to delete a group from the database and its corresponding entry in LDAP.The API is used to delete a user object from the database and its corresponding entry in LDAP.findActiveAndDisabledUsersByName(Class<?> principalClass, String name) This API returns an enumeration containing all the active and disabled users with the given name.findActiveAndDisabledUsersByName(Class<?> principalClass, String name, DirectoryContextProvider[] contexts) This API returns an enumeration containing all the active and disabled users with the given name.findDisabledUser(long key) This API can be used to query for a disabled user given the id value associated to the user object.This API returns an enumeration containing all the active and disabled users.findLikeActiveAndDisabledUsers(Class principalClass, Map<String, List<String>> criteriaMap, DirectoryContextProvider[] contexts) This API returns an enumeration containing all the active and disabled users.findLikeDisabledUsers(String criteria) Provides a result set of all disabled users that match the search criteria provided as a parameter.findLikeGroups(String pattern) This method will search for groups whose name matches the name pattern provided.findLikeGroups(String pattern, DirectoryContextProvider context) This method will search the given directory context for groups whose name matches the name pattern provided.findLikeOrganizations(String attributeName, String pattern) This API returns all the organizations matching the name provided as a pattern.findLikeOrganizations(String attributeName, String pattern, DirectoryContextProvider context) Deprecated.deprecated in release 12.1findLikeOrganizations(String attributeName, String pattern, DirectoryContextProvider context, boolean querySubtree) This API returns all the organizations matching the name provided as a pattern.findLikeOrganizations(String attributeName, String pattern, DirectoryContextProvider context, boolean querySubtree, boolean applyAccessFilter) This API returns all the organizations matching the name provided as a pattern.findLikeUsers(String attributeName, String pattern) This API returns all the users matching the name provided as a pattern.findLikeUsers(String attributeName, String pattern, DirectoryContextProvider context) This API returns all the users matching the name provided as a pattern.getAuthenticatedUser(String auth_name)
Supported API: trueString[]
Supported API: trueDeprecated.getGroup(String name, DirectoryContextProvider context) This method will search for groups whose name attribute matches the given name in the given directory context.
Supported API: truegetGroups(String name, DirectoryContextProvider context)
Supported API: truegetOrganization(String name) Get the organization by providing its name
Supported API: truegetPrincipal(Class principalClass, String name, DirectoryContextProvider context) This method will search for given type of principals with the given name in the given organization.getPrincipal(String name, Class type, DirectoryContextProvider context) This method will search for a principal with the given name in the given organization.getPrincipal(String name, DirectoryContextProvider context) This method will search for principals with the given name in the given organization.getPrincipal(ObjectIdentifier reference) Gets the user or group for the specified principal reference.getPrincipalReference(String name, Class type) This method will search for a principal with the given name in the given organization, and return its reference.getPrincipalReference(String name, Class type, DirectoryContextProvider context) Returns a reference to a principal, given the name, Class type and DirectoryContextProvider.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.Gets the first user matched with the name passed as argument.getUser(String name, DirectoryContextProvider context)
Supported API: trueThis API will search and return all users whose name attribute value matches the given namegetUsers(String name, DirectoryContextProvider context)
Supported API: truebooleanisMember(ObjectIdentifier group, WTPrincipal principal, boolean cacheUser) Check if this user is a member of this LicenseGroups instance.booleanisMember(LicenseGroups licenseGroup, WTPrincipal principal) Check if this user is a member of this LicenseGroups instance.booleanisMember(WTGroup group, WTPrincipal principal)
Supported API: truebooleanisMember(WTPrincipalReference group, WTPrincipal principal)
Supported API: trueThis API takes a set of groups and retrieves all the direct members from the MembershipLink table.This API takes a set of groups and retrieves all the direct members from the MembershipLink table.move(WTPrincipal principal, DirectoryContextProvider newContext)
Supported API: truenewDirectoryContextProvider(String[] services, String[] searchScopes)
Supported API: truenewDirectoryContextProvider(DirectoryContextProvider baseContext, String[] searchScopes)
Supported API: true
Supported API: true
Supported API: truequeryPrincipals(Class principalClass, Map<String, List<String>> criteriaMap, DirectoryContextProvider context)
Supported API: true This method is used to pass extra criteriaMap parameter in the flow of method queryPrincipals(Class principalClass, String criteria, DirectoryContextProvider context)queryPrincipals(Class principalClass, Map<String, List<String>> criteriaMap, DirectoryContextProvider[] contexts)
Supported API: truebooleanremoveMember(WTGroup group, WTPrincipal principal) Removes a principal from a group.booleanremoveMember(WTGroup group, WTPrincipal principal, boolean bValidate) Removes a principal from a group.booleanremoveMembers(WTGroup group, WTPrincipal[] principals) Removes principals from a group.booleanremoveMembers(WTGroup group, WTPrincipal[] principals, boolean bValidate) Removes principals from a group.booleanremoveMembers(WTGroup group, WTPrincipal[] principals, boolean validate, boolean validateLicenseGroup) Removes principals from a group.rename(WTPrincipal principal, String newName)
Supported API: truerename(WTPrincipal principal, String newName, boolean validateLicenseGroup)
Supported API: truerepairPrincipal(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.updatePrincipal(WTPrincipal principal)
Supported API: trueupdatePrincipal(WTPrincipal principal, boolean validateLicenseGroup)
Supported API: trueMethods inherited from class wt.services.StandardManager
getManagerService, getManagerStatus, getName, getStartupType, initialize, performShutdownProcess, registerEvents
-
Method Details
-
getPrincipal
Gets the user or group for the specified principal reference.
Supported API: true- Specified by:
getPrincipalin interfaceOrganizationServicesManager- Parameters:
reference-- Returns:
- WTPrincipal
- Throws:
WTException
-
getPrincipal
This method will search for principals with the given name in the given organization.
Supported API: true- Specified by:
getPrincipalin interfaceOrganizationServicesManager- Parameters:
name-context-- Returns:
- Enumeration
- Throws:
WTException
-
getPrincipal
public Enumeration getPrincipal(Class principalClass, String name, DirectoryContextProvider context) throws WTException This method will search for given type of principals with the given name in the given organization.
Supported API: true- Specified by:
getPrincipalin interfaceOrganizationServicesManager- Parameters:
name-context-- Returns:
- Enumeration
- Throws:
WTException
-
getPrincipal
public 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- Specified by:
getPrincipalin interfaceOrganizationServicesManager- Parameters:
name-type-context-- Returns:
- WTPrincipal
- Throws:
WTException
-
getPrincipalReference
public 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- Specified by:
getPrincipalReferencein interfaceOrganizationServicesManager- Parameters:
name-context-- Returns:
- Enumeration
- Throws:
WTException
-
getPrincipalReference
public WTPrincipalReference getPrincipalReference(String name, Class type, DirectoryContextProvider context) throws WTException Returns a reference to a principal, given the name, Class type and DirectoryContextProvider. If more than one principal is found, an exception is thrown.
Supported API: true- Specified by:
getPrincipalReferencein interfaceOrganizationServicesManager- Parameters:
name-type-context-- Returns:
- WTPrincipalReference
- Throws:
WTException
-
getPrincipalReference
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- Specified by:
getPrincipalReferencein interfaceOrganizationServicesManager- Parameters:
name-type-- Returns:
- WTPrincipalReference
- Throws:
WTException
-
queryPrincipals
public Enumeration queryPrincipals(Class principalClass, Map<String, List<String>> criteriaMap, DirectoryContextProvider context) throws WTException
Supported API: true This method is used to pass extra criteriaMap parameter in the flow of method queryPrincipals(Class principalClass, String criteria, DirectoryContextProvider context)- Specified by:
queryPrincipalsin interfaceOrganizationServicesManager- Parameters:
principalClass-criteriaMap-context-- Returns:
- Enumeration
- Throws:
WTException
-
queryPrincipals
public Enumeration queryPrincipals(Class principalClass, Map<String, List<String>> criteriaMap) throws WTException
Supported API: true- Specified by:
queryPrincipalsin interfaceOrganizationServicesManager- Parameters:
principalClass-criteria-context-- Returns:
- Enumeration
- Throws:
WTException
-
queryPrincipals
public Enumeration queryPrincipals(Class principalClass, Map<String, List<String>> criteriaMap, DirectoryContextProvider[] contexts) throws WTException
Supported API: true- Specified by:
queryPrincipalsin interfaceOrganizationServicesManager- Parameters:
principalClass-criteria-contexts-- Returns:
- Enumeration
- Throws:
WTException
-
createPrincipal
This API persists the principal object in the database. In addition it also creates a corresponding entry in LDAP if necessary.
Supported API: true- Specified by:
createPrincipalin interfaceOrganizationServicesManager- Parameters:
principal-- Returns:
- WTPrincipal
- Throws:
WTException
-
updatePrincipal
public WTPrincipal updatePrincipal(WTPrincipal principal, boolean validateLicenseGroup) throws WTException
Supported API: true- Specified by:
updatePrincipalin interfaceOrganizationServicesManager- Parameters:
principal-validateLicenseGroup- : This flag will decide to invoked LicenceBundled Group validation. Ideally this should always be set to true, when invoking this method outside of org services.- Returns:
- WTPrincipal
- Throws:
WTException
-
updatePrincipal
Supported API: true- Specified by:
updatePrincipalin interfaceOrganizationServicesManager- Parameters:
principal-- Returns:
- WTPrincipal
- Throws:
WTException
-
rename
public WTPrincipal rename(WTPrincipal principal, String newName, boolean validateLicenseGroup) throws WTException
Supported API: true- Specified by:
renamein interfaceOrganizationServicesManager- Parameters:
principal-newName-validateLicenseGroup- : This flag will decide to invoked LicenceBundled Group validation. Ideally this should always be set to true, when invoking this method outside of org services.- Returns:
- WTPrincipal
- Throws:
WTException
-
rename
Supported API: true- Specified by:
renamein interfaceOrganizationServicesManager- Parameters:
principal-newName-- Returns:
- WTPrincipal
- Throws:
WTException
-
move
public WTPrincipal move(WTPrincipal principal, DirectoryContextProvider newContext) throws WTException
Supported API: true- Specified by:
movein interfaceOrganizationServicesManager- Parameters:
principal-newContext-- Returns:
- WTPrincipal
- Throws:
WTException
-
getAuthenticatedUser
Supported API: true- Specified by:
getAuthenticatedUserin interfaceOrganizationServicesManager- Parameters:
auth_name-- Returns:
- WTUser
- Throws:
WTException
-
getUser
Gets the first user matched with the name passed as argument. Returns null if there is no such user.
Supported API: true- Specified by:
getUserin interfaceOrganizationServicesManager- Parameters:
name-- Returns:
- WTUser
- Throws:
WTException
-
getUser
Supported API: true- Specified by:
getUserin interfaceOrganizationServicesManager- Parameters:
name-context-- Returns:
- WTUser
- Throws:
WTException
-
getUsers
Supported API: true- Specified by:
getUsersin interfaceOrganizationServicesManager- Parameters:
name-context-- Returns:
- Enumeration
- Throws:
WTException
-
getUsers
This API will search and return all users whose name attribute value matches the given nameA few behaviors to note:
- All configured Idp services will be searched.
- The search is performed on the name attribute in Idp and an exact match is expected. If user has multiple names in Idp (aliases, alternate names), any of those can be considered a match
- A user that is only as-yet in Idp and not yet persisted in Windchill can also be found and returned by this
API. The
Persistenceattributes of the user can be checked to determine if this is a persisted user or not - Since the search for a match occurs on the Idp end, a Windchill user whose Idp record is missing (e.g user
has been disabled) or has been renamed (user is in a repair-needed state), will not be found. For the same
reason,
Internalusers (users that are in Pending or Replicated states) will not be found, since they do not have corresponding Idp records - This API makes use of caching and is suitable for repeat lookups
Also see other related APIs that can be used to find principals, to know if there's a more suitable API:
OrganizationServicesManager.getUser(String, DirectoryContextProvider)OrganizationServicesManager.findLikeDisabledUsers(String)OrganizationServicesManager.findActiveAndDisabledUsersByName(Class, String, DirectoryContextProvider[])OrganizationServicesManager.findUserAnyState(String)OrganizationServicesManager.findLikeUsers(String, String, DirectoryContextProvider)OrganizationServicesManager.getPrincipal(String, DirectoryContextProvider)OrganizationServicesManager.getPrincipal(String, Class, DirectoryContextProvider)OrganizationServicesManager.getPrincipalByDN(String)
Supported API: true- Specified by:
getUsersin interfaceOrganizationServicesManager- Parameters:
name- - Name of the user- Returns:
- WTUser - The user found, or null if none found with that name
- Throws:
WTException
-
findLikeUsers
public 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- Specified by:
findLikeUsersin interfaceOrganizationServicesManager- Parameters:
attributeName-pattern-context-- Returns:
- Enumeration
- Throws:
WTException
-
findLikeUsers
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.
Supported API: true- Specified by:
findLikeUsersin interfaceOrganizationServicesManager- Parameters:
attributeName-pattern-- Returns:
- Enumeration
- Throws:
WTException
-
delete
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- Specified by:
deletein interfaceOrganizationServicesManager- Parameters:
user-- Returns:
- WTUser
- Throws:
WTException
-
getGroup
Deprecated.Gets the group with the name passed as argument. Returns null if there is no such group.
Supported API: true- Specified by:
getGroupin interfaceOrganizationServicesManager- Parameters:
name-- Returns:
- WTGroup
- Throws:
WTException- {@link Deprecated. Use #getPrincipal(String name, WTContainer container, boolean persist) }
-
getGroup
This method will search for groups whose name attribute matches the given name in the given directory context.
Supported API: true- Specified by:
getGroupin interfaceOrganizationServicesManager- Parameters:
name-context-- Returns:
- WTGroup
- Throws:
WTException
-
getGroups
Supported API: true- Specified by:
getGroupsin interfaceOrganizationServicesManager- Parameters:
name-context-- Returns:
- Enumeration
- Throws:
WTException
-
getGroups
Supported API: true- Specified by:
getGroupsin interfaceOrganizationServicesManager- Parameters:
name-- Returns:
- Enumeration
- Throws:
WTException
-
findLikeGroups
public 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- Specified by:
findLikeGroupsin interfaceOrganizationServicesManager- Parameters:
pattern-context-- Returns:
- Enumeration returns the groups whose name matches the pattern that is specified for name
- Throws:
WTException
-
findLikeGroups
This method will search for groups whose name matches the name pattern provided. The "pattern" parameter could be something like "name=group1" or "name=g*.
Supported API: true- Specified by:
findLikeGroupsin interfaceOrganizationServicesManager- Parameters:
pattern-- Returns:
- Enumeration returns the groups whose name matches the pattern that is specified for name
- Throws:
WTException
-
delete
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- Specified by:
deletein interfaceOrganizationServicesManager- Parameters:
group-- Returns:
- WTGroup
- Throws:
WTException
-
addMember
public 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- Specified by:
addMemberin interfaceOrganizationServicesManager- Parameters:
group-principal-- Returns:
- boolean
- Throws:
WTExceptionUserNotFoundException
-
addMembers
Adds principals to a group. Returns an array containing principals that were newly added as members of the group.. For the License group , it will check if the new members can be added. If all the Licenses of Named License group is already consumed, it will not allow to add member. In case of exception , while adding user to license group due to unavailability of license or available count, it checks if group is member of License Exclusion group, then computeAvailableCountForLicenseGroup() calculated the count.
Supported API: true- Specified by:
addMembersin interfaceOrganizationServicesManager- Parameters:
group-principals-- Returns:
- WTPrincipal[]
- Throws:
WTException
-
removeMember
public 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- Specified by:
removeMemberin interfaceOrganizationServicesManager- Parameters:
group-principal-- Returns:
- boolean
- Throws:
WTExceptionUserNotFoundException
-
isMember
Check if this user is a member of this LicenseGroups instance.
Supported API: true- Specified by:
isMemberin interfaceOrganizationServicesManager- Parameters:
licenseGroup- the LicenseGroups instanceprincipal- the user- Returns:
- boolean
- Throws:
WTException
-
isMember
public boolean isMember(ObjectIdentifier group, WTPrincipal principal, boolean cacheUser) throws WTException Check if this user is a member of this LicenseGroups instance.
Supported API: true- Specified by:
isMemberin interfaceOrganizationServicesManager- Parameters:
group- the group instanceprincipal- the usercacheUser-- Returns:
- boolean
- Throws:
WTException
-
isMember
Supported API: true- Specified by:
isMemberin interfaceOrganizationServicesManager- Parameters:
group-principal-- Returns:
- boolean
- Throws:
WTException
-
isMember
Supported API: true- Specified by:
isMemberin interfaceOrganizationServicesManager- Parameters:
group-principal-- Returns:
- boolean
- Throws:
WTException
-
members
This API takes a set of groups and retrieves all the direct members from the MembershipLink table. returns members in given group to reflect the user's current membership. Enumeration the members of the given group
Supported API: true- Specified by:
membersin interfaceOrganizationServicesManager- Parameters:
group-- Returns:
- Enumeration the members of the given group
- Throws:
WTException
-
members
This API takes a set of groups and retrieves all the direct members from the MembershipLink table. returns members in given group to reflect the user's current membership. If parameter flatten is true, it will recursively query all children or sub groups, but only return all WTUsers. If parameter flatten is false, it will return all the first level members, including WTUsers and WTGroups. Enumeration the members of the given group
Supported API: true- Specified by:
membersin interfaceOrganizationServicesManager- Parameters:
group-flatten-- Returns:
- Enumeration the members of the given group
- Throws:
WTException
-
getOrganization
Get the organization by providing its name
Supported API: true- Specified by:
getOrganizationin interfaceOrganizationServicesManager- Parameters:
name-- Returns:
- WTOrganization
- Throws:
WTException
-
findLikeOrganizations
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- Specified by:
findLikeOrganizationsin interfaceOrganizationServicesManager- Parameters:
attributeName-pattern-- Returns:
- Enumeration
- Throws:
WTException
-
findLikeOrganizations
@Deprecated public Enumeration findLikeOrganizations(String attributeName, String pattern, DirectoryContextProvider context) throws WTException Deprecated.deprecated in release 12.1This 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- Specified by:
findLikeOrganizationsin interfaceOrganizationServicesManager- Parameters:
attributeName-pattern-context-- Returns:
- Enumeration
- Throws:
WTException
-
findLikeOrganizations
public 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- Specified by:
findLikeOrganizationsin interfaceOrganizationServicesManager- Parameters:
attributeName-pattern-context-querySubtree-- Returns:
- Enumeration
- Throws:
WTException
-
findLikeOrganizations
public 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- Specified by:
findLikeOrganizationsin interfaceOrganizationServicesManager- Parameters:
attributeName-pattern-context-querySubtree-applyAccessFilter-- Returns:
- Enumeration
- Throws:
WTException
-
getDirectoryServiceNames
Supported API: true- Specified by:
getDirectoryServiceNamesin interfaceOrganizationServicesManager- Returns:
- String []
- Throws:
WTException
-
repairPrincipal
public 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- Specified by:
repairPrincipalin interfaceOrganizationServicesManager- Parameters:
oldName-newDn-oldEnteredDn-- Returns:
- WTPrincipal
- Throws:
WTException
-
newDirectoryContextProvider
public DirectoryContextProvider newDirectoryContextProvider(DirectoryContextProvider baseContext, String[] searchScopes) throws WTException
Supported API: true- Specified by:
newDirectoryContextProviderin interfaceOrganizationServicesManager- Parameters:
baseContext-searchScopes-- Returns:
- DirectoryContextProvider
- Throws:
WTException
-
newDirectoryContextProvider
public DirectoryContextProvider newDirectoryContextProvider(String[] services, String[] searchScopes) throws WTException
Supported API: true- Specified by:
newDirectoryContextProviderin interfaceOrganizationServicesManager- Parameters:
services-searchScopes-- Returns:
- DirectoryContextProvider
- Throws:
WTException
-
newDirectoryContextProviderForDataBaseRepository
public DirectoryContextProvider newDirectoryContextProviderForDataBaseRepository() throws WTException
Supported API: true- Specified by:
newDirectoryContextProviderForDataBaseRepositoryin interfaceOrganizationServicesManager- Returns:
- DirectoryContextProvider
- Throws:
WTException
-
removeMembers
public 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- Specified by:
removeMembersin interfaceOrganizationServicesManager- Parameters:
group-principals-- Returns:
- boolean
- Throws:
WTExceptionUserNotFoundException
-
findLikeActiveAndDisabledUsers
public Enumeration findLikeActiveAndDisabledUsers(Class principalClass, Map<String, List<String>> criteriaMap, DirectoryContextProvider[] contexts) throws WTExceptionThis API returns an enumeration containing all the active and disabled users. 'criteriaMap' parameter has info similar to criteria but in a map format which supports multiple ; separated values and quoting is not needed The "criteria" parameter in deprecated API was something like "name=user1" or email="user1@email.com". Note that this parameter must use proper quoting (like name="some user") where spaces are involved and proper escaping when special characters are involved. Org services package documentation has a detailed description on how to create a DirectoryContextProvider that needs to be passed into this API.
Supported API: true- Specified by:
findLikeActiveAndDisabledUsersin interfaceOrganizationServicesManager- Parameters:
principalClass-criteriaMap-contexts-- Returns:
- Enumeration
- Throws:
WTException
-
findLikeActiveAndDisabledUsers
public Enumeration findLikeActiveAndDisabledUsers(Class principalClass, Map<String, List<String>> criteriaMap) throws WTExceptionThis API returns an enumeration containing all the active and disabled users. 'criteriaMap' parameter has info similar to criteria but in a map format which supports multiple ; separated values and quoting is not needed The "criteria" parameter in deprecated API was something like "name=user1" or email="user1@email.com". Note that this parameter must use proper quoting (like name="some user") where spaces are involved and proper escaping when special characters are involved.
Supported API: true- Specified by:
findLikeActiveAndDisabledUsersin interfaceOrganizationServicesManager- Parameters:
principalClass-criteriaMap-- Returns:
- Enumeration
- Throws:
WTException
-
findActiveAndDisabledUsersByName
public Enumeration findActiveAndDisabledUsersByName(Class<?> principalClass, String name, DirectoryContextProvider[] contexts) throws WTException This API returns an enumeration containing all the active and disabled users with the given name. This is an easier-to-use convenience method wrappingfindActiveAndDisabledUsersByName(java.lang.Class, java.lang.String, wt.org.DirectoryContextProvider[])and doing all necessary quoting and escaping internally. Org services package documentation has a detailed description on how to create a DirectoryContextProvider that needs to be passed into this API.
Supported API: true- Specified by:
findActiveAndDisabledUsersByNamein interfaceOrganizationServicesManager- Parameters:
principalClass-name-contexts-- Returns:
- Enumeration
- Throws:
WTException
-
findActiveAndDisabledUsersByName
public Enumeration findActiveAndDisabledUsersByName(Class<?> principalClass, String name) throws WTException This API returns an enumeration containing all the active and disabled users with the given name.
Supported API: true- Specified by:
findActiveAndDisabledUsersByNamein interfaceOrganizationServicesManager- Parameters:
principalClass-name-- Returns:
- Enumeration
- Throws:
WTException
-
findLikeDisabledUsers
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- Specified by:
findLikeDisabledUsersin interfaceOrganizationServicesManager- Parameters:
criteria-- Returns:
- Enumeration
- Throws:
WTException
-
removeMember
public 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- Specified by:
removeMemberin interfaceOrganizationServicesManager- Parameters:
group-principal-bValidate- - This should always be set to true, when ivoking this method outside of org services. This is only set to false within org services when deleting a principal since there is no need to prevent additionally unnecessary checks.- Returns:
- boolean
- Throws:
WTExceptionUserNotFoundException
-
removeMembers
public boolean removeMembers(WTGroup group, WTPrincipal[] principals, boolean validate, boolean validateLicenseGroup) throws WTException Removes principals from a group. Returns true if principals belonged to the group, false otherwise. Also if Principal is removed from Named License group it will Checkin the License User is member of 2 groups and both are members of Named License, If user removed from one group , it will still consume the Named License.
Supported API: true- Specified by:
removeMembersin interfaceOrganizationServicesManager- Parameters:
group-principals-bValidate- This should always be set to true, when invoking this method outside of org services. This is only set to false within org services when deleting a principal since there is no need to prevent additionally unnecessary checks.validateLicenseGroup- : This flag will decide to invoked LicenceBundled Group validation. Ideally this should always be set to true, when invoking this method outside of org services.- Returns:
- boolean
- Throws:
WTExceptionUserNotFoundException
-
removeMembers
public boolean removeMembers(WTGroup group, WTPrincipal[] principals, boolean bValidate) throws WTException Removes principals from a group. Returns true if principals belonged to the group, false otherwise. Also if Principal is removed from Named License group it will Checkin the License User is member of 2 groups and both are members of Named License, If user removed from one group , it will still consume the Named License.
Supported API: true- Specified by:
removeMembersin interfaceOrganizationServicesManager- Parameters:
group-principals-bValidate- This should always be set to true, when ivoking this method outside of org services. This is only set to false within org services when deleting a principal since there is no need to prevent additionally unnecessary checks.- Returns:
- boolean
- Throws:
WTExceptionUserNotFoundException
-
findDisabledUser
This API can be used to query for a disabled user given the id value associated to the user object.
Supported API: true- Specified by:
findDisabledUserin interfaceOrganizationServicesManager- Parameters:
key-- Returns:
- WTUser
- Throws:
WTException
-