Package org.infoglue.cms.entities.management

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


      logger.info("Removing accessRight:" + accessRight.getId() + ":" + accessRight.getUsers().size());

      Iterator rolesIterator = accessRight.getRoles().iterator();
      while(rolesIterator.hasNext())
      {
          AccessRightRole accessRightRole = (AccessRightRole)rolesIterator.next();
          rolesIterator.remove();
          db.remove(accessRightRole);
      }
     
      Iterator groupsIterator = accessRight.getGroups().iterator();
View Full Code Here


    logger.info("Removing accessRight:" + accessRight.getId() + ":" + accessRight.getUsers().size());

    Iterator rolesIterator = accessRight.getRoles().iterator();
    while(rolesIterator.hasNext())
    {
        AccessRightRole accessRightRole = (AccessRightRole)rolesIterator.next();
        rolesIterator.remove();
        db.remove(accessRightRole);
    }
   
    Iterator groupsIterator = accessRight.getGroups().iterator();
View Full Code Here

          }

          Iterator approvedRolesIterator = approvedRoles.iterator();
          while(approvedRolesIterator.hasNext())
          {
              AccessRightRole accessRightRole = (AccessRightRole)approvedRolesIterator.next();
             
            if(enableDebug)
              debugInfo += "\n    " + role.getName() + " = " + accessRightRole.getRoleName();

              if(logger.isInfoEnabled())
                logger.info("" + role.getName() + " = " + accessRightRole.getRoleName());
              if(accessRightRole.getRoleName().equals(role.getName()))
              {
              if(enableDebug)
                debugInfo += "\n    Principal " + infoGluePrincipal.getName() + " has role " + accessRightRole.getRoleName();

                  if(logger.isInfoEnabled())
                  logger.info("Principal " + infoGluePrincipal.getName() + " has role " + accessRightRole.getRoleName());
           
                  principalHasRole = true;
                  break outer;
              }
          }
View Full Code Here

          }

          Iterator approvedRolesIterator = approvedRoles.iterator();
          while(approvedRolesIterator.hasNext())
          {
              AccessRightRole accessRightRole = (AccessRightRole)approvedRolesIterator.next();
              if(accessRightRole.getRoleName().equals(role.getName()))
              {
                  principalHasRole = true;
                  break outer;
              }
          }
View Full Code Here

      else
        results = oql.execute();
       
      while (results.hasMore())
      {
        AccessRightRole accessRightRole = (AccessRightRole)results.next();
        //Dummy to get the access right to load correctly - otherwise a but occurrs.
        Integer accessRightId = accessRightRole.getAccessRight().getAccessRightId();

        if(accessRightRole.getAccessRight() == null && !readOnly)
          db.remove(accessRightRole);
        else
          accessRightRoleList.add(accessRightRole);
      }
     
View Full Code Here

      else
        results = oql.execute();
       
      while (results.hasMore())
      {
        AccessRightRole accessRightRole = (AccessRightRole)results.next();
        accessRightsRoles.add(accessRightRole);
      }
     
      results.close();
      oql.close();
View Full Code Here

      else
        results = oql.execute();

      while (results.hasMore())
      {
        AccessRightRole accessRightRole = (AccessRightRole)results.next();
        accessRightsRoles.add(accessRightRole);
      }

      results.close();
      oql.close();
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);
        }
      }
       
      for(String groupName : groupNames)
View Full Code Here

                         
                          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 = accessRightRoleList.iterator();
             
            while(i.hasNext())
              {
                  AccessRightRole accessRightRole = (AccessRightRole)i.next();
                  AccessRight accessRight = accessRightRole.getAccessRight();
                 
                  if(accessRight != null)
                  {
                    boolean exists = false;

                    Iterator rolesIterator = accessRight.getRoles().iterator();
                    while(rolesIterator.hasNext())
                    {
                      AccessRightRole currentAccessRightRole = (AccessRightRole)rolesIterator.next();
                      if(currentAccessRightRole.getRoleName().equals(newRoleName))
                        exists = true;
                    }
                 
                    if(!exists)
                    {
                      //accessRightRole.setRoleName(newRoleName);
                AccessRightRoleVO accessRightRoleVO = new AccessRightRoleVO();
                accessRightRoleVO.setRoleName(newRoleName);
                AccessRightRole newAccessRightRole = AccessRightController.getController().createAccessRightRole(db, accessRightRoleVO, accessRight);
                accessRight.getRoles().add(newAccessRightRole);
                    }
                  }                 
              }             
          }
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.