Method Summary |
|
boolean | accountExists(String userName) Check whether a specified user's account exists.
The login name is used for looking up the account.
Parameters: userName - The user to be checked. |
boolean | accountExists(User user) Check whether a specified user's account exists.
An User object is used for looking up the account.
Parameters: user - The user object to be checked. |
Group | addGroup(Group group) Creates a new group with specified attributes.
Parameters: group - the object describing the group to be created. |
Permission | addPermission(Permission permission) Creates a new permission with specified attributes.
Parameters: permission - The object describing the permission to be created. |
Role | addRole(Role role) Creates a new role with specified attributes.
Parameters: role - The object describing the role to be created. |
void | addUser(User user, String password) Creates new user account with specified attributes. |
void | changePassword(User user, String oldPassword, String newPassword) Change the password for an User. |
boolean | checkPassword(String checkpw, String encpw) |
String | encryptPassword(String password) This method provides client-side encryption mechanism for passwords.
This is an utility method that is used by other classes to maintain
a consistent approach to encrypting password. |
String | encryptPassword(String password, String salt) This method provides client-side encryption mechanism for passwords.
This is an utility method that is used by other classes to maintain
a consistent approach to encrypting password. |
void | forcePassword(User user, String password) Forcibly sets new password for an User.
This is supposed by the administrator to change the forgotten or
compromised passwords. |
AccessControlList | getACL(User user) Constructs an AccessControlList for a specific user. |
Class | getAclClass() Returns the Class object for the implementation of AccessControlList interface
used by the system. |
AccessControlList | getAclInstance(Map roles, Map permissions) Construct a new ACL object. |
GroupSet | getAllGroups() Retrieves all groups defined in the system. |
PermissionSet | getAllPermissions() Retrieves all permissions defined in the system. |
RoleSet | getAllRoles() Retrieves all roles defined in the system. |
User | getAnonymousUser() Constructs an User object to represent an anonymous user of the
application. |
User | getAuthenticatedUser(String username, String password) Authenticates an user, and constructs an User object to represent
him/her.
Parameters: username - The user name. Parameters: password - The user password. |
Group | getGlobalGroup() Provides a reference to the Group object that represents the
global group. |
Group | getGroup(String name) Retrieve a Group object with specified name.
Parameters: name - the name of the Group. |
Group | getGroupById(int id) Retrieve a Group object with specified Id.
Parameters: name - the name of the Group. |
Group | getGroupByName(String name) Retrieve a Group object with specified name.
Parameters: name - the name of the Group. |
Class | getGroupClass() Returns the Class object for the implementation of Group interface
used by the system. |
Group | getGroupInstance() Construct a blank Group object. |
Group | getGroupInstance(String groupName) Construct a blank Group object. |
GroupSet | getGroups(Criteria criteria) Retrieve a set of Groups that meet the specified Criteria.
Parameters: criteria - a Criteria of Group selection. |
Group | getNewGroup(String groupName) |
Permission | getNewPermission(String permissionName) |
Role | getNewRole(String roleName) |
Permission | getPermission(String name) Retrieve a Permission object with specified name.
Parameters: name - the name of the Permission. |
Permission | getPermissionById(int id) Retrieve a Permission object with specified Id.
Parameters: name - the name of the Permission. |
Permission | getPermissionByName(String name) Retrieve a Permission object with specified name.
Parameters: name - the name of the Permission. |
Class | getPermissionClass() Returns the Class object for the implementation of Permission interface
used by the system. |
Permission | getPermissionInstance() Construct a blank Permission object. |
Permission | getPermissionInstance(String permName) Construct a blank Permission object. |
PermissionSet | getPermissions(Role role) Retrieves all permissions associated with a role.
Parameters: role - the role name, for which the permissions are to be retrieved. |
PermissionSet | getPermissions(Criteria criteria) Retrieve a set of Permissions that meet the specified Criteria.
Parameters: criteria - a Criteria of Permissions selection. |
Role | getRole(String name) Retrieve a Role object with specified name.
Parameters: name - the name of the Role. |
Role | getRoleById(int id) Retrieve a Role object with specified Id.
Parameters: name - the name of the Role. |
Role | getRoleByName(String name) Retrieve a Role object with specified name.
Parameters: name - the name of the Role. |
Class | getRoleClass() Returns the Class object for the implementation of Role interface
used by the system. |
Role | getRoleInstance() Construct a blank Role object. |
Role | getRoleInstance(String roleName) Construct a blank Role object. |
RoleSet | getRoles(Criteria criteria) Retrieve a set of Roles that meet the specified Criteria.
Parameters: criteria - a Criteria of Roles selection. |
User | getUser(String username) Constructs an User object to represent a registered user of the
application.
Parameters: username - The user name. |
Class | getUserClass() Returns the Class object for the implementation of User interface
used by the system. |
User | getUserInstance() Construct a blank User object. |
User | getUserInstance(String userName) Construct a blank User object.
This method calls getUserClass, and then creates a new object using
the default constructor.
Parameters: userName - The name of the user. |
List | getUserList(Criteria criteria) Retrieve a set of users that meet the specified criteria.
As the keys for the criteria, you should use the constants that
are defined in
User interface, plus the names
of the custom attributes you added to your user representation
in the data storage. |
UserManager | getUserManager() Returns the configured UserManager. |
User[] | getUsers(Criteria criteria) Retrieve a set of users that meet the specified criteria.
As the keys for the criteria, you should use the constants that
are defined in
User interface, plus the names
of the custom attributes you added to your user representation
in the data storage. |
void | grant(User user, Group group, Role role) Grant an User a Role in a Group. |
void | grant(Role role, Permission permission) |
boolean | isAnonymousUser(User u) |
void | removeGroup(Group group) Removes a Group from the system. |
void | removePermission(Permission permission) Removes a Permission from the system. |
void | removeRole(Role role) Removes a Role from the system. |
void | removeUser(User user) Removes an user account from the system. |
void | renameGroup(Group group, String name) Renames an existing Group. |
void | renamePermission(Permission permission, String name) Renames an existing Permission. |
void | renameRole(Role role, String name) Renames an existing Role. |
void | revoke(User user, Group group, Role role) Revoke a Role in a Group from an User. |
void | revoke(Role role, Permission permission) Revokes a Permission from a Role. |
void | revokeAll(User user) Revokes all roles from an User. |
void | revokeAll(Role role) Revokes all permissions from a Role. |
void | saveGroup(Group group) Stores Group's attributes. |
void | saveOnSessionUnbind(User user) Saves User data when the session is unbound. |
void | savePermission(Permission permission) Stores Permission's attributes. |
void | saveRole(Role role) Stores Role's attributes. |
void | saveUser(User user) Saves User's data in the permanent storage. |
void | setUserManager(UserManager userManager) Configure a new user Manager. |