public class CreateUser
extends org.alfresco.bm.http.AuthenticatedHttpEventProcessor
Modifier and Type | Field and Description |
---|---|
static String |
PEOPLE_JSON_EMAIL |
static String |
PEOPLE_JSON_FIRSTNAME |
static String |
PEOPLE_JSON_GROUPS |
static String |
PEOPLE_JSON_LASTNAME |
static String |
PEOPLE_JSON_NODEREF |
static String |
PEOPLE_JSON_PASSWORD |
static String |
PEOPLE_JSON_USERNAME |
Constructor and Description |
---|
CreateUser(org.alfresco.http.HttpClientProvider httpClientProvider,
org.alfresco.http.AuthenticationDetailsProvider authenticationDetailsProvider,
String baseUrl,
org.alfresco.bm.user.UserDataService userDataService) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getRandomGroups()
Using the current
user group chances , generate a set of random groups
according to the chances. |
Map<String,Double> |
getUserGroups()
Used for testing
|
org.alfresco.bm.event.EventResult |
processEvent(org.alfresco.bm.event.Event event) |
void |
setIgnoreExistingUsers(boolean ignoreExistingUsers) |
void |
setUserGroups(String userGroupStr)
A description of the groups users should be added to with percentage chances.
|
executeHttpMethodAsAdmin, executeHttpMethodAsUser, getAuthDetailProvider, getFullUrlForPath, getHttpProvider, releaseResources
getName, getWarnDelay, isAutoCloseSessionId, isAutoPropagateSessionId, isChart, processEvent, register, resumeTimer, setAutoCloseSessionId, setAutoPropagateSessionId, setBeanName, setChart, setEventName, setEventNames, setRegistry, setWarnDelay, stopTimer, suspendTimer, toString
public static final String PEOPLE_JSON_USERNAME
public static final String PEOPLE_JSON_FIRSTNAME
public static final String PEOPLE_JSON_LASTNAME
public static final String PEOPLE_JSON_EMAIL
public static final String PEOPLE_JSON_PASSWORD
public static final String PEOPLE_JSON_GROUPS
public static final String PEOPLE_JSON_NODEREF
public CreateUser(org.alfresco.http.HttpClientProvider httpClientProvider, org.alfresco.http.AuthenticationDetailsProvider authenticationDetailsProvider, String baseUrl, org.alfresco.bm.user.UserDataService userDataService)
public void setIgnoreExistingUsers(boolean ignoreExistingUsers)
ignoreExistingUsers
- whether or not to ignore existing users when
creating. If set to true the event will be successful when
executed. If set to false, an exception will be thrown when
user already exists.public void setUserGroups(String userGroupStr)
SITE_ADMINISTRATORS:0.05, DATA_ANALYSTS:0.25will result in users having a 5% chance of being assigned to the 'SITE_ADMINISTRATORS' group and a 25% chance of being assigned to the 'DATA_ANALYSTS' group. The group assignments are always considered separately i.e. being assigned to one group does not change the chances of being assigned to another group. NOTE: The
API used
requires that the group names are prepended with the
GROUP_ prefix; this is done automatically and should not be specified here. Use the group
names as they appear on the administrator's group management screens.userGroupStr
- a string description of groups to assign users toIllegalArgumentException
- if the input string is not well-formedpublic List<String> getRandomGroups()
user group chances
, generate a set of random groups
according to the chances.Copyright © 2015. All rights reserved.