Package org.infoglue.cms.entities.structure

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


        }
    }

  private void testSiteNode(InfoGluePrincipal principal, Integer siteNodeId, Database db) throws ConstraintException, SystemException, Exception
  {
        SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(siteNodeId, db);
        siteNode.getValueObject().setName(siteNode.getValueObject().getName().substring(0,10) + System.currentTimeMillis());

    SiteNodeVersionVO latestSiteNodeVersionVO = SiteNodeVersionController.getController().getLatestSiteNodeVersion(db, siteNode.getSiteNodeId(), false).getValueObject();
    latestSiteNodeVersionVO.setContentType("text/html");
    logger.info("PageKey:" + latestSiteNodeVersionVO.getPageCacheKey());
    latestSiteNodeVersionVO.setPageCacheKey("");
    latestSiteNodeVersionVO.setPageCacheTimeout(null);
    latestSiteNodeVersionVO.setDisableEditOnSight(new Integer(2));
View Full Code Here


      //Thread.sleep(100);
  }
 
  private void recurseSiteNodeTree(Integer siteNodeId, Integer languageId, TemplateController templateController) throws Exception
  {
      SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(siteNodeId, templateController.getDatabase(), true);
      SiteNodeVO siteNodeVO = templateController.getSiteNode(siteNodeId);
      Collection childSiteNodes = siteNode.getChildSiteNodes();
     
      Iterator childSiteNodesIterator = childSiteNodes.iterator();
      while(childSiteNodesIterator.hasNext())
        {
          SiteNode childSiteNode = (SiteNode)childSiteNodesIterator.next();
          recurseSiteNodeTree(childSiteNode.getSiteNodeId(), languageId, templateController);
         
          Integer metaInfoContentId = templateController.getMetaInformationContentId(childSiteNode.getSiteNodeId());
          templateController.getContentAttribute(metaInfoContentId, languageId, "ComponentStructure", true);
        }
  }
View Full Code Here

          beginTransaction(db);

          try
          {
            createSiteNodeWizardInfoBean.getSiteNodeVO().setIsBranch(new Boolean(true));
              SiteNode newSiteNode = SiteNodeControllerProxy.getSiteNodeControllerProxy().acCreate(this.getInfoGluePrincipal(), createSiteNodeWizardInfoBean.getParentSiteNodeId(), createSiteNodeWizardInfoBean.getSiteNodeTypeDefinitionId(), repositoryId, createSiteNodeWizardInfoBean.getSiteNodeVO(), db);           
              newSiteNodeVO = newSiteNode.getValueObject();
              SiteNodeController.getController().createSiteNodeMetaInfoContent(db, newSiteNodeVO, repositoryId, this.getInfoGluePrincipal(), createSiteNodeWizardInfoBean.getPageTemplateContentId(), new ArrayList());
             
              commitTransaction(db);
          }
          catch(Exception e)
View Full Code Here

     
      List<SiteNode> siteNodeList = SiteNodeControllerProxy.getController().getRepositorySiteNodes(repositoryId, db);
      Iterator<SiteNode> siteNodeListIterator = siteNodeList.iterator();
      while(siteNodeListIterator.hasNext())
      {
        SiteNode siteNode = siteNodeListIterator.next();
        siteNode.setIsDeleted(false);
      }
     
      //If any of the validations or setMethods reported an error, we throw them up now before create.
      ceb.throwIfNotEmpty();
   
View Full Code Here

      while(i.hasNext())
      {
        Element child = (Element)i.next();
        String id = child.getStringValue();
       
        SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(new Integer(id), db);
        siteNodes.add(siteNode);      
      }             
    }
    catch(Exception e)
    {
View Full Code Here

      while(i.hasNext())
      {
        Element child = (Element)i.next();
        String id = child.getStringValue();
       
        SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(new Integer(id), db, true);
        siteNodes.add(siteNode);      
      }             
    }
    catch(Exception e)
    {
View Full Code Here

      while(i.hasNext())
      {
        Element child = (Element)i.next();
        String id = child.getStringValue();
       
        SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(new Integer(id), db);
        siteNodes.add(siteNode);      
      }             
    }
    catch(Exception e)
    {
View Full Code Here

        beginTransaction(db);
        t.printElapsedTime("beginTransaction took");

        try
        {
            SiteNode newSiteNode = SiteNodeControllerProxy.getSiteNodeControllerProxy().acCreate(this.getInfoGluePrincipal(), this.parentSiteNodeId, this.siteNodeTypeDefinitionId, this.repositoryId, this.siteNodeVO, db);           
            newSiteNodeVO = newSiteNode.getValueObject();
            t.printElapsedTime("acCreate took");
            SiteNodeController.getController().createSiteNodeMetaInfoContent(db, newSiteNodeVO, this.repositoryId, this.getInfoGluePrincipal(), this.pageTemplateContentId, new ArrayList());
            t.printElapsedTime("createSiteNodeMetaInfoContent took");
           
            commitTransaction(db);
View Full Code Here

        try
        {
          ceb = this.siteNodeVO.validate();
          ceb.throwIfNotEmpty();

          SiteNode newSiteNode = SiteNodeControllerProxy.getSiteNodeControllerProxy().acCreate(this.getInfoGluePrincipal(), this.parentSiteNodeId, this.siteNodeTypeDefinitionId, this.repositoryId, this.siteNodeVO, db);           
            newSiteNodeVO = newSiteNode.getValueObject();
            t.printElapsedTime("acCreate took");

            List<LanguageVO> languages = RepositoryLanguageController.getController().getLanguageVOListForRepositoryId(newSiteNode.getValueObject().getRepositoryId(), db);
            Map<String,String> metaAttributes = new HashMap<String,String>();
          ContentTypeDefinitionVO ctdVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName("Meta info");
          List<ContentTypeAttribute> attributes = ContentTypeDefinitionController.getController().getContentTypeAttributes(ctdVO, false);
          for(LanguageVO languageVO : languages)
          {
View Full Code Here

    {
    ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

    try
    {
      SiteNode siteNode = siteNodeVersion.getOwningSiteNode();
        Collection serviceBindings = siteNodeVersion.getServiceBindings();
        Iterator serviceBindingsIterator = serviceBindings.iterator();
        while(serviceBindingsIterator.hasNext())
        {
            ServiceBinding serviceBinding = (ServiceBinding)serviceBindingsIterator.next();
            serviceBindingsIterator.remove();
            db.remove(serviceBinding);
        }
       
        if(siteNode != null)
            siteNode.getSiteNodeVersions().remove(siteNodeVersion);
     
        db.remove(siteNodeVersion);
    }
    catch(Exception e)
    {
View Full Code Here

TOP

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

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.