Class VelocityViewsRenderer<T,R>
java.lang.Object
io.micronaut.views.AbstractViewsRenderer<T,R>
io.micronaut.views.velocity.VelocityViewsRenderer<T,R>
- Type Parameters:
T- The model typeR- The request type
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, ViewsRenderer<T,R>
Renders with templates with Apache Velocity Project.
- Since:
- 1.0
- Author:
- Sergio del Amo, graemerocher
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final VelocityViewsRendererConfigurationprotected final org.apache.velocity.app.VelocityEngineprotected final ViewsConfigurationFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionVelocityViewsRenderer(ViewsConfiguration viewsConfiguration, VelocityViewsRendererConfiguration velocityConfiguration, org.apache.velocity.app.VelocityEngine velocityEngine) -
Method Summary
Methods inherited from class AbstractViewsRenderer
defaultExtension, getTemplate, viewLocationWithExtension, viewLocationWithoutExtension, viewNameWithExtensionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Field Details
-
velocityEngine
protected final org.apache.velocity.app.VelocityEngine velocityEngine -
viewsConfiguration
-
velocityConfiguration
-
-
Constructor Details
-
VelocityViewsRenderer
@Inject public VelocityViewsRenderer(ViewsConfiguration viewsConfiguration, VelocityViewsRendererConfiguration velocityConfiguration, org.apache.velocity.app.VelocityEngine velocityEngine) - Parameters:
viewsConfiguration- Views ConfigurationvelocityConfiguration- Velocity ConfigurationvelocityEngine- Velocity Engine
-
-
Method Details
-
render
-
render
-
exists
Description copied from class:AbstractViewsRendererDetermines whether a template resource for the given view name is available.Returns
falsewhen this renderer was created without a resource loader.- Specified by:
existsin interfaceViewsRenderer<T,R> - Overrides:
existsin classAbstractViewsRenderer<T,R> - Parameters:
viewName- The requested view name, with or without the configured extension- Returns:
- Whether the corresponding template resource exists
-