org.activiti.engine
接口 IdentityService

所有已知实现类:
IdentityServiceImpl

public interface IdentityService

Service to manage Users and Groups.

作者:
Tom Baeyens

方法摘要
 boolean checkPassword(String userId, String password)
          Checks if the password is valid for the given user.
 GroupQuery createGroupQuery()
          Creates a GroupQuery thats allows to programmatically query the groups.
 void createMembership(String userId, String groupId)
           
 NativeGroupQuery createNativeGroupQuery()
          Returns a new NativeQuery for tasks.
 NativeUserQuery createNativeUserQuery()
          Returns a new NativeQuery for tasks.
 UserQuery createUserQuery()
          Creates a UserQuery that allows to programmatically query the users.
 void deleteGroup(String groupId)
          Deletes the group.
 void deleteMembership(String userId, String groupId)
          Delete the membership of the user in the group.
 void deleteUser(String userId)
           
 void deleteUserInfo(String userId, String key)
          Delete an entry of the generic extensibility key-value pairs associated with a user
 String getUserInfo(String userId, String key)
          Generic extensibility key-value pairs associated with a user
 List<String> getUserInfoKeys(String userId)
          Generic extensibility keys associated with a user
 Picture getUserPicture(String userId)
          Retrieves the picture for a given user.
 Group newGroup(String groupId)
          Creates a new group.
 User newUser(String userId)
          Creates a new user.
 void saveGroup(Group group)
          Saves the group.
 void saveUser(User user)
          Saves the user.
 void setAuthenticatedUserId(String authenticatedUserId)
          Passes the authenticated user id for this particular thread.
 void setUserInfo(String userId, String key, String value)
          Generic extensibility key-value pairs associated with a user
 void setUserPicture(String userId, Picture picture)
          Sets the picture for a given user.
 

方法详细信息

newUser

User newUser(String userId)
Creates a new user. The user is transient and must be saved using saveUser(User).

参数:
userId - id for the new user, cannot be null.

saveUser

void saveUser(User user)
Saves the user. If the user already existed, the user is updated.

参数:
user - user to save, cannot be null.
抛出:
RuntimeException - when a user with the same name already exists.

createUserQuery

UserQuery createUserQuery()
Creates a UserQuery that allows to programmatically query the users.


createNativeUserQuery

NativeUserQuery createNativeUserQuery()
Returns a new NativeQuery for tasks.


deleteUser

void deleteUser(String userId)
参数:
userId - id of user to delete, cannot be null. When an id is passed for an unexisting user, this operation is ignored.

newGroup

Group newGroup(String groupId)
Creates a new group. The group is transient and must be saved using saveGroup(Group).

参数:
groupId - id for the new group, cannot be null.

createGroupQuery

GroupQuery createGroupQuery()
Creates a GroupQuery thats allows to programmatically query the groups.


createNativeGroupQuery

NativeGroupQuery createNativeGroupQuery()
Returns a new NativeQuery for tasks.


saveGroup

void saveGroup(Group group)
Saves the group. If the group already existed, the group is updated.

参数:
group - group to save. Cannot be null.
抛出:
RuntimeException - when a group with the same name already exists.

deleteGroup

void deleteGroup(String groupId)
Deletes the group. When no group exists with the given id, this operation is ignored.

参数:
groupId - id of the group that should be deleted, cannot be null.

createMembership

void createMembership(String userId,
                      String groupId)
参数:
userId - the userId, cannot be null.
groupId - the groupId, cannot be null.
抛出:
RuntimeException - when the given user or group doesn't exist or when the user is already member of the group.

deleteMembership

void deleteMembership(String userId,
                      String groupId)
Delete the membership of the user in the group. When the group or user don't exist or when the user is not a member of the group, this operation is ignored.

参数:
userId - the user's id, cannot be null.
groupId - the group's id, cannot be null.

checkPassword

boolean checkPassword(String userId,
                      String password)
Checks if the password is valid for the given user. Arguments userId and password are nullsafe.


setAuthenticatedUserId

void setAuthenticatedUserId(String authenticatedUserId)
Passes the authenticated user id for this particular thread. All service method (from any service) invocations done by the same thread will have access to this authenticatedUserId.


setUserPicture

void setUserPicture(String userId,
                    Picture picture)
Sets the picture for a given user.

参数:
picture - can be null to delete the picture.
抛出:
ActivitiObjectNotFoundException - if the user doesn't exist.

getUserPicture

Picture getUserPicture(String userId)
Retrieves the picture for a given user.

抛出:
ActivitiObjectNotFoundException - if the user doesn't exist.

setUserInfo

void setUserInfo(String userId,
                 String key,
                 String value)
Generic extensibility key-value pairs associated with a user


getUserInfo

String getUserInfo(String userId,
                   String key)
Generic extensibility key-value pairs associated with a user


getUserInfoKeys

List<String> getUserInfoKeys(String userId)
Generic extensibility keys associated with a user


deleteUserInfo

void deleteUserInfo(String userId,
                    String key)
Delete an entry of the generic extensibility key-value pairs associated with a user



Copyright © 2013 Alfresco. All rights reserved.