Java 类org.apache.velocity.tools.view.ViewToolManager 实例源码

项目:demyo    文件:Velocity2ToolboxView.java   
@PostConstruct
private void initToolManager() throws IllegalStateException, IOException {
    LOGGER.debug("Configuring toolbox from {}", getToolboxConfigLocation());
    velocityToolManager = new ViewToolManager(getServletContext(), false, true);
    velocityToolManager.setVelocityEngine(getVelocityEngine());
    FileFactoryConfiguration factoryConfig = new XmlFactoryConfiguration(false);
    factoryConfig.read(new ServletContextResource(getServletContext(), getToolboxConfigLocation()).getURL());
    velocityToolManager.configure(factoryConfig);
}
项目:Harvest-JP    文件:VelocityToolsView.java   
@Override
public void afterPropertiesSet() throws Exception {
    super.afterPropertiesSet();

    XmlFactoryConfiguration config = new XmlFactoryConfiguration();
    config.read(getServletContext().getResourceAsStream(getToolboxConfigLocation()));
    toolManager = new ViewToolManager(getServletContext(), false, false);
    toolManager.configure(config);
    toolManager.setVelocityEngine(getVelocityEngine());
}
项目:communote-server    文件:VelocityTemplateManager.java   
public ViewToolManager getToolManager() {
    return getOrBuildToolManager();
}
项目:communote-server    文件:VelocityToolbox2View.java   
/**
 * Returns the shared tool manger
 *
 * @return the manager
 */
private ViewToolManager getToolManager() {
    return WebServiceLocator.instance().getService(VelocityTemplateManager.class)
            .getToolManager();
}