[ 
https://issues.apache.org/jira/browse/SLING-8421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16841328#comment-16841328
 ] 

Karl Pauls commented on SLING-8421:
-----------------------------------

I created the following two PR to address this:

[https://github.com/apache/sling-org-apache-sling-feature-launcher/pull/9]

[https://github.com/apache/sling-org-apache-sling-feature-io/pull/12]

The main idea is to extend the ArtifactHandler with a getLocalUrl method that 
returns a URL. Consequently, I extended the ArtifactProvider with a 
getArtifactHandler method that can be used to get the ArtifactHandler for a 
given artifact directly. Subsequently, I changed all usage in the io and the 
launcher to use the getArtifactHandler().getLocalURL() internally instead of 
getting a file. It is not super pretty but it has the benefit that all new 
methods are BC and offer default methods that allow to completely ignore this 
new way of doing things. The nice thing about it is that one can now provide 
handlers that get the artifacts from whatever they can turn into a URL that 
works. 

[~cziegeler], [~bosschaert] - wdyt?

> Allow artifact providers that work with URLs instead of Files
> -------------------------------------------------------------
>
>                 Key: SLING-8421
>                 URL: https://issues.apache.org/jira/browse/SLING-8421
>             Project: Sling
>          Issue Type: Improvement
>          Components: Feature Model
>    Affects Versions: Feature Model IO 1.0.2, Feature Model Launcher 1.0.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>            Priority: Major
>             Fix For: Feature Model IO 1.0.2, Feature Model Launcher 1.0.4
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The way we set-up the feature io (and subsequently, the way the launcher 
> currently uses it) there is a build-in assumption that artifacts are 
> available as local files. While that makes some sense there are scenarios 
> where it would be more efficient to not require them to be Files unless it is 
> really needed. We should make it possible for a provider to hand out URLs 
> instead of Files and prefer to use those URLs where possible as a File can be 
> easily accessed via a URL but the reverse is not true without locally 
> buffering the URL content as a File.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to