Package com.alimama.mdrill.ui.service

Source Code of com.alimama.mdrill.ui.service.AdhocUi

package com.alimama.mdrill.ui.service;

import java.util.HashMap;
import java.util.Map;

import backtype.storm.utils.Utils;

import com.alimama.mdrill.json.JSONArray;
import com.alimama.mdrill.json.JSONException;
import com.alimama.mdrill.json.JSONObject;
import com.alimama.web.TableList;

public class AdhocUi {
 
  public static String getTableListForUi() throws Exception
  {
    JSONObject jsonObj = new JSONObject();
    jsonObj.put("code", 1);
    jsonObj.put("message", "success");
   
    JSONArray modules = new JSONArray();
   
   
    HashMap<String,JSONObject> tableInfo=new HashMap<String, JSONObject>();
//    {
//      "moduleName": "P4P-推广",
//      "moduleId": "3",
//      "moduleTableName":"rpt_p4padhoc_product",
//      "begin":"2012-10-10",
//            "dateLimit": -30
//    }
    for(String s:TableList.getTablelist())
    {
      JSONObject item=new JSONObject();
      item.put("moduleName", s);
      item.put("moduleId", s);
    }
    Map stormconf = Utils.readStormConfig();
    String uiconfpath=(String) stormconf.get("higo.ui.conf.dir");


   
    return jsonObj.toString();
  }
}
TOP

Related Classes of com.alimama.mdrill.ui.service.AdhocUi

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.