Class ReadonlyProcessCase
java.lang.Object
com.aquima.interactions.process.wrapper.ProcessCaseDelegate
com.aquima.interactions.process.wrapper.ReadonlyProcessCase
- All Implemented Interfaces:
IProcessCase
Decorator class that wraps a process case to make it immutable (read-only).
- Since:
- 7.1
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorDescriptionReadonlyProcessCase
(IProcessCase processCase) Constructs a read-only wrapper for the specified process case. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInstance
(ICaseDataInstance instanceModel) void
createTask
(IUserData userData, String taskName, DateTimeValue startDate, String[] roles) Always throws an InvalidStateException: No modifications allowed on a read only process case.getAvailableTasks
(IUserData userData) This method will returns an array containing all the process tasks that may be executed for the current case.This method returns a read-only object containing the case profile.getCaseProfile
(CaseDataChangeListener caseDataChangeListener) This method returns a read-only object containing the case profile.void
mapCaseProfile
(IMapping mapping, IProfile sourceMappingProfile) This method maps a source profile to the case profile using the specified mapping.void
removeInstance
(ICaseDataInstance instanceModel) void
unlock()
Methods inherited from class com.aquima.interactions.process.wrapper.ProcessCaseDelegate
getCreationDate, getDisplayName, getId, getInstanceModel, getInternalCaseProfile, getName, getProcessCase, getStatus, isLocked
-
Constructor Details
-
ReadonlyProcessCase
Constructs a read-only wrapper for the specified process case.- Parameters:
processCase
- The process case that should be wrapped in this read-only decorator.
-
-
Method Details
-
createTask
public IProcessTask createTask(IUserData userData, String taskName, DateTimeValue startDate, String[] roles) Always throws an InvalidStateException: No modifications allowed on a read only process case.- Specified by:
createTask
in interfaceIProcessCase
- Overrides:
createTask
in classProcessCaseDelegate
- Parameters:
userData
- Object containing information about the current user.taskName
- The name or the description of the task.startDate
- The time at which the task should become active.roles
- The roles that are required to execute the task.- Returns:
- Object representing the newly created task.
-
getAvailableTasks
Description copied from interface:IProcessCase
This method will returns an array containing all the process tasks that may be executed for the current case. If the current case is locked, or no process steps are available, the method will return an empty array. The returned process steps are bound to the user they are requested for.- Specified by:
getAvailableTasks
in interfaceIProcessCase
- Overrides:
getAvailableTasks
in classProcessCaseDelegate
- Parameters:
userData
- Object containing information about the current user.- Returns:
- Array containing the process steps that may be executed by the supplied user.
-
getCaseProfile
Description copied from interface:IProcessCase
This method returns a read-only object containing the case profile. The case profile is updated after each process step that has been executed.- Specified by:
getCaseProfile
in interfaceIProcessCase
- Overrides:
getCaseProfile
in classProcessCaseDelegate
- Returns:
- Object containing the case profile.
-
getCaseProfile
Description copied from interface:IProcessCase
This method returns a read-only object containing the case profile. The case profile is updated after each process step that has been executed.- Specified by:
getCaseProfile
in interfaceIProcessCase
- Overrides:
getCaseProfile
in classProcessCaseDelegate
- Parameters:
caseDataChangeListener
- profile changeListener for retrieving case-data set to the caseProfile- Returns:
- Object containing the case profile.
-
mapCaseProfile
Description copied from interface:IProcessCase
This method maps a source profile to the case profile using the specified mapping.- Parameters:
mapping
- A mapping to be applied after the profile has been recreatedsourceMappingProfile
- The profile to be used as source for the mapping update
-
clearInternalCaseDataCache
public void clearInternalCaseDataCache()- Specified by:
clearInternalCaseDataCache
in interfaceIProcessCase
- Overrides:
clearInternalCaseDataCache
in classProcessCaseDelegate
-
unlock
public void unlock()- Specified by:
unlock
in interfaceIProcessCase
- Overrides:
unlock
in classProcessCaseDelegate
-
addInstance
- Specified by:
addInstance
in interfaceIProcessCase
- Overrides:
addInstance
in classProcessCaseDelegate
-
removeInstance
- Specified by:
removeInstance
in interfaceIProcessCase
- Overrides:
removeInstance
in classProcessCaseDelegate
-