classdef Action < handle & matlab.mixin.Heterogeneous
    %ACTION parent class of all concrete Actions
    
    %   Copyright 2019 The MathWorks, Inc.
    
    properties(SetAccess = protected)
        ID string
        SettingValueGetterStrategy fxptui.internal.workflowsetting.settingvaluegetterstrategy.SettingValueGetterStrategy
        SettingValueSetterStrategy fxptui.internal.workflowsetting.settingvaluesetterstrategy.SettingValueSetterStrategy
    end
    
    methods(Sealed)
        
        function execute(this, engine, workflowSetting)
            % check whether the Action meets the conditions to be executed
            this.executeLocal(engine, workflowSetting);
        end        
        
        function setID(this, id)
            this.ID = id;
        end
        
        function setSettingValueGetterStrategy(this, strategy)
            this.SettingValueGetterStrategy = strategy;
        end
        
        function setSettingValueSetterStrategy(this, strategy)
            this.SettingValueSetterStrategy = strategy;
        end
        
    end
    
    methods(Abstract, Access = {?fxptui.internal.action.Action, ?WorkflowTestCase})
        executeLocal(this, converter, workflowSettings);
    end
    
end
