Examples of AccessRight


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

     
      QueryResults results = oql.execute(Database.READONLY);
      while (results.hasMore())
      {
        SmallAccessRightImpl smallAccessRight = (SmallAccessRightImpl)results.next();
        AccessRight accessRight = getAccessRightWithId(smallAccessRight.getAccessRightId(), db);
       
        accessRightList.add(accessRight);
      }
     
      results.close();
View Full Code Here

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

     
      QueryResults results = oql.execute(Database.READONLY);
      while (results.hasMore())
      {
        SmallAccessRightImpl smallAccessRight = (SmallAccessRightImpl)results.next();
        AccessRight accessRight = getAccessRightWithId(smallAccessRight.getAccessRightId(), db);
       
        accessRightList.add(accessRight);
      }
     
      results.close();
View Full Code Here

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

      QueryResults results = oql.execute();
      logger.info("Fetching entity in read/write mode");

      while (results.hasMore())
      {
        AccessRight accessRight = (AccessRight)results.next();
        //logger.info("accessRight:" + accessRight.getAccessRightId());
        accessRightList.add(accessRight);
      }

      results.close();
View Full Code Here

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

       
      this.logger.info("Fetching entity in read/write mode");

      while (results.hasMore())
      {
        AccessRight accessRight = (AccessRight)results.next();
        //logger.info("accessRight:" + accessRight.getAccessRightId());
        accessRightList.add(accessRight);
      }
     
      results.close();
View Full Code Here

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

      QueryResults results = oql.execute();
      this.logger.info("Fetching entity in read/write mode");

      while (results.hasMore())
      {
        AccessRight accessRight = (AccessRight)results.next();
        logger.info("accessRight:" + accessRight.getAccessRightId());
        accessRightList.add(accessRight);
      }
     
      results.close();
      oql.close();
View Full Code Here

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

      QueryResults results = oql.execute();
      this.logger.info("Fetching entity in read/write mode");

      while (results.hasMore())
      {
        AccessRight accessRight = (AccessRight)results.next();
        logger.info("accessRight:" + accessRight.getAccessRightId());
        accessRightList.add(accessRight);
      }

      results.close();
      oql.close();
View Full Code Here

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

      QueryResults results = oql.execute();
      this.logger.info("Fetching entity in read/write mode");

      while (results.hasMore())
      {
        AccessRight accessRight = (AccessRight)results.next();
        accessRightList.add(accessRight);
      }

      results.close();
      oql.close();
View Full Code Here

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

   * @throws Exception
   */
 
  public AccessRight create(AccessRightVO accessRightVO, InterceptionPoint interceptionPoint, Database db) throws SystemException, Exception
  {
    AccessRight accessRight = new AccessRightImpl();
    accessRight.setValueObject(accessRightVO);
   
    accessRight.setInterceptionPoint(interceptionPoint);
   
    db.create(accessRight);
         
    return accessRight;
  }    
View Full Code Here

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

      int interceptionPointIndex = 0;
      String interceptionPointIdString = request.getParameter(interceptionPointIndex + "_InterceptionPointId");
      while(interceptionPointIdString != null)
      {
        logger.info("interceptionPointIdString:" + interceptionPointIdString);
        AccessRight accessRight = delete(new Integer(interceptionPointIdString), parameters, false, db);
       
        if(accessRight == null)
        {
          logger.info("accessRight after delete was null");
          AccessRightVO accessRightVO = new AccessRightVO();
          accessRightVO.setParameters(parameters);
 
          int roleIndex = 0;
          String roleName = request.getParameter(interceptionPointIdString + "_" + roleIndex + "_roleName");
          while(roleName != null)
          {
              String hasAccess = request.getParameter(interceptionPointIdString + "_" + roleName + "_hasAccess");
           
            if(hasAccess != null)
            {
                if(accessRight == null)
                {
                  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++;
            }
           
            roleIndex++;
            roleName = request.getParameter(interceptionPointIdString + "_" + roleIndex + "_roleName");
          }
 
          int groupIndex = 0;
          String groupName = request.getParameter(interceptionPointIdString + "_" + groupIndex + "_groupName");
          while(groupName != null)
          {
            logger.info("groupName:" + groupName);
              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);
View Full Code Here

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

   
    try
    {
      beginTransaction(db);
     
      AccessRight accessRight = this.getAccessRightWithId(accessRightId, db);

      Iterator groupsIterator = accessRight.getGroups().iterator();
      while(groupsIterator.hasNext())
      {
          AccessRightGroup accessRightGroup = (AccessRightGroup)groupsIterator.next();
          groupsIterator.remove();
          db.remove(accessRightGroup);
      }
     
      if(groupNames != null)
      {
        for(int i=0; i < groupNames.length; i++)
        {
            String groupName = groupNames[i];
            AccessRightGroupVO accessRightGroupVO = new AccessRightGroupVO();
            accessRightGroupVO.setGroupName(groupName);
            AccessRightGroup accessRightGroup = createAccessRightGroup(db, accessRightGroupVO, accessRight);
            accessRight.getGroups().add(accessRightGroup);
        }
      }
     
        commitTransaction(db);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.