public class UserUtils extends Object
Provides utility methods and constants related to working with users.
Modifier and Type | Field and Description |
---|---|
static StringValue<String> |
ADDRESS
The variable that holds the address of the user.
|
static BooleanValue<Boolean> |
ADMIN_USER_VARIABLE
The variable that holds the flag whether the user is the automatically created system admin user of the tenant.
|
static ComplexValue<Map<String,Map<String,String>>> |
CONFIGURATION
<p>The variable that holds the configuration object of a user.
|
static ComplexValue<List<User.DeputyUser>> |
DEPUTIES |
static BooleanValue<Boolean> |
DEPUTY_ACTIVE |
static BooleanValue<Boolean> |
DEPUTY_NOTIFY |
static StringValue<String> |
DEPUTY_USER_ID
The variable that holds the user information who can act as user deputy.
|
static String |
EDORAS_VIS_CONFIGURATION_KEY
The key where the edoras vis configuration map is stored inside the main
CONFIGURATION map. |
static StringValue<String> |
EMAIL_ADDRESS
The variable that holds the email address of the user.
|
static StringValue<String> |
FIRST_NAME
The variable that holds the first name of the user.
|
static StringValue<String> |
HOME_URL
The variable that holds the home url of the user.
|
static StringValue<String> |
LANGUAGE
The variable that holds the language of the user.
|
static StringValue<String> |
LAST_NAME
The variable that holds the last name of the user.
|
static BooleanValue<Boolean> |
LIVE_PREVIEW
The variable that holds the live preview flag of the user.
|
static StringValue<String> |
LOGIN
The variable that holds the login of the user.
|
static ComplexValue<Set<String>> |
MEMBER_GROUPS
The variable that holds the work object ids of the groups the user is a member of.
|
static StringValue<String> |
MOBILE_NUMBER
The variable that holds the mobile number of the user.
|
static StringValue<String> |
NOTES
The variable that holds additional notes of the user.
|
static BooleanValue<Boolean> |
NOTIFY_ASSIGNEE_WORK_ITEM_MODIFIED
The variable that holds the flag whether to notify the assignee of a work item about modifications of the work item.
|
static BooleanValue<Boolean> |
NOTIFY_NEW_ASSIGNEE_OF_WORK_ITEM
The variable that holds the flag whether to notify a user that he/she has been assigned a task.
|
static BooleanValue<Boolean> |
NOTIFY_NEW_CANDIDATE_ASSIGNEE_OF_WORK_ITEM
The variable that holds the flag whether to notify a user that he/she is a candidate to become the assignee for a currently unassigned task.
|
static BooleanValue<Boolean> |
NOTIFY_OWNER_WORK_ITEM_MODIFIED
The variable that holds the flag whether to notify the owner of a work item about modifications of the work item.
|
static StringValue<String> |
ORIGIN_USER_ID |
static StringValue<String> |
ORIGIN_USER_LOGIN |
static StringValue<String> |
ORIGIN_USER_NAME |
static StringValue<String> |
PASSWORD
The variable that holds the password of the user.
|
static StringValue<String> |
PHONE_NUMBER
The variable that holds the phone number of the user.
|
static ComplexValue<List<Map<String,Object>>> |
USERS_TO_IMPERSONATE
The user to impersonante and the origin user variables are not stored on the user object.
|
Constructor and Description |
---|
UserUtils(String emailValidationPattern) |
Modifier and Type | Method and Description |
---|---|
static User |
convertToUser(AnyWorkObject userAnyWorkObject,
SystemGroups systemGroups)
Converts an
AnyWorkObject user to a User object. |
static AnyWorkObject |
convertToWorkObject(User user)
Converts a
User to an AnyWorkObject user object. |
static String |
getEmail(AnyWorkObject user)
Deprecated.
Please use the
EMAIL_ADDRESS variable. |
static String |
getLogin(AnyWorkObject user)
Deprecated.
Please use the
LOGIN variable. |
static Set<String> |
getMemberGroups(AnyWorkObject user)
Deprecated.
Please use the
MEMBER_GROUPS variable. |
boolean |
isValidEmailAddress(String email)
Checks if the given email address is valid.
|
static boolean |
isValidName(String name)
Checks if the given name is valid.
|
public static final StringValue<String> FIRST_NAME
The variable that holds the first name of the user.
public static final StringValue<String> LAST_NAME
The variable that holds the last name of the user.
public static final StringValue<String> LOGIN
The variable that holds the login of the user.
public static final StringValue<String> PASSWORD
The variable that holds the password of the user.
public static final StringValue<String> LANGUAGE
The variable that holds the language of the user.
public static final StringValue<String> EMAIL_ADDRESS
The variable that holds the email address of the user.
public static final StringValue<String> PHONE_NUMBER
The variable that holds the phone number of the user.
public static final StringValue<String> MOBILE_NUMBER
The variable that holds the mobile number of the user.
public static final StringValue<String> ADDRESS
The variable that holds the address of the user.
public static final StringValue<String> NOTES
The variable that holds additional notes of the user.
public static final ComplexValue<Set<String>> MEMBER_GROUPS
The variable that holds the work object ids of the groups the user is a member of.
public static final StringValue<String> HOME_URL
The variable that holds the home url of the user.
public static final BooleanValue<Boolean> LIVE_PREVIEW
The variable that holds the live preview flag of the user.
public static final BooleanValue<Boolean> NOTIFY_OWNER_WORK_ITEM_MODIFIED
The variable that holds the flag whether to notify the owner of a work item about modifications of the work item.
public static final BooleanValue<Boolean> NOTIFY_ASSIGNEE_WORK_ITEM_MODIFIED
The variable that holds the flag whether to notify the assignee of a work item about modifications of the work item.
public static final BooleanValue<Boolean> NOTIFY_NEW_ASSIGNEE_OF_WORK_ITEM
The variable that holds the flag whether to notify a user that he/she has been assigned a task.
public static final BooleanValue<Boolean> NOTIFY_NEW_CANDIDATE_ASSIGNEE_OF_WORK_ITEM
The variable that holds the flag whether to notify a user that he/she is a candidate to become the assignee for a currently unassigned task.
public static final BooleanValue<Boolean> ADMIN_USER_VARIABLE
The variable that holds the flag whether the user is the automatically created system admin user of the tenant.
public static final ComplexValue<Map<String,Map<String,String>>> CONFIGURATION
<p>The variable that holds the configuration object of a user. The configuration map is structured the following way: </p>
<pre>
{
"edorasVis": {
"property1": "value1",
…
},
}
</pre>
It is a map of maps which holds the individual configuration maps to separate them from each other. The EDORAS_VIS_CONFIGURATION_KEY
is the key for the edoras vis
configuration object.
public static final StringValue<String> DEPUTY_USER_ID
The variable that holds the user information who can act as user deputy.
public static final BooleanValue<Boolean> DEPUTY_NOTIFY
public static final BooleanValue<Boolean> DEPUTY_ACTIVE
public static final ComplexValue<List<User.DeputyUser>> DEPUTIES
public static final ComplexValue<List<Map<String,Object>>> USERS_TO_IMPERSONATE
The user to impersonante and the origin user variables are not stored on the user object. These are just used to add the information to the user object when retrieved by the front end.
public static final StringValue<String> ORIGIN_USER_ID
public static final StringValue<String> ORIGIN_USER_NAME
public static final StringValue<String> ORIGIN_USER_LOGIN
public static final String EDORAS_VIS_CONFIGURATION_KEY
The key where the edoras vis configuration map is stored inside the main CONFIGURATION
map.
public UserUtils(String emailValidationPattern)
public boolean isValidEmailAddress(String email)
Checks if the given email address is valid.
email
- the email address to checkpublic static boolean isValidName(String name)
Checks if the given name is valid.
name
- the name to check@Deprecated public static String getLogin(AnyWorkObject user)
LOGIN
variable.user
- the user work object.@Deprecated public static String getEmail(AnyWorkObject user)
EMAIL_ADDRESS
variable.user
- the user work object.@Deprecated public static Set<String> getMemberGroups(AnyWorkObject user)
MEMBER_GROUPS
variable.user
- the user work object.public static User convertToUser(AnyWorkObject userAnyWorkObject, SystemGroups systemGroups)
Converts an AnyWorkObject
user to a User
object.
userAnyWorkObject
- the given AnyWorkObject
user to convert to a User
objectsystemGroups
- the system groups of the tenant which are needed to set the roles of the userUser
objectIllegalArgumentException
- if the given AnyWorkObject
user is nullpublic static AnyWorkObject convertToWorkObject(User user)
Converts a User
to an AnyWorkObject
user object.
user
- the given User
to convert to an AnyWorkObject
AnyWorkObject
IllegalArgumentException
- if the given User
object is nullCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.