当前位置: 首页>>代码示例>>Java>>正文


Java TemplateProcessor类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:TemplateServiceImpl.java

示例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);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:TemplateServiceImpl.java

示例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);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:17,代码来源:XSLTProcessorTest.java

示例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);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:15,代码来源:BaseProcessor.java

示例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);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:12,代码来源:TemplateServiceImpl.java

示例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();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:15,代码来源:XSLTRenderingEngineTest.java

示例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();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:14,代码来源:XSLTProcessorTest.java

示例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());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:TemplateServiceImpl.java


注:本文中的org.alfresco.service.cmr.repository.TemplateProcessor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。