Method Summary |
|
public static boolean | accountExists(User user) Check whether a specified user's account exists.
The login name is used for looking up the account.
Parameters: user - The user to be checked. |
public static 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 name of the user to be checked. |
public static void | addGroup(Group group) Creates a new group with specified attributes. |
public static void | addPermission(Permission permission) Creates a new permission with specified attributes. |
public static void | addRole(Role role) Creates a new role with specified attributes. |
public static void | addUser(User user, String password) Creates new user account with specified attributes. |
public static void | changePassword(User user, String oldPassword, String newPassword) Change the password for an User. |
public static boolean | checkPassword(String checkpw, String encpw) |
public static Group | createGroup(String name) Creates a new Group in the system. |
public static Permission | createPermission(String name) Creates a new Permission in the system. |
public static Role | createRole(String name) Creates a new Role in the system. |
public static String | encryptPassword(String password) This method provides client-side encryption of passwords.
This is an utility method that is used by other classes to maintain
a consistent approach to encrypting password. |
public static String | encryptPassword(String password, String salt) This method provides client-side encryption of passwords.
This is an utility method that is used by other classes to maintain
a consistent approach to encrypting password. |
public static 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. |
public static AccessControlList | getACL(User user) Constructs an AccessControlList for a specific user. |
public static GroupSet | getAllGroups() Retrieves all groups defined in the system. |
public static PermissionSet | getAllPermissions() Retrieves all permissions defined in the system. |
public static RoleSet | getAllRoles() Retrieves all roles defined in the system. |
public static User | getAnonymousUser() Constructs an User object to represent an anonymous user of the
application. |
public static 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. |
public static Group | getGlobalGroup() Provides a reference to the Group object that represents the
global group. |
public static Group | getGroup(String groupName) Retrieve a Group object with specified name.
Parameters: groupName - The name of the Group to be retrieved. |
public static Group | getGroupById(int groupId) Retrieve a Group object with specified Id.
Parameters: name - the name of the Group. |
public static Group | getGroupByName(String groupName) Retrieve a Group object with specified name.
Parameters: groupName - The name of the Group to be retrieved. |
public static Class | getGroupClass() Returns the Class object for the implementation of Group interface
used by the system. |
public static Group | getGroupInstance(String groupName) Construct a blank Group object. |
public static GroupSet | getGroups(Criteria criteria) Retrieve a set of Groups that meet the specified Criteria.
Parameters: criteria - A Criteria of Group selection. |
public static Group | getNewGroup(String groupName) Retrieves a named Group. |
public static Permission | getNewPermission(String permissionName) Retrieves a named Permission. |
public static Role | getNewRole(String roleName) Retrieves a named Role. |
public static Permission | getPermission(String permissionName) Retrieve a Permission object with specified name.
Parameters: permissionName - The name of the Permission to be retrieved. |
public static Permission | getPermissionById(int permissionId) Retrieve a Permission object with specified Id.
Parameters: name - the name of the Permission. |
public static Permission | getPermissionByName(String permissionName) Retrieve a Permission object with specified name.
Parameters: permissionName - The name of the Permission to be retrieved. |
public static Class | getPermissionClass() Returns the Class object for the implementation of Permission interface
used by the system. |
public static Permission | getPermissionInstance(String permName) Construct a blank Permission object.
This method calls getPermissionClass, and then creates a new object using
the default constructor.
Parameters: permName - The name of the permission. |
public static PermissionSet | getPermissions(Criteria criteria) Retrieve a set of Permissions that meet the specified Criteria.
Parameters: criteria - a Criteria of Permissions selection. |
public static PermissionSet | getPermissions(Role role) Retrieves all permissions associated with a role.
Parameters: role - the role name, for which the permissions are to be retrieved. |
public static Role | getRole(String roleName) Retrieve a Role object with specified name.
Parameters: roleName - The name of the Role to be retrieved. |
public static Role | getRoleById(int roleId) Retrieve a Role object with specified Id.
Parameters: name - the name of the Role. |
public static Role | getRoleByName(String roleName) Retrieve a Role object with specified name.
Parameters: roleName - The name of the Role to be retrieved. |
public static Class | getRoleClass() Returns the Class object for the implementation of Role interface
used by the system. |
public static Role | getRoleInstance(String roleName) Construct a blank Role object.
This method calls getRoleClass, and then creates a new object using
the default constructor.
Parameters: roleName - The name of the role. |
public static RoleSet | getRoles(Criteria criteria) Retrieve a set of Roles that meet the specified Criteria.
Parameters: criteria - a Criteria of Roles selection. |
public static SecurityService | getService() Retrieves an implementation of SecurityService, base on the settings in
TurbineResources. |
public static User | getUser(String username) Constructs an User object to represent a registered user of the
application.
Parameters: username - The user name. |
public static Class | getUserClass() Returns the Class object for the implementation of User interface
used by the system. |
public static User | getUserInstance() Construct a blank User object. |
public static 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. |
public static UserManager | getUserManager() Returns the configured UserManager. |
public static 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. |
public static void | grant(User user, Group group, Role role) Grant an User a Role in a Group. |
public static void | grant(Role role, Permission permission) |
public static boolean | isAnonymousUser(User user) |
public static void | removeGroup(Group group) Removes a Group from the system. |
public static void | removePermission(Permission permission) Removes a Permission from the system. |
public static void | removeRole(Role role) Removes a Role from the system. |
public static void | removeUser(User user) Removes an user account from the system. |
public static void | renameGroup(Group group, String name) Renames an existing Group. |
public static void | renamePermission(Permission permission, String name) Renames an existing Permission. |
public static void | renameRole(Role role, String name) Renames an existing Role. |
public static void | revoke(User user, Group group, Role role) Revoke a Role in a Group from an User. |
public static void | revoke(Role role, Permission permission) Revokes a Permission from a Role. |
public static void | revokeAll(User user) Revokes all roles from an User. |
public static void | revokeAll(Role role) Revokes all permissions from a Role. |
public static void | saveGroup(Group group) Stores Group's attributes. |
public static void | saveOnSessionUnbind(User user) Saves User data when the session is unbound. |
public static void | savePermission(Permission permission) Stores Permission's attributes. |
public static void | saveRole(Role role) Stores Role's attributes. |
public static void | saveUser(User user) Saves User's data in the permanent storage. |
public void | setUserManager(UserManager userManager) Configure a new user Manager. |