Package org.infoglue.cms.entities.management

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


                    InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithName(interceptionPointName, db);
                   
                    logger.info("interceptionPointName:" + interceptionPointName);
                  logger.info("parameters:" + parameters);
 
                  AccessRightVO accessRightVO = new AccessRightVO();
                  accessRightVO.setParameters("" + parameters);
                 
                  if(clearOldAccessRights != null && clearOldAccessRights.equalsIgnoreCase("true"))
                    AccessRightController.getController().delete(interceptionPoint.getId(), parameters, true, db);
                 
                  AccessRight accessRight = AccessRightController.getController().create(accessRightVO, interceptionPoint, db);
View Full Code Here


    while(accessRightListIterator.hasNext())
    {
      AccessRight accessRight = (AccessRight)accessRightListIterator.next();
      logger.info("accessRight:" + accessRight.getId());
     
      AccessRightVO copiedAccessRight = accessRight.getValueObject().createCopy();
      copiedAccessRight.setParameters(newSiteNodeVersionId.toString());
     
      InterceptionPoint icp = null;
      for(InterceptionPoint currentICP : interceptionPointList)
      {
        if(currentICP.getId().equals(copiedAccessRight.getInterceptionPointId()))
          icp = currentICP;
      }
      if(icp != null)
      {
        AccessRight newAccessRight = AccessRightController.getController().create(copiedAccessRight, icp, db);
View Full Code Here

            {
              if(message.getClassName().indexOf("AccessRightImpl") > -1)
              {
                try
              {
                  AccessRightVO acVO;
                  InterceptionPointVO icpVO;
                  try
                  {
                  acVO = AccessRightController.getController().getAccessRightVOWithId((Integer)message.getObjectId());
                  icpVO = InterceptionPointController.getController().getInterceptionPointVOWithId(acVO.getInterceptionPointId());
                  }
                  catch (Exception e)
                  {
                    logger.info("No access right found", e);
                    continue;
              }
                 
                  if(acVO != null && icpVO != null && !processedEntities.contains("" + icpVO.getCategory() + "_" + acVO.getParameters()))
                {
                  //logger.info("icpVO:" + icpVO.getName());
                  if(icpVO.getName().indexOf("Content.") > -1)
                  {
                    //logger.info("Was a content access... let's clear caches for that content.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                    {
                      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(idAsString));
                        publicationVO.setRepositoryId(new Integer(contentVO.getRepositoryId()));

                      PublicationDetailVO publicationDetailVO = new PublicationDetailVO();
                      publicationDetailVO.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO.setDescription("Access rights change publication");
                      publicationDetailVO.setEntityClass("org.infoglue.cms.entities.content.Content");
                      publicationDetailVO.setEntityId(contentVO.getId());
                      publicationDetailVO.setName("" + contentVO.getName());
                      publicationDetailVO.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO);
                    }
                  }
                  else if(icpVO.getName().indexOf("ContentVersion.") > -1)
                  {
                    //logger.info("Was a contentversion access... let's clear caches for that content.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                    {
                      ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getContentVersionVOWithId(new Integer(idAsString));
                      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(contentVersionVO.getContentId()));
                        publicationVO.setRepositoryId(new Integer(contentVO.getRepositoryId()));

                      PublicationDetailVO publicationDetailVO = new PublicationDetailVO();
                      publicationDetailVO.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO.setDescription("Access rights change publication");
                      publicationDetailVO.setEntityClass("org.infoglue.cms.entities.content.ContentVersion");
                      publicationDetailVO.setEntityId(contentVersionVO.getId());
                      publicationDetailVO.setName("" + contentVO.getName() + "/" + contentVersionVO.getId());
                      publicationDetailVO.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO);

                      PublicationDetailVO publicationDetailVO2 = new PublicationDetailVO();
                      publicationDetailVO2.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO2.setDescription("Access rights change publication");
                      publicationDetailVO2.setEntityClass("org.infoglue.cms.entities.content.Content");
                      publicationDetailVO2.setEntityId(contentVO.getId());
                      publicationDetailVO2.setName("" + contentVO.getName());
                      publicationDetailVO2.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO2.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO2);
                    }
                  }
                else if(icpVO.getName().indexOf("SiteNodeVersion.") > -1)
                {
                  //logger.info("Was a sitenode version access... let's clear caches for that siteNodeVersion.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                    {
                      SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(new Integer(idAsString));
                      SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(new Integer(siteNodeVersionVO.getSiteNodeId()));
                        publicationVO.setRepositoryId(new Integer(siteNodeVO.getRepositoryId()));

                      PublicationDetailVO publicationDetailVO = new PublicationDetailVO();
                      publicationDetailVO.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO.setDescription("Access rights change publication");
                      publicationDetailVO.setEntityClass("org.infoglue.cms.entities.structure.SiteNode");
                      publicationDetailVO.setEntityId(siteNodeVO.getId());
                      publicationDetailVO.setName("" + siteNodeVO.getName());
                      publicationDetailVO.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO);

                      PublicationDetailVO publicationDetailVO2 = new PublicationDetailVO();
                      publicationDetailVO2.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO2.setDescription("Access rights change publication");
                      publicationDetailVO2.setEntityClass("org.infoglue.cms.entities.structure.SiteNodeVersion");
                      publicationDetailVO2.setEntityId(siteNodeVersionVO.getId());
                      publicationDetailVO2.setName("" + siteNodeVO.getName() + "/" + siteNodeVersionVO.getId());
                      publicationDetailVO2.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO2.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO2);}
                }
                else
                {
                  //logger.info("****************************");
                  //logger.info("* WHAT TO DO WITH: " + icpVO.getName() + " *");
                  //logger.info("****************************");
                }
                  //logger.info("Feeling done with " + "" + icpVO.getCategory() + "_" + acVO.getParameters());
                  processedEntities.add("" + icpVO.getCategory() + "_" + acVO.getParameters());
                }
                else
                {
                  //logger.info("Allready processed " + icpVO.getCategory() + "_" + acVO.getParameters());
                }
