package BWP.MobileSale.Config;

import BWP.MobileSale.Util.StringUtil;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;

public abstract class ConfigBase {
	String mName;
	Context mContext;
	public ConfigBase(Context context,String name){
		mName = name;
		mContext = context;
	}
	
	public SharedPreferences getStore(){
		if(StringUtil.IsNullOrEmpty(mName)){
			return PreferenceManager.getDefaultSharedPreferences(mContext);
		}else{
			return mContext.getSharedPreferences(mName, Context.MODE_PRIVATE);
		}
	}
	
	public abstract void GetValues(SharedPreferences store);
	
	public abstract void SetValues(Editor store);

}
