Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1061

ResourceFinder: abstract API for looking up resources, including multiple resources for a given name

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0M5
    • Core Library
    • 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);
        }

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: