[jira] Created: (CAY-1061) ResourceFinder: abstract API for looking up resources, including multiple resources for a given name

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Sun Jun 01 2008 - 07:05:52 EDT

  • Next message: Andrus Adamchik (JIRA): "[jira] Closed: (CAY-1061) ResourceFinder: abstract API for looking up resources, including multiple resources for a given name"

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

                     Key: CAY-1061
                     URL: https://issues.apache.org/cayenne/browse/CAY-1061
                 Project: Cayenne
              Issue Type: Task
              Components: Cayenne Core Library
        Affects Versions: 3.0
                Reporter: Andrus Adamchik
                Assignee: Andrus Adamchik
                 Fix For: 3.0

    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);
    }

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Sun Jun 01 2008 - 07:06:22 EDT