Search in sources :

Example 6 with ExecutorBeanContainer

use of org.entando.entando.aps.system.services.controller.executor.ExecutorBeanContainer in project entando-core by entando.

the class AbstractTestExecutorService method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    try {
        Configuration config = new Configuration();
        DefaultObjectWrapper wrapper = new DefaultObjectWrapper();
        config.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);
        config.setObjectWrapper(wrapper);
        config.setTemplateExceptionHandler(TemplateExceptionHandler.DEBUG_HANDLER);
        TemplateModel templateModel = this.createModel(wrapper);
        ExecutorBeanContainer ebc = new ExecutorBeanContainer(config, templateModel);
        super.getRequestContext().addExtraParam(SystemConstants.EXTRAPAR_EXECUTOR_BEAN_CONTAINER, ebc);
    } catch (Throwable t) {
        throw new Exception(t);
    }
}
Also used : Configuration(freemarker.template.Configuration) DefaultObjectWrapper(freemarker.template.DefaultObjectWrapper) TemplateModel(freemarker.template.TemplateModel) ExecutorBeanContainer(org.entando.entando.aps.system.services.controller.executor.ExecutorBeanContainer)

Aggregations

ExecutorBeanContainer (org.entando.entando.aps.system.services.controller.executor.ExecutorBeanContainer)6 TemplateModel (freemarker.template.TemplateModel)4 RequestContext (com.agiletec.aps.system.RequestContext)3 AllHttpScopesHashModel (freemarker.ext.servlet.AllHttpScopesHashModel)2 Configuration (freemarker.template.Configuration)2 DefaultObjectWrapper (freemarker.template.DefaultObjectWrapper)2 Template (freemarker.template.Template)2 StringReader (java.io.StringReader)2 Writer (java.io.Writer)2 ServletRequest (javax.servlet.ServletRequest)2 JspException (javax.servlet.jsp.JspException)2 GuiFragment (org.entando.entando.aps.system.services.guifragment.GuiFragment)2 IGuiFragmentManager (org.entando.entando.aps.system.services.guifragment.IGuiFragmentManager)2 ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)1 ActionContext (com.opensymphony.xwork2.ActionContext)1 Environment (freemarker.core.Environment)1 StringModel (freemarker.ext.beans.StringModel)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 OutputStreamWriter (java.io.OutputStreamWriter)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1