public interface UserDataService
UserData
storage. All UserData
returned from and persisted
with this service will be testrun-specific. The testrun-identifier is set in the constructor.Modifier and Type | Interface and Description |
---|---|
static interface |
UserDataService.UserCallback |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DOMAIN
The
domain given to users who belong to the default domain |
Modifier and Type | Method and Description |
---|---|
long |
countCloudAwareUsers()
Count the number of cloud-enabled users, regardless of signup state
|
long |
countUsers() |
long |
countUsers(boolean created) |
long |
countUsers(String domain,
boolean created) |
void |
createNewUser(UserData data) |
UserData |
findUserByEmail(String email)
Find a user by email address
|
UserData |
findUserByUsername(String username)
Find a user by username
|
UserData |
findUserByUserName(String userName)
Find a user by it's username.
|
List<UserData> |
getCreatedUsers(int startIndex,
int count)
Get a list of usernames that are created in alfresco with paging
|
Iterator<String> |
getDomainsIterator()
An iterator over networks in the users collection.
|
UserData |
getRandomUser()
Select a random, pre-created user.
|
UserData |
getRandomUserFromDomain(String domain)
Select a random, pre-created user.
|
UserData |
getRandomUserFromDomains(List<String> domains)
Select a random, pre-created user that is a member of one of the given domains.
|
Iterator<UserData> |
getUsersByDomainIterator(String domain)
Iterate over users in the given network.
|
List<UserData> |
getUsersInDomain(String domain,
int startIndex,
int count)
Access users by their user domain using paging
|
List<UserData> |
getUsersInDomain(String domain,
int startIndex,
int count,
boolean created)
Return a maximum of "max" users in the network with id "networkId" and given created flag.
|
List<UserData> |
getUsersPendingCreation(int startIndex,
int count)
Get a list of usernames that are NOT created in alfresco with paging
|
List<UserData> |
getUsersWithoutCloudSignUp(int startIndex,
int count)
Retrieves a selection of users that have no cloud signup details.
|
void |
setUserCloudSignUp(String username,
CloudSignUpData cloudSignUp)
Set the registration data for a user
|
void |
setUserCreated(String username,
boolean created)
Change the 'created' state of the user i.e.
|
void |
setUserNodeId(String username,
String nodeId)
Store a node ID associated with the username
|
void |
setUserPassword(String username,
String password)
Update a user's password
|
void |
setUserTicket(String username,
String ticket)
Store an authentication token (ticket) against a username
|
static final String DEFAULT_DOMAIN
domain
given to users who belong to the default domainvoid createNewUser(UserData data)
void setUserTicket(String username, String ticket)
void setUserNodeId(String username, String nodeId)
void setUserCreated(String username, boolean created)
long countUsers(boolean created)
created
- true to only count users present in Alfrescolong countUsers(String domain, boolean created)
domain
- the domain to searchcreated
- true to only count users present in Alfrescolong countUsers()
UserData findUserByUsername(String username)
UserData
found otherwise null.UserData findUserByEmail(String email)
UserData
found otherwise null.List<UserData> getUsersPendingCreation(int startIndex, int count)
startIndex
- index to start getting users fromcount
- number of users to fetchList<UserData> getCreatedUsers(int startIndex, int count)
startIndex
- index to start getting users fromcount
- number of users to fetchUserData getRandomUser()
void setUserCloudSignUp(String username, CloudSignUpData cloudSignUp)
username
- the usernamecloudSignUp
- the new registration data to setlong countCloudAwareUsers()
List<UserData> getUsersWithoutCloudSignUp(int startIndex, int count)
List<UserData> getUsersInDomain(String domain, int startIndex, int count)
domain
- the user domainstartIndex
- the start index for pagingcount
- the number of users to retrieveDEFAULT_DOMAIN
List<UserData> getUsersInDomain(String domain, int startIndex, int count, boolean created)
domain
- the user domainstartIndex
- the start index for pagingcount
- the number of users to retrievecreated
- is the user created or not?DEFAULT_DOMAIN
Iterator<String> getDomainsIterator()
DEFAULT_DOMAIN
UserData findUserByUserName(String userName)
UserData
found. Null, if user doesn't exist.DEFAULT_DOMAIN
UserData getRandomUserFromDomain(String domain)
domain
- the user domainDEFAULT_DOMAIN
UserData getRandomUserFromDomains(List<String> domains)
domain
- the user domainDEFAULT_DOMAIN
Iterator<UserData> getUsersByDomainIterator(String domain)
domain
- the user domainDEFAULT_DOMAIN
Copyright © 2014. All rights reserved.