Package com.spotfire.server.userdir
Interface UserDirectory
Deprecated.
This interface provides functionality to list and modify users and groups.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Deprecated.Constant specifying the operation of reading groups.static final int
Deprecated.Constant specifying the operation of reading users.static final int
Deprecated.Constant specifying the operation of writing groups.static final int
Deprecated.Constant specifying the operation of writing users.static final int
Deprecated.Constant specifying the internal and external service providers.static final int
Deprecated.Constant specifying the external service provider.static final int
Deprecated.Constant specifying the internal service provider. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMember
(GroupPrincipal group, SpotfirePrincipal principal) Deprecated.Adds a member to a group principal in the directory.createGroupPrincipal
(String name) Deprecated.Creates a new group principal in the directory.createUserPrincipal
(String name, String password) Deprecated.Creates a new user principal in the directory.createUserPrincipal
(String name, String domainName, String password) Deprecated.Creates a new user principal in the directory.Deprecated.Returns the Administrator group principal.Deprecated.Returns an array containing the default groups on the server.getGroupPrincipal
(String name) Deprecated.Returns the group principal with the specified name in the internalSPOTFIRE
domain from the directory.getGroupPrincipal
(String name, String domainName) Deprecated.Returns the group principal with the specified name and domain from the directory.Deprecated.Returns an array containing all group principals in the directory.getGroupPrincipals
(String regExp) Deprecated.Returns an array containing all group principals with names that matches the given regular expression.getGroups
(SpotfirePrincipal principal) Deprecated.Returns an array containing all groups of which the specified principal is an immediate member.getGroupsRecursive
(SpotfirePrincipal principal) Deprecated.Returns an array containing all groups of which the specified principal is a member.Deprecated.Returns an array containing all immutable groups on the server.getMembers
(GroupPrincipal group) Deprecated.Returns an array containing all immediate members (both users and other groups) of a group in the directory.getPrimaryGroup
(SpotfirePrincipal principal) Deprecated.Returns the specified principal's primary group.getPrincipal
(Guid guid) Deprecated.Returns the principal with the specified GUID from the directory.getUserPrincipal
(String name) Deprecated.Returns the user principal with the specified name in the internalSPOTFIRE
domain from the directory.getUserPrincipal
(String name, String domainName) Deprecated.Returns the user principal with the specified name and domain from the directory.Deprecated.Returns an array containing all user principals in the directory.getUserPrincipals
(String regExp) Deprecated.Returns an array containing all user principals with names that matches the given regular expression.boolean
isAdministrator
(UserPrincipal user) Deprecated.Queries whether or not the given user is an administrator of the server, i.e. is a member of the Administrator group.boolean
isDefaultGroup
(GroupPrincipal group) Deprecated.Returnstrue
if the given group is a default group.boolean
isImmutableGroup
(GroupPrincipal group) Deprecated.Returnstrue
if the given group is immutable.boolean
isMember
(GroupPrincipal group, SpotfirePrincipal principal) Deprecated.Check if a principal is member of a group.boolean
isOperationSupported
(int operation, int serviceProvider) Deprecated.Check if an operation is supported by the user directory or not.void
removeMember
(GroupPrincipal group, SpotfirePrincipal principal) Deprecated.Removes a member from a group in the directory.void
removePrincipal
(SpotfirePrincipal principal) Deprecated.Removes a principal from the directory.void
renamePrincipal
(SpotfirePrincipal principal, String name) Deprecated.Changes the name of a principal in the directory.void
setGroups
(SpotfirePrincipal principal, GroupPrincipal[] groups) Deprecated.Set all groups that a principal belongs to.void
setMembers
(GroupPrincipal group, SpotfirePrincipal[] principals) Deprecated.Sets all members of a group.void
setPassword
(UserPrincipal user, String password) Deprecated.Changes the password for a user.void
setPrimaryGroup
(SpotfirePrincipal principal, GroupPrincipal primaryGroup) Deprecated.Sets the primary group for the specified principal.
-
Field Details
-
OPERATION_READ_USERS
static final int OPERATION_READ_USERSDeprecated.Constant specifying the operation of reading users.- Since:
- 3.0
- See Also:
-
OPERATION_WRITE_USERS
static final int OPERATION_WRITE_USERSDeprecated.Constant specifying the operation of writing users.- Since:
- 3.0
- See Also:
-
OPERATION_READ_GROUPS
static final int OPERATION_READ_GROUPSDeprecated.Constant specifying the operation of reading groups.- Since:
- 3.0
- See Also:
-
OPERATION_WRITE_GROUPS
static final int OPERATION_WRITE_GROUPSDeprecated.Constant specifying the operation of writing groups.- Since:
- 3.0
- See Also:
-
SERVICE_PROVIDER_INTERNAL
static final int SERVICE_PROVIDER_INTERNALDeprecated.Constant specifying the internal service provider.- Since:
- 3.0
- See Also:
-
SERVICE_PROVIDER_EXTERNAL
static final int SERVICE_PROVIDER_EXTERNALDeprecated.Constant specifying the external service provider.- Since:
- 3.0
- See Also:
-
SERVICE_PROVIDER_ALL
static final int SERVICE_PROVIDER_ALLDeprecated.Constant specifying the internal and external service providers.- Since:
- 3.0
- See Also:
-
-
Method Details
-
getUserPrincipal
Deprecated.Returns the user principal with the specified name in the internalSPOTFIRE
domain from the directory.- Parameters:
name
- the name of the user- Returns:
- a
UserPrincipal
if the directory contains a user with the given name, ornull
if such a user does not exist - Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getUserPrincipal
Deprecated.Returns the user principal with the specified name and domain from the directory.- Parameters:
name
- the name of the userdomainName
- the name of the user's domain- Returns:
- a
UserPrincipal
if the directory contains a user with the given name, ornull
if such a user does not exist - Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 5.0
-
getGroupPrincipal
Deprecated.Returns the group principal with the specified name in the internalSPOTFIRE
domain from the directory.- Parameters:
name
- the name of the group- Returns:
- a
GroupPrincipal
if the directory contains a group with the given name, ornull
if such a group does not exist - Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getGroupPrincipal
Deprecated.Returns the group principal with the specified name and domain from the directory.- Parameters:
name
- the name of the groupdomainName
- the name of the group domain- Returns:
- a
GroupPrincipal
if the directory contains a group with the given name, ornull
if such a group does not exist - Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 5.0
-
getPrincipal
Deprecated.Returns the principal with the specified GUID from the directory.- Parameters:
guid
- the GUID of the principal- Returns:
- a
UserPrincipal
or aGroupPrincipal
if the directory contains a principal with the given GUID, ornull
if such a principal does not exist - Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getUserPrincipals
UserPrincipal[] getUserPrincipals()Deprecated.Returns an array containing all user principals in the directory.- Returns:
- an array containing all user principals
- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getUserPrincipals
Deprecated.Returns an array containing all user principals with names that matches the given regular expression.- Parameters:
regExp
- a regular expression following the syntax of thePattern
Java API- Returns:
- an array containing all user principals with matching names
- Throws:
IllegalArgumentException
- if the given regular expression is invalidUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getGroupPrincipals
GroupPrincipal[] getGroupPrincipals()Deprecated.Returns an array containing all group principals in the directory.- Returns:
- an array containing all group principals
- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getGroupPrincipals
Deprecated.Returns an array containing all group principals with names that matches the given regular expression.- Parameters:
regExp
- a regular expression following the syntax of thePattern
Java API- Returns:
- an array containing all group principals with matching names
- Throws:
IllegalArgumentException
- if the given regular expression is invalidUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getMembers
Deprecated.Returns an array containing all immediate members (both users and other groups) of a group in the directory. The method is not recursive and does not expand subgroups.- Parameters:
group
- a group principal- Returns:
- a
SpotfirePrincipal
array containing all immediate group members, where each member is either aUserPrincipal
or aGroupPrincipal
object. - Throws:
NoSuchPrincipalException
- if the given group cannot be found in the directoryUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
isMember
Deprecated.Check if a principal is member of a group. This method is recursive and will check inherited groups.- Parameters:
group
- a group principalprincipal
- the principal to check membership for- Returns:
true
if the given principal is a member of the group, otherwisefalse
- Throws:
NoSuchPrincipalException
- if the given group or principal cannot be found in the directoryUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getGroups
Deprecated.Returns an array containing all groups of which the specified principal is an immediate member. The method is not recursive and does not return inherited groups.- Parameters:
principal
- the principal to retrieve groups for- Returns:
- an array containing all group principals of which the given principal is an immediate member
- Throws:
NoSuchPrincipalException
- if the given principal cannot be found in the directoryUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getDefaultGroups
GroupPrincipal[] getDefaultGroups()Deprecated.Returns an array containing the default groups on the server. The default groups are automatically created during installation and must always exist.- Returns:
- an array containing the default group principals
- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getImmutableGroups
GroupPrincipal[] getImmutableGroups()Deprecated.Returns an array containing all immutable groups on the server. The immutable groups cannot be modified.- Returns:
- an array containing the immutable group principals
- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
isImmutableGroup
Deprecated.Returnstrue
if the given group is immutable.- Parameters:
group
- a group- Returns:
true
if the given group is immutable,false
otherwise- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
isDefaultGroup
Deprecated.Returnstrue
if the given group is a default group.- Parameters:
group
- a group- Returns:
true
if the given group is a default group,false
otherwise- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
isAdministrator
Deprecated.Queries whether or not the given user is an administrator of the server, i.e. is a member of the Administrator group.- Parameters:
user
- a user- Returns:
true
if the given user is an administrator,false
otherwise- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
getAdministratorGroup
GroupPrincipal getAdministratorGroup()Deprecated.Returns the Administrator group principal.- Returns:
- the Administrator group principal
- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
createUserPrincipal
Deprecated.Creates a new user principal in the directory.- Parameters:
name
- the name of the user principal to be createdpassword
- the password for the user principal to be created- Returns:
- the created user principal
- Throws:
PrincipalAlreadyExistsException
- if a principal with the specified name already exists in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support creating user principalsUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
createUserPrincipal
Deprecated.Creates a new user principal in the directory.- Parameters:
name
- the name of the user principal to be createddomainName
- the name of the user's domainpassword
- the password for the user principal to be created- Returns:
- the created user principal
- Throws:
PrincipalAlreadyExistsException
- if a principal with the specified name already exists in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support creating user principalsUserDirectoryException
- if an error occurred in the service provider- Since:
- 5.0
-
setPassword
Deprecated.Changes the password for a user.- Parameters:
user
- the user whose password to changepassword
- the new password- Throws:
NoSuchPrincipalException
- if the given user principal cannot be found in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support modifying passwordsUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
createGroupPrincipal
Deprecated.Creates a new group principal in the directory.- Parameters:
name
- the name of the group principal to be created- Returns:
- the created group principal
- Throws:
PrincipalAlreadyExistsException
- if a principal with the specified name already exists in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support creating group principalsUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
removePrincipal
Deprecated.Removes a principal from the directory.- Parameters:
principal
- the principal to be removed- Throws:
NoSuchPrincipalException
- if the given principal cannot be found in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support removing principalsUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
renamePrincipal
Deprecated.Changes the name of a principal in the directory.- Parameters:
principal
- the principal to change the name forname
- the new name- Throws:
NoSuchPrincipalException
- if the given principal cannot be found in the directoryPrincipalAlreadyExistsException
- if a principal with the specified name already exists in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support renaming principalsUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
addMember
Deprecated.Adds a member to a group principal in the directory.- Parameters:
group
- the group principal to add a member toprincipal
- the principal to be added as a member- Throws:
NoSuchPrincipalException
- if the group or the principal cannot be found in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support modifying group principalsUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
removeMember
Deprecated.Removes a member from a group in the directory. Does nothing if the principal is not a member of the group.- Parameters:
group
- the group principal to remove a member fromprincipal
- the principal to be removed as a member- Throws:
NoSuchPrincipalException
- if any of the given principals cannot be found in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support modifying group principalsUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
setMembers
Deprecated.Sets all members of a group. All previous members of the group will be removed before the new members are added.- Parameters:
group
- the group principal to set members forprincipals
- the new group members- Throws:
NoSuchPrincipalException
- if any of the given principals cannot be found in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support modifying group principalsUserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
setGroups
Deprecated.Set all groups that a principal belongs to. This method will remove all previous groups of the principal.- Parameters:
principal
- the principal to set group membership forgroups
- the groups which the principal should be a member of- Throws:
NoSuchPrincipalException
- if the principal or any of the group principals cannot be found in the directoryReadOnlyDirectoryException
- if the directory is configured with a service provider that does not support modifying group principalsUserDirectoryException
- if an error occurred in the underlying system- Since:
- 3.0
-
getPrimaryGroup
Deprecated.Returns the specified principal's primary group.- Parameters:
principal
- the principal whose primary group should be return- Returns:
- the principal's primary group
- Throws:
UserDirectoryException
- if an error occurred in the service provider- Since:
- 3.0
-
setPrimaryGroup
Deprecated.Sets the primary group for the specified principal. The principal must already be a direct member of the primary group. This method will overwrite any previous primary group. To delete a primary group association, call this method with theprimaryGroup
argument set tonull
.- Parameters:
principal
- the principal to set the primary group forprimaryGroup
- the principal's primary group- Throws:
UserDirectoryException
- if the specified primary group is invalid- Since:
- 3.0
-
isOperationSupported
boolean isOperationSupported(int operation, int serviceProvider) Deprecated.Check if an operation is supported by the user directory or not.- Parameters:
operation
-OPERATION_READ_USERS
,OPERATION_WRITE_USERS
,OPERATION_READ_GROUPS
orOPERATION_WRITE_GROUPS
.serviceProvider
-SERVICE_PROVIDER_INTERNAL
,SERVICE_PROVIDER_EXTERNAL
orSERVICE_PROVIDER_ALL
.- Returns:
true
if the operation is supported,false
otherwise.- Since:
- 3.0
-
getGroupsRecursive
Deprecated.Returns an array containing all groups of which the specified principal is a member. The method is recursive and will return inherited groups.- Parameters:
principal
- the principal to retrieve groups for- Returns:
- an array containing all group principals of which the given principal is a member
- Throws:
NoSuchPrincipalException
- if the given principal cannot be found in the directoryUserDirectoryException
- if an error occurred in the underlying system- Since:
- 3.0
-
AuthenticationContext.getUserDirectory()
to retrieve aUserDirectory
instance instead.