Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.AccessRightRole


                    {
                        String roleName = (String)accessRightRolesIterator.next();
                       
                  AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
                  accessRightRoleVO.setRoleName(roleName);
                  AccessRightRole accessRightRole = AccessRightController.getController().createAccessRightRole(db, accessRightRoleVO, accessRight);
                  accessRight.getRoles().add(accessRightRole);
                    }
                  }
                 
                  List accessRightGroups = (List)accessRightMap.get("accessRightGroups");
View Full Code Here


        }

        Iterator rolesIterator = accessRight.getRoles().iterator();
        while(rolesIterator.hasNext())
        {
            AccessRightRole accessRightRole = (AccessRightRole)rolesIterator.next();
            AccessRightRoleVO newAccessRightRoleVO = new AccessRightRoleVO();
            newAccessRightRoleVO.setRoleName(accessRightRole.getRoleName());
            AccessRightRole newAccessRightRole = AccessRightController.getController().createAccessRightRole(db, newAccessRightRoleVO, newAccessRight);
            newAccessRight.getRoles().add(newAccessRightRole);
        }

        Iterator usersIterator = accessRight.getUsers().iterator();
        while(usersIterator.hasNext())
View Full Code Here

        dbAccessRight.create(accessRight);
 
        Iterator accessRightRoleIterator = accessRight.getRoles().iterator();
        while(accessRightRoleIterator.hasNext())
        {
          AccessRightRole accessRightRole = (AccessRightRole)accessRightRoleIterator.next();
          accessRightRole.setAccessRight(accessRight);
          dbAccessRight.create(accessRightRole);
        }
 
        Iterator accessRightGroupIterator = accessRight.getGroups().iterator();
        while(accessRightGroupIterator.hasNext())
View Full Code Here

      db.create(arImpl);

      Iterator accessRightRoleIterator = accessRight.getRoles().iterator();
      while(accessRightRoleIterator.hasNext())
      {
        AccessRightRole accessRightRole = (AccessRightRole)accessRightRoleIterator.next();

        AccessRightRoleImpl arrImpl = new AccessRightRoleImpl();
        arrImpl.setAccessRight(arImpl);
        arrImpl.setRoleName(accessRightRole.getRoleName());
        arImpl.getRoles().add(arrImpl);

        db.create(arrImpl);
      }
View Full Code Here

        }
       
        Iterator roleIterator = accessRight.getRoles().iterator();
        while(roleIterator.hasNext())
        {
          AccessRightRole role = (AccessRightRole)roleIterator.next();
          roleIterator.remove();
          db.remove(role);
        }

        Iterator userIterator = accessRight.getUsers().iterator();
View Full Code Here

      }
     
      QueryResults results = oql.execute(Database.READONLY);
      while (results.hasMore())
      {
        AccessRightRole accessRightRole = (AccessRightRole)results.next();
        accessRightRoleList.add(accessRightRole.getValueObject());
      }
     
      results.close();
      oql.close();
    }
View Full Code Here

                accessRight = create(accessRightVO, interceptionPoint, db);
                }
               
                AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
                accessRightRoleVO.setRoleName(roleName);
                AccessRightRole accessRightRole = createAccessRightRole(db, accessRightRoleVO, accessRight);
                accessRight.getRoles().add(accessRightRole);
              accessRights++;
            }
           
            roleIndex++;
            roleName = request.getParameter(interceptionPointIdString + "_" + roleIndex + "_roleName");
          }
 
          int groupIndex = 0;
          String groupName = request.getParameter(interceptionPointIdString + "_" + groupIndex + "_groupName");
 
          while(groupName != null)
          {
            logger.info("groupName:" + groupName);
              if(accessRight == null)
              {
                InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithId(new Integer(interceptionPointIdString), db);
                //logger.info("Creating access for:" + interceptionPoint.getName() + "_" + parameters);
              accessRight = create(accessRightVO, interceptionPoint, db);
              }
           
              AccessRightGroupVO accessRightGroupVO = new AccessRightGroupVO();
              accessRightGroupVO.setGroupName(groupName);
              AccessRightGroup accessRightGroup = createAccessRightGroup(db, accessRightGroupVO, accessRight);
              accessRight.getGroups().add(accessRightGroup);
           
            accessRights++;
              groupIndex++;
              groupName = request.getParameter(interceptionPointIdString + "_" + groupIndex + "_groupName");
              //logger.info("groupName:" + groupName);
          }
        }
        else
        {
          logger.info("accessRight after delete:" + accessRight.getAccessRightId());

          int roleIndex = 0;
          String roleName = request.getParameter(interceptionPointIdString + "_" + roleIndex + "_roleName");
          while(roleName != null)
          {
              String hasAccess = request.getParameter(interceptionPointIdString + "_" + roleName + "_hasAccess");
            if(hasAccess != null)
            {
                AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
                accessRightRoleVO.setRoleName(roleName);
                AccessRightRole accessRightRole = createAccessRightRole(db, accessRightRoleVO, accessRight);
                accessRight.getRoles().add(accessRightRole);
              accessRights++;
            }
           
            roleIndex++;
View Full Code Here

      // Delete all existing access right for this role on this parameter and category group
      List<AccessRightRole> accessRightsRole = getAccessRightsRole(interceptionPointCategory, roleName, parameters, db, false);
        Iterator<AccessRightRole> accessRightsRoleIterator = accessRightsRole.iterator();
        while(accessRightsRoleIterator.hasNext())
        {
        AccessRightRole accessRightRole = (AccessRightRole)accessRightsRoleIterator.next();

            db.remove(accessRightRole.getAccessRight());

            accessRightsRoleIterator.remove();
            db.remove(accessRightRole);
        }

        // Add acces rights for each interception point in the category
      List<InterceptionPoint> interceptionPointList = InterceptionPointController.getController().getInterceptionPointList(interceptionPointCategory, db);
      for(InterceptionPoint interceptionPoint : interceptionPointList)
      {
        AccessRightVO accessRightVO = new AccessRightVO();
        accessRightVO.setParameters(parameters);

        AccessRight accessRight = create(accessRightVO, interceptionPoint, db);

        if(roleName != null && accessRight != null)
        {
          AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
          accessRightRoleVO.setRoleName(roleName);
          AccessRightRole accessRightRole = createAccessRightRole(db, accessRightRoleVO, accessRight);
          accessRight.getRoles().add(accessRightRole);
        }
      }

      commitTransaction(db);
View Full Code Here

   * @throws SystemException
   */
 
  public AccessRightRole createAccessRightRole(Database db, AccessRightRoleVO accessRightRoleVO, AccessRight accessRight) throws SystemException, Exception
  {
      AccessRightRole accessRightRole = new AccessRightRoleImpl();
      accessRightRole.setValueObject(accessRightRoleVO);
      accessRightRole.setAccessRight(accessRight);
     
      db.create(accessRightRole);
       
      return accessRightRole;
  }
View Full Code Here

        AccessRight accessRight = (AccessRight)i.next();
       
        Iterator accessRightRolesIterator = accessRight.getRoles().iterator();
        while(accessRightRolesIterator.hasNext())
        {
          AccessRightRole accessRightRole = (AccessRightRole)accessRightRolesIterator.next();
          if(roleName.equals(accessRightRole.getRoleName()))
          {
            accessRightRolesIterator.remove();
            db.remove(accessRightRole);
          }
        }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.AccessRightRole

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.