Package org.butor.auth.common.role

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


          CommonMessageID.SERVICE_FAILURE.getMessage());
      return;
    }
    for (RoleItem item : items) {
      item.setRoleId(role.getId());
      RoleItemKey uk = roleDao.insertItem(item, cra);
      if (uk == null) {
        ApplicationException.exception(
            CommonMessageID.SERVICE_FAILURE.getMessage());
        return;
      }
View Full Code Here


          CommonMessageID.SERVICE_FAILURE.getMessage());
      return;
    }
    for (RoleItem item : items) {
      item.setRoleId(role.getId());
      RoleItemKey uk = roleDao.insertItem(item, cra);
      if (uk == null) {
        ApplicationException.exception(
            CommonMessageID.SERVICE_FAILURE.getMessage());
        return;
      }
View Full Code Here

    try {
      List<RoleItem> oldFuncs = readRole(roleKey.getId(), cra);
      dataTL.set(oldFuncs);
      for (RoleItem ori : oldFuncs) {
        // func removed
        RoleItemKey rik = new RoleItemKey(roleKey.getId(), ori.getFunc(), ori.getSys(), ori.getRevNo());
        deleteItem(rik, cra);
      }
    } finally {
      dataTL.remove();
    }
View Full Code Here

            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) {
          ri.setRoleId(role.getId());
          RoleItemKey uk = insertItem(ri, cra);
          if (uk == null) {
            ApplicationException.exception(
                CommonMessageID.SERVICE_FAILURE.getMessage());
            return;
          }
View Full Code Here

    item.setRevNo(0);
    UpdateResult ur = insert(PROC_INSERT_ITEM, insertItemSql, item, cra);
    if (ur.numberOfRowAffected == 0) {
      ApplicationException.exception(DAOMessageID.UPDATE_FAILURE.getMessage());
    }
    return new RoleItemKey(item.getRoleId(), item.getFunc(), item.getSys(), 0);
  }
View Full Code Here

          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) {
        ri.setRoleId(role.getId());
        RoleItemKey uk = insertItem(ri, cra);
        if (uk == null) {
          ApplicationException.exception(
              CommonMessageID.SERVICE_FAILURE.getMessage());
          return;
        }
View Full Code Here

    item.setRevNo(0);
    UpdateResult ur = insert(PROC_INSERT_ITEM, insertItemSql, item, cra);
    if (ur.numberOfRowAffected == 0) {
      ApplicationException.exception(DAOMessageID.UPDATE_FAILURE.getMessage());
    }
    return new RoleItemKey(item.getRoleId(), item.getFunc(), item.getSys(), 0);
  }
View Full Code Here

          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) {
        ri.setRoleId(role.getId());
        RoleItemKey uk = insertItem(ri, cra);
        if (uk == null) {
          ApplicationException.exception(
              CommonMessageID.SERVICE_FAILURE.getMessage());
          return;
        }
View Full Code Here

TOP

Related Classes of org.butor.auth.common.role.RoleItemKey

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.