Package it.eng.spagobi.wapp.metadata

Examples of it.eng.spagobi.wapp.metadata.SbiMenuRole


      hqlQuery.setInteger(0, roleId.intValue());
      List hibList = hqlQuery.list();
     
      Iterator it = hibList.iterator();
      IMenuDAO menuDAO = DAOFactory.getMenuDAO();
      SbiMenuRole tmpMenuRole = null;
      Menu tmpMenu = null;
      while (it.hasNext()) { 
        Object[] tmpLst = (Object[])it.next();
        Integer menuId = (Integer)tmpLst[0];
        tmpMenu = menuDAO.loadMenuByID(menuId, roleId);
View Full Code Here


      //Modify Roles Associated
      // delete all roles previously associated
      Set oldRoles = hibMenu.getSbiMenuRoles();
      Iterator iterOldRoles = oldRoles.iterator();
      while (iterOldRoles.hasNext()) {
        SbiMenuRole role = (SbiMenuRole) iterOldRoles.next();
        tmpSession.delete(role);
      }
      // save roles functionality
      Set menuRoleToSave = new HashSet();
      menuRoleToSave.addAll(saveRolesMenu(tmpSession, hibMenu,
View Full Code Here

    getIncongruousRolesQuery.setParameter("MENU_ID", menuId);
    List incongruousRoles = getIncongruousRolesQuery.list();
    if (incongruousRoles != null && !incongruousRoles.isEmpty()) {
      Iterator it = incongruousRoles.iterator();
      while (it.hasNext()) {
        SbiMenuRole role = (SbiMenuRole) it.next();
        aSession.delete(role);
      }
    }
    // recursion on children
    String getChildrenMenuNodesHqlQuery = " from SbiMenu s where s.id.parentId = ?";
View Full Code Here

      SbiMenu hibMenu = (SbiMenu) tmpSession.load(SbiMenu.class, aMenu.getMenuId());

      Set oldRoles = hibMenu.getSbiMenuRoles();
      Iterator iterOldRoles = oldRoles.iterator();
      while (iterOldRoles.hasNext()) {
        SbiMenuRole role = (SbiMenuRole) iterOldRoles.next();
        tmpSession.delete(role);
      }
      Integer eventualFatherId = aMenu.getMenuId();
      eraseMenuSons(eventualFatherId,tmpSession);
View Full Code Here

    List rolesList = new ArrayList();
    Set roles = hibMenu.getSbiMenuRoles();   // roles of menu in database
    Iterator iterRoles = roles.iterator();
    while(iterRoles.hasNext()) {      // for each role retrieved in database
      SbiMenuRole hibMenuRole = (SbiMenuRole)iterRoles.next();

      SbiExtRoles hibRole =hibMenuRole.getSbiExtRoles();

      RoleDAOHibImpl roleDAO =  new RoleDAOHibImpl();
      Role role = roleDAO.toRole(hibRole);

      rolesList.add(role);
View Full Code Here

      SbiMenuRoleId sbiMenuRoleId = new SbiMenuRoleId();
      sbiMenuRoleId.setMenuId(hibMenu.getMenuId());
      sbiMenuRoleId.setExtRoleId(role.getId());

      SbiMenuRole sbiMenuRole= new SbiMenuRole();
      sbiMenuRole.setId(sbiMenuRoleId);
      sbiMenuRole.setSbiMenu(hibMenu);
      sbiMenuRole.setSbiExtRoles(hibRole);
      updateSbiCommonInfo4Insert(sbiMenuRole);
      aSession.save(sbiMenuRole);
      menuRoleToSave.add(sbiMenuRole);
    }
    return menuRoleToSave;
View Full Code Here

TOP

Related Classes of it.eng.spagobi.wapp.metadata.SbiMenuRole

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.