@Named(value="userController") @SessionScoped public class UserController extends Object implements Serializable
The controller allows to store up to 50 favorite workitem IDs in the profile.
| Modifier and Type | Field and Description |
|---|---|
static String |
COOKIE_LOCALE |
static String |
DEFAULT_LOCALE |
static String |
ITEM_SIGNATURE_IMAGE |
static String |
ITEM_USER_ICON |
static String |
LINK_PROPERTY |
static String |
LINK_PROPERTY_DEPRECATED |
protected org.imixs.workflow.faces.util.LoginController |
loginController |
static int |
MAX_FAVORITE_ENTRIES |
protected ProfileService |
profileService |
static int |
UPDATE_PROJECT_ACTIVITY_ID |
protected UserGroupService |
userGroupService |
protected org.imixs.workflow.faces.data.WorkflowController |
workflowController |
protected org.imixs.workflow.engine.WorkflowService |
workflowService |
| Constructor and Description |
|---|
UserController() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFavorite(String id) |
String |
getEmail(String aAccount)
This method returns the email for a useraccount
|
List<String> |
getFavoriteIds()
Returns a list with all uniqueids stored in the profile favorites
|
String |
getLanguage()
returns the user language
|
Locale |
getLocale()
This method returns the current user locale.
|
org.imixs.workflow.ItemCollection |
getProfile(String aAccount)
This method returns a cached cloned version of a user profile for a given
useraccount.
|
String |
getUserName(String aAccount)
This method returns the username (displayname) for a useraccount.
|
org.imixs.workflow.ItemCollection |
getWorkitem()
This method returns the current users userprofile entity.
|
void |
init()
The init method is used to load a user profile or automatically create a new
one if no profile for the user is available.
|
boolean |
isFavorite(String id)
Returns true if the uniqueid is stored in the profile favorites
|
boolean |
isMobileUser()
This method returns true if the user may be using a mobile device
|
void |
onWorkflowEvent(org.imixs.workflow.faces.data.WorkflowEvent workflowEvent)
WorkflowEvent listener listens to WORKITEM events to reset the current
username workitem if processed.
|
void |
removeFavorite(String id) |
void |
removeSignature()
removes the current user signature
|
void |
removeUserIcon()
removes the current user icon
|
void |
setLocale(Locale alocale) |
void |
setWorkitem(org.imixs.workflow.ItemCollection aworkitem) |
public static final String LINK_PROPERTY
public static final String LINK_PROPERTY_DEPRECATED
public static final String ITEM_USER_ICON
public static final String ITEM_SIGNATURE_IMAGE
public static final int MAX_FAVORITE_ENTRIES
public static final int UPDATE_PROJECT_ACTIVITY_ID
public static final String DEFAULT_LOCALE
public static final String COOKIE_LOCALE
protected ProfileService profileService
protected UserGroupService userGroupService
protected org.imixs.workflow.engine.WorkflowService workflowService
@Inject protected org.imixs.workflow.faces.util.LoginController loginController
@Inject protected org.imixs.workflow.faces.data.WorkflowController workflowController
@PostConstruct public void init() throws org.imixs.workflow.exceptions.AccessDeniedException, org.imixs.workflow.exceptions.ProcessingErrorException
org.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedExceptionpublic org.imixs.workflow.ItemCollection getWorkitem()
throws org.imixs.workflow.exceptions.AccessDeniedException,
org.imixs.workflow.exceptions.ProcessingErrorException
org.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedExceptionpublic void setWorkitem(org.imixs.workflow.ItemCollection aworkitem)
public Locale getLocale()
public void setLocale(Locale alocale)
public String getLanguage()
public org.imixs.workflow.ItemCollection getProfile(String aAccount)
aName - public String getUserName(String aAccount)
aName - public String getEmail(String aAccount)
aName - public void removeUserIcon()
public void removeSignature()
public void onWorkflowEvent(@Observes
org.imixs.workflow.faces.data.WorkflowEvent workflowEvent)
The method also updates the user Locale
In case a new image is uplaoded the method set the item user.icon. The deprecated item name 'txtusericon' is still supported..
Optional Signature images can be uploaded if the file name starts with 'signatrue.'. If a signature image exists the item 'signature.image' is set
A profile can hole one user.icon and one signature.image. Deprecated images will be removed by this method automatically.
workflowEvent - public boolean isFavorite(String id)
id - public List<String> getFavoriteIds()
public void addFavorite(String id)
public void removeFavorite(String id)
public boolean isMobileUser()
Copyright © 2011–2022 Imixs Software Solutions GmbH. All rights reserved.