[ 
https://issues.apache.org/jira/browse/FELIX-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839810#action_12839810
 ] 

Guillaume Nodet commented on FELIX-2144:
----------------------------------------

I do agree that the API is not clean.   Though I disagree that we offer 
multiple ways.  Imho the user should not have to implement a Repository object.

I'm considering adding a new method to the RepositoryAdmin interface instead:
    Resolver resolver(Resource[] resources);

This would make a clean and intuitive API while still not forcing the user to 
implement the Repository object.  Furthermore, the resolver really does not 
care about repositories.  There are some problems however:
   * the deployer part does care about repositories (mostly about timestamp)
   * the resolver still has to know how to order resources (prefer local over 
remote), so this would mean moving the isLocal() method from the Repository to 
the Resource interface (which actually makes more sense)


> Add global requirements and capabilities
> ----------------------------------------
>
>                 Key: FELIX-2144
>                 URL: https://issues.apache.org/jira/browse/FELIX-2144
>             Project: Felix
>          Issue Type: New Feature
>          Components: Bundle Repository (OBR)
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> Global constraints on resources would be useful to be able to add constraints 
> to the resolution like:
>   * do not use a resource
>   * add version range to used resources ...

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

Reply via email to