public class ResourceFreemarkerTagDirective extends RenderServiceFreeMarkerDirective
Outputs the requested url representation of a resource. Named Resource Examples:
endpoint>/<object id>" />protocol>" endpoint="<endpoint>" object="<object id>" />| Constructor and Description |
|---|
ResourceFreemarkerTagDirective(String directiveName,
RequestContext context,
ModelObject object,
RenderService renderService)
Instantiates a new
ResourceFreemarkerTagDirective. |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
This method is declared by the
TemplateDirectiveModel interface that the abstract
superclass AbstractFreeMarkerDirective implements. |
getObject, getRenderService, getRequestContextpublic ResourceFreemarkerTagDirective(String directiveName, RequestContext context, ModelObject object, RenderService renderService)
Instantiates a new ResourceFreemarkerTagDirective. The RenderService will be
used by calling its generateResourceURL method to generate the URL to output. The directive name is
only needed for generating useful exception messages to assist debugging problems but an effort should be made to
set it correctly
directiveName - The name of the directive represented by the instance of this class.context - A RenderContext required as an argument to the RenderService methods.renderService - A RenderService used to generate the output of the directive.public void execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
throws freemarker.template.TemplateException,
IOException
This method is declared by the TemplateDirectiveModel interface that the abstract
superclass AbstractFreeMarkerDirective implements. It retrieves any properties supplied
when invoking the directive and passes them onto the PresentationService method.
freemarker.template.TemplateExceptionIOExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.