All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mobi.cangol.mobile.service.plugin.AbstractPlugin Maven / Gradle / Ivy

There is a newer version: 1.2.7
Show newest version
package mobi.cangol.mobile.service.plugin;

import java.util.HashMap;

/**
 * Created by jince on 2017/3/22.
 */

public abstract class AbstractPlugin {
    private boolean mValid = true;
    private HashMap mActions;

    public AbstractPlugin() {
        mActions = new HashMap<>();
        registerActions();
    }

    protected void registerAction(String actionName, AbstractAction action) {
        mActions.put(actionName, action);
    }

    public AbstractAction findAction(String actionName) {
        return mActions.get(actionName);
    }

    public boolean isValid() {
        return mValid;
    }

    protected abstract void registerActions();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy