Class ReadonlyProcessCase

java.lang.Object
com.aquima.interactions.process.wrapper.ProcessCaseDelegate
com.aquima.interactions.process.wrapper.ReadonlyProcessCase
All Implemented Interfaces:
IProcessCase

public class ReadonlyProcessCase extends ProcessCaseDelegate
Decorator class that wraps a process case to make it immutable (read-only).
Since:
7.1
Author:
Jon van Leuven
  • Constructor Details

    • ReadonlyProcessCase

      public ReadonlyProcessCase(IProcessCase processCase)
      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 interface IProcessCase
      Overrides:
      createTask in class ProcessCaseDelegate
      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

      public IProcessTask[] getAvailableTasks(IUserData userData)
      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 interface IProcessCase
      Overrides:
      getAvailableTasks in class ProcessCaseDelegate
      Parameters:
      userData - Object containing information about the current user.
      Returns:
      Array containing the process steps that may be executed by the supplied user.
    • getCaseProfile

      public IProfile 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 interface IProcessCase
      Overrides:
      getCaseProfile in class ProcessCaseDelegate
      Returns:
      Object containing the case profile.
    • getCaseProfile

      public IProfile getCaseProfile(CaseDataChangeListener caseDataChangeListener)
      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 interface IProcessCase
      Overrides:
      getCaseProfile in class ProcessCaseDelegate
      Parameters:
      caseDataChangeListener - profile changeListener for retrieving case-data set to the caseProfile
      Returns:
      Object containing the case profile.
    • mapCaseProfile

      public void mapCaseProfile(IMapping mapping, IProfile sourceMappingProfile)
      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 recreated
      sourceMappingProfile - The profile to be used as source for the mapping update
    • clearInternalCaseDataCache

      public void clearInternalCaseDataCache()
      Specified by:
      clearInternalCaseDataCache in interface IProcessCase
      Overrides:
      clearInternalCaseDataCache in class ProcessCaseDelegate
    • unlock

      public void unlock()
      Specified by:
      unlock in interface IProcessCase
      Overrides:
      unlock in class ProcessCaseDelegate
    • addInstance

      public void addInstance(ICaseDataInstance instanceModel)
      Specified by:
      addInstance in interface IProcessCase
      Overrides:
      addInstance in class ProcessCaseDelegate
    • removeInstance

      public void removeInstance(ICaseDataInstance instanceModel)
      Specified by:
      removeInstance in interface IProcessCase
      Overrides:
      removeInstance in class ProcessCaseDelegate