|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserManager
Describes the interface for managing users and provides access to the
User
.
Method Summary | |
---|---|
User |
addUser(java.lang.String userName)
Add a new user |
User |
addUser(java.lang.String userName,
boolean mapped)
Add a new user and optionally map/replicate it to an external storage manager (if configured). |
java.lang.String |
getAnonymousUser()
|
PasswordCredential |
getPasswordCredential(User user)
Returns the current PasswordCredential for a User or a new one if the doesn't have one yet |
javax.security.auth.Subject |
getSubject(AuthenticatedUser user)
Get a Subject for an (possibly externally) authenticated user with (optionally) provided credentials. |
javax.security.auth.Subject |
getSubject(User user)
Get a Subject for an user. |
User |
getUser(java.lang.String userName)
Get a User for a given user name. |
java.util.List<java.lang.String> |
getUserNames(java.lang.String nameFilter)
Retrieves a a detached and modifiable List user names, finding users matching the corresponding user name filter. |
java.util.List<User> |
getUsers(java.lang.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. |
java.util.List<User> |
getUsersInGroup(java.lang.String groupName)
Retrieves a a detached and modifiable User list of all the users in a specific group. |
java.util.List<User> |
getUsersInRole(java.lang.String roleName)
Retrieves a a detached and modifiable User list of all the users in a specific role. |
java.util.List<User> |
lookupUsers(java.lang.String attributeName,
java.lang.String attributeValue)
Retrieves a a detached and modifiable User list of all the users having a specific value for a specific attribute |
User |
newTransientUser(java.lang.String name)
|
User |
newUser(java.lang.String name)
|
User |
newUser(java.lang.String name,
boolean mapped)
|
void |
removeUser(java.lang.String userName)
Remove a user. |
void |
storePasswordCredential(PasswordCredential credential)
|
void |
updateUser(User user)
Updates a user and all its attributes |
boolean |
userExists(java.lang.String userName)
Whether or not a user exists. |
Methods inherited from interface org.apache.jetspeed.security.PrincipalTypeManager |
---|
getPrincipalManager, getPrincipalType |
Method Detail |
---|
java.lang.String getAnonymousUser()
User newUser(java.lang.String name)
User newUser(java.lang.String name, boolean mapped)
User newTransientUser(java.lang.String name)
User addUser(java.lang.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.
User
Throws
- a security exception.
SecurityException
User addUser(java.lang.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.
User
Throws
- a security exception.
SecurityException
void removeUser(java.lang.String userName) throws SecurityException
Remove a user. If there user attributes associated with this user, they will be removed as well.
Permission
for this user will be removed as well.
userName
- The user name.
Throws
- a security exception.
SecurityException
boolean userExists(java.lang.String userName)
Whether or not a user exists.
userName
- The user name.
User getUser(java.lang.String userName) throws SecurityException
Get a User
for a given user name.
userName
- The user name.
User
.
Throws
- a security exception if the user cannot be found.
SecurityException
javax.security.auth.Subject 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 found
SecurityException
javax.security.auth.Subject 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 found
SecurityException
java.util.List<User> getUsers(java.lang.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
.
SecurityException
UserResultList 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.
SecurityException
java.util.List<java.lang.String> getUserNames(java.lang.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.
SecurityException
java.util.List<User> getUsersInRole(java.lang.String roleName) throws SecurityException
Retrieves a a detached and modifiable User
list of all the users in a specific role.
roleName
- The role name
User
.
Throws
- a security exception if the role does not exist.
SecurityException
java.util.List<User> getUsersInGroup(java.lang.String groupName) throws SecurityException
Retrieves a a detached and modifiable User
list of all the users in a specific group.
groupName
- The group name
User
.
Throws
- security exception if the group does not exist.
SecurityException
void updateUser(User user) throws SecurityException
user
-
SecurityException
java.util.List<User> lookupUsers(java.lang.String attributeName, java.lang.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
-
SecurityException
PasswordCredential getPasswordCredential(User user) throws SecurityException
user
- the user
SecurityException
void storePasswordCredential(PasswordCredential credential) throws SecurityException
SecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |