Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0
-
None
Description
Per CAY-943 we will be supporting multiple project files with the same name, loaded from different modules. ResourceLocator class does not support multiple resources with the same name, and is generally dirty and non-OO (it has all posible lookup strategies piled together in one class), so I am using this occasion to create an alternative to ResourceLoader - a simple interface ResourceFinder, an abstract strategy API that will be used by the new MultiProjectConfiguration:
public interface ResourceFinder {
/**
- Returns a collection of resource URLs with a given name found in the environment
- using some lookup strategy.
*/
Collection<URL> getResources(String name);
/**
- Returns a single resource matching a given name. If more than one resource matches
- the name, it is implementation specific which one will be returned.
*/
URL getResource(String name);
}