Package org.infoglue.cms.entities.structure

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


  public String getSiteNodePath(Integer siteNodeId) throws Exception
  {
    StringBuffer sb = new StringBuffer();
   
    SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
    while(siteNodeVO != null)
    {
      sb.insert(0, "/" + siteNodeVO.getName());
      if(siteNodeVO.getParentSiteNodeId() != null)
        siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVO.getParentSiteNodeId());
      else
        siteNodeVO = null;
    }
   
    return sb.toString();
View Full Code Here


  {
    Integer structureLanguageId = (Integer)getHttpSession().getAttribute("structureLanguageId");
    logger.info("structureLanguageId:" + structureLanguageId)
    StringBuffer sb = new StringBuffer();
   
    SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
    while(siteNodeVO != null)
    {
      String pageName = siteNodeVO.getName();
      if(structureLanguageId != null)
      {
        ContentVersionVO cvVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(siteNodeVO.getMetaInfoContentId(), structureLanguageId);
        if(cvVO != null)
        {
          String navigationTitle = ContentVersionController.getContentVersionController().getAttributeValue(cvVO, "NavigationTitle", true);
          if(pageName != null && !pageName.equals(""))
            pageName = navigationTitle;
        }
        else
        {
          ContentVersionVO masterCVVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(siteNodeVO.getMetaInfoContentId(), structureLanguageId);
          if(masterCVVO != null)
          {
            String navigationTitle = ContentVersionController.getContentVersionController().getAttributeValue(masterCVVO, "NavigationTitle", true);
            if(pageName != null && !pageName.equals(""))
              pageName = navigationTitle;
          }
        }
      }
     
      sb.insert(0, "/" + pageName);
      if(siteNodeVO.getParentSiteNodeId() != null)
        siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVO.getParentSiteNodeId());
      else
        siteNodeVO = null;
    }
   
    return sb.toString();
View Full Code Here

   
  public String getSiteNodePath(Integer siteNodeId, Database db) throws Exception
  {
    StringBuffer sb = new StringBuffer();
   
    SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId, db);
    while(siteNodeVO != null)
    {
      sb.insert(0, "/" + siteNodeVO.getName());
      if(siteNodeVO.getParentSiteNodeId() != null)
        siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVO.getParentSiteNodeId(), db);
      else
        siteNodeVO = null;
    }
   
    return sb.toString();
