|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.action.CommonResourceAbstractBase
org.alfresco.repo.action.ParameterizedItemAbstractBase
org.alfresco.repo.action.executer.ActionExecuterAbstractBase
org.alfresco.repo.rendition.executer.AbstractRenderingEngine
org.alfresco.repo.rendition.executer.BaseTemplateRenderingEngine
public abstract class BaseTemplateRenderingEngine
This abstract class forms a basis for all rendering engines that are built
around the Template Service.
A template must be specified either as a String using the
PARAM_TEMPLATE parameter, as a NodeRef using the PARAM_TEMPLATE_NODE
parameter or as a file path location using the PARAM_TEMPLATE_PATH parameter.
The RenderingEngine reads from these parameters with the following priority:
PARAM_TEMPLATE > PARAM_TEMPLATE_NODE > PARAM_TEMPLATE_PATH.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine |
|---|
AbstractRenderingEngine.RenderingContext |
| Field Summary | |
|---|---|
static java.lang.String |
PARAM_MODEL
This optional Map<String, Serializable> parameter
can be used to pass additional arguments to the templating engine when processing a
template. |
static java.lang.String |
PARAM_TEMPLATE
This optional String parameter specifies the template in a simple
String format.If this parameter is set the Rendering Engine will use it in preference to templates specified by either the PARAM_TEMPLATE_NODE or the PARAM_TEMPLATE_PATH parameters. |
static java.lang.String |
PARAM_TEMPLATE_NODE
This optional NodeRef parameter specifies a node containing the
template to be processed.If a value is specified for PARAM_TEMPLATE then this parameter will be ignored. If a value is specified for this parameter it will be used in preference to values specified for the PARAM_TEMPLATE_PATH parameter. |
static java.lang.String |
PARAM_TEMPLATE_PATH
This optional String parameter specifies a file path location for
the template to be processed.If a value is specified for PARAM_TEMPLATE or PARAM_TEMPLATE_NODE then this parameter will be ignored. |
| Fields inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine |
|---|
CONTENT_READER_NOT_FOUND_MESSAGE, contentService, mimetypeMap, nodeService, PARAM_ENCODING, PARAM_MIME_TYPE, PARAM_PLACEHOLDER_RESOURCE_PATH, PARAM_RUN_AS, PARAM_SOURCE_CONTENT_PROPERTY, PARAM_TARGET_CONTENT_PROPERTY, PARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGE |
| Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase |
|---|
actionDefinition, applicableTypes, publicAction |
| Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase |
|---|
DISPLAY_LABEL, runtimeActionService |
| Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase |
|---|
name |
| Fields inherited from interface org.alfresco.repo.action.executer.ActionExecuter |
|---|
PARAM_RESULT |
| Constructor Summary | |
|---|---|
BaseTemplateRenderingEngine()
|
|
| Method Summary | |
|---|---|
protected abstract java.lang.Object |
buildModel(AbstractRenderingEngine.RenderingContext context)
Create the model that will be passed to the template service for rendering with the appropriate template. |
protected java.lang.String |
getParamDisplayLabel(java.lang.String paramName)
This method gets the parameter definition display label from the properties file. |
protected java.util.Collection |
getParameterDefinitions()
Supplies the list of parameters required by this rendering engine. |
org.alfresco.service.cmr.search.SearchService |
getSearchService()
|
protected org.alfresco.service.cmr.repository.NodeRef |
getTemplateNode(AbstractRenderingEngine.RenderingContext context)
|
TemplateService |
getTemplateService()
|
protected abstract java.lang.String |
getTemplateType()
Get the type of template that is to be used. |
protected void |
render(AbstractRenderingEngine.RenderingContext context)
|
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
|
void |
setTemplateService(TemplateService templateService)
|
| Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase |
|---|
execute, getActionDefinition, getQueueName, init, setApplicableTypes, setPublicAction, setQueueName |
| Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase |
|---|
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getParameterDefintions, getTitleKey, setRuntimeActionService, toString |
| Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase |
|---|
setBeanName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PARAM_MODEL
Map<String, Serializable> parameter
can be used to pass additional arguments to the templating engine when processing a
template.
public static final java.lang.String PARAM_TEMPLATE
String parameter specifies the template in a simple
String format.
public static final java.lang.String PARAM_TEMPLATE_NODE
NodeRef parameter specifies a node containing the
template to be processed.
public static final java.lang.String PARAM_TEMPLATE_PATH
String parameter specifies a file path location for
the template to be processed.
| Constructor Detail |
|---|
public BaseTemplateRenderingEngine()
| Method Detail |
|---|
protected void render(AbstractRenderingEngine.RenderingContext context)
render in class AbstractRenderingEngineprotected org.alfresco.service.cmr.repository.NodeRef getTemplateNode(AbstractRenderingEngine.RenderingContext context)
protected abstract java.lang.Object buildModel(AbstractRenderingEngine.RenderingContext context)
context - The context of the rendering request
protected abstract java.lang.String getTemplateType()
protected java.lang.String getParamDisplayLabel(java.lang.String paramName)
getParamDisplayLabel in class AbstractRenderingEngineparamName - the name of the parameter
protected java.util.Collection getParameterDefinitions()
AbstractRenderingEngine
getParameterDefinitions in class AbstractRenderingEnginepublic void setTemplateService(TemplateService templateService)
templateService - the templateService to setpublic void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
searchService - the searchService to setpublic TemplateService getTemplateService()
public org.alfresco.service.cmr.search.SearchService getSearchService()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||