public final class UserUtils extends Object
Modifier and Type | Field and Description |
---|---|
static com.edorasware.commons.core.entity.VariableName<String,String> |
ADDRESS
The variable that holds the address of the user.
|
static com.edorasware.commons.core.entity.VariableName<Boolean,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.commons.core.entity.VariableName<Map<String,Map<String,String>>,Map<String,Map<String,String>>> |
CONFIGURATION
The variable that holds the configuration object of a user.
|
static com.edorasware.commons.core.entity.VariableName<List<User.DeputyUser>,List<Map<String,Object>>> |
DEPUTIES |
static com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> |
DEPUTY_ACTIVE |
static com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> |
DEPUTY_NOTIFY |
static com.edorasware.commons.core.entity.VariableName<String,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.commons.core.entity.VariableName<String,String> |
EMAIL_ADDRESS
The variable that holds the email address of the user.
|
static com.edorasware.commons.core.entity.VariableName<String,String> |
FIRST_NAME
The variable that holds the first name of the user.
|
static com.edorasware.commons.core.entity.VariableName<String,String> |
HOME_URL
The variable that holds the home url of the user.
|
static com.edorasware.commons.core.entity.VariableName<String,String> |
LANGUAGE
The variable that holds the language of the user.
|
static com.edorasware.commons.core.entity.VariableName<String,String> |
LAST_NAME
The variable that holds the last name of the user.
|
static com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> |
LIVE_PREVIEW
The variable that holds the live preview flag of the user.
|
static com.edorasware.commons.core.entity.VariableName<String,String> |
LOGIN
The variable that holds the login of the user.
|
static com.edorasware.commons.core.entity.VariableName<Set<com.edorasware.commons.core.entity.GroupId>,Set<com.edorasware.commons.core.entity.GroupId>> |
MEMBER_GROUPS
The variable that holds the work object ids of the groups the user is a member of.
|
static com.edorasware.commons.core.entity.VariableName<String,String> |
MOBILE_NUMBER
The variable that holds the mobile number of the user.
|
static com.edorasware.commons.core.entity.VariableName<String,String> |
NOTES
The variable that holds additional notes of the user.
|
static com.edorasware.commons.core.entity.VariableName<Boolean,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.commons.core.entity.VariableName<Boolean,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.commons.core.entity.VariableName<Boolean,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.commons.core.entity.VariableName<Boolean,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.commons.core.entity.VariableName<String,String> |
ORIGIN_USER_ID |
static com.edorasware.commons.core.entity.VariableName<String,String> |
ORIGIN_USER_LOGIN |
static com.edorasware.commons.core.entity.VariableName<String,String> |
ORIGIN_USER_NAME |
static com.edorasware.commons.core.entity.VariableName<String,String> |
PASSWORD
The variable that holds the password of the user.
|
static com.edorasware.commons.core.entity.VariableName<String,String> |
PHONE_NUMBER
The variable that holds the phone number of the user.
|
static com.edorasware.commons.core.entity.VariableName<List<Map<String,Object>>,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<com.edorasware.commons.core.entity.GroupId> |
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.commons.core.entity.VariableName<String,String> FIRST_NAME
public static final com.edorasware.commons.core.entity.VariableName<String,String> LAST_NAME
public static final com.edorasware.commons.core.entity.VariableName<String,String> LOGIN
public static final com.edorasware.commons.core.entity.VariableName<String,String> PASSWORD
public static final com.edorasware.commons.core.entity.VariableName<String,String> LANGUAGE
public static final com.edorasware.commons.core.entity.VariableName<String,String> EMAIL_ADDRESS
public static final com.edorasware.commons.core.entity.VariableName<String,String> PHONE_NUMBER
public static final com.edorasware.commons.core.entity.VariableName<String,String> MOBILE_NUMBER
public static final com.edorasware.commons.core.entity.VariableName<String,String> ADDRESS
public static final com.edorasware.commons.core.entity.VariableName<String,String> NOTES
public static final com.edorasware.commons.core.entity.VariableName<Set<com.edorasware.commons.core.entity.GroupId>,Set<com.edorasware.commons.core.entity.GroupId>> MEMBER_GROUPS
public static final com.edorasware.commons.core.entity.VariableName<String,String> HOME_URL
public static final com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> LIVE_PREVIEW
public static final com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> NOTIFY_OWNER_WORK_ITEM_MODIFIED
public static final com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> NOTIFY_ASSIGNEE_WORK_ITEM_MODIFIED
public static final com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> NOTIFY_NEW_ASSIGNEE_OF_WORK_ITEM
public static final com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> NOTIFY_NEW_CANDIDATE_ASSIGNEE_OF_WORK_ITEM
public static final com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> ADMIN_USER_VARIABLE
public static final com.edorasware.commons.core.entity.VariableName<Map<String,Map<String,String>>,Map<String,Map<String,String>>> CONFIGURATION
The variable that holds the configuration object of a user. The configuration map is structured the following way:
{ "edorasVis": { "property1": "value1", ... }, }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.commons.core.entity.VariableName<String,String> DEPUTY_USER_ID
public static final com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> DEPUTY_NOTIFY
public static final com.edorasware.commons.core.entity.VariableName<Boolean,Boolean> DEPUTY_ACTIVE
public static final com.edorasware.commons.core.entity.VariableName<List<User.DeputyUser>,List<Map<String,Object>>> DEPUTIES
public static final com.edorasware.commons.core.entity.VariableName<List<Map<String,Object>>,List<Map<String,Object>>> USERS_TO_IMPERSONATE
public static final com.edorasware.commons.core.entity.VariableName<String,String> ORIGIN_USER_ID
public static final com.edorasware.commons.core.entity.VariableName<String,String> ORIGIN_USER_NAME
public static final com.edorasware.commons.core.entity.VariableName<String,String> ORIGIN_USER_LOGIN
public static final String EDORAS_VIS_CONFIGURATION_KEY
CONFIGURATION
map.public UserUtils(String emailValidationPattern)
public boolean isValidEmailAddress(String email)
email
- the email address to checkpublic static boolean isValidName(String name)
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<com.edorasware.commons.core.entity.GroupId> 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)
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)
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 - 2017 edorasware ag. All Rights Reserved.