View Full Code Here

      dc.setUseFullUrl(true);
      dc.setSiteNodeId(siteNodeId);
      dc.setContentId(-1);

      List<LanguageVO> languageVOList =  LanguageController.getController().getLanguageVOList(repositoryId, db);
      SiteNodeVO siteNodeVO = SiteNodeController.getSiteNodeVOWithId(siteNodeId, db);
      for(LanguageVO languageVO : languageVOList)
      {
        ContentVersionVO currentPublishedMetainfoVersion = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(siteNodeVO.getMetaInfoContentId(), languageVO.getLanguageId(), ContentVersionVO.PUBLISHED_STATE, db);
        if (logger.isDebugEnabled())
        {
          logger.debug("Getting NiceUri path for SiteNode: " + siteNodeId + ", in language: " + languageVO.getLanguageId() + ". SiteNode has version in current language: " + (currentPublishedMetainfoVersion != null));
        }
        if (currentPublishedMetainfoVersion != null)
View Full Code Here

                 else if(o instanceof SiteNodeVersionVO)
                 {
                   SiteNodeVersionVO snvo = (SiteNodeVersionVO)o;
                   logger.info("Replacing in sn:" + snvo.getId());
                  
                           SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(snvo.getSiteNodeId(), db);
                     LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(siteNodeVO.getRepositoryId(), db);
                     ContentVersionVO cv = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(siteNodeVO.getMetaInfoContentId(), masterLanguageVO.getId(), db);
                     logger.info("Replacing in:" + cv.getVersionValue());
                  
                   String newVersionValue = cv.getVersionValue(); //.replaceAll("\"" + oldContentId + "\"", "\"" + newContentId + "\"");
                  
                   Pattern p = Pattern.compile("<binding.*?>");
 
View Full Code Here

           
          String id = qualifyerXML.substring(idIndex + 4, endIndex);
         
          try
          {
            SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(new Integer(id));
            relatedPages.add(siteNodeVO);
          }
          catch(Exception e)
          {
              logger.info("An error occurred when looking up one of the related Pages FromXML:" + e.getMessage(), e);
View Full Code Here

          clearCache(SiteNodeVersionImpl.class);

          try
          {
            MediumSiteNodeVersionImpl siteNodeVersion = (MediumSiteNodeVersionImpl)object;
            SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVersion.getValueObject().getSiteNodeId(), true);
            CacheController.clearCacheForGroup("siteNodeCacheWithLatestVersion", "siteNode_" + siteNodeVO.getId());
            CacheController.clearCacheForGroup("childSiteNodesCache", "siteNode_" + siteNodeVO.getId());
            CacheController.clearCacheForGroup("childPagesCache", "siteNode_" + siteNodeVO.getId());
            if(siteNodeVO.getParentSiteNodeId() != null)
            {
              CacheController.clearCacheForGroup("childSiteNodesCache", "siteNode_" + siteNodeVO.getParentSiteNodeId());         
              CacheController.clearCacheForGroup("childPagesCache", "siteNode_" + siteNodeVO.getParentSiteNodeId());
            }
           
            CacheController.clearCacheForGroup("latestSiteNodeVersionCache", "siteNode_" + siteNodeVO.getId());
          }
          catch (Exception e)
          {
            logger.warn("Error in JDOCallback:" + e.getMessage(), e);
          }
        }
        else
        {
          SiteNodeVersionImpl siteNodeVersion = (SiteNodeVersionImpl)object;
         
          clearCache(MediumSiteNodeVersionImpl.class, siteNodeVersion.getId());
          try
          {
            SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVersion.getValueObject().getSiteNodeId(), true);
            if(siteNodeVO != null)
            { 
              CacheController.clearCacheForGroup("siteNodeCacheWithLatestVersion", "siteNode_" + siteNodeVO.getId());
              CacheController.clearCacheForGroup("childSiteNodesCache", "siteNode_" + siteNodeVO.getId());
              CacheController.clearCacheForGroup("childPagesCache", "siteNode_" + siteNodeVO.getId());
              if(siteNodeVO.getParentSiteNodeId() != null)
              {
                CacheController.clearCacheForGroup("childSiteNodesCache", "siteNode_" + siteNodeVO.getParentSiteNodeId());         
                CacheController.clearCacheForGroup("childPagesCache", "siteNode_" + siteNodeVO.getParentSiteNodeId());         
              }
             
              CacheController.clearCacheForGroup("latestSiteNodeVersionCache", "siteNode_" + siteNodeVO.getId());
            }
          }
          catch (Exception e)
          {
            logger.warn("Error in JDOCallback:" + e.getMessage(), e);
View Full Code Here

            MediumSiteNodeVersionImpl siteNodeVersion = (MediumSiteNodeVersionImpl)object;
            CacheController.clearCacheForGroup("siteNodeCacheWithLatestVersion", "siteNode_" + (Integer)getObjectIdentity(object));
            CacheController.clearCacheForGroup("childSiteNodesCache", "siteNode_" + siteNodeVersion.getValueObject().getSiteNodeId());
            CacheController.clearCacheForGroup("childPagesCache", "siteNode_" + siteNodeVersion.getValueObject().getSiteNodeId());
            CacheController.clearCacheForGroup("latestSiteNodeVersionCache", "siteNode_" + siteNodeVersion.getValueObject().getSiteNodeId());
            SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVersion.getValueObject().getSiteNodeId(), true);
            if(siteNodeVO.getParentSiteNodeId() != null)
            {
              CacheController.clearCacheForGroup("childSiteNodesCache", "siteNode_" + siteNodeVO.getParentSiteNodeId());         
              CacheController.clearCacheForGroup("childPagesCache", "siteNode_" + siteNodeVO.getParentSiteNodeId());         
            }
          }
          catch (Exception e)
          {
            logger.warn("Error in JDOCallback:" + e.getMessage(), e);
          }
        }
        else
        {
          clearCache(MediumSiteNodeVersionImpl.class);
          try
          {
            SiteNodeVersionImpl siteNodeVersion = (SiteNodeVersionImpl)object;
            Integer siteNodeId = siteNodeVersion.getSiteNodeId();
            if(siteNodeId == null && siteNodeVersion.getOwningSiteNode() != null)
              siteNodeId = siteNodeVersion.getOwningSiteNode().getId();

            CacheController.clearCacheForGroup("siteNodeCacheWithLatestVersion", "siteNode_" + siteNodeId);
            CacheController.clearCacheForGroup("childSiteNodesCache", "siteNode_" + siteNodeId);
            CacheController.clearCacheForGroup("childPagesCache", "siteNode_" + siteNodeId);
            CacheController.clearCacheForGroup("latestSiteNodeVersionCache", "siteNode_" + siteNodeId);
            SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVersion.getValueObject().getSiteNodeId(), true);
            if(siteNodeVO.getParentSiteNodeId() != null)
            {
              CacheController.clearCacheForGroup("childSiteNodesCache", "siteNode_" + siteNodeVO.getParentSiteNodeId());
              CacheController.clearCacheForGroup("childPagesCache", "siteNode_" + siteNodeVO.getParentSiteNodeId());
            }
          }
          catch (Exception e)
          {
            logger.warn("Error in JDOCallback:" + e.getMessage(), e);
View Full Code Here

        throw new SystemException("There was no template bound to this page which makes it impossible to render.")
     
      ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageId);
      if(contentVersionVO == null)
      {
        SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
        LanguageVO masterLanguage = LanguageController.getController().getMasterLanguage(siteNodeVO.getRepositoryId());
        contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), masterLanguage.getLanguageId());
      }
     
      template = ContentVersionController.getContentVersionController().getAttributeValue(contentVersionVO.getId(), "ComponentStructure", false);
     
View Full Code Here

    {
          beginTransaction(db);
 
          try
          {
        SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId, db);
        ContentVersionVO cvVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(siteNodeVO.getMetaInfoContentId(), sortLanguageId, db)
        if(cvVO != null)
        {
          String hideInNavigation = ContentVersionController.getContentVersionController().getAttributeValue(cvVO, "HideInNavigation", false);
          //System.out.println("hideInNavigation:" + hideInNavigation + " on " + sortLanguageId + "/" + cvVO.getContentVersionId());
          if(hideInNavigation == null || hideInNavigation.equals("") || hideInNavigation.equalsIgnoreCase("false"))
View Full Code Here

TOP

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

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.