package cc.smtweb.biz.mztb.web.base.prelibraryConfiguration;

import cc.smtweb.framework.core.annotation.SwBody;
import cc.smtweb.framework.core.annotation.SwService;
import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleService;
import cc.smtweb.framework.core.mvc.service.AbstractHandler;
import cc.smtweb.framework.core.session.UserSession;

/**
 * Created by 1 at 2023-12-18 11:09:33
 * 页面【[配置前置库连接列表]的服务类
 */
@SwService
public class PrelibraryConfigurationService extends LCSingleService {
    //public final static String TYPE_DEMO = "demo";
    @Override
    protected AbstractHandler createHandler(String type) {
        switch (type) {
            case TYPE_MODEL_LOAD:
                return new PrelibraryConfigurationHandler.PrelibraryConfigurationLoadHandler();
            case TYPE_MODEL_LIST:
                return new PrelibraryConfigurationHandler.PrelibraryConfigurationListHandler();
            case TYPE_MODEL_SAVE:
                return new PrelibraryConfigurationHandler.PrelibraryConfigurationSaveHandler();
        }
        return super.createHandler(type);
    }

/* demo
    //自定义
    public R demo(@SwBody SwMap params, UserSession us) {
        return pageHandler(params, us, TYPE_DEMO, handler -> ((DemoHandler)handler).demo());
    }
*/

}
