All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.seedstack.io.spi.AbstractBaseStaticTemplateLoader Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
/**
 * 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.net.URL;
import java.util.Map;
import java.util.Set;

/**
 * This class should be extended to add a loader of static templates. Static templates are load from the META-INF/templates
 * directory.
 * 
 * @author [email protected]
 * @param 
 *            template
 */
public abstract class AbstractBaseStaticTemplateLoader implements StaticTemplateLoader {

	protected Map templateURLs;

	/**
	 * Constructor.
	 */
	public AbstractBaseStaticTemplateLoader() {
	}

	@Override
	public Set names() {
		return templateURLs.keySet();
	}

	@Override
	public boolean contains(String name) {
		return templateURLs.containsKey(name);
	}

	/**
	 * @param templateURLs
	 *            the templateURLs to set
	 */
	public void setTemplateURLs(Map templateURLs) {
		this.templateURLs = templateURLs;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy