コード例 #1
0
 public void setSpecification(int sessionId, String source, String target) {
   try {
     HashMap<String, Object> sourceMap = JsonParser.parseJSONToJava(source);
     HashMap<String, Object> targetMap = JsonParser.parseJSONToJava(target);
     LimesUser lu = UserManager.getInstance().getUser(sessionId);
     lu.setSourceMap(sourceMap);
     lu.setTargetMap(targetMap);
     lu.setNoUsageTime(0);
   } catch (ParseException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
コード例 #2
0
 public void setMetricSpec(int sessionId, String metricMap) {
   try {
     HashMap<String, Object> metricJMap = JsonParser.parseJSONToJava(metricMap);
     LimesUser lu = UserManager.getInstance().getUser(sessionId);
     log.info(metricMap);
     lu.setMetricMap(metricJMap);
     lu.setNoUsageTime(0);
   } catch (ParseException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
コード例 #3
0
 public String fetchMetricMap(int sessionId) {
   LimesUser lu = UserManager.getInstance().getUser(sessionId);
   String result = "";
   return JsonParser.parseJavaToJSON(lu.getMetricMap());
 }
コード例 #4
0
 public String fetchTargetData(int sessionId) {
   LimesUser lu = UserManager.getInstance().getUser(sessionId);
   return JsonParser.parseJavaToJSON(lu.getTargetMap());
 }