package com.qhclh.ytzh.configs;

import android.content.Context;
import android.content.SharedPreferences;

import org.forks.jsonrpc.RpcFacade;


public class ServerConfig extends ConfigBase {

    String JPUSH_TAG_KEY="jpushtagkey";
    String SYSTEMSET_ENABLE_SCAN="systemset_enable_scan";
    String ENABLE_Catogray="systemset_enable_catogray";
    String ENABLE_MoneyTipe="systemset_enable_moneytipe";
    String ENABLE_StoreGoods="systemset_enable_storegoods";

    public ServerConfig(Context context) {
        super(context, "");
    }

    @Override
    public void GetValues(SharedPreferences store) {
        mServerUri = store.getString(RpcFacade.SERVER_URI_PREFKEY, "");
        mTag = store.getString(JPUSH_TAG_KEY, "");
        mEnableGoodsScan = store.getBoolean(SYSTEMSET_ENABLE_SCAN,false);
        mEnableGoodsCatogray = store.getBoolean(ENABLE_Catogray,false);
        mEnablMoneyTipe = store.getBoolean(ENABLE_MoneyTipe,false);
        mEnablStoreGoods = store.getBoolean(ENABLE_StoreGoods,false);

    }

    @Override
    public void SetValues(SharedPreferences.Editor store) {
        store.putString(RpcFacade.SERVER_URI_PREFKEY, getServerUri());
        store.putString(JPUSH_TAG_KEY, getTag());
        store.putBoolean(SYSTEMSET_ENABLE_SCAN,getEnableGoodsScan());
        store.putBoolean(ENABLE_Catogray,getEnableGoodsCatogray());
        store.putBoolean(ENABLE_MoneyTipe,getEnableMoneyTipe());
        store.putBoolean(ENABLE_StoreGoods,getEnableStoreGoods());
    }

    private String mServerUri;
    private String mTag;

    public String getServerUri() {
        return mServerUri;
    }

    public void setServerUri(String value) {
        mServerUri = value;
    }


    public String getTag() {
        return mTag;
    }

    public void setTag(String value) {
        mTag = value;
    }

    private boolean mEnableGoodsScan;
    public boolean getEnableGoodsScan() {
        return mEnableGoodsScan;
    }
    public void setEnableGoodsScang(boolean value) {
        mEnableGoodsScan = value;
    }

    private boolean mEnableGoodsCatogray;
    public boolean getEnableGoodsCatogray() {
        return mEnableGoodsCatogray;
    }
    public void setEnableGoodsCatogray(boolean value) {
        mEnableGoodsCatogray = value;
    }

    private boolean mEnablMoneyTipe;
    public boolean getEnableMoneyTipe() {
        return mEnablMoneyTipe;
    }
    public void setEnableMoneyTipe(boolean value) {
        mEnablMoneyTipe = value;
    }

    private boolean mEnablStoreGoods;
    public boolean getEnableStoreGoods() {
        return mEnablStoreGoods;
    }
    public void setEnableStoreGoods(boolean value) {
        mEnablStoreGoods = value;
    }
}
