public interface UserManager extends PrincipalTypeManager
Describes the interface for managing users and provides access to the
User.
| Modifier and Type | Method and Description |
|---|---|
User |
addUser(String userName)
Add a new user
|
User |
addUser(String userName,
boolean mapped)
Add a new user and optionally map/replicate it to an external storage manager (if configured).
|
String |
getAnonymousUser() |
PasswordCredential |
getPasswordCredential(User user)
Returns the current PasswordCredential for a User or a new one if the doesn't have one yet
|
Subject |
getSubject(AuthenticatedUser user)
Get a Subject for an (possibly externally) authenticated user with (optionally) provided credentials.
|
Subject |
getSubject(User user)
Get a Subject for an user.
|
User |
getUser(String userName)
Get a
Userfor a given user name. |
List<String> |
getUserNames(String nameFilter)
Retrieves a a detached and modifiable List user names, finding users matching the corresponding
user name filter.
|
List<User> |
getUsers(String nameFilter)
Retrieves a detached and modifiable
User list matching the corresponding
user name filter. |
UserResultList |
getUsersExtended(JetspeedPrincipalQueryContext queryContext)
Retrieves a detached and modifiable
User list matching the corresponding
query context. |
List<User> |
getUsersInGroup(String groupName)
Retrieves a a detached and modifiable
User list of all the users in a specific group. |
List<User> |
getUsersInRole(String roleName)
Retrieves a a detached and modifiable
User list of all the users in a specific role. |
List<User> |
lookupUsers(String attributeName,
String attributeValue)
Retrieves a a detached and modifiable
User list of all the users having a specific value for a specific attribute |
User |
newTransientUser(String name) |
User |
newUser(String name) |
User |
newUser(String name,
boolean mapped) |
void |
removeUser(String userName)
Remove a user.
|
void |
storePasswordCredential(PasswordCredential credential) |
void |
updateUser(User user)
Updates a user and all its attributes
|
boolean |
userExists(String userName)
Whether or not a user exists.
|
getPrincipalManager, getPrincipalTypeString getAnonymousUser()
User addUser(String userName) throws SecurityException
Add a new user
If an external security storage manager is used, the user will be mapped/replicated to it as well.
userName - The user name.Userthrows - a security exception.SecurityExceptionUser addUser(String userName, boolean mapped) throws SecurityException
Add a new user and optionally map/replicate it to an external storage manager (if configured).
userName - The user name.mapped - if the new User should be mapped/replicated to an external security storage manager (if used) or not.Userthrows - a security exception.SecurityExceptionvoid removeUser(String userName) throws SecurityException
Remove a user. If there user attributes associated with this user, they will be removed as well.
Permissionfor this user will be removed as well.
userName - The user name.throws - a security exception.SecurityExceptionboolean userExists(String userName)
Whether or not a user exists.
userName - The user name.User getUser(String userName) throws SecurityException
Get a Userfor a given user name.
userName - The user name.User.throws - a security exception if the user cannot be found.SecurityExceptionSubject getSubject(User user) throws SecurityException
Get a Subject for an user.
The Subject credentials (.e.g. PasswordCredential) will be retrieved by the Jetspeed security provider itself (if configured).
If an external authentication provider is used supplying custom credentials
the method getSubject(AuthenticatedUser) should be used instead.
user - The user.throws - a security exception if the user cannot be foundSecurityExceptionSubject getSubject(AuthenticatedUser user) throws SecurityException
Get a Subject for an (possibly externally) authenticated user with (optionally) provided credentials.
user - The authenticated user.throws - a security exception if the user cannot be foundSecurityExceptionList<User> getUsers(String nameFilter) throws SecurityException
Retrieves a detached and modifiable User list matching the corresponding
user name filter.
nameFilter - The filter used to retrieve matching users.User.SecurityExceptionUserResultList getUsersExtended(JetspeedPrincipalQueryContext queryContext) throws SecurityException
Retrieves a detached and modifiable User list matching the corresponding
query context. It returns a UserResultList, containing
the actual result list an the total number of results from the query.
queryContext - The (@see JetspeedPrincipalQueryContext) for this query.SecurityExceptionList<String> getUserNames(String nameFilter) throws SecurityException
Retrieves a a detached and modifiable List user names, finding users matching the corresponding user name filter.
nameFilter - The filter used to retrieve matching users.SecurityExceptionList<User> getUsersInRole(String roleName) throws SecurityException
Retrieves a a detached and modifiable User list of all the users in a specific role.
roleName - The role nameUser.throws - a security exception if the role does not exist.SecurityExceptionList<User> getUsersInGroup(String groupName) throws SecurityException
Retrieves a a detached and modifiable User list of all the users in a specific group.
groupName - The group nameUser.throws - security exception if the group does not exist.SecurityExceptionvoid updateUser(User user) throws SecurityException
user - SecurityExceptionList<User> lookupUsers(String attributeName, String attributeValue) throws SecurityException
Retrieves a a detached and modifiable User list of all the users having a specific value for a specific attribute
attributeName - attributeValue - SecurityExceptionPasswordCredential getPasswordCredential(User user) throws SecurityException
user - the userSecurityExceptionvoid storePasswordCredential(PasswordCredential credential) throws SecurityException
SecurityExceptionCopyright © 1999–2016 The Apache Software Foundation. All rights reserved.