X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FDefaultLoaders.java;h=72d8d190137fc67539e2f848262f63970ef58f25;hb=3335cbf7681220fcf95cff4895e025251211bf8e;hp=39a289df11272358556ac8c4443706de33350a71;hpb=2f21e4a2402f1c7a55175f223118521dbd2d27d8;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/main/DefaultLoaders.java b/src/main/java/net/pterodactylus/sone/main/DefaultLoaders.java
index 39a289d..72d8d19 100644
--- a/src/main/java/net/pterodactylus/sone/main/DefaultLoaders.java
+++ b/src/main/java/net/pterodactylus/sone/main/DefaultLoaders.java
@@ -7,13 +7,17 @@ import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
+import net.pterodactylus.sone.web.WebInterface;
import net.pterodactylus.util.io.Closer;
+import net.pterodactylus.util.template.ClassPathTemplateProvider;
import net.pterodactylus.util.template.Template;
+import net.pterodactylus.util.template.TemplateProvider;
+import net.pterodactylus.util.web.Page;
+import net.pterodactylus.util.web.Request;
+import net.pterodactylus.util.web.StaticPage;
/**
* Default {@link Loaders} implementation that loads resources from the classpath.
- *
- * @author David âBombeâ Roden
*/
public class DefaultLoaders implements Loaders {
@@ -33,4 +37,15 @@ public class DefaultLoaders implements Loaders {
}
}
+ @Override
+ public Page loadStaticPage(String pathPrefix, String basePath, String mimeType) {
+ return new StaticPage(pathPrefix, basePath, mimeType) {
+ };
+ }
+
+ @Override
+ public TemplateProvider getTemplateProvider() {
+ return new ClassPathTemplateProvider(WebInterface.class, "/templates/");
+ }
+
}