Package org.infoglue.deliver.controllers.kernel.impl.simple

Examples of org.infoglue.deliver.controllers.kernel.impl.simple.TemplateController


   * @return the template controller.
   * @throws JspTagException if the template controller wasn't found.
   */
  protected TemplateController getController() throws JspTagException
  {
      TemplateController controller;
     
      try
    {
      controller = (TemplateController) this.pageContext.getRequest().getAttribute("org.infoglue.cms.deliver.templateLogic");
      if(controller == null)
View Full Code Here


        BrowserBean browserBean = new BrowserBean();
      //this.browserBean.setRequest(getRequest());

    NodeDeliveryController nodeDeliveryController = NodeDeliveryController.getNodeDeliveryController(siteNodeId, languageId, contentId);
    IntegrationDeliveryController integrationDeliveryController  = IntegrationDeliveryController.getIntegrationDeliveryController(siteNodeId, languageId, contentId);
    TemplateController templateController = getTemplateController(dbWrapper, siteNodeId, languageId, contentId, new FakeHttpServletRequest(), (InfoGluePrincipal)principal, false, browserBean, nodeDeliveryController, integrationDeliveryController);
   
    DeliveryContext deliveryContext = DeliveryContext.getDeliveryContext(/*(InfoGluePrincipal)this.principal*/);
    //deliveryContext.setRepositoryName(repositoryName);
    deliveryContext.setSiteNodeId(siteNodeId);
    deliveryContext.setContentId(contentId);
    deliveryContext.setLanguageId(languageId);
    deliveryContext.setPageKey("" + System.currentTimeMillis());
    //deliveryContext.setSession(new Session(fakeHttpServletSession));
    //deliveryContext.setInfoGlueAbstractAction(null);
    deliveryContext.setHttpServletRequest(fakeHttpServletRequest);
    deliveryContext.setHttpServletResponse(fakeHttpServletResponse);

    templateController.setDeliveryContext(deliveryContext);
   
    //We don't want a page cache entry to be created
    deliveryContext.setDisablePageCache(true);

    Integer rootMetaInfoContentId = templateController.getMetaInformationContentId(siteNodeId);
    logger.info("rootMetaInfoContentId:" + rootMetaInfoContentId);
   
    recurseSiteNodeTree(siteNodeId, languageId, templateController);

      Integer topContentId = null;
      ContentVO contentVO = templateController.getContent(rootMetaInfoContentId);
      logger.info("contentVO:" + contentVO.getName());
    ContentVO parentContentVO = templateController.getContent(contentVO.getParentContentId());
    logger.info("parentContentVO:" + parentContentVO.getName());
    while(parentContentVO != null)
      {
            topContentId = parentContentVO.getContentId();

            if(parentContentVO.getParentContentId() != null)
                parentContentVO = templateController.getContent(parentContentVO.getParentContentId());
            else
                parentContentVO = null;
      }
     
    logger.info("topContentId:" + topContentId);
View Full Code Here

   * normal site-delivery version.
   */
 
  public TemplateController getTemplateController(DatabaseWrapper dbWrapper, Integer siteNodeId, Integer languageId, Integer contentId, HttpServletRequest request, InfoGluePrincipal infoGluePrincipal, boolean allowEditOnSightAtAll, BrowserBean browserBean, NodeDeliveryController nodeDeliveryController, IntegrationDeliveryController integrationDeliveryController) throws SystemException, Exception
  {
    TemplateController templateController = new BasicTemplateController(dbWrapper, infoGluePrincipal);
    templateController.setStandardRequestParameters(siteNodeId, languageId, contentId)
    templateController.setHttpRequest(request)
    templateController.setBrowserBean(browserBean);
    templateController.setDeliveryControllers(nodeDeliveryController, null, integrationDeliveryController)
   
    return templateController;   
  }
View Full Code Here

        }
      }
     
      this.nodeDeliveryController           = NodeDeliveryController.getNodeDeliveryController(getSiteNodeId(), getLanguageId(), getContentId());
      this.integrationDeliveryController     = IntegrationDeliveryController.getIntegrationDeliveryController(getSiteNodeId(), getLanguageId(), getContentId());
      TemplateController templateController   = getTemplateController(dbWrapper, getSiteNodeId(), getLanguageId(), getContentId(), getRequest(), (InfoGluePrincipal)principal, false);
      this.navigationTitle = templateController.getPageNavTitle(this.getSiteNodeId());

      closeTransaction(dbWrapper.getDatabase());
    }
    catch(Exception e)
    {
View Full Code Here

TOP

Related Classes of org.infoglue.deliver.controllers.kernel.impl.simple.TemplateController

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.