blob: 761eb1db5625bce13224f0780f2a39affa47a7ee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.templates;
import java.io.Writer;
/**
* A template turns a template string and some state into
* an instantiated string. Add support for a particular
* template mechanism by subclassing this.
*
* @author bratseth
* @deprecated use a Renderer instead
*/
@SuppressWarnings("deprecation")
@Deprecated // OK (But wait for deprecated handlers in vespaclient-container-plugin to be removed)
// TODO: Remove on Vespa 7
public abstract class Template<T extends Writer> {
/**
* Renders this template
*
* @param context the context to evaluate in
* @param writer the writer to render to
*/
public abstract void render(Context context,T writer) throws java.io.IOException;
/**
* Get template name
*
* @return template name
*/
public abstract String getName();
}
|