Examples of RoleItem


Examples of com.adito.security.RoleItem

        if (roles == null) {
            return Collections.emptyList();
        }
        Collection<RoleItem> items = new ArrayList<RoleItem>();
        for (Role role : roles) {
            items.add(new RoleItem(role));
        }
        return items;
    }
View Full Code Here

Examples of org.butor.auth.common.role.RoleItem

      List<RoleItem> oldFuncs = readRole(role.getId(), cra);
      dataTL.set(oldFuncs);
      Iterator<RoleItem> it = oldFuncs.iterator();
      while (it.hasNext()) {
        boolean funcRemoved = true;
        RoleItem ori = it.next();
        for (RoleItem ri : funcs) {
          if (ri.getFunc().equalsIgnoreCase(ori.getFunc()) && ri.getSys().equalsIgnoreCase(ori.getSys())) {
            funcRemoved = false;
            continue; // role still exists
          }
        }
        if (funcRemoved) {
          RoleItemKey rik = new RoleItemKey(role.getId(), ori.getFunc(), ori.getSys(), ori.getRevNo());
          deleteItem(rik, cra);
          it.remove();
        }
      }
      for (RoleItem ri : funcs) {
        boolean funcAdded = true;
        for (RoleItem ori : oldFuncs) {
          if (ri.getFunc().equalsIgnoreCase(ori.getFunc()) && ri.getSys().equalsIgnoreCase(ori.getSys())) {
            funcAdded = false;
            continue; // role still exists
          }
        }
        if (funcAdded) {
View Full Code Here

Examples of org.butor.auth.common.role.RoleItem

    List<RoleItem> funcs = role.getItems();
    List<RoleItem> oldFuncs = readRole(role.getId(), cra);
    Iterator<RoleItem> it = oldFuncs.iterator();
    while (it.hasNext()) {
      boolean funcRemoved = true;
      RoleItem ori = it.next();
      for (RoleItem ri : funcs) {
        if (ri.getFunc().equalsIgnoreCase(ori.getFunc()) && ri.getSys().equalsIgnoreCase(ori.getSys())) {
          funcRemoved = false;
          continue; // role still exists
        }
      }
      if (funcRemoved) {
        RoleItemKey rik = new RoleItemKey(role.getId(), ori.getFunc(), ori.getSys(), ori.getRevNo());
        deleteItem(rik, cra);
        it.remove();
      }
    }
    for (RoleItem ri : funcs) {
      boolean funcAdded = true;
      for (RoleItem ori : oldFuncs) {
        if (ri.getFunc().equalsIgnoreCase(ori.getFunc()) && ri.getSys().equalsIgnoreCase(ori.getSys())) {
          funcAdded = false;
          continue; // role still exists
        }
      }
      if (funcAdded) {
View Full Code Here

Examples of org.butor.auth.common.role.RoleItem

    List<RoleItem> funcs = role.getItems();
    List<RoleItem> oldFuncs = readRole(role.getId(), cra);
    Iterator<RoleItem> it = oldFuncs.iterator();
    while (it.hasNext()) {
      boolean funcRemoved = true;
      RoleItem ori = it.next();
      for (RoleItem ri : funcs) {
        if (ri.getFunc().equalsIgnoreCase(ori.getFunc()) && ri.getSys().equalsIgnoreCase(ori.getSys())) {
          funcRemoved = false;
          continue; // role still exists
        }
      }
      if (funcRemoved) {
        RoleItemKey rik = new RoleItemKey(role.getId(), ori.getFunc(), ori.getSys(), ori.getRevNo());
        deleteItem(rik, cra);
        it.remove();
      }
    }
    for (RoleItem ri : funcs) {
      boolean funcAdded = true;
      for (RoleItem ori : oldFuncs) {
        if (ri.getFunc().equalsIgnoreCase(ori.getFunc()) && ri.getSys().equalsIgnoreCase(ori.getSys())) {
          funcAdded = false;
          continue; // role still exists
        }
      }
      if (funcAdded) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.