public class RenderComponentDirective extends Object implements freemarker.template.TemplateDirectiveModel
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_PARAM_NAME |
static String |
COMPONENT_PATH_PARAM_NAME |
protected String |
includeElementName |
static String |
KEY_COMPONENT_MODEL |
protected org.springframework.beans.factory.ObjectFactory<freemarker.template.SimpleHash> |
modelFactory |
protected ScriptFactory |
scriptFactory |
protected ScriptResolver |
scriptResolver |
protected javax.servlet.ServletContext |
servletContext |
protected SiteItemService |
siteItemService |
protected String |
templateNamePrefix |
protected String |
templateNameSuffix |
protected String |
templateXPathQuery |
| Constructor and Description |
|---|
RenderComponentDirective() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
createScriptVariables(SiteItem component,
Map<String,Object> model) |
void |
execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body) |
protected void |
executeScript(Script script,
Map<String,Object> scriptVariables,
freemarker.core.Environment env) |
protected Map<String,Object> |
executeScripts(SiteItem component,
freemarker.core.Environment env) |
protected SiteItem |
getComponent(String componentPath,
freemarker.core.Environment env) |
protected SiteItem |
getComponentFromNode(freemarker.template.TemplateModel componentParam,
freemarker.core.Environment env) |
protected SiteItem |
getComponentFromPath(freemarker.template.TemplateModel componentPathParam,
freemarker.core.Environment env) |
protected freemarker.template.SimpleHash |
getComponentModel(SiteItem component,
Map<String,Object> scriptsModel) |
protected freemarker.template.Template |
getComponentTemplate(SiteItem component,
freemarker.core.Environment env) |
protected String |
getComponentTemplateName(SiteItem component,
freemarker.core.Environment env) |
protected void |
processComponentTemplate(freemarker.template.Template template,
freemarker.template.SimpleHash model,
Writer output,
freemarker.core.Environment env) |
void |
setIncludeElementName(String includeElementName) |
void |
setModelFactory(org.springframework.beans.factory.ObjectFactory<freemarker.template.SimpleHash> modelFactory) |
void |
setScriptFactory(ScriptFactory scriptFactory) |
void |
setScriptResolver(ScriptResolver scriptResolver) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
void |
setSiteItemService(SiteItemService siteItemService) |
void |
setTemplateNamePrefix(String templateNamePrefix) |
void |
setTemplateNameSuffix(String templateNameSuffix) |
void |
setTemplateXPathQuery(String templateXPathQuery) |
public static final String KEY_COMPONENT_MODEL
public static final String COMPONENT_PARAM_NAME
public static final String COMPONENT_PATH_PARAM_NAME
protected javax.servlet.ServletContext servletContext
protected SiteItemService siteItemService
protected ScriptFactory scriptFactory
protected org.springframework.beans.factory.ObjectFactory<freemarker.template.SimpleHash> modelFactory
protected String templateXPathQuery
protected String templateNamePrefix
protected String templateNameSuffix
protected String includeElementName
protected ScriptResolver scriptResolver
public void setServletContext(javax.servlet.ServletContext servletContext)
public void setSiteItemService(SiteItemService siteItemService)
public void setScriptFactory(ScriptFactory scriptFactory)
public void setModelFactory(org.springframework.beans.factory.ObjectFactory<freemarker.template.SimpleHash> modelFactory)
public void setTemplateXPathQuery(String templateXPathQuery)
public void setTemplateNamePrefix(String templateNamePrefix)
public void setTemplateNameSuffix(String templateNameSuffix)
public void setIncludeElementName(String includeElementName)
public void setScriptResolver(ScriptResolver scriptResolver)
public void execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
throws freemarker.template.TemplateException
execute in interface freemarker.template.TemplateDirectiveModelfreemarker.template.TemplateExceptionprotected SiteItem getComponentFromNode(freemarker.template.TemplateModel componentParam, freemarker.core.Environment env) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected SiteItem getComponentFromPath(freemarker.template.TemplateModel componentPathParam, freemarker.core.Environment env) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected SiteItem getComponent(String componentPath, freemarker.core.Environment env) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected Map<String,Object> executeScripts(SiteItem component, freemarker.core.Environment env) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected Map<String,Object> createScriptVariables(SiteItem component, Map<String,Object> model)
protected void executeScript(Script script, Map<String,Object> scriptVariables, freemarker.core.Environment env) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected freemarker.template.Template getComponentTemplate(SiteItem component, freemarker.core.Environment env) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected String getComponentTemplateName(SiteItem component, freemarker.core.Environment env) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected freemarker.template.SimpleHash getComponentModel(SiteItem component, Map<String,Object> scriptsModel) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected void processComponentTemplate(freemarker.template.Template template,
freemarker.template.SimpleHash model,
Writer output,
freemarker.core.Environment env)
throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionCopyright © 2014 CrafterCMS. All Rights Reserved.