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();
   }
 }
 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();
   }
 }
 public String fetchMetricMap(int sessionId) {
   LimesUser lu = UserManager.getInstance().getUser(sessionId);
   String result = "";
   return JsonParser.parseJavaToJSON(lu.getMetricMap());
 }
 public String fetchTargetData(int sessionId) {
   LimesUser lu = UserManager.getInstance().getUser(sessionId);
   return JsonParser.parseJavaToJSON(lu.getTargetMap());
 }