From 26de0cc9e84a2f7de8ca575801d7d9ab5f4e5da7 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Fri, 24 Jan 2020 14:44:20 +0100 Subject: Add example Qute resource. Change-Id: Ie5be7967d6d8536270873d01641f5ff825e31e07 --- .../eu/mulk/mulkcms2/benki/wiki/WikiResource.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java (limited to 'src/main/java/eu') diff --git a/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java b/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java new file mode 100644 index 0000000..6ef0e40 --- /dev/null +++ b/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java @@ -0,0 +1,25 @@ +package eu.mulk.mulkcms2.benki.wiki; + +import static javax.ws.rs.core.MediaType.TEXT_HTML; + +import io.quarkus.qute.Template; +import io.quarkus.qute.TemplateInstance; +import io.quarkus.qute.api.ResourcePath; +import javax.inject.Inject; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; + +@Path("/wiki") +public class WikiResource { + + @ResourcePath("benki/wiki/wikiPage.html") + @Inject Template wikiPage; + + @GET + @Path("/pages/{pageName}") + @Produces(TEXT_HTML) + public TemplateInstance getPage(@PathParam("pageName") String pageName) { + return wikiPage.data("title", "TEST"); + } +} -- cgit v1.2.3