|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Describes the interface for managing users and provides access to the
User
.
Method Summary | |
void |
addUser(String username,
String password)
Add a new user provided a username and password. |
void |
addUser(String username,
String password,
String atnProviderName)
Add a new user provided a username and password in the specified authentication provider store. |
boolean |
authenticate(String username,
String password)
Authenticate a user. |
String |
getAnonymousUser()
|
User |
getUser(String username)
Get a User for a given username. |
Iterator |
getUsers(String filter)
An iterator of User finding users matching the corresponding
filter criteria. |
Collection |
getUsersInGroup(String groupFullPathName)
A collection of User for a specific group. |
Collection |
getUsersInRole(String roleFullPathName)
A collection of User for all the users in a specific role. |
void |
removeUser(String username)
Remove a user. |
void |
setPassword(String username,
String oldPassword,
String newPassword)
Set the user password. |
void |
setPasswordEnabled(String userName,
boolean enabled)
Set the enabled state of the user password credential. |
void |
setPasswordExpiration(String userName,
Date expirationDate)
Set the expiration date and the expired flag of the password credential. |
void |
setPasswordUpdateRequired(String userName,
boolean updateRequired)
Set the update required state of the user password credential. |
void |
setUserEnabled(String userName,
boolean enabled)
Enable or disable a user. |
boolean |
userExists(String username)
Whether or not a user exists. |
Method Detail |
public String getAnonymousUser()
public boolean authenticate(String username, String password)
Authenticate a user.
username
- The user name.password
- The user password.
public void addUser(String username, String password) throws SecurityException
Add a new user provided a username and password.
username
- The user name.password
- The password.
Throws
- a security exception.
SecurityException
public void addUser(String username, String password, String atnProviderName) throws SecurityException
Add a new user provided a username and password in the specified authentication provider store.
username
- The user name.password
- The password.atnProviderName
- The authentication provider name.
Throws
- a security exception.
SecurityException
public void removeUser(String username) throws SecurityException
Remove a user. If there is a Preferences
node for
profile properties associated to this user, it will be removed as well.
Permission
for this user will be removed as well.
username
- The user name.
Throws
- a security exception.
SecurityException
public boolean userExists(String username)
Whether or not a user exists.
username
- The user name.
public User getUser(String username) throws SecurityException
Get a User
for a given username.
username
- The username.
User
.
Throws
- a security exception if the user cannot be found.
SecurityException
public Iterator getUsers(String filter) throws SecurityException
An iterator of User
finding users matching the corresponding
filter criteria.
Current implementation only allows for getting back all users with "" as a fitler.
TODO Complete filter implementation.
filter
- The filter used to retrieve matching users.
User
.
SecurityException
public Collection getUsersInRole(String roleFullPathName) throws SecurityException
A collection of User
for all the users in a specific role.
roleFullPathName
- The role name full path (e.g.
theRoleName.theRoleNameChild).
User
.
Throws
- a security exception if the role does not exist.
SecurityException
public Collection getUsersInGroup(String groupFullPathName) throws SecurityException
A collection of User
for a specific group.
groupFullPathName
- The group name full path
(e.g. theGroupName.theGroupChildName).
User
.
Throws
- security exception if the group does not exist.
SecurityException
public void setPassword(String username, String oldPassword, String newPassword) throws SecurityException
Set the user password.
username
- The user name.oldPassword
- The old password.newPassword
- The new password.
Throws
- a security exception.
SecurityException
public void setPasswordUpdateRequired(String userName, boolean updateRequired) throws SecurityException
Set the update required state of the user password credential.
userName
- The user name.updateRequired
- The update required state.
Throws
- a security exception.
SecurityException
public void setPasswordEnabled(String userName, boolean enabled) throws SecurityException
Set the enabled state of the user password credential.
userName
- The user name.enabled
- The enabled state.
Throws
- a security exception.
SecurityException
public void setUserEnabled(String userName, boolean enabled) throws SecurityException
userName
- The user nameenabled
- enabled flag for the user
SecurityException
public void setPasswordExpiration(String userName, Date expirationDate) throws SecurityException
Set the expiration date and the expired flag of the password credential.
If a date equal or before the current date is provided, the expired flag will be set to true, otherwise to false.
userName
- The user name.expirationDate
- The expiration date to set.
Throws
- a security exception.
SecurityException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |