package me.timos.thuanle.bbcli.action;

import me.timos.thuanle.bbcli.Configuration;

import java.io.IOException;
import java.util.Map;

public abstract class BaseBatchAction {
    private Configuration mConfig;

    public BaseBatchAction(Configuration config) {
        mConfig = config;
    }

    public Configuration getConfig() {
        return mConfig;
    }

    public void perform() throws IOException {
        int size = getConfig().countRecords();
        for (int i = 0; i < size; i++) {
            performSingleAction(mConfig.getRecord(i));
        }
    }

    protected abstract void performSingleAction(Map<String, String> params) throws IOException;
}

@@ -29,24 +29,62 @@
 li.action;%0A%0A
+import me.timos.thuanle.bbcli.Action;%0A
 import me.ti
@@ -202,24 +202,42 @@
 BatchAction 
+implements Action 
 %7B%0A    privat
@@ -408,32 +408,46 @@
 mConfig;%0A    %7D%0A%0A
+    @Override%0A
     public void 

fix base action