Class WorkflowDTO.WatcherStepDTO

Enclosing class:
WorkflowDTO

public static class WorkflowDTO.WatcherStepDTO extends WorkflowDTO.StepDTO<WorkflowDTO.WatcherStepDTO>
  • Constructor Details

    • WatcherStepDTO

      public WatcherStepDTO(WorkflowDTO workflow, String userLoginName)
  • Method Details

    • withUserWatcher

      @Deprecated public WorkflowDTO.WatcherStepDTO withUserWatcher(String userLoginName)
      Deprecated.
      Specify a user as recipient Last invoked of #withUserWatcher(String), #withUserGroupWatcher(String), #withEmailListWatcher(String...) wins
    • withUserWatchers

      public WorkflowDTO.WatcherStepDTO withUserWatchers(String... userLoginNames)
      Specify users as recipients Last invoked of #withUserWatchers(String...), #withUserGroupWatchers(String...), #withEmailListWatcher(String...) wins
    • withUserGroupWatcher

      @Deprecated public WorkflowDTO.WatcherStepDTO withUserGroupWatcher(String userGroupUniqueName)
      Deprecated.
      Specify user group as recipient Last invoked of #withUserWatcher(String), #withUserGroupWatcher(String), #withEmailListWatcher(String...) wins
    • withUserGroupWatchers

      public WorkflowDTO.WatcherStepDTO withUserGroupWatchers(String... userGroupUniqueNames)
      Specify user groups as recipient Last invoked of #withUserWatchers(String...), #withUserGroupWatchers(String...), #withEmailListWatchers(String...) wins
    • withEmailListWatcher

      public WorkflowDTO.WatcherStepDTO withEmailListWatcher(String... emails)
      Instead of specifying a user name or a user group, arbitrary email addresses can be used here Last invoked of #withUserWatchers(String...), #withUserGroupWatchers(String...), #withEmailListWatcher(String...) wins
    • addProperty

      public WorkflowDTO.WatcherStepDTO addProperty(String name, Object value)
    • setReason

      public WorkflowDTO.WatcherStepDTO setReason(String reason)
    • setReason

      public WorkflowDTO.WatcherStepDTO setReason(List<String> reasons)
    • withReasons

      public WorkflowDTO.WatcherStepDTO withReasons(String... reasons)
      Sets explanations for the watcher step.
      Parameters:
      reasons - The reasons why each watcher is notified. The reasons match watchers. E.g. if you have 3 watchers (w1, w2, w3), you can specify up to 3 reasons (r1, r2, r3) and then r1 corresponds to w1, r2 to w2 etc. If you want to put multiple reasons to a single watcher, you need to join the strings and return a single combined reason in the code.
      Returns:
    • getUserWatcher

      public String getUserWatcher()
      Deprecated.
      Return the current watcher (or null if none set or if group watcher)
      Returns:
      The user name
    • getUserWatchers

      public List<String> getUserWatchers()
      Return the current watchers (or null if none set or if group watchers)
      Returns:
      The user names
    • getReason

      @Deprecated public String getReason()
      Deprecated.
      Returns the reason text
      Returns:
      The reason
    • getReasons

      public List<String> getReasons()
      Returns the reason text
      Returns:
      The reason
    • getUserGroupWatcher

      public String getUserGroupWatcher()
      Deprecated.
      Gets user group name in case of group watcher (or null otherwise)
      Returns:
    • getUserGroupWatchers

      public List<String> getUserGroupWatchers()
      Gets user group names in case of group watchers (or null otherwise)
      Returns:
    • getEmailListWatcher

      public String[] getEmailListWatcher()
      Gets the list of email addresses if specified as recipient for this node
      Returns:
    • toMap

      public Map<String,Object> toMap()
      Overrides:
      toMap in class WorkflowDTO.StepDTO<WorkflowDTO.WatcherStepDTO>
    • fromMap

      public void fromMap(Map<String,Object> values)
      Overrides:
      fromMap in class WorkflowDTO.StepDTO<WorkflowDTO.WatcherStepDTO>