Ejemplo n.º 1
0
 /**
  * load页面供新增操作
  *
  * @param context
  */
 public void add(Map<String, Object> context) {
   String service = (String) context.get("service");
   if (service != null && service.length() > 0 && !service.contains("*")) {
     List<Provider> providerList = providerService.findByService(service);
     List<String> addressList = new ArrayList<String>();
     for (Provider provider : providerList) {
       addressList.add(provider.getUrl().split("://")[1].split("/")[0]);
     }
     context.put("addressList", addressList);
     context.put("service", service);
     context.put("methods", CollectionUtils.sort(providerService.findMethodsByService(service)));
   } else {
     List<String> serviceList = Tool.sortSimpleName(providerService.findServices());
     context.put("serviceList", serviceList);
   }
   if (context.get("input") != null) context.put("input", context.get("input"));
 }
Ejemplo n.º 2
0
 /**
  * load页面供新增操作
  *
  * @param context
  */
 public void multiadd(Map<String, Object> context) {
   List<String> serviceList = Tool.sortSimpleName(providerService.findServices());
   context.put("serviceList", serviceList);
 }