@DeclareRoles(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) @RolesAllowed(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) public class ProfileService extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CREATE_PROFILE_ACTIVITY_ID |
protected javax.enterprise.event.Event<ProfileEvent> |
profileEvents |
static int |
START_PROFILE_PROCESS_ID |
protected org.imixs.workflow.engine.WorkflowService |
workflowService |
| Constructor and Description |
|---|
ProfileService() |
| Modifier and Type | Method and Description |
|---|---|
org.imixs.workflow.ItemCollection |
cloneWorkitem(org.imixs.workflow.ItemCollection aWorkitem)
This method closes a profile entity and computes the attributes txtUsername
and txtInitials
|
org.imixs.workflow.ItemCollection |
createProfile(String userid,
String locale)
Creates a new profile document
|
void |
discardCache(String userid)
This method removes a profile from the cache.
|
org.imixs.workflow.ItemCollection |
findProfileById(String userid)
This method returns a profile by its id.
|
org.imixs.workflow.ItemCollection |
findProfileById(String userid,
boolean refresh)
This method returns a profile by its id.
|
org.imixs.workflow.ItemCollection |
lookupProfileById(String userid)
This method returns a profile by its id.
|
void |
reset()
resets the profile cache..
|
public static final int START_PROFILE_PROCESS_ID
public static final int CREATE_PROFILE_ACTIVITY_ID
protected org.imixs.workflow.engine.WorkflowService workflowService
@Inject protected javax.enterprise.event.Event<ProfileEvent> profileEvents
public void reset()
public org.imixs.workflow.ItemCollection findProfileById(String userid)
userid - - the profile idpublic org.imixs.workflow.ItemCollection findProfileById(String userid, boolean refresh)
The returned workitem is a cloned version of the profile entity and can not be processed or updated. Use lookupProfile to get the full entity of a profile.
If the boolean 'refresh' is true the method lookup the user in any case with a search query and updates the cache.
userid - - the profile idrefresh - - boolean indicates if the internal cache should be usedpublic org.imixs.workflow.ItemCollection lookupProfileById(String userid)
Use findProfileById to work with the internal cache if there is no need to update the profile.
The method also fires a ProfileEvent which can be observed by clients to provide a different behavior. For example a LDAPService can lookup the data in a LDAP directory if a local profile was not found (see issue #343)
userid - - the profile idpublic void discardCache(String userid)
userid - public org.imixs.workflow.ItemCollection cloneWorkitem(org.imixs.workflow.ItemCollection aWorkitem)
aWorkitem - public org.imixs.workflow.ItemCollection createProfile(String userid, String locale) throws org.imixs.workflow.exceptions.AccessDeniedException, org.imixs.workflow.exceptions.ProcessingErrorException, org.imixs.workflow.exceptions.PluginException, org.imixs.workflow.exceptions.ModelException
userid - org.imixs.workflow.exceptions.ModelExceptionorg.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedExceptionCopyright © 2011–2022 Imixs Software Solutions GmbH. All rights reserved.