Class AbstractResourceLoader
java.lang.Object
fr.paris.lutece.plugins.resource.loader.AbstractResourceLoader
- All Implemented Interfaces:
ResourceLoader
- Direct Known Subclasses:
FileResourceLoader,JarResourceLoader,ServletContextResourceLoader,ThreadContextClasspathResourceLoader,URLResourceLoader
- Version:
- $Id$
- Author:
- Trygve Laugstøl
-
Field Summary
Fields inherited from interface fr.paris.lutece.plugins.resource.loader.ResourceLoader
DEFAULT_ORDINAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSearchPath(String path) getResourceURL(String path) Retrieves the resource paths as a Setfrom a given directory. Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.paris.lutece.plugins.resource.loader.ResourceLoader
getId, getOrdinal, getResource
-
Constructor Details
-
AbstractResourceLoader
public AbstractResourceLoader()
-
-
Method Details
-
addSearchPath
- Specified by:
addSearchPathin interfaceResourceLoader
-
getResourceURL
Description copied from interface:ResourceLoaderRetrieves the resource paths as a Setfrom a given directory. This method reads the files in the specified directory, converts their paths to URLs, and returns them in a Set. If no resources are found, a ResourceNotFoundExceptionwill be thrown.- Specified by:
getResourceURLin interfaceResourceLoader- Parameters:
path- The base path in the file system, which can be either relative or absolute. This path is used to locate the directory containing the resources. The path must start with a "/".- Returns:
- A Set containing the URLs of the resources found in the directory.
- Throws:
ResourceNotFoundException- If no resources are found or if an error occurs while reading the directory or converting paths to URLs.
-