public class AnchorFreeMarkerDirective extends RenderServiceFreeMarkerDirective
This class uses a RenderService to render an HTML anchor that provides a link
to the object defined by the supplied parameters. It is the FreeMarker equivalent of the custom JSP
ObjectAnchorTag.
| Constructor and Description |
|---|
AnchorFreeMarkerDirective(String directiveName,
RenderService renderService)
Instantiates a new
AnchorFreeMarkerDirective. |
| 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 implemented to satisfy the
TemplateDirectiveModel interface that is
implemented by the AbstractFreeMarkerDirective in the class hierarchy. |
getObject, getRenderService, getRequestContextpublic AnchorFreeMarkerDirective(String directiveName, RenderService renderService)
Instantiates a new AnchorFreeMarkerDirective. The RenderService will be
used by calling its generateAnchorLink method to generate the
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.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 implemented to satisfy the TemplateDirectiveModel interface that is
implemented by the AbstractFreeMarkerDirective in the class hierarchy. It retrieves the
any parameters that have been supplied when invoking the directive and passes them onto the
PresentationService to render the HTML anchor which is then output.
freemarker.template.TemplateExceptionIOExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.