View Full Code Here

             
              skipOriginalEntity = true;
             
              try
              {
                AccessRightVO acVO = AccessRightController.getController().getAccessRightVOWithId(new Integer(objectId));
                InterceptionPointVO icpVO = InterceptionPointController.getController().getInterceptionPointVOWithId(acVO.getInterceptionPointId());
                if(!processedEntities.contains("" + icpVO.getCategory() + "_" + acVO.getParameters()))
                {
                  String acKey = "" + icpVO.getId() + "_" + acVO.getParameters();
                accessRightsToClear.add(acKey);

                  //logger.info("icpVO:" + icpVO.getName());
                  if(icpVO.getName().indexOf("Content.") > -1)
                  {
                    //logger.info("Was a content access... let's clear caches for that content.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                      addCacheUpdateDirective("org.infoglue.cms.entities.content.impl.simple.ContentImpl", idAsString, allIGCacheCalls);
                  }
                  else if(icpVO.getName().indexOf("ContentVersion.") > -1)
                  {
                    //logger.info("Was a contentversion access... let's clear caches for that content.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                      addCacheUpdateDirective("org.infoglue.cms.entities.content.impl.simple.ContentVersionImpl", idAsString, allIGCacheCalls);
                  }
                  else if(icpVO.getName().indexOf("SiteNode.") > -1)
                  {
                    //logger.info("Was a sitenode access... let's clear caches for that content.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                      addCacheUpdateDirective("org.infoglue.cms.entities.structure.impl.simple.SiteNodeImpl", idAsString, allIGCacheCalls);
                  }
                else if(icpVO.getName().indexOf("SiteNodeVersion.") > -1)
                {
                  //logger.info("Was a sitenode version access... let's clear caches for that content.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                      addCacheUpdateDirective("org.infoglue.cms.entities.structure.impl.simple.SiteNodeVersionImpl", idAsString, allIGCacheCalls);
                }
                else
                {
                  logger.info("****************************");
                  logger.info("* WHAT TO DO WITH: " + icpVO.getName() + " *");
                  logger.info("****************************");
                }
                  logger.info("Feeling done with " + "" + icpVO.getName() + "_" + acVO.getParameters());
                  processedEntities.add("" + icpVO.getName() + "_" + acVO.getParameters());
                }
                else
                  logger.info("Allready processed " + icpVO.getCategory() + "_" + acVO.getParameters());
              }
              catch(Exception e2)
              {
                logger.warn("Error handling access right update: " + e2.getMessage());
              }
