Class ResetCommand

java.lang.Object
org.tasktide.core.manager.command.commands.AbstractCommand
org.tasktide.core.manager.command.commands.ResetCommand
All Implemented Interfaces:
ManagerCommand

public class ResetCommand extends AbstractCommand
Command class handling resetting TaskTideModel
  • Constructor Details

  • Method Details

    • runCommand

      public Object runCommand()
      Handles whether to reset a single, or collection of WorkItem. Throwing IllegalStateException for all but RESET_ITEM, or RESET_ITEMS
      Specified by:
      runCommand in class AbstractCommand
      Returns:
    • validateCommand

      public boolean validateCommand()
      Validates whether command spec provided is sufficient for required ManagerAction. Throwing IllegalStateException for all but RESET_ITEM, or RESET_ITEMS
      Returns:
      boolean
    • resetWorkItem

      public WorkItem resetWorkItem()
      Resets configured "Item Id", returning the updated WorkItem
      Returns:
      WorkItem
    • resetItems

      public int resetItems()
      Iteratively reset provided list of WorkItem Ids
      Returns:
      int