/*
* Created on Apr 1, 2003
*/
package net.sf.jportlet.util;
import java.io.InputStream;
import java.net.URL;
import java.util.Locale;
/**
* The <code>ResourceLoader</code> load resources as <code>java.io.InputStream</code>
* or bind resources to their path in the application context.
*
* If a resource named <code>foo.txt</code> is requested to the resource loader,
* it will search the following files:
* <ol>
* <li> <client-markup>/foo_<locale-language>_<locale-country>_<locale-variant>.txt
* <li> <client-markup>/foo_<locale-language>_<locale-country>.txt
* <li> <client-markup>/foo_<locale-language>.txt
* <li> <client-markup>/foo.txt
* </ol>
*
* @author <a href="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
*/
public interface ResourceLoader
{
//~ Methods ----------------------------------------------------------------
public URL getResource( String path );
public InputStream getResourceAsStream( String path );
public InputStream getResourceAsStream( String path,
String markup );
public InputStream getResourceAsStream( String path,
String markup,
Locale locale );
public String getResourcePath( String path );
public String getResourcePath( String path,
String markup );
public String getResourcePath( String path,
String markup,
Locale locale );
}
|