View Full Code Here

                    //System.out.println("This was an access right update - do we handle it:" + cacheName);
                    if(!CmsPropertyHandler.getOperatingMode().equalsIgnoreCase("3"))
                    {
                      try
                      {
                        AccessRightVO acVO = AccessRightController.getController().getAccessRightVOWithId(new Integer(entityId));
                        InterceptionPointVO icpVO = InterceptionPointController.getController().getInterceptionPointVOWithId(acVO.getInterceptionPointId());
                        //System.out.println("icpVO:" + icpVO.getName());
                        if(icpVO.getName().indexOf("Content.") > -1)
                        {
                          //System.out.println("Was a content access... let's clear caches for that content.");
                          String idAsString = acVO.getParameters();
                          if(idAsString != null && !idAsString.equals(""))
                            clearCaches("org.infoglue.cms.entities.content.impl.simple.ContentImpl", idAsString, null, cachesToSkip, forceClear);
                        }
                        else if(icpVO.getName().indexOf("ContentVersion.") > -1)
                        {
                          //System.out.println("Was a contentversion access... let's clear caches for that content.");
                          String idAsString = acVO.getParameters();
                          if(idAsString != null && !idAsString.equals(""))
                            clearCaches("org.infoglue.cms.entities.content.impl.simple.ContentVersionImpl", idAsString, null, cachesToSkip, forceClear);                       
                        }
                        else if(icpVO.getName().indexOf("SiteNode.") > -1)
                        {
                          //System.out.println("Was a sitenode access... let's clear caches for that content.");
                          String idAsString = acVO.getParameters();
                          if(idAsString != null && !idAsString.equals(""))
                            clearCaches("org.infoglue.cms.entities.structure.impl.simple.SiteNodeImpl", idAsString, null, cachesToSkip, forceClear);                                               
                        }
                      else if(icpVO.getName().indexOf("SiteNodeVersion.") > -1)
                      {
                        //System.out.println("Was a sitenode version access... let's clear caches for that content.");
                          String idAsString = acVO.getParameters();
                          if(idAsString != null && !idAsString.equals(""))
                            clearCaches("org.infoglue.cms.entities.structure.impl.simple.SiteNodeVersionImpl", idAsString, null, cachesToSkip, forceClear);                                               
                      }
                      else
                      {
View Full Code Here

               
                skipOriginalEntity = true;
               
                try
                {
                  AccessRightVO acVO = AccessRightController.getController().getAccessRightVOWithId(new Integer(objectId));
                  InterceptionPointVO icpVO = InterceptionPointController.getController().getInterceptionPointVOWithId(acVO.getInterceptionPointId());
                  if(!processedEntities.contains("" + icpVO.getCategory() + "_" + acVO.getParameters()))
                  {
                    logger.info("icpVO:" + icpVO.getName());
                    if(icpVO.getName().indexOf("Content.") > -1)
                    {
                      logger.info("Was a content access... let's clear caches for that content.");
                      String idAsString = acVO.getParameters();
                      if(idAsString != null && !idAsString.equals(""))
                        addCacheUpdateDirective("org.infoglue.cms.entities.content.impl.simple.ContentImpl", idAsString, allIGCacheCalls);
                    }
                    else if(icpVO.getName().indexOf("ContentVersion.") > -1)
                    {
                      logger.info("Was a contentversion access... let's clear caches for that content.");
                      String idAsString = acVO.getParameters();
                      if(idAsString != null && !idAsString.equals(""))
                        addCacheUpdateDirective("org.infoglue.cms.entities.content.impl.simple.ContentVersionImpl", idAsString, allIGCacheCalls);
                    }
                    else if(icpVO.getName().indexOf("SiteNode.") > -1)
                    {
                      logger.info("Was a sitenode access... let's clear caches for that content.");
                      String idAsString = acVO.getParameters();
                      if(idAsString != null && !idAsString.equals(""))
                        addCacheUpdateDirective("org.infoglue.cms.entities.structure.impl.simple.SiteNodeImpl", idAsString, allIGCacheCalls);
                    }
                  else if(icpVO.getName().indexOf("SiteNodeVersion.") > -1)
                  {
                    logger.info("Was a sitenode version access... let's clear caches for that content.");
                      String idAsString = acVO.getParameters();
                      if(idAsString != null && !idAsString.equals(""))
                        addCacheUpdateDirective("org.infoglue.cms.entities.structure.impl.simple.SiteNodeVersionImpl", idAsString, allIGCacheCalls);
                  }
                  else
                  {
                    logger.info("****************************");
                    logger.info("* WHAT TO DO WITH: " + icpVO.getName() + " *");
                    logger.info("****************************");
                  }
                    logger.info("Feeling done with " + "" + icpVO.getCategory() + "_" + acVO.getParameters());
                    processedEntities.add("" + icpVO.getCategory() + "_" + acVO.getParameters());
                  }
                  else
                    logger.info("Allready processed " + icpVO.getCategory() + "_" + acVO.getParameters());
                }
                catch(Exception e2)
                {
                  logger.warn("Error handling access right update: " + e2.getMessage());
                }
View Full Code Here

      while(accessRightListIterator.hasNext())
      {
        AccessRight accessRight = (AccessRight)accessRightListIterator.next();
        logger.info("accessRight:" + accessRight.getId());
       
        AccessRightVO copiedAccessRight = accessRight.getValueObject().createCopy(); //.getValueObject();
        copiedAccessRight.setParameters(newContentVersionId.toString());
        AccessRightController.getController().create(copiedAccessRight, interceptionPoint, db);
      }
    }
  } 
View Full Code Here

       
        Collection approvedRoles = accessRight.getRoles();
        Collection approvedGroups = accessRight.getGroups();
        Collection approvedUsers = accessRight.getUsers();
   
        AccessRightVO vo = accessRight.getValueObject();
        vo.getRoles().addAll(toVOList(approvedRoles));
        vo.getGroups().addAll(toVOList(approvedGroups));
        vo.getUsers().addAll(toVOList(approvedUsers));
       
        accessRightVOList.add(vo);
    }
   
    if(accessRightVOList != null)
View Full Code Here

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

          List<AccessRight> accessRights = getAccessRightListForEntity(new Integer(interceptionPointIdString), parameters, db);
        if(hasAccess != null)
        {
            if(accessRights == null || accessRights.size() == 0)
            {
            AccessRightVO accessRightVO = new AccessRightVO();
            accessRightVO.setParameters(parameters);

                InterceptionPoint interceptionPoint = InterceptionPointController.getController().getInterceptionPointWithId(new Integer(interceptionPointIdString), db);
            accessRight = create(accessRightVO, interceptionPoint, db);
            }
            else
View Full Code Here

TOP

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

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.