Package org.infoglue.cms.entities.structure

Examples of org.infoglue.cms.entities.structure.SiteNodeVersionVO


 
  public SiteNodeVersionVO getLatestActiveSiteNodeVersionVO(Database db, Integer siteNodeId) throws SystemException, Exception
  {
    String key = "" + siteNodeId;
    logger.info("key:" + key);
    SiteNodeVersionVO siteNodeVersionVO = (SiteNodeVersionVO)CacheController.getCachedObjectFromAdvancedCache("latestSiteNodeVersionCache", key);
    if(siteNodeVersionVO != null)
    {
      if(logger.isInfoEnabled())
        logger.info("There was an cached siteNodeVersionVO:" + siteNodeVersionVO);
    }
    else
    {
      siteNodeVersionVO = getLatestActiveSiteNodeVersionVO(siteNodeId, db);
      /*
      SiteNodeVersion siteNodeVersion = getLatestActiveSiteNodeVersion(siteNodeId, db);
      if(siteNodeVersion != null)
        siteNodeVersionVO = siteNodeVersion.getValueObject();
      */
     
      if(siteNodeVersionVO != null)
      {
            String groupKey1 = CacheController.getPooledString(4, siteNodeVersionVO.getId());
            String groupKey2 = CacheController.getPooledString(3, siteNodeId);
 
            CacheController.cacheObjectInAdvancedCache("latestSiteNodeVersionCache", key, siteNodeVersionVO, new String[]{groupKey1, groupKey2}, true);
      }
    }
View Full Code Here


 
  public SiteNodeVersionVO getLatestActiveSiteNodeVersionVOForPageCache(Database db, Integer siteNodeId) throws SystemException, Exception
  {
    String key = "" + siteNodeId;
    logger.info("key:" + key);
    SiteNodeVersionVO siteNodeVersionVO = (SiteNodeVersionVO)CacheController.getCachedObject("pageCacheLatestSiteNodeVersions", key);
    if(siteNodeVersionVO != null)
    {
      if(logger.isInfoEnabled())
        logger.info("There was an cached siteNodeVersionVO:" + siteNodeVersionVO);
    }
View Full Code Here

  public SiteNodeVersionVO getLatestActiveSiteNodeVersionVO(Integer siteNodeId, Database db) throws SystemException, Exception
  {
      String versionKey = "" + siteNodeId + "_" + getOperatingMode() + "_siteNodeVersionVO";   
     
      //SiteNodeVersionVO siteNodeVersionVO = (SiteNodeVersionVO)CacheController.getCachedObject("latestSiteNodeVersionCache", versionKey);
      SiteNodeVersionVO siteNodeVersionVO = (SiteNodeVersionVO)CacheController.getCachedObjectFromAdvancedCache("latestSiteNodeVersionCache", versionKey);
    if(siteNodeVersionVO != null)
      {
        if(logger.isInfoEnabled())
          logger.info("There was a cached siteNodeVersionVO:" + siteNodeVersionVO);
    }
View Full Code Here

    boolean isPageCacheDisabled = false;
   
    try
    {
      SiteNodeVersionVO latestSiteNodeVersionVO = getLatestActiveSiteNodeVersionVO(db, siteNodeId);
      if(latestSiteNodeVersionVO != null && latestSiteNodeVersionVO.getDisablePageCache() != null)
      { 
        if(latestSiteNodeVersionVO.getDisablePageCache().intValue() == NO.intValue())
          isPageCacheDisabled = false;
        else if(latestSiteNodeVersionVO.getDisablePageCache().intValue() == YES.intValue())
          isPageCacheDisabled = true;
        else if(latestSiteNodeVersionVO.getDisablePageCache().intValue() == INHERITED.intValue())
        {
          SiteNodeVO parentSiteNode = this.getParentSiteNode(db, siteNodeId);
          if(parentSiteNode != null)
            isPageCacheDisabled = getIsPageCacheDisabled(db, parentSiteNode.getSiteNodeId());
        }
View Full Code Here

      String pageKey = CacheController.getPageCacheKey(session, request, siteNodeId, languageId, contentId, userAgent, queryString, extra);
      try
    {
     
      SiteNodeVersionVO latestSiteNodeVersionVO = getLatestActiveSiteNodeVersionVOForPageCache(db, siteNodeId);
      Integer currentSiteNodeId = siteNodeId;
     
      while(latestSiteNodeVersionVO == null || latestSiteNodeVersionVO.getPageCacheKey() == null || latestSiteNodeVersionVO.getPageCacheKey().length() == 0 || latestSiteNodeVersionVO.getPageCacheKey().equalsIgnoreCase("default"))
      {
        if(currentSiteNodeId == null)
          break;
       
        SiteNodeVO parentSiteNodeVO = getParentSiteNode(db, currentSiteNodeId);
        if(parentSiteNodeVO != null)
        {
          latestSiteNodeVersionVO = getLatestActiveSiteNodeVersionVOForPageCache(db, parentSiteNodeVO.getId());
          if(latestSiteNodeVersionVO != null)
            currentSiteNodeId = latestSiteNodeVersionVO.getSiteNodeId();
          else
            currentSiteNodeId = null
        }
        else
          break;
      }
     
      if(latestSiteNodeVersionVO != null && latestSiteNodeVersionVO.getPageCacheKey() != null && latestSiteNodeVersionVO.getPageCacheKey().length() > 0 && !latestSiteNodeVersionVO.getPageCacheKey().equalsIgnoreCase("default"))
      {
          String originalRequestURL = request.getParameter("originalRequestURL");
          if(originalRequestURL == null || originalRequestURL.length() == 0)
            originalRequestURL = request.getRequestURL().toString();

          pageKey = originalRequestURL + "_" + latestSiteNodeVersionVO.getPageCacheKey();
          pageKey = pageKey.replaceAll("\\$siteNodeId", "" + siteNodeId);
          pageKey = pageKey.replaceAll("\\$languageId", "" + languageId);
          pageKey = pageKey.replaceAll("\\$contentId", "" + contentId);
          pageKey = pageKey.replaceAll("\\$useragent", "" + userAgent);
          pageKey = pageKey.replaceAll("\\$queryString", "" + queryString);
View Full Code Here

    boolean isEditOnSightDisabled = false;
   
    try
    {
      SiteNodeVersionVO latestSiteNodeVersionVO = getLatestActiveSiteNodeVersionVO(db, siteNodeId);
      if(latestSiteNodeVersionVO != null && latestSiteNodeVersionVO.getDisableEditOnSight() != null)
      { 
        if(latestSiteNodeVersionVO.getDisableEditOnSight().intValue() == NO.intValue())
          isEditOnSightDisabled = false;
        else if(latestSiteNodeVersionVO.getDisableEditOnSight().intValue() == YES.intValue())
          isEditOnSightDisabled = true;
        else if(latestSiteNodeVersionVO.getDisableEditOnSight().intValue() == INHERITED.intValue())
        {
          SiteNodeVO parentSiteNode = this.getParentSiteNode(db, siteNodeId);
          if(parentSiteNode != null)
            isEditOnSightDisabled = getIsEditOnSightDisabled(db, parentSiteNode.getSiteNodeId());
        }
View Full Code Here

    boolean isPageProtected = false;
   
    try
    {
      SiteNodeVersionVO latestSiteNodeVersionVO = getLatestActiveSiteNodeVersionVO(db, siteNodeId);
      if(latestSiteNodeVersionVO != null && latestSiteNodeVersionVO.getIsProtected() != null)
      { 
        if(latestSiteNodeVersionVO.getIsProtected().intValue() == SiteNodeVersionVO.NO.intValue())
          isPageProtected = false;
        else if(latestSiteNodeVersionVO.getIsProtected().intValue() == SiteNodeVersionVO.YES.intValue())
          isPageProtected = true;
        else if(latestSiteNodeVersionVO.getIsProtected().intValue() == SiteNodeVersionVO.YES_WITH_INHERIT_FALLBACK.intValue())
          isPageProtected = true;
        else if(latestSiteNodeVersionVO.getIsProtected().intValue() == SiteNodeVersionVO.INHERITED.intValue())
        {
          SiteNodeVO parentSiteNode = this.getParentSiteNode(db, siteNodeId);
          if(parentSiteNode != null)
            isPageProtected = getIsPageProtected(db, parentSiteNode.getSiteNodeId());
        }
View Full Code Here

    Integer pageCacheTimeout = null;
   
    try
    {
      SiteNodeVersionVO latestSiteNodeVersionVO = getLatestActiveSiteNodeVersionVO(db, siteNodeId);
      if(latestSiteNodeVersionVO != null && latestSiteNodeVersionVO.getPageCacheTimeout() != null && !latestSiteNodeVersionVO.getPageCacheTimeout().equals(""))
      { 
        try
        {
          pageCacheTimeout = new Integer(latestSiteNodeVersionVO.getPageCacheTimeout());
        }
        catch (Exception e)
        {
          logger.warn("Wrong format on pageCacheTimeout on siteNode:" + latestSiteNodeVersionVO.getSiteNodeName(), e);
        }
      }
      if(pageCacheTimeout == null)
      {
        SiteNodeVO parentSiteNode = this.getParentSiteNode(db, siteNodeId);
View Full Code Here

      if(interceptionPointName.equals("SiteNodeVersion.Read"))
        honourInheritanceFallback = false;
     
      InterceptionPointVO ipVO = InterceptionPointController.getController().getInterceptionPointVOWithName(interceptionPointName, db);

      SiteNodeVersionVO siteNodeVersionVO = getLatestActiveSiteNodeVersionVO(db, siteNodeId);
      protectedSiteNodeVersionId = SiteNodeVersionControllerProxy.getSiteNodeVersionControllerProxy().getProtectedSiteNodeVersionId(siteNodeVersionVO.getId(), ipVO.getId(), honourInheritanceFallback, db);
    }
    catch(Exception e)
    {
      logger.warn("An error occurred trying to get if the siteNodeVersion has disabled pageCache:" + e.getMessage(), e);
    }
View Full Code Here

    Integer protectedSiteNodeVersionId = null;
   
    try
    {
      SiteNodeVersionVO siteNodeVersionVO = this.getLatestActiveSiteNodeVersionVOForPageCache(db, siteNodeId);
      if(siteNodeVersionVO != null && siteNodeVersionVO.getIsProtected() != null)
      { 
        if(logger.isInfoEnabled())
          logger.info("siteNodeVersionVO:" + siteNodeVersionVO.getId() + ":" + siteNodeVersionVO.getIsProtected());
        if(siteNodeVersionVO.getIsProtected().intValue() == NO.intValue())
          protectedSiteNodeVersionId = null;
        else if(siteNodeVersionVO.getIsProtected().intValue() == YES.intValue())
          protectedSiteNodeVersionId = siteNodeVersionVO.getId();
        else if(siteNodeVersionVO.getIsProtected().intValue() == SiteNodeVersionVO.YES_WITH_INHERIT_FALLBACK.intValue())
          protectedSiteNodeVersionId = siteNodeVersionVO.getId();
        else if(siteNodeVersionVO.getIsProtected().intValue() == INHERITED.intValue())
        {
          SiteNodeVO parentSiteNode = this.getParentSiteNodeForPageCache(db, siteNodeId);
          if(parentSiteNode != null)
            protectedSiteNodeVersionId = getProtectedSiteNodeVersionIdForPageCache(db, parentSiteNode.getSiteNodeId());
        }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.structure.SiteNodeVersionVO

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.