本文整理汇总了Java中org.alfresco.service.cmr.repository.TemplateProcessor类的典型用法代码示例。如果您正苦于以下问题:Java TemplateProcessor类的具体用法?Java TemplateProcessor怎么用?Java TemplateProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TemplateProcessor类属于org.alfresco.service.cmr.repository包,在下文中一共展示了TemplateProcessor类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processTemplate
import org.alfresco.service.cmr.repository.TemplateProcessor; //导入依赖的package包/类
/**
* @see org.alfresco.service.cmr.repository.TemplateService#processTemplate(java.lang.String, java.lang.String, java.lang.Object, java.io.Writer)
*/
public void processTemplate(String engine, String template, Object model, Writer out)
throws TemplateException
{
try
{
// execute template processor
TemplateProcessor processor = getTemplateProcessor(engine);
processor.process(template, model, out);
}
catch (TemplateException terr)
{
throw terr;
}
catch (Throwable err)
{
throw new TemplateException(err.getMessage(), err);
}
}
示例2: processTemplateString
import org.alfresco.service.cmr.repository.TemplateProcessor; //导入依赖的package包/类
/**
* @see org.alfresco.service.cmr.repository.TemplateService#processTemplateString(java.lang.String, java.lang.String, java.lang.Object, java.io.Writer)
*/
public void processTemplateString(String engine, String template, Object model, Writer out)
throws TemplateException
{
try
{
// execute template processor
TemplateProcessor processor = getTemplateProcessor(engine);
processor.processString(template, model, out);
}
catch (TemplateException terr)
{
throw terr;
}
catch (Throwable err)
{
throw new TemplateException(err.getMessage(), err);
}
}
示例3: onSetUpInTransaction
import org.alfresco.service.cmr.repository.TemplateProcessor; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void onSetUpInTransaction() throws Exception
{
super.onSetUpInTransaction();
this.searchService = (SearchService) this.applicationContext.getBean("SearchService");
this.xsltFunctions = (XSLTFunctions) this.applicationContext.getBean("xsltFunctions");
this.nodeService = (NodeService) this.applicationContext.getBean("NodeService");
this.contentService = (ContentService) this.applicationContext.getBean("ContentService");
this.fileFolderService = (FileFolderService) this.applicationContext.getBean("FileFolderService");
this.xsltProcessor = (TemplateProcessor) this.applicationContext.getBean("xsltProcessor");
this.templateService = (TemplateService) this.applicationContext.getBean("TemplateService");
ResultSet rs = searchService.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_XPATH,
"/app:company_home");
this.companyHome = rs.getNodeRef(0);
}
示例4: register
import org.alfresco.service.cmr.repository.TemplateProcessor; //导入依赖的package包/类
/**
* Registers this processor with the relevant services
*/
public void register()
{
if (this instanceof ScriptProcessor)
{
scriptService.registerScriptProcessor((ScriptProcessor)this);
}
if (this instanceof TemplateProcessor)
{
templateService.registerTemplateProcessor((TemplateProcessor)this);
}
}
示例5: getTemplateProcessor
import org.alfresco.service.cmr.repository.TemplateProcessor; //导入依赖的package包/类
/**
* @see org.alfresco.service.cmr.repository.TemplateService#getTemplateProcessor(java.lang.String)
*/
public TemplateProcessor getTemplateProcessor(String engine)
{
if (engine == null)
{
engine = this.defaultTemplateEngine;
}
return this.processors.get(engine);
}
示例6: onSetUpInTransaction
import org.alfresco.service.cmr.repository.TemplateProcessor; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void onSetUpInTransaction() throws Exception
{
super.onSetUpInTransaction();
this.nodeService = (NodeService) this.applicationContext.getBean("NodeService");
this.contentService = (ContentService) this.applicationContext.getBean("ContentService");
this.fileFolderService = (FileFolderService) this.applicationContext.getBean("FileFolderService");
this.xsltProcessor = (TemplateProcessor) this.applicationContext.getBean("xsltProcessor");
this.templateService = (TemplateService) this.applicationContext.getBean("TemplateService");
this.renditionService = (RenditionService) this.applicationContext.getBean("RenditionService");
this.companyHome = this.applicationContext.getBean("repositoryHelper", Repository.class).getCompanyHome();
}
示例7: onSetUpInTransaction
import org.alfresco.service.cmr.repository.TemplateProcessor; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void onSetUpInTransaction() throws Exception
{
super.onSetUpInTransaction();
this.nodeService = (NodeService) this.applicationContext.getBean("NodeService");
this.contentService = (ContentService) this.applicationContext.getBean("ContentService");
this.fileFolderService = (FileFolderService) this.applicationContext.getBean("FileFolderService");
this.xsltProcessor = (TemplateProcessor) this.applicationContext.getBean("xsltProcessor");
this.templateService = (TemplateService) this.applicationContext.getBean("TemplateService");
this.repositoryHelper = (Repository) this.applicationContext.getBean("repositoryHelper");
this.companyHome = repositoryHelper.getCompanyHome();
}
示例8: registerTemplateProcessor
import org.alfresco.service.cmr.repository.TemplateProcessor; //导入依赖的package包/类
/**
* @see org.alfresco.service.cmr.repository.TemplateService#registerTemplateProcessor(org.alfresco.service.cmr.repository.TemplateProcessor)
*/
public void registerTemplateProcessor(TemplateProcessor templateProcessor)
{
this.processors.put(templateProcessor.getName(), templateProcessor);
this.processorNamesByExtension.put(templateProcessor.getExtension(), templateProcessor.getName());
}