Class ResetCommand
java.lang.Object
org.tasktide.core.manager.command.commands.AbstractCommand
org.tasktide.core.manager.command.commands.ResetCommand
- All Implemented Interfaces:
ManagerCommand
Command class handling resetting
TaskTideModel-
Field Summary
Fields inherited from class AbstractCommand
action, cmdSpec, cmdType, target -
Constructor Summary
ConstructorsConstructorDescriptionResetCommand(ManagerAction action, ManagerTarget target, CommandSpec cmdSpec, CommandType cmdType) Construct reset command -
Method Summary
Modifier and TypeMethodDescriptionintIteratively reset provided list ofWorkItemIdsResets configured "Item Id", returning the updatedWorkItemHandles whether to reset a single, or collection ofWorkItem.booleanValidates whether command spec provided is sufficient for requiredManagerAction.Methods inherited from class AbstractCommand
execute, getAction, getCmdSpec, getCmdType, getTarget, toJsonDoc, toJsonString, toString
-
Constructor Details
-
ResetCommand
public ResetCommand(ManagerAction action, ManagerTarget target, CommandSpec cmdSpec, CommandType cmdType) Construct reset command- Parameters:
action-target-cmdSpec-cmdType-
-
-
Method Details
-
runCommand
Handles whether to reset a single, or collection ofWorkItem. Throwing IllegalStateException for all but RESET_ITEM, or RESET_ITEMS- Specified by:
runCommandin classAbstractCommand- Returns:
-
validateCommand
public boolean validateCommand()Validates whether command spec provided is sufficient for requiredManagerAction. Throwing IllegalStateException for all but RESET_ITEM, or RESET_ITEMS- Returns:
- boolean
-
resetWorkItem
-
resetItems
-