public class

MockCrowdService

extends Object
implements CrowdService
java.lang.Object
   ↳ com.atlassian.jira.user.MockCrowdService

Summary

Fields
protected Map<StringPasswordCredential> credentials
protected Map<String, SetMultimap<StringString>> groupAttributes
protected Multimap<StringUser> groupMembers
protected Map<StringGroup> groups
protected Multimap<StringGroup> nestedGroups
protected Map<StringMap<StringSet<String>>> userAttributes
protected Map<StringUser> users
Public Constructors
MockCrowdService()
Public Methods
Group addGroup(Group group)
boolean addGroupToGroup(Group childGroup, Group parentGroup)
User addUser(ApplicationUser user)
User addUser(User user, String credential)
boolean addUserToGroup(ApplicationUser user, Group group)
boolean addUserToGroup(User user, Group group)
User authenticate(String name, String credential)
Collection<User> getAllUsers()
UserCapabilities getCapabilitiesForNewUsers()
Group getGroup(String name)
GroupWithAttributes getGroupWithAttributes(String name)
User getUser(String name)
UserWithAttributes getUserWithAttributes(String name)
boolean isGroupDirectGroupMember(Group childGroup, Group parentGroup)
boolean isGroupMemberOfGroup(String childGroupName, String parentGroup)
boolean isGroupMemberOfGroup(Group childGroup, Group parentGroup)
boolean isUserDirectGroupMember(User user, Group group)
boolean isUserMemberOfGroup(User user, Group group)
boolean isUserMemberOfGroup(String userName, String groupName)
boolean mockUsersInGroup(int numberOfUsers, Group group)
void removeAllGroupAttributes(Group group)
void removeAllUserAttributes(User user)
boolean removeGroup(Group group)
void removeGroupAttribute(Group group, String attributeName)
boolean removeGroupFromGroup(Group childGroup, Group parentGroup)
boolean removeUser(User user)
void removeUserAttribute(User user, String key)
boolean removeUserFromGroup(User user, Group group)
User renameUser(User user, String newUsername)
<T> Iterable<T> search(Query<T> query)
Iterable<User> searchUsersAllowingDuplicateNames(Query<User> userQuery)
void setGroupAttribute(Group group, String attributeName, String attributeValue)
void setGroupAttribute(Group group, String attributeName, Set<String> attributeValues)
void setUserAttribute(User user, String key, Set<String> value)
void setUserAttribute(User user, String key, String value)
Group updateGroup(Group group)
User updateUser(User user)
void updateUserCredential(User user, String credential)
Protected Methods
UserKeyStore getUserKeyStore()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.crowd.embedded.api.CrowdService

Fields

protected Map<StringPasswordCredential> credentials

protected Map<String, SetMultimap<StringString>> groupAttributes

protected Multimap<StringUser> groupMembers

protected Map<StringGroup> groups

protected Multimap<StringGroup> nestedGroups

protected Map<StringMap<StringSet<String>>> userAttributes

protected Map<StringUser> users

Public Constructors

public MockCrowdService ()

Public Methods

public Group addGroup (Group group)

public boolean addGroupToGroup (Group childGroup, Group parentGroup)

public User addUser (User user, String credential)

public boolean addUserToGroup (ApplicationUser user, Group group)

public boolean addUserToGroup (User user, Group group)

public User authenticate (String name, String credential)

public Collection<User> getAllUsers ()

public UserCapabilities getCapabilitiesForNewUsers ()

public Group getGroup (String name)

public GroupWithAttributes getGroupWithAttributes (String name)

public User getUser (String name)

public UserWithAttributes getUserWithAttributes (String name)

public boolean isGroupDirectGroupMember (Group childGroup, Group parentGroup)

public boolean isGroupMemberOfGroup (String childGroupName, String parentGroup)

public boolean isGroupMemberOfGroup (Group childGroup, Group parentGroup)

public boolean isUserDirectGroupMember (User user, Group group)

public boolean isUserMemberOfGroup (User user, Group group)

public boolean isUserMemberOfGroup (String userName, String groupName)

public boolean mockUsersInGroup (int numberOfUsers, Group group)

public void removeAllGroupAttributes (Group group)

public void removeAllUserAttributes (User user)

public boolean removeGroup (Group group)

public void removeGroupAttribute (Group group, String attributeName)

public boolean removeGroupFromGroup (Group childGroup, Group parentGroup)

public boolean removeUser (User user)

public void removeUserAttribute (User user, String key)

public boolean removeUserFromGroup (User user, Group group)

public User renameUser (User user, String newUsername)

public Iterable<T> search (Query<T> query)

public Iterable<User> searchUsersAllowingDuplicateNames (Query<User> userQuery)

public void setGroupAttribute (Group group, String attributeName, String attributeValue)

public void setGroupAttribute (Group group, String attributeName, Set<String> attributeValues)

public void setUserAttribute (User user, String key, Set<String> value)

public void setUserAttribute (User user, String key, String value)

public Group updateGroup (Group group)

public User updateUser (User user)

public void updateUserCredential (User user, String credential)

Protected Methods

protected UserKeyStore getUserKeyStore ()