public class UserManager
extends java.lang.Object
Constructor and Description |
---|
UserManager()
Constructor of the UserManager class.
|
UserManager(java.util.Hashtable env)
Internal: Applications should not use this method.
Constructor for UserManager that takes in a provider class name.
|
UserManager(java.lang.String providerClassName)
Internal: Applications should not use this method.
Constructor for UserManager that takes in a provider class name.
|
Modifier and Type | Method and Description |
---|---|
java.security.Principal |
addUser(User user,
Credential cred)
Create a user in identity store with the specified User and
Credential.
|
User |
createUser()
Creates a User object.
|
void |
deleteUser(java.security.Principal principal)
Delete from identity store the specified Principal.
|
java.security.Principal |
getAnonymousUser()
Returns ther anonymous user principal.
|
java.lang.String |
getAnonymousUserName()
Returns the name of anonymous user.
|
java.security.Principal |
getPrincipal(java.lang.String username)
Retrieve the Principal from identity store of the specified
username.
|
User |
getUser(java.security.Principal principal)
Returns the User of the specified principal.
|
java.util.ArrayList |
getUserList(int sizeLimit,
AttributeFilter[] filter)
Returns a list of users for the specified filter and size
limit.
|
java.util.ArrayList |
getUserList(int sizeLimit,
AttributeFilter[] filter,
java.security.Principal role)
Returns a list of user grantee of specified role principal,
and user attribute filter and size limit.
|
java.util.ArrayList |
getUserProfileList(int sizeLimit,
AttributeFilter[] filter)
Returns a list of UserProfile for the specified
filter and size limit.
|
java.lang.Object |
getUserProfilePropertyVal(java.lang.String name,
java.lang.String propName)
Returns the UserProfile property value for the specified user name and property name.
|
boolean |
isAddUserSupported()
Returns true if addUser to identity store is
supported.
|
boolean |
isDeleteUserSupported()
Returns true if deleteUser from identity store is
supported.
|
boolean |
isModifyUserSupported()
Returns true if modifiyUser in identity store is
supported.
|
void |
modifyUser(java.security.Principal principal,
User user)
Internal: Applications should not use this method.
Method not implemented by this class.
|
void |
saveUserProfile(java.lang.String userName,
java.util.HashMap values)
Saves user profile values for the specified user.
|
public UserManager()
This constructor reads the test.properties
file for the
providerClass
property, which should be a class name of a
class that implements the IdentityManagement
interface.
The class that is specified is then set up as the IdentityManagement provider for this API.
public UserManager(java.lang.String providerClassName)
providerClassName
- identity management provider class
name.public UserManager(java.util.Hashtable env)
properties
- initialization property values.public java.security.Principal addUser(User user, Credential cred)
user
- the user to be addedcred
- the user credentialspublic User createUser()
public java.security.Principal getPrincipal(java.lang.String username)
username
- the user namepublic User getUser(java.security.Principal principal)
principal
- the user principalpublic void modifyUser(java.security.Principal principal, User user)
principal
- the principal.user
- the user object.public void deleteUser(java.security.Principal principal)
principal
- the principal of the user to be removed.public boolean isAddUserSupported()
public boolean isModifyUserSupported()
public boolean isDeleteUserSupported()
public java.util.ArrayList getUserList(int sizeLimit, AttributeFilter[] filter)
sizeLimit
- the maximum return size.filter
- filter attributespublic java.util.ArrayList getUserList(int sizeLimit, AttributeFilter[] filter, java.security.Principal role)
sizeLimit
- the maximum return size.filter
- filter attributesrole
- role grantpublic java.util.ArrayList getUserProfileList(int sizeLimit, AttributeFilter[] filter)
sizeLimit
- the maximum return size.filter
- filter attributespublic java.lang.Object getUserProfilePropertyVal(java.lang.String name, java.lang.String propName)
name
- the name of user.propName
- the property name.public void saveUserProfile(java.lang.String userName, java.util.HashMap values)
userName
- name of the uservalues
- user profile properties and valuespublic java.lang.String getAnonymousUserName()
public java.security.Principal getAnonymousUser()