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

Examples of org.infoglue.cms.entities.content.impl.simple.ContentImpl


        clearCache(MediumContentImpl.class);

        //CacheController.clearCache("childContentCache");
        try
        {
          ContentImpl content = (ContentImpl)object;

          CacheController.clearCacheForGroup("contentCache", "content_" + content.getId());
          CacheController.clearCache("rootContentCache", "root_" + content.getRepositoryId());
          CacheController.clearCacheForGroup("contentVersionCache", "content_" + content.getId());
          CacheController.clearCacheForGroup("childContentCache", "content_" + content.getId());
          if(content.getParentContent() != null)
            CacheController.clearCacheForGroup("childContentCache", "content_" + content.getParentContent().getId());
          else
            CacheController.clearCache("rootContentCache", "root_" + content.getRepositoryId());
        }
        catch (Exception e)
        {
          logger.warn("Error in JDOCallback:" + e.getMessage(), e);
        }
      }
      else if(object.getClass().getName().equals(MediumContentImpl.class.getName()))
      {
        clearCache(SmallContentImpl.class);
        clearCache(SmallishContentImpl.class);
        clearCache(ContentImpl.class);

        //CacheController.clearCache("childContentCache");
        try
        {
          MediumContentImpl content = (MediumContentImpl)object;
          CacheController.clearCacheForGroup("contentCache", "content_" + content.getId());
          CacheController.clearCacheForGroup("contentVersionCache", "content_" + content.getId());
          CacheController.clearCache("childContentCache");
          if(content.getParentContentId() == null)
            CacheController.clearCache("rootContentCache", "root_" + content.getRepositoryId());
        }
        catch (Exception e)
        {
          logger.warn("Error in JDOCallback:" + e.getMessage(), e);
        }
View Full Code Here


      }
      else if(object.getClass().getName().equals(ContentImpl.class.getName()))
      {
        try
        {
          ContentImpl content = (ContentImpl)object;
          CacheController.clearCacheForGroup("childContentCache", "content_" + content.getId());
          if(content.getValueObject().getParentContentId() != null)
          {
            CacheController.clearCacheForGroup("childContentCache", "content_" + content.getValueObject().getParentContentId());
            if(ContentController.getContentController().getDoesContentExist(content.getId()))
            {
              ContentVO parentContentVO = ContentController.getContentController().getContentVOWithId(content.getValueObject().getParentContentId(), false);
              if(parentContentVO.getParentContentId() != null)
              {
                CacheController.clearCacheForGroup("childContentCache", "content_" + parentContentVO.getParentContentId());
              }
            }
          }
        }
        catch (Exception e)
        {
          logger.warn("Error in JDOCallback:" + e.getMessage(), e);
        }
       
        clearCache(SmallContentImpl.class);
        clearCache(SmallishContentImpl.class);
        clearCache(MediumContentImpl.class);
      }
      else if(object.getClass().getName().equals(MediumContentImpl.class.getName()))
      {
        try
        {
          MediumContentImpl content = (MediumContentImpl)object;
          CacheController.clearCacheForGroup("childContentCache", "content_" + content.getId());
          if(content.getValueObject().getParentContentId() != null)
          {
            CacheController.clearCacheForGroup("childContentCache", "content_" + content.getValueObject().getParentContentId());
            ContentVO parentContentVO = ContentController.getContentController().getContentVOWithId(content.getValueObject().getParentContentId(), false);
            if(parentContentVO.getParentContentId() != null)
            {
              CacheController.clearCacheForGroup("childContentCache", "content_" + parentContentVO.getParentContentId());
            }
          }
View Full Code Here

      }
      else if(object.getClass().getName().equals(ContentImpl.class.getName()))
      {
        try
        {
          ContentImpl content = (ContentImpl)object;
          CacheController.clearCacheForGroup("contentCache", "content_" + content.getId());
          CacheController.clearCacheForGroup("childContentCache", "content_" + content.getId());
          if(content.getParentContent() != null)
            CacheController.clearCacheForGroup("childContentCache", "content_" + content.getParentContent().getId());
          else
            CacheController.clearCache("rootContentCache", "root_" + content.getRepositoryId());
        }
        catch (Exception e)
        {
          logger.warn("Error in JDOCallback:" + e.getMessage(), e);
        }
View Full Code Here

      {
        logger.info("Changing creator from '" + currentModifier + "' to '" + newModifier + "' for number of Contents: " + results.size());
      }
      while (results.hasMore())
      {
        ContentImpl c = (ContentImpl)results.nextElement();
        c.setCreator(newModifier);
        if (logger.isDebugEnabled())
        {
          logger.debug("Changing creator from '" + currentModifier + "' to '" + newModifier + "' for Content with ID: " + c.getContentId());
        }
      }

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

TOP

Related Classes of org.infoglue.cms.entities.content.impl.simple.ContentImpl

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.