Package org.infoglue.cms.entities.management

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


                    Iterator accessRightRolesIterator = accessRightRoles.iterator();
                    while(accessRightRolesIterator.hasNext())
                    {
                        String roleName = (String)accessRightRolesIterator.next();
                       
                  AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
                  accessRightRoleVO.setRoleName(roleName);
                  AccessRightRole accessRightRole = AccessRightController.getController().createAccessRightRole(db, accessRightRoleVO, accessRight);
                  accessRight.getRoles().add(accessRightRole);
                    }
                  }
                 
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();
View Full Code Here

             
              Iterator i = systemRoleVOList.iterator();
             
            while(i.hasNext())
              {
                  AccessRightRoleVO accessRightRoleVO = (AccessRightRoleVO)i.next();
                 
                  boolean isValid = false;
                 
                  Iterator userIterator = users.iterator();
               
              while(userIterator.hasNext())
                {
                InfoGlueRole role = (InfoGlueRole)userIterator.next();
                    if(role.getName().equalsIgnoreCase(accessRightRoleVO.getRoleName()))
                    {
                      isValid = true;
                      break;
                    }
                }
                 
              if(!isValid)
                invalidRoles.add(accessRightRoleVO.getRoleName());
              }
             
              addValidationItem(name, description, true, "Faulty " + invalidRoles.size() + " rolenames.");
          }
          catch(Exception e)
View Full Code Here

                {
                  InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithId(new Integer(interceptionPointIdString), db);
                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++;
            }
           
View Full Code Here

        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);
        }
      }
View Full Code Here

        }
       
        Iterator approvedRolesIterator = accessRightRoleVOList.iterator();
        while(approvedRolesIterator.hasNext())
        {
          AccessRightRoleVO accessRightRole = (AccessRightRoleVO)approvedRolesIterator.next();
            if(logger.isInfoEnabled())
              logger.info("" + role.getName() + " = " + accessRightRole.getRoleName());
            if(accessRightRole.getRoleName().equals(role.getName()))
            {
                if(logger.isInfoEnabled())
                logger.info("Principal " + infoGluePrincipal.getName() + " has role " + accessRightRole.getRoleName());
         
                principalHasRole = true;
                break outer;
            }
        }
View Full Code Here

        }
       
        Iterator approvedRolesIterator = accessRightRoleVOList.iterator();
        while(approvedRolesIterator.hasNext())
        {
          AccessRightRoleVO accessRightRole = (AccessRightRoleVO)approvedRolesIterator.next();
            if(logger.isInfoEnabled())
              logger.info("" + role.getName() + " = " + accessRightRole.getRoleName());
            if(accessRightRole.getRoleName().equals(role.getName()))
            {
                if(logger.isInfoEnabled())
                logger.info("Principal " + infoGluePrincipal.getName() + " has role " + accessRightRole.getRoleName());
         
                principalHasRole = true;
                break outer;
            }
        }
View Full Code Here

        }
       
        if(add)
        {
          logger.info("roleName:" + roleName);
            AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
            accessRightRoleVO.setRoleName(roleName);
            AccessRightRole accessRightRole = createAccessRightRole(db, accessRightRoleVO, keeperAR);
            keeperAR.getRoles().add(accessRightRole);
        }
      }
       
View Full Code Here

                      {
                          //Map accessRightRoleMap = (Map)accessRightRolesIterator.next();
                         
                          String roleName = accessRightRolesIterator.next();
                         
                    AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
                    accessRightRoleVO.setRoleName(roleName);
                    AccessRightRole accessRightRole = AccessRightController.getController().createAccessRightRole(db, accessRightRoleVO, accessRight);
                  @SuppressWarnings("unchecked")
                  Collection<AccessRightRole> roles = accessRight.getRoles();
                  roles.add(accessRightRole);
                      }
View Full Code Here

             
              Iterator i = systemRoleVOList.iterator();
             
            while(i.hasNext())
              {
                  AccessRightRoleVO accessRightRoleVO = (AccessRightRoleVO)i.next();
                 
                  boolean isValid = false;
                 
                  Iterator userIterator = users.iterator();
               
              while(userIterator.hasNext())
                {
                InfoGlueRole role = (InfoGlueRole)userIterator.next();
                    if(role.getName().equalsIgnoreCase(accessRightRoleVO.getRoleName()))
                    {
                      isValid = true;
                      break;
                    }
                }
                 
              if(!isValid)
                invalidRoles.add(accessRightRoleVO.getRoleName());
              }
          }
          catch(Exception e)
          {
            e.printStackTrace();
View Full Code Here

TOP

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

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.