Package org.infoglue.cms.entities.management.impl.simple

Examples of org.infoglue.cms.entities.management.impl.simple.AccessRightImpl


      }
      else if(object.getClass().getName().equals(AccessRightImpl.class.getName()) || object.getClass().getName().equals(AccessRightRoleImpl.class.getName()) || object.getClass().getName().equals(AccessRightGroupImpl.class.getName()) || object.getClass().getName().equals(AccessRightUserImpl.class.getName()))
      {
        try
        {
          AccessRightImpl ar = (AccessRightImpl)object;
          String acKey = "" + ar.getValueObject().getInterceptionPointId();
          if(ar.getValueObject().getParameters() != null && !ar.getValueObject().getParameters().equals(""))
            acKey = "" + ar.getValueObject().getInterceptionPointId() + "_" + ar.getValueObject().getParameters();
          CacheController.clearUserAccessCache(acKey);             
        }
        catch (Exception e)
        {
          logger.error("Failed to clear user cache:" + e.getMessage());
View Full Code Here


      }
      else if(object.getClass().getName().equals(AccessRightImpl.class.getName()) || object.getClass().getName().equals(AccessRightRoleImpl.class.getName()) || object.getClass().getName().equals(AccessRightGroupImpl.class.getName()) || object.getClass().getName().equals(AccessRightUserImpl.class.getName()))
      {
        try
        {
          AccessRightImpl ar = (AccessRightImpl)object;
          String acKey = "" + ar.getValueObject().getInterceptionPointId();
          if(ar.getValueObject().getParameters() != null && !ar.getValueObject().getParameters().equals(""))
            acKey = "" + ar.getValueObject().getInterceptionPointId() + "_" + ar.getValueObject().getParameters();
          CacheController.clearUserAccessCache(acKey);             
        }
        catch (Exception e)
        {
          logger.error("Failed to clear user cache:" + e.getMessage());
View Full Code Here

      }
      else if(object.getClass().getName().equals(AccessRightImpl.class.getName()) || object.getClass().getName().equals(AccessRightRoleImpl.class.getName()) || object.getClass().getName().equals(AccessRightGroupImpl.class.getName()) || object.getClass().getName().equals(AccessRightUserImpl.class.getName()))
      {
        try
        {
          AccessRightImpl ar = (AccessRightImpl)object;
          String acKey = "" + ar.getValueObject().getInterceptionPointId();
          if(ar.getValueObject().getParameters() != null && !ar.getValueObject().getParameters().equals(""))
            acKey = "" + ar.getValueObject().getInterceptionPointId() + "_" + ar.getValueObject().getParameters();
          CacheController.clearUserAccessCache(acKey);             
        }
        catch (Exception e)
        {
          logger.error("Failed to clear user cache:" + e.getMessage());
View Full Code Here

    }
   
    List<AccessRight> accessRights = AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPoint.getId(), oldParameter, db);
    for(AccessRight accessRight : accessRights)
    {   
      AccessRightImpl arImpl = new AccessRightImpl();
      arImpl.setInterceptionPoint(interceptionPoint);
      arImpl.setParameters(newParameter);
     
      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);
      }

      Iterator accessRightGroupIterator = accessRight.getGroups().iterator();
      while(accessRightGroupIterator.hasNext())
      {
        AccessRightGroup accessRightGroup = (AccessRightGroup)accessRightGroupIterator.next();

        AccessRightGroupImpl argImpl = new AccessRightGroupImpl();
        argImpl.setAccessRight(arImpl);
        argImpl.setGroupName(accessRightGroup.getGroupName());
        arImpl.getGroups().add(argImpl);

        db.create(argImpl);
      }

      Iterator accessRightUserIterator = accessRight.getUsers().iterator();
      while(accessRightUserIterator.hasNext())
      {
        AccessRightUser accessRightUser = (AccessRightUser)accessRightUserIterator.next();

        AccessRightUserImpl aruImpl = new AccessRightUserImpl();
        aruImpl.setAccessRight(arImpl);
        aruImpl.setUserName(accessRightUser.getUserName());
        arImpl.getUsers().add(aruImpl);

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

    int i=0;
    while(results.hasMore())
      {
      i++;
      //System.out.print(".");
      AccessRightImpl aru = (SmallAccessRightImpl)results.next();     
      String key = "" + aru.getValueObject().getInterceptionPointId();
      if(aru.getValueObject().getParameters() != null && !aru.getValueObject().getParameters().equals(""))
        key = "" + aru.getValueObject().getInterceptionPointId() + "_" + aru.getValueObject().getParameters();
     
      if(accessRightsMap.get(key) == null)
      {
        accessRightsMap.put(key, 1);
      }
View Full Code Here

   * @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

TOP

Related Classes of org.infoglue.cms.entities.management.impl.simple.AccessRightImpl

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.