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);
SiteNodeVO siteNodeVO = templateController.getSiteNode(siteNodeId);
SiteNodeVO rootSiteNodeVO = templateController.getRepositoryRootSiteNode(siteNodeVO.getRepositoryId());
recurseSiteNodeTree(rootSiteNodeVO.getId(), languageId, templateController, principal/*, dbWrapper*/, 1, 0);
List templates = ContentController.getContentController().getContentVOWithContentTypeDefinition("HTMLTemplate", dbWrapper.getDatabase());
Iterator templatesIterator = templates.iterator();
{
ContentVO template = (ContentVO)templatesIterator.next();
String templateString = templateController.getContentAttribute(template.getId(), languageId, "Template", true);
}
RepositoryVO repository = RepositoryDeliveryController.getRepositoryDeliveryController().getMasterRepository(dbWrapper.getDatabase());
RepositoryDeliveryController.getRepositoryDeliveryController().getRepositoryVOListFromServerName(dbWrapper.getDatabase(), "localhost", "8080", repository.getName(), "");