org.seedstack.io.spi.TemplateLoader Maven / Gradle / Ivy
/**
* Copyright (c) 2013-2015, The SeedStack authors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package org.seedstack.io.spi;
import java.util.Set;
/**
* A TemplateLoader is associated to an {@link org.seedstack.io.spi.AbstractTemplateRenderer}. The association is made by the name of the
* renderer specified with templateRenderer.
*
* @author [email protected]
*
* @param
* template
*/
public interface TemplateLoader {
/**
* @param name
* name of the resquested template
* @return a template
*/
T load(String name);
/**
* @return list of the template names
*/
Set names();
/**
* @param name
* template name
* @return true if the loader contains the template, false otherwise
*/
boolean contains(String name);
/**
* @return key of the renderer associated to the template. Should return null if there is no renderer associated.
*/
String templateRenderer();
/**
* @return key of the parser associated to the template. Should return null if there is no parser associated.
*/
String templateParser();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy