Package org.imixs.workflow.engine.adminp
Class JobHandlerRenameUser
java.lang.Object
org.imixs.workflow.engine.adminp.JobHandlerRenameUser
- All Implemented Interfaces:
JobHandler
@DeclareRoles("org.imixs.ACCESSLEVEL.MANAGERACCESS")
@RunAs("org.imixs.ACCESSLEVEL.MANAGERACCESS")
public class JobHandlerRenameUser
extends Object
implements JobHandler
The JobHandlerRenameUser updates the name fields of workitems. A name can be
replaced or added. The following job attributes are expected:
- namFrom - source userID
- namTo - target userID
- keyReplace - if true the source UserID will be replaced with the target UserID, otherwise the target userID will be added
- workitem
- childworkitem
- workitemlob
- $writeaccess
- $readaccess
- $creator
- owner
- namcreator (deprecated)
- Version:
- 1.0
- See Also:
-
Field Summary
Fields inherited from interface org.imixs.workflow.engine.adminp.JobHandler
ISCOMPLETED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionrun
(ItemCollection adminp) This method creates a new AdminP Job to rename userId in workitems.boolean
updateWorkitemUserIds
(ItemCollection entity, String from, String to, boolean replace) Updates read,write and owner of a entity and returns true if an update was necessary
-
Constructor Details
-
JobHandlerRenameUser
public JobHandlerRenameUser()
-
-
Method Details
-
run
This method creates a new AdminP Job to rename userId in workitems.- Specified by:
run
in interfaceJobHandler
- Parameters:
adminp
- description- Returns:
- updated job description
- Throws:
QueryException
AccessDeniedException
AdminPException
-
updateWorkitemUserIds
public boolean updateWorkitemUserIds(ItemCollection entity, String from, String to, boolean replace) throws AccessDeniedException Updates read,write and owner of a entity and returns true if an update was necessary- Parameters:
entity
-from
-to
-replace
-- Returns:
- true if the entiy was modified.
- Throws:
AccessDeniedException
-