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

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


  }

  public boolean delete(Long[] ids, Map<String, Object> context) {
    String service = (String) context.get("service");
    String username = (String) context.get("username");
    Owner owner = new Owner();
    owner.setService(service);
    owner.setUsername(username);
    if (service == null || service.length() == 0
            || username == null || username.length() == 0){
            context.put("message", getMessage("NoSuchOperationData"));
            return false;
        }
View Full Code Here


    private List<Owner> toOverrideLiset(List<Provider> pList, List<Override> cList){
        Map<String, Owner> oList = new HashMap<String, Owner>();
        for(Provider p : pList){
            if(p.getUsername() != null){
              for (String username : Constants.COMMA_SPLIT_PATTERN.split(p.getUsername())) {
                  Owner o = new Owner();
                  o.setService(p.getService());
                  o.setUsername(username);
                  oList.put(o.getService() + "/" + o.getUsername(), o);
              }
            }
        }
        for(Override c : cList){
          Map<String, String> params = StringUtils.parseQueryString(c.getParams());
          String usernames = params.get("owner");
            if(usernames != null && usernames.length() > 0){
              for (String username : Constants.COMMA_SPLIT_PATTERN.split(usernames)) {
                Owner o = new Owner();
                    o.setService(c.getService());
                    o.setUsername(username);
                    oList.put(o.getService() + "/" + o.getUsername(), o);
              }
            }
        }
        return new ArrayList<Owner>(oList.values());
    }
View Full Code Here

TOP

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

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.