-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- now uses ActionEnum - takes outcome_id as argument when available
- Loading branch information
1 parent
5da30ae
commit b2d611a
Showing
6 changed files
with
36 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
"""Base for all action handlers""" | ||
from abc import ABC, abstractmethod | ||
|
||
from api.models.action import ActionEnum | ||
|
||
class ActionBase(ABC): # pylint: disable=too-few-public-methods | ||
|
||
class ActionFactory(ABC): # pylint: disable=too-few-public-methods | ||
"""Base class for action handlers""" | ||
|
||
@abstractmethod | ||
def run(self, params): | ||
"""Perform the action""" | ||
|
||
|
||
ACTION_HANDLER_CLASS_MAPS = { | ||
ActionEnum.LOCK_WORK_START_DATE : "DisableWorkStartDate" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters