package com.seeyon.apps.src_flowIntegration.config;

import com.seeyon.apps.common.config.ICstConfigApi;
import com.seeyon.apps.common.plugin.vo.ConfigVo;
import com.seeyon.apps.src_flowIntegration.constants.FlowIntegrationConstants;
import com.seeyon.ctp.common.AppContext;
import org.springframework.stereotype.Component;

import static com.seeyon.apps.src_flowIntegration.constants.FlowIntegrationConstants.getPluginId;


@Component("src_flowIntegration.flowIntegrationConfigProvider")
public class FlowIntegrationConfigProvider {

    protected ICstConfigApi cstConfigApi = (ICstConfigApi) AppContext.getBean("cstConfigApi");

    public String getBizConfigByKey(FlowIntegrationConstants key) {
        ConfigVo config = cstConfigApi.getConfig(getPluginId());
        return config.getParamVal(key.name());
    }
}
