✨ Use @TemplatePath annotations on most pages
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 17 May 2019 20:44:36 +0000 (22:44 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 17 May 2019 20:44:36 +0000 (22:44 +0200)
50 files changed:
src/main/kotlin/net/pterodactylus/sone/web/pages/AboutPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarksPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/CreateAlbumPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/CreatePostPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/CreateReplyPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/CreateSonePage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteAlbumPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteImagePage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/DeletePostPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteProfileFieldPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteReplyPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/EditProfileFieldPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/EditProfilePage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/IndexPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/OptionsPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/SearchPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/UploadImagePage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt
src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/AboutPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/BookmarksPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/CreateAlbumPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/CreatePostPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/CreateReplyPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/CreateSonePageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteAlbumPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteImagePageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/DeletePostPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteProfileFieldPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteReplyPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/EditProfileFieldPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/EditProfilePageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/IndexPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/LoginPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/NewPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/OptionsPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/RescuePageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/SearchPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/UploadImagePageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/ViewPostPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/ViewSonePageTest.kt

index 3e2820e..7c53a08 100644 (file)
@@ -11,6 +11,7 @@ import javax.inject.Inject
  * A [SoneTemplatePage] that stores information about Sone in the [TemplateContext].
  */
 @MenuName("About")
  * A [SoneTemplatePage] that stores information about Sone in the [TemplateContext].
  */
 @MenuName("About")
+@TemplatePath("/templates/about.html")
 class AboutPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer,
                private val pluginVersion: PluginVersion,
                private val pluginYear: PluginYear,
 class AboutPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer,
                private val pluginVersion: PluginVersion,
                private val pluginYear: PluginYear,
index c021d0a..7b4cbdc 100644 (file)
@@ -13,6 +13,7 @@ import javax.inject.Inject
  * Page that lets the user browse all his bookmarked posts.
  */
 @MenuName("Bookmarks")
  * Page that lets the user browse all his bookmarked posts.
  */
 @MenuName("Bookmarks")
+@TemplatePath("/templates/bookmarks.html")
 class BookmarksPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
                SoneTemplatePage("bookmarks.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Bookmarks.Title") {
 
 class BookmarksPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
                SoneTemplatePage("bookmarks.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Bookmarks.Title") {
 
index 3ffd622..98c2143 100644 (file)
@@ -14,6 +14,7 @@ import javax.inject.Inject
 /**
  * Page that lets the user create a new album.
  */
 /**
  * Page that lets the user create a new album.
  */
+@TemplatePath("/templates/createAlbum.html")
 class CreateAlbumPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("createAlbum.html", template, "Page.CreateAlbum.Title", webInterface, loaders, templateRenderer) {
 
 class CreateAlbumPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("createAlbum.html", template, "Page.CreateAlbum.Title", webInterface, loaders, templateRenderer) {
 
index 9f57ef5..b1d62b3 100644 (file)
@@ -14,6 +14,7 @@ import javax.inject.Inject
 /**
  * This page lets the user create a new [Post].
  */
 /**
  * This page lets the user create a new [Post].
  */
+@TemplatePath("/templates/createPost.html")
 class CreatePostPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("createPost.html", template, "Page.CreatePost.Title", webInterface, loaders, templateRenderer) {
 
 class CreatePostPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("createPost.html", template, "Page.CreatePost.Title", webInterface, loaders, templateRenderer) {
 
index 3e8bc72..d38a6ce 100644 (file)
@@ -13,6 +13,7 @@ import javax.inject.Inject
 /**
  * This page lets the user post a reply to a post.
  */
 /**
  * This page lets the user post a reply to a post.
  */
+@TemplatePath("/templates/createReply.html")
 class CreateReplyPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("createReply.html", template, "Page.CreateReply.Title", webInterface, loaders, templateRenderer) {
 
 class CreateReplyPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("createReply.html", template, "Page.CreateReply.Title", webInterface, loaders, templateRenderer) {
 
index 0acc0bd..6c39248 100644 (file)
@@ -16,6 +16,7 @@ import javax.inject.Inject
  * The “create Sone” page lets the user create a new Sone.
  */
 @MenuName("CreateSone")
  * The “create Sone” page lets the user create a new Sone.
  */
 @MenuName("CreateSone")
+@TemplatePath("/templates/createSone.html")
 class CreateSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("createSone.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.CreateSone.Title") {
 
 class CreateSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("createSone.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.CreateSone.Title") {
 
index b1969cc..ba61ad2 100644 (file)
@@ -12,6 +12,7 @@ import javax.inject.Inject
 /**
  * Page that lets the user delete an {@link Album}.
  */
 /**
  * Page that lets the user delete an {@link Album}.
  */
+@TemplatePath("/templates/deleteAlbum.html")
 class DeleteAlbumPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteAlbum.html", template, "Page.DeleteAlbum.Title", webInterface, loaders, templateRenderer) {
 
 class DeleteAlbumPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteAlbum.html", template, "Page.DeleteAlbum.Title", webInterface, loaders, templateRenderer) {
 
index 755cfaa..c0d43aa 100644 (file)
@@ -12,6 +12,7 @@ import javax.inject.Inject
 /**
  * Page that lets the user delete an {@link Image}.
  */
 /**
  * Page that lets the user delete an {@link Image}.
  */
+@TemplatePath("/templates/deleteImage.html")
 class DeleteImagePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteImage.html", template, "Page.DeleteImage.Title", webInterface, loaders, templateRenderer) {
 
 class DeleteImagePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteImage.html", template, "Page.DeleteImage.Title", webInterface, loaders, templateRenderer) {
 
index f9daed5..17b1616 100644 (file)
@@ -12,6 +12,7 @@ import javax.inject.Inject
 /**
  * Lets the user delete a post they made.
  */
 /**
  * Lets the user delete a post they made.
  */
+@TemplatePath("/templates/deletePost.html")
 class DeletePostPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deletePost.html", template, "Page.DeletePost.Title", webInterface, loaders, templateRenderer) {
 
 class DeletePostPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deletePost.html", template, "Page.DeletePost.Title", webInterface, loaders, templateRenderer) {
 
index 49cdbdf..348b81c 100644 (file)
@@ -12,6 +12,7 @@ import javax.inject.Inject
 /**
  * Page that lets the user confirm the deletion of a profile field.
  */
 /**
  * Page that lets the user confirm the deletion of a profile field.
  */
+@TemplatePath("/templates/deleteProfileField.html")
 class DeleteProfileFieldPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteProfileField.html", template, "Page.DeleteProfileField.Title", webInterface, loaders, templateRenderer) {
 
 class DeleteProfileFieldPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteProfileField.html", template, "Page.DeleteProfileField.Title", webInterface, loaders, templateRenderer) {
 
index 85f1f21..9857e69 100644 (file)
@@ -12,6 +12,7 @@ import javax.inject.Inject
 /**
  * This page lets the user delete a reply.
  */
 /**
  * This page lets the user delete a reply.
  */
+@TemplatePath("/templates/deleteReply.html")
 class DeleteReplyPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteReply.html", template, "Page.DeleteReply.Title", webInterface, loaders, templateRenderer) {
 
 class DeleteReplyPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteReply.html", template, "Page.DeleteReply.Title", webInterface, loaders, templateRenderer) {
 
index ceaa1e2..ec3319e 100644 (file)
@@ -15,6 +15,7 @@ import javax.inject.Inject
  * installation.
  */
 @MenuName("DeleteSone")
  * installation.
  */
 @MenuName("DeleteSone")
+@TemplatePath("/templates/deleteSone.html")
 class DeleteSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteSone.html", template, "Page.DeleteSone.Title", webInterface, loaders, templateRenderer) {
 
 class DeleteSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("deleteSone.html", template, "Page.DeleteSone.Title", webInterface, loaders, templateRenderer) {
 
index 0ea1fb7..cf23d47 100644 (file)
@@ -12,6 +12,7 @@ import javax.inject.Inject
 /**
  * Page that lets the user edit the name of a profile field.
  */
 /**
  * Page that lets the user edit the name of a profile field.
  */
+@TemplatePath("/templates/editProfileField.html")
 class EditProfileFieldPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
                LoggedInPage("editProfileField.html", template, "Page.EditProfileField.Title", webInterface, loaders, templateRenderer) {
 
 class EditProfileFieldPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
                LoggedInPage("editProfileField.html", template, "Page.EditProfileField.Title", webInterface, loaders, templateRenderer) {
 
index b7524d0..ff9faab 100644 (file)
@@ -15,6 +15,7 @@ import javax.inject.Inject
  * This page lets the user edit her profile.
  */
 @MenuName("EditProfile")
  * This page lets the user edit her profile.
  */
 @MenuName("EditProfile")
+@TemplatePath("/templates/editProfile.html")
 class EditProfilePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
                LoggedInPage("editProfile.html", template, "Page.EditProfile.Title", webInterface, loaders, templateRenderer) {
 
 class EditProfilePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
                LoggedInPage("editProfile.html", template, "Page.EditProfile.Title", webInterface, loaders, templateRenderer) {
 
index 5a5959e..10e6a0c 100644 (file)
@@ -16,6 +16,7 @@ import javax.inject.Inject
  * The image browser page is the entry page for the image management.
  */
 @MenuName("ImageBrowser")
  * The image browser page is the entry page for the image management.
  */
 @MenuName("ImageBrowser")
+@TemplatePath("/templates/imageBrowser.html")
 class ImageBrowserPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("imageBrowser.html", template, "Page.ImageBrowser.Title", webInterface, loaders, templateRenderer) {
 
 class ImageBrowserPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("imageBrowser.html", template, "Page.ImageBrowser.Title", webInterface, loaders, templateRenderer) {
 
index a6a5683..89cd359 100644 (file)
@@ -16,6 +16,7 @@ import javax.inject.Inject
  * of all friends of the current user.
  */
 @MenuName("Index")
  * of all friends of the current user.
  */
 @MenuName("Index")
+@TemplatePath("/templates/index.html")
 class IndexPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer, private val postVisibilityFilter: PostVisibilityFilter) :
                LoggedInPage("index.html", template, "Page.Index.Title", webInterface, loaders, templateRenderer) {
 
 class IndexPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer, private val postVisibilityFilter: PostVisibilityFilter) :
                LoggedInPage("index.html", template, "Page.Index.Title", webInterface, loaders, templateRenderer) {
 
index 0e890cc..b795f15 100644 (file)
@@ -14,6 +14,7 @@ import javax.inject.Inject
  * This page shows all known Sones.
  */
 @MenuName("KnownSones")
  * This page shows all known Sones.
  */
 @MenuName("KnownSones")
+@TemplatePath("/templates/knownSones.html")
 class KnownSonesPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("knownSones.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.KnownSones.Title") {
 
 class KnownSonesPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("knownSones.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.KnownSones.Title") {
 
index 8f65b33..8e927c5 100644 (file)
@@ -15,6 +15,7 @@ import javax.inject.Inject
  * The login page lets the user log in.
  */
 @MenuName("Login")
  * The login page lets the user log in.
  */
 @MenuName("Login")
+@TemplatePath("/templates/login.html")
 class LoginPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("login.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Login.Title") {
 
 class LoginPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("login.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Login.Title") {
 
index 874c157..149f5ea 100644 (file)
@@ -15,7 +15,8 @@ import javax.inject.Inject
  * [PostVisibilityFilter.isPostVisible(Sone, Post)] and sorted by time.
  */
 @MenuName("New")
  * [PostVisibilityFilter.isPostVisible(Sone, Post)] and sorted by time.
  */
 @MenuName("New")
-class NewPage @Inject constructor(  template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
+@TemplatePath("/templates/new.html")
+class NewPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("new.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.New.Title") {
 
        override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) =
                SoneTemplatePage("new.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.New.Title") {
 
        override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) =
index 708b918..4bf6b12 100644 (file)
@@ -17,6 +17,7 @@ import javax.inject.Inject
  * This page lets the user edit the options of the Sone plugin.
  */
 @MenuName("Options")
  * This page lets the user edit the options of the Sone plugin.
  */
 @MenuName("Options")
+@TemplatePath("/templates/options.html")
 class OptionsPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("options.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Options.Title") {
 
 class OptionsPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("options.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Options.Title") {
 
index 6546bdc..261074e 100644 (file)
@@ -14,6 +14,7 @@ import javax.inject.Inject
  * Page that lets the user control the rescue mode for a Sone.
  */
 @MenuName("Rescue")
  * Page that lets the user control the rescue mode for a Sone.
  */
 @MenuName("Rescue")
+@TemplatePath("/templates/rescue.html")
 class RescuePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("rescue.html", template, "Page.Rescue.Title", webInterface, loaders, templateRenderer) {
 
 class RescuePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("rescue.html", template, "Page.Rescue.Title", webInterface, loaders, templateRenderer) {
 
index b44a94e..550e3f1 100644 (file)
@@ -29,6 +29,7 @@ import javax.inject.Inject
  * This page lets the user search for posts and replies that contain certain
  * words.
  */
  * This page lets the user search for posts and replies that contain certain
  * words.
  */
+@TemplatePath("/templates/search.html")
 class SearchPage(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer, ticker: Ticker = Ticker.systemTicker()) :
                SoneTemplatePage("search.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Search.Title") {
 
 class SearchPage(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer, ticker: Ticker = Ticker.systemTicker()) :
                SoneTemplatePage("search.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Search.Title") {
 
index 0a31e4f..32eec71 100644 (file)
@@ -22,6 +22,7 @@ import javax.inject.Inject
 /**
  * Page implementation that lets the user upload an image.
  */
 /**
  * Page implementation that lets the user upload an image.
  */
+@TemplatePath("/templates/invalid.html")
 class UploadImagePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("uploadImage.html", template, "Page.UploadImage.Title", webInterface, loaders, templateRenderer) {
 
 class UploadImagePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                LoggedInPage("uploadImage.html", template, "Page.UploadImage.Title", webInterface, loaders, templateRenderer) {
 
index 1067698..941f040 100644 (file)
@@ -12,6 +12,7 @@ import javax.inject.*
 /**
  * This page lets the user view a post and all its replies.
  */
 /**
  * This page lets the user view a post and all its replies.
  */
+@TemplatePath("/templates/viewPost.html")
 class ViewPostPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("viewPost.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.ViewPost.Title") {
 
 class ViewPostPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("viewPost.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.ViewPost.Title") {
 
index 38868e2..b1d36c5 100644 (file)
@@ -17,6 +17,7 @@ import javax.inject.Inject
 /**
  * Lets the user browser another Sone.
  */
 /**
  * Lets the user browser another Sone.
  */
+@TemplatePath("/templates/viewSone.html")
 class ViewSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("viewSone.html", webInterface, loaders, template, templateRenderer) {
 
 class ViewSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
                SoneTemplatePage("viewSone.html", webInterface, loaders, template, templateRenderer) {
 
index 947262a..a2fd178 100644 (file)
@@ -64,4 +64,9 @@ class AboutPageTest : WebPageTest({ template, webInterface, loaders, templateRen
            assertThat(page.menuName, equalTo("About"))
        }
 
            assertThat(page.menuName, equalTo("About"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/about.html"))
+       }
+
 }
 }
index b3882e5..a9891aa 100644 (file)
@@ -70,5 +70,9 @@ class BookmarksPageTest: WebPageTest(::BookmarksPage) {
            assertThat(page.menuName, equalTo("Bookmarks"))
        }
 
            assertThat(page.menuName, equalTo("Bookmarks"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/bookmarks.html"))
+       }
 
 }
 
 }
index 921313d..b0db24d 100644 (file)
@@ -8,6 +8,7 @@ import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.selfMock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.selfMock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -104,4 +105,9 @@ class CreateAlbumPageTest : WebPageTest(::CreateAlbumPage) {
                assertThat(baseInjector.getInstance<CreateAlbumPage>(), notNullValue())
        }
 
                assertThat(baseInjector.getInstance<CreateAlbumPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/createAlbum.html"))
+       }
+
 }
 }
index dccce87..ef54172 100644 (file)
@@ -6,6 +6,7 @@ import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.utils.asOptional
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.utils.asOptional
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -96,4 +97,9 @@ class CreatePostPageTest: WebPageTest(::CreatePostPage) {
            assertThat(baseInjector.getInstance<CreatePostPage>(), notNullValue())
        }
 
            assertThat(baseInjector.getInstance<CreatePostPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/createPost.html"))
+       }
+
 }
 }
index 4cd67c9..ec56267 100644 (file)
@@ -5,6 +5,7 @@ import net.pterodactylus.sone.data.Sone
 import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -93,4 +94,9 @@ class CreateReplyPageTest: WebPageTest(::CreateReplyPage) {
            assertThat(baseInjector.getInstance<CreateReplyPage>(), notNullValue())
        }
 
            assertThat(baseInjector.getInstance<CreateReplyPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/createReply.html"))
+       }
+
 }
 }
index 9b5f983..e865f65 100644 (file)
@@ -156,4 +156,9 @@ class CreateSonePageTest : WebPageTest(::CreateSonePage) {
            assertThat(page.menuName, equalTo("CreateSone"))
        }
 
            assertThat(page.menuName, equalTo("CreateSone"))
        }
 
+       @Test
+       fun `page is annotated with the correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/createSone.html"))
+       }
+
 }
 }
index 95ffa00..28f7880 100644 (file)
@@ -6,6 +6,7 @@ import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -112,4 +113,9 @@ class DeleteAlbumPageTest: WebPageTest(::DeleteAlbumPage) {
                assertThat(baseInjector.getInstance<DeleteAlbumPage>(), notNullValue())
        }
 
                assertThat(baseInjector.getInstance<DeleteAlbumPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/deleteAlbum.html"))
+       }
+
 }
 }
index 2275108..65f2516 100644 (file)
@@ -7,6 +7,7 @@ import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -88,4 +89,9 @@ class DeleteImagePageTest: WebPageTest(::DeleteImagePage) {
            assertThat(baseInjector.getInstance<DeleteImagePage>(), notNullValue())
        }
 
            assertThat(baseInjector.getInstance<DeleteImagePage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/deleteImage.html"))
+       }
+
 }
 }
index 3c18fb4..e6f386a 100644 (file)
@@ -6,6 +6,7 @@ import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -110,4 +111,9 @@ class DeletePostPageTest: WebPageTest(::DeletePostPage) {
            assertThat(baseInjector.getInstance<DeletePostPage>(), notNullValue())
        }
 
            assertThat(baseInjector.getInstance<DeletePostPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/deletePost.html"))
+       }
+
 }
 }
index 0baaffe..678991d 100644 (file)
@@ -4,6 +4,7 @@ import net.pterodactylus.sone.data.Profile
 import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -83,4 +84,9 @@ class DeleteProfileFieldPageTest: WebPageTest(::DeleteProfileFieldPage) {
                assertThat(baseInjector.getInstance<DeleteProfileFieldPage>(), notNullValue())
        }
 
                assertThat(baseInjector.getInstance<DeleteProfileFieldPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/deleteProfileField.html"))
+       }
+
 }
 }
index 5cc0e7f..fbec0d5 100644 (file)
@@ -6,6 +6,7 @@ import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -103,4 +104,9 @@ class DeleteReplyPageTest: WebPageTest(::DeleteReplyPage) {
                assertThat(baseInjector.getInstance<DeleteReplyPage>(), notNullValue())
        }
 
                assertThat(baseInjector.getInstance<DeleteReplyPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/deleteReply.html"))
+       }
+
 }
 }
index 5551e76..3d53b01 100644 (file)
@@ -66,4 +66,9 @@ class DeleteSonePageTest: WebPageTest(::DeleteSonePage) {
            assertThat(page.menuName, equalTo("DeleteSone"))
        }
 
            assertThat(page.menuName, equalTo("DeleteSone"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/deleteSone.html"))
+       }
+
 }
 }
index cff74ac..39bb25d 100644 (file)
@@ -4,6 +4,7 @@ import net.pterodactylus.sone.data.Profile
 import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -101,4 +102,9 @@ class EditProfileFieldPageTest: WebPageTest(::EditProfileFieldPage) {
                assertThat(baseInjector.getInstance<EditProfileFieldPage>(), notNullValue())
        }
 
                assertThat(baseInjector.getInstance<EditProfileFieldPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/editProfileField.html"))
+       }
+
 }
 }
index 45af39d..be34861 100644 (file)
@@ -231,4 +231,9 @@ class EditProfilePageTest: WebPageTest(::EditProfilePage) {
            assertThat(page.menuName, equalTo("EditProfile"))
        }
 
            assertThat(page.menuName, equalTo("EditProfile"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/editProfile.html"))
+       }
+
 }
 }
index faf70b8..0ec7898 100644 (file)
@@ -148,4 +148,9 @@ class ImageBrowserPageTest: WebPageTest(::ImageBrowserPage) {
            assertThat(page.menuName, equalTo("ImageBrowser"))
        }
 
            assertThat(page.menuName, equalTo("ImageBrowser"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/imageBrowser.html"))
+       }
+
 }
 }
index 9a55a00..09bf4a0 100644 (file)
@@ -165,4 +165,9 @@ class IndexPageTest: WebPageTest({ template, webInterface, loaders, templateRend
            assertThat(page.menuName, equalTo("Index"))
        }
 
            assertThat(page.menuName, equalTo("Index"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+               assertThat(page.templatePath, equalTo("/templates/index.html"))
+       }
+
 }
 }
index bc46b9d..1c9ff0e 100644 (file)
@@ -256,4 +256,9 @@ class KnownSonesPageTest: WebPageTest(::KnownSonesPage) {
            assertThat(page.menuName, equalTo("KnownSones"))
        }
 
            assertThat(page.menuName, equalTo("KnownSones"))
        }
 
+       @Test
+       fun `page is annotated with corrrect template path`() {
+           assertThat(page.templatePath, equalTo("/templates/knownSones.html"))
+       }
+
 }
 }
index 794e68b..8748aa0 100644 (file)
@@ -152,4 +152,9 @@ class LoginPageTest: WebPageTest(::LoginPage) {
            assertThat(page.menuName, equalTo("Login"))
        }
 
            assertThat(page.menuName, equalTo("Login"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/login.html"))
+       }
+
 }
 }
index 3a0f34c..2edf1dd 100644 (file)
@@ -95,4 +95,9 @@ class NewPageTest: WebPageTest(::NewPage) {
            assertThat(page.menuName, equalTo("New"))
        }
 
            assertThat(page.menuName, equalTo("New"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/new.html"))
+       }
+
 }
 }
index ecee2f4..147f45c 100644 (file)
@@ -390,4 +390,9 @@ class OptionsPageTest: WebPageTest(::OptionsPage) {
            assertThat(page.menuName, equalTo("Options"))
        }
 
            assertThat(page.menuName, equalTo("Options"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/options.html"))
+       }
+
 }
 }
index 028119f..0738baa 100644 (file)
@@ -99,4 +99,9 @@ class RescuePageTest: WebPageTest(::RescuePage) {
            assertThat(page.menuName, equalTo("Rescue"))
        }
 
            assertThat(page.menuName, equalTo("Rescue"))
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/rescue.html"))
+       }
+
 }
 }
index 89c3dda..02e8ed7 100644 (file)
@@ -14,6 +14,7 @@ import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.utils.asOptional
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.utils.asOptional
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.contains
 import org.hamcrest.Matchers.equalTo
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.contains
 import org.hamcrest.Matchers.equalTo
@@ -372,4 +373,9 @@ class SearchPageTest: WebPageTest({ template, webInterface, loaders, templateRen
            assertThat(baseInjector.getInstance<SearchPage>(), notNullValue())
        }
 
            assertThat(baseInjector.getInstance<SearchPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/search.html"))
+       }
+
 }
 }
index 1af2f72..1d5d94d 100644 (file)
@@ -10,6 +10,7 @@ import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.mockBuilder
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.mockBuilder
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import net.pterodactylus.util.web.Method.POST
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -123,4 +124,9 @@ class UploadImagePageTest: WebPageTest(::UploadImagePage) {
            assertThat(baseInjector.getInstance<UploadImagePage>(), notNullValue())
        }
 
            assertThat(baseInjector.getInstance<UploadImagePage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/invalid.html"))
+       }
+
 }
 }
index cf92bde..0b50370 100644 (file)
@@ -6,6 +6,7 @@ import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import org.hamcrest.Matchers.notNullValue
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
 import org.hamcrest.Matchers.notNullValue
@@ -106,4 +107,9 @@ class ViewPostPageTest: WebPageTest(::ViewPostPage) {
            assertThat(baseInjector.getInstance<ViewPostPage>(), notNullValue())
        }
 
            assertThat(baseInjector.getInstance<ViewPostPage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/viewPost.html"))
+       }
+
 }
 }
index ee311e2..dc586bd 100644 (file)
@@ -11,6 +11,7 @@ import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.utils.Pagination
 import net.pterodactylus.sone.utils.asOptional
 import net.pterodactylus.sone.web.baseInjector
 import net.pterodactylus.sone.utils.Pagination
 import net.pterodactylus.sone.utils.asOptional
 import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.contains
 import org.hamcrest.Matchers.equalTo
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.contains
 import org.hamcrest.Matchers.equalTo
@@ -213,4 +214,9 @@ class ViewSonePageTest: WebPageTest(::ViewSonePage) {
            assertThat(baseInjector.getInstance<ViewSonePage>(), notNullValue())
        }
 
            assertThat(baseInjector.getInstance<ViewSonePage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct template path`() {
+           assertThat(page.templatePath, equalTo("/templates/viewSone.html"))
+       }
+
 }
 }