FreemarkerTemplating.java
/*
* Copyright 2018 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.server.service;
import java.io.IOException;
import java.util.Map;
/**
* The Interface FreemarkerTemplating.
*
* @author Matija Obreza
*/
public interface FreemarkerTemplating {
/**
* Process template.
*
* @param template the template
* @param root the root
* @return the string
* @throws FreemarkerException the freemarker exception
*/
String processTemplate(String template, Map<?, ?> root) throws FreemarkerException;
/**
* Process template resource.
*
* @param template the template
* @param root the root
* @return the string
* @throws FreemarkerException the freemarker exception
*/
String processTemplateResource(String template, Map<?, ?> root) throws FreemarkerException;
/**
* The Class FreemarkerException.
*/
public final static class FreemarkerException extends IOException {
private static final long serialVersionUID = -8412115361695692212L;
/**
* Instantiates a new freemarker exception.
*
* @param e the e
*/
public FreemarkerException(final Throwable e) {
super(e);
}
}
}