Package com.alibaba.dubbo.registry.common.domain

Examples of com.alibaba.dubbo.registry.common.domain.Weight


            }
        }
       
        for(String aimService : aimServices) {
            for (String a : addresses) {
                Weight wt = new Weight();
                wt.setUsername((String)context.get("operator"));
                wt.setAddress(Tool.getIP(a));
                wt.setService(aimService);
                wt.setWeight(w);
                overrideService.saveOverride(OverrideUtils.weightToOverride(wt));
            }
        }
        return true;
    }
View Full Code Here


     * load weight对象供编辑操作
     * @param id
     * @param context
     */
    public void show(Long id, Map<String, Object> context) {
      Weight weight = OverrideUtils.overrideToWeight(overrideService.findById(id));
        context.put("weight", weight);
    }
View Full Code Here

     * @param ids
     * @return
     */
    public boolean delete(Long[] ids, Map<String, Object> context) {
        for (Long id : ids) {
            Weight w = OverrideUtils.overrideToWeight(overrideService.findById(id));
            if (!super.currentUser.hasServicePrivilege(w.getService())) {
                context.put("message", getMessage("HaveNoServicePrivilege", w.getService()));
                return false;
            }
        }
       
        for (Long id : ids) {
View Full Code Here

                   continue;
               }else{
                   Map<String,String> params = StringUtils.parseQueryString(o.getParams());
                   for(Map.Entry<String, String> entry : params.entrySet()){
                       if(entry.getKey().equals("weight")){
                           Weight weight = new Weight();
                           weight.setAddress(o.getAddress());
                           weight.setId(o.getId());
                           weight.setService(o.getService());
                           weight.setWeight(Integer.valueOf(entry.getValue()));
                           weights.add(weight);
                       }
                   }
               }
           }
View Full Code Here

TOP

Related Classes of com.alibaba.dubbo.registry.common.domain.Weight

Copyright © 2018 www.massapicom. 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.