Package io.micronaut.views.velocity
Class VelocityViewsRenderer<T,R> 
java.lang.Object
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 Stringprotected 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 java.lang.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
 - 
folder
 
 - 
 - 
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
@NonNull public @NonNull io.micronaut.core.io.Writable render(@NonNull @NonNull String view, @Nullable T data, @NonNull R request) - Specified by:
 renderin interfaceViewsRenderer<T,R> - Parameters:
 view- view name to be rendereddata- response body to render it with a viewrequest- HTTP request- Returns:
 - A writable where the view will be written to.
 
 - 
render
public void render(@NonNull @NonNull String view, org.apache.velocity.VelocityContext context, String encoding, Writer writer) - Parameters:
 view- The viewcontext- The contextencoding- The encodingwriter- The writer
 - 
exists
- Specified by:
 existsin interfaceViewsRenderer<T,R> - Parameters:
 viewName- view name to be rendered- Returns:
 - true if a template can be found for the supplied view name.
 
 
 -