Examples of SiteNodeVO


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

   * This method returns the value-object of the parent of a specific siteNode.
   */
 
  public static SiteNodeVO getParentSiteNodeVO(Integer siteNodeId, Database db) throws SystemException, Bug, Exception
  {
    SiteNodeVO parent = null;
    
    SiteNodeVO siteNodeVO = getSiteNodeVOWithId(siteNodeId, db);
    if(siteNodeVO != null && siteNodeVO.getParentSiteNodeId() != null)
      parent = getSiteNodeVOWithId(siteNodeVO.getParentSiteNodeId(), db);
   
    return parent;     
  }
View Full Code Here

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

   */
         
     public SiteNodeVO getRootSiteNodeVO(Integer repositoryId) throws ConstraintException, SystemException
     {
       String key = "rootSiteNode_" + repositoryId;
       SiteNodeVO cachedRootNodeVO = (SiteNodeVO)CacheController.getCachedObject("repositoryRootNodesCache", key);
    if(cachedRootNodeVO != null)
    {
      if(logger.isInfoEnabled())
        logger.info("There was an cachedRootNodeVO:" + cachedRootNodeVO);
      return cachedRootNodeVO;
    }

        Database db = CastorDatabaseService.getDatabase();

        SiteNodeVO siteNodeVO = null;

        beginTransaction(db);

        try
        {
View Full Code Here

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

   * This method fetches the root siteNode for a particular repository within a certain transaction.
   */
         
  public SiteNodeVO getRootSiteNodeVO(Integer repositoryId, Database db) throws ConstraintException, SystemException, Exception
  {
    SiteNodeVO siteNodeVO = null;
   
    OQLQuery oql = db.getOQLQuery( "SELECT s FROM org.infoglue.cms.entities.structure.impl.simple.SmallSiteNodeImpl s WHERE is_undefined(s.parentSiteNode) AND s.repositoryId = $1");
    oql.bind(repositoryId);
   
    QueryResults results = oql.execute(Database.READONLY);
View Full Code Here

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

   * is handling.
   */

  public BaseEntityVO getNewVO()
  {
    return new SiteNodeVO();
  }
View Full Code Here

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

       
        //SiteNode parentSiteNode = newSiteNode.getParentSiteNode();
        Integer parentSiteNodeId = newSiteNode.getParentSiteNodeId();
        while(parentSiteNodeId != null)
        {
          SiteNodeVO parentSiteNode = getSmallSiteNodeVOWithId(parentSiteNodeId, db);
            path = "/" + parentSiteNode.getName() + path;
            parentSiteNodeId = parentSiteNode.getParentSiteNodeId();
            //parentSiteNode = parentSiteNode.getParentSiteNode();
        }
        path = basePath + path;
       
        RequestAnalyser.getRequestAnalyser().registerComponentStatistics("Getting path", t.getElapsedTime());
View Full Code Here

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

    // Get the children of this content and do the recursion
    List childSiteNodeList = SiteNodeController.getController().getSiteNodeChildrenVOList(siteNodeId);
    Iterator cit = childSiteNodeList.iterator();
    while (cit.hasNext())
    {
        SiteNodeVO siteNodeVO = (SiteNodeVO) cit.next();
       
        if (resultList.size() % 50 == 0)
          processBean.updateProcess("Found " + resultList.size() + " pages so far...");
      getSiteNodeVOWithParentRecursive(siteNodeVO.getId(), processBean, resultList);
    }
 
    return resultList;
  }
View Full Code Here

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

    return siteNodes;
    }

    public SiteNodeVO getSiteNodeVOWithMetaInfoContentId(Integer contentId) throws ConstraintException, SystemException
    {
    SiteNodeVO siteNodeVO = null;

    Integer cachedSiteNodeId = metaInfoSiteNodeIdMap.get(contentId);
    if(cachedSiteNodeId != null)
    {
      siteNodeVO = getSiteNodeVOWithId(cachedSiteNodeId, false);
View Full Code Here

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

    private static Map<Integer,Integer> metaInfoSiteNodeIdMap = new ConcurrentHashMap<Integer,Integer>();
   
    public SiteNodeVO getSiteNodeVOWithMetaInfoContentId(Database db, Integer contentId) throws ConstraintException, SystemException, Exception
    {
    SiteNodeVO siteNodeVO = null;
   
    Integer cachedSiteNodeId = metaInfoSiteNodeIdMap.get(contentId);
    if(cachedSiteNodeId != null)
    {
      siteNodeVO = getSiteNodeVOWithId(cachedSiteNodeId, db);
    }
    else
    {
      //logger.error("Asking for heavy lookup on meta info content id:" + contentId);
      //Thread.dumpStack();
      //System.out.println("Asking for mapping:" + contentId);
      OQLQuery oql = db.getOQLQuery("SELECT sn FROM org.infoglue.cms.entities.structure.impl.simple.SmallSiteNodeImpl sn WHERE sn.metaInfoContentId = $1 ORDER BY sn.siteNodeId");
        oql.bind(contentId);
       
        QueryResults results = oql.execute(Database.READONLY);
     
        if(results.hasMore())
          {
        SmallSiteNodeImpl siteNode = (SmallSiteNodeImpl)results.next();
        siteNodeVO = siteNode.getValueObject();
        logger.info("Caching " + siteNodeVO.getId() + " on " + contentId);
        metaInfoSiteNodeIdMap.put(contentId, siteNodeVO.getId());
          }
 
      results.close();
      oql.close();
    }
View Full Code Here

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

          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 parentSiteNodeVO = getParentSiteNode(siteNodeId);
          if(parentSiteNodeVO != null)
            protectedSiteNodeVersionId = getProtectedSiteNodeVersionId(parentSiteNodeVO.getId());
        }
      }
    }
    catch(Exception e)
    {
View Full Code Here

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

          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 parentSiteNodeVO = getParentSiteNodeVO(siteNodeId, db);
          if(parentSiteNodeVO != null)
            protectedSiteNodeVersionId = getProtectedSiteNodeVersionId(parentSiteNodeVO.getId(), db);
        }
      }
    }
    catch(Exception e)
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.