コード例 #1
0
 public Object doGetInfoDetailTask(Task task) {
   Object result = null;
   Map<String, Object> taskParams = task.getTaskParams();
   String infoSource = (String) taskParams.get(Info.INFO_SOURCE);
   String infoType = (String) taskParams.get(Info.INFO_TYPE);
   String getinfo_detail_url =
       HttpClientUtil.BASE_URL + "data/news/detail?source=" + infoSource + "&type=" + infoType;
   if (infoType.equals("2") || infoType.equals("5")) {
     getinfo_detail_url =
         HttpClientUtil.BASE_URL + "data/news/detail_2?source=" + infoSource + "&type=" + infoType;
   }
   try {
     String jsonString = HttpClientUtil.getRequest(getinfo_detail_url);
     int type = Integer.parseInt(infoType);
     result = JsonUtil.getInfoDetail(type, jsonString);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return result;
 }