
package com.jeelowcode.core.framework.config.btncommand.receiver;

import com.jeelowcode.core.framework.config.btncommand.definable.DefinablePluginManager;

/**
 * 自定义按钮执行者
 */
public class ButtonReceiverDefinable implements IButtonCommandReceiver<Object> {


    private String pluginKey;

    private Object param;

    public ButtonReceiverDefinable(String pluginKey, Object param) {
        this.pluginKey = pluginKey;
        this.param = param;

    }

    /**
     * 执行命令
     * @return
     */
    @Override
    public Object receiver() {
        DefinablePluginManager definablePluginManager=new DefinablePluginManager();
        return definablePluginManager.executePlugin(pluginKey, param);
    }

}
