Class PugTemplateEngine
- All Implemented Interfaces:
MutinyDelegate
unwrap() shall return an object of class PugConfiguration
Thís interface has been copied from JadeTemplateEngine.java. Authors of JadeTemplateEngine.java are Tim Fox, Paulo Lopes (pmlopes), Julien Viet (vietj), Roman Novikov (mystdeim), nEJC (mrnejc), Yunyu Lin, Kevin Macksamie (k-mack), Geoffrey Clements (baldmountain).
For authors of this file see git history.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
PugTemplateEngine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<PugTemplateEngine>static final StringDefault template extension -
Constructor Summary
ConstructorsConstructorDescriptionPugTemplateEngine(io.vertx.ext.web.templ.pug.PugTemplateEngine delegate) Create a new instance ofPugTemplateEnginedelegating to the given (non-null) instance ofPugTemplateEngine.PugTemplateEngine(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic PugTemplateEngineCreate a template engine using defaultsstatic PugTemplateEngineCreate a template engine using defaultsstatic PugTemplateEngineCreate a template engine using defaultsbooleanio.vertx.ext.web.templ.pug.PugTemplateEngineGet the delegate instance.inthashCode()static PugTemplateEnginenewInstance(io.vertx.ext.web.templ.pug.PugTemplateEngine delegate) Creates a new instance of thePugTemplateEngine.io.smallrye.mutiny.Uni<io.vertx.core.buffer.Buffer>Render the template.io.smallrye.mutiny.Uni<io.vertx.core.buffer.Buffer>Render the template.io.vertx.core.buffer.BufferrenderAndAwait(io.vertx.core.json.JsonObject context, String templateFileName) Render the template.io.vertx.core.buffer.BufferrenderAndAwait(Map<String, Object> context, String templateFileName) Render the template.renderAndForget(io.vertx.core.json.JsonObject context, String templateFileName) Render the template.renderAndForget(Map<String, Object> context, String templateFileName) Render the template.toString()de.neuland.pug4j.PugConfigurationunwrap()Returns the underlying engine, so further configurations or customizations may be applied ornullwhen the engine cannot unwrap it.Methods inherited from class io.vertx.mutiny.ext.web.common.template.TemplateEngine
clearCache, newInstance
-
Field Details
-
DEFAULT_TEMPLATE_EXTENSION
Default template extension- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
PugTemplateEngine
public PugTemplateEngine(io.vertx.ext.web.templ.pug.PugTemplateEngine delegate) Create a new instance ofPugTemplateEnginedelegating to the given (non-null) instance ofPugTemplateEngine. -
PugTemplateEngine
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.templ.pug.PugTemplateEngine getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Overrides:
getDelegatein classTemplateEngine- Returns:
- the delegate instance
-
render
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.buffer.Buffer> render(io.vertx.core.json.JsonObject context, String templateFileName) Render the template. Template engines that support partials/fragments should extract the template base path from the template filename up to the last file separator. Some engines support localization, for these engines, there is a predefined key "lang" to specify the language to be used in the localization, the format should follow the standard locale formats e.g.: "en-gb", "pt-br", "en".Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
renderin classTemplateEngine- Parameters:
context- the routing contexttemplateFileName- the template file name to use- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
TemplateEngine.render(JsonObject, String)
-
renderAndAwait
public io.vertx.core.buffer.Buffer renderAndAwait(io.vertx.core.json.JsonObject context, String templateFileName) Render the template. Template engines that support partials/fragments should extract the template base path from the template filename up to the last file separator. Some engines support localization, for these engines, there is a predefined key "lang" to specify the language to be used in the localization, the format should follow the standard locale formats e.g.: "en-gb", "pt-br", "en".Unlike the bare Vert.x variant, this method returns a
Buffer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
renderAndAwaitin classTemplateEngine- Parameters:
context- the routing contexttemplateFileName- the template file name to use- Returns:
- The operation result
- See Also:
-
TemplateEngine.render(JsonObject, String)
-
renderAndForget
public PugTemplateEngine renderAndForget(io.vertx.core.json.JsonObject context, String templateFileName) Render the template. Template engines that support partials/fragments should extract the template base path from the template filename up to the last file separator. Some engines support localization, for these engines, there is a predefined key "lang" to specify the language to be used in the localization, the format should follow the standard locale formats e.g.: "en-gb", "pt-br", "en".Unlike the bare Vert.x variant, this method ignores the
Bufferresult or any failure.- Overrides:
renderAndForgetin classTemplateEngine- Parameters:
context- the routing contexttemplateFileName- the template file name to use- Returns:
- The current instance to chain operations if needed.
- See Also:
-
TemplateEngine.render(JsonObject, String)
-
render
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.buffer.Buffer> render(Map<String, Object> context, String templateFileName) Render the template. Template engines that support partials/fragments should extract the template base path from the template filename up to the last file separator. Some engines support localization, for these engines, there is a predefined key "lang" to specify the language to be used in the localization, the format should follow the standard locale formats e.g.: "en-gb", "pt-br", "en".Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
renderin classTemplateEngine- Parameters:
context- the routing contexttemplateFileName- the template file name to use- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
TemplateEngine.render(Map, String)
-
renderAndAwait
public io.vertx.core.buffer.Buffer renderAndAwait(Map<String, Object> context, String templateFileName) Render the template. Template engines that support partials/fragments should extract the template base path from the template filename up to the last file separator. Some engines support localization, for these engines, there is a predefined key "lang" to specify the language to be used in the localization, the format should follow the standard locale formats e.g.: "en-gb", "pt-br", "en".Unlike the bare Vert.x variant, this method returns a
Buffer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
renderAndAwaitin classTemplateEngine- Parameters:
context- the routing contexttemplateFileName- the template file name to use- Returns:
- The operation result
- See Also:
-
TemplateEngine.render(Map, String)
-
renderAndForget
Render the template. Template engines that support partials/fragments should extract the template base path from the template filename up to the last file separator. Some engines support localization, for these engines, there is a predefined key "lang" to specify the language to be used in the localization, the format should follow the standard locale formats e.g.: "en-gb", "pt-br", "en".Unlike the bare Vert.x variant, this method ignores the
Bufferresult or any failure.- Overrides:
renderAndForgetin classTemplateEngine- Parameters:
context- the routing contexttemplateFileName- the template file name to use- Returns:
- The current instance to chain operations if needed.
- See Also:
-
TemplateEngine.render(Map, String)
-
create
Create a template engine using defaults- Returns:
- the engine
-
create
Create a template engine using defaults- Returns:
- the engine
-
create
Create a template engine using defaults- Returns:
- the engine
-
unwrap
public de.neuland.pug4j.PugConfiguration unwrap()Description copied from class:TemplateEngineReturns the underlying engine, so further configurations or customizations may be applied ornullwhen the engine cannot unwrap it.- Overrides:
unwrapin classTemplateEngine- Returns:
- the engine instance.
-
newInstance
Creates a new instance of thePugTemplateEngine. -
hashCode
public int hashCode()- Overrides:
hashCodein classTemplateEngine
-
equals
- Overrides:
equalsin classTemplateEngine
-
toString
- Overrides:
toStringin classTemplateEngine
-