public class UserUtils extends Object
Provides utility methods and constants related to working with users.
Modifier and Type | Field and Description |
---|---|
static com.edorasware.api.value.StringValue<String> |
ADDRESS
The variable that holds the address of the user.
|
static com.edorasware.api.value.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 com.edorasware.api.value.ComplexValue<Map<String,Map<String,String>>> |
CONFIGURATION
<p>The variable that holds the configuration object of a user.
|
static com.edorasware.api.value.ComplexValue<List<User.DeputyUser>> |
DEPUTIES |
static com.edorasware.api.value.BooleanValue<Boolean> |
DEPUTY_ACTIVE |
static com.edorasware.api.value.BooleanValue<Boolean> |
DEPUTY_NOTIFY |
static com.edorasware.api.value.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 com.edorasware.api.value.StringValue<String> |
EMAIL_ADDRESS
The variable that holds the email address of the user.
|
static com.edorasware.api.value.StringValue<String> |
FIRST_NAME
The variable that holds the first name of the user.
|
static com.edorasware.api.value.StringValue<String> |
HOME_URL
The variable that holds the home url of the user.
|
static com.edorasware.api.value.StringValue<String> |
LANGUAGE
The variable that holds the language of the user.
|
static com.edorasware.api.value.StringValue<String> |
LAST_NAME
The variable that holds the last name of the user.
|
static com.edorasware.api.value.BooleanValue<Boolean> |
LIVE_PREVIEW
The variable that holds the live preview flag of the user.
|
static com.edorasware.api.value.StringValue<String> |
LOGIN
The variable that holds the login of the user.
|
static com.edorasware.api.value.ComplexValue<Set<String>> |
MEMBER_GROUPS
The variable that holds the work object ids of the groups the user is a member of.
|
static com.edorasware.api.value.StringValue<String> |
MOBILE_NUMBER
The variable that holds the mobile number of the user.
|
static com.edorasware.api.value.StringValue<String> |
NOTES
The variable that holds additional notes of the user.
|
static com.edorasware.api.value.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 com.edorasware.api.value.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 com.edorasware.api.value.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 com.edorasware.api.value.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 com.edorasware.api.value.StringValue<String> |
ORIGIN_USER_ID |
static com.edorasware.api.value.StringValue<String> |
ORIGIN_USER_LOGIN |
static com.edorasware.api.value.StringValue<String> |
ORIGIN_USER_NAME |
static com.edorasware.api.value.StringValue<String> |
PASSWORD
The variable that holds the password of the user.
|
static com.edorasware.api.value.StringValue<String> |
PHONE_NUMBER
The variable that holds the phone number of the user.
|
static com.edorasware.api.value.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(com.edorasware.commons.core.any.AnyWorkObject userAnyWorkObject,
SystemGroups systemGroups)
Converts an
AnyWorkObject user to a User object. |
static com.edorasware.commons.core.any.AnyWorkObject |
convertToWorkObject(User user)
Converts a
User to an AnyWorkObject user object. |
static String |
getEmail(com.edorasware.commons.core.any.AnyWorkObject user)
Deprecated.
Please use the
EMAIL_ADDRESS variable. |
static String |
getLogin(com.edorasware.commons.core.any.AnyWorkObject user)
Deprecated.
Please use the
LOGIN variable. |
static Set<String> |
getMemberGroups(com.edorasware.commons.core.any.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 com.edorasware.api.value.StringValue<String> FIRST_NAME
The variable that holds the first name of the user.
public static final com.edorasware.api.value.StringValue<String> LAST_NAME
The variable that holds the last name of the user.
public static final com.edorasware.api.value.StringValue<String> LOGIN
The variable that holds the login of the user.
public static final com.edorasware.api.value.StringValue<String> PASSWORD
The variable that holds the password of the user.
public static final com.edorasware.api.value.StringValue<String> LANGUAGE
The variable that holds the language of the user.
public static final com.edorasware.api.value.StringValue<String> EMAIL_ADDRESS
The variable that holds the email address of the user.
public static final com.edorasware.api.value.StringValue<String> PHONE_NUMBER
The variable that holds the phone number of the user.
public static final com.edorasware.api.value.StringValue<String> MOBILE_NUMBER
The variable that holds the mobile number of the user.
public static final com.edorasware.api.value.StringValue<String> ADDRESS
The variable that holds the address of the user.
public static final com.edorasware.api.value.StringValue<String> NOTES
The variable that holds additional notes of the user.
public static final com.edorasware.api.value.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 com.edorasware.api.value.StringValue<String> HOME_URL
The variable that holds the home url of the user.
public static final com.edorasware.api.value.BooleanValue<Boolean> LIVE_PREVIEW
The variable that holds the live preview flag of the user.
public static final com.edorasware.api.value.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 com.edorasware.api.value.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 com.edorasware.api.value.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 com.edorasware.api.value.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 com.edorasware.api.value.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 com.edorasware.api.value.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 com.edorasware.api.value.StringValue<String> DEPUTY_USER_ID
The variable that holds the user information who can act as user deputy.
public static final com.edorasware.api.value.BooleanValue<Boolean> DEPUTY_NOTIFY
public static final com.edorasware.api.value.BooleanValue<Boolean> DEPUTY_ACTIVE
public static final com.edorasware.api.value.ComplexValue<List<User.DeputyUser>> DEPUTIES
public static final com.edorasware.api.value.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 com.edorasware.api.value.StringValue<String> ORIGIN_USER_ID
public static final com.edorasware.api.value.StringValue<String> ORIGIN_USER_NAME
public static final com.edorasware.api.value.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(com.edorasware.commons.core.any.AnyWorkObject user)
LOGIN
variable.user
- the user work object.@Deprecated public static String getEmail(com.edorasware.commons.core.any.AnyWorkObject user)
EMAIL_ADDRESS
variable.user
- the user work object.@Deprecated public static Set<String> getMemberGroups(com.edorasware.commons.core.any.AnyWorkObject user)
MEMBER_GROUPS
variable.user
- the user work object.public static User convertToUser(com.edorasware.commons.core.any.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 com.edorasware.commons.core.any.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 - 2018 edorasware ag. All Rights Reserved.