mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-19 21:16:55 +01:00
added method to read templates from a reader
This commit is contained in:
@@ -30,10 +30,13 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.template;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
/**
|
||||
@@ -82,4 +85,19 @@ public class MustacheTemplateEngineTest extends TemplateEngineTestBase
|
||||
{
|
||||
return "sonia/scm/template/001.mustache";
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
protected InputStream getResource(String resource)
|
||||
{
|
||||
return MustacheTemplateEngineTest.class.getResourceAsStream(
|
||||
"/sonia/scm/template/".concat(resource).concat(".mustache"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user