Added RenderUtils and more tests.
This commit is contained in:
parent
0da0e43aa5
commit
d7659f4052
24 changed files with 148 additions and 89 deletions
|
@ -43,10 +43,7 @@ public class EncodeBase64 implements ValueRenderer {
|
|||
*/
|
||||
@Override
|
||||
public String render(Template template, String valueId, String differentiator) {
|
||||
if (template.hasValueId(differentiator)) {
|
||||
return StringUtils.encodeBase64(template.getValue(differentiator).getBytes(StandardCharsets.UTF_8));
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
return StringUtils.encodeBase64(RenderUtils.fetchValue(template, differentiator)
|
||||
.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue