[shrinkwrap-issues] [JBoss JIRA] Commented: (SHRINKWRAP-112) Create a Unified Importer API

Aslak Knutsen (JIRA) jira-events at lists.jboss.org
Mon Jan 4 03:47:30 EST 2010


    [ https://jira.jboss.org/jira/browse/SHRINKWRAP-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12501928#action_12501928 ] 

Aslak Knutsen commented on SHRINKWRAP-112:
------------------------------------------

quote:
Given: 

from(URL) > from(new File(URL)) 

...what would you expect of: 

from(new URL("http://mydomain.com/resource.xml")) 

...? 

'http://mydomain.com/resource.xml' is not a file:// protocol, so it won't be delegated to from(new File(url)).
It should try to get the file name 'resource.xml' and lookup the extension 'xml' for a known Import handler. and use url.openStream to fetch the content. This will open up support for any URLStreamHandler(webdav, ssh, ftp) defined for the JVM.
If no one found, we could hope for Zip or fail.. 



> Create a Unified Importer API
> -----------------------------
>
>                 Key: SHRINKWRAP-112
>                 URL: https://jira.jboss.org/jira/browse/SHRINKWRAP-112
>             Project: ShrinkWrap
>          Issue Type: Feature Request
>            Reporter: Aslak Knutsen
>            Assignee: Aslak Knutsen
>
> Importer	
> 	from(String)
> 		from(new File(String)) 
> 	from(File)
> 		File.isFile -> LookupImporterType -> ZipImporter
> 		File.isDirectory -> ExplodedImporter
> 	from(URL)
> 		URL.getFile.isDirectory -> ExplodedImporter
> 		URL.getExtension -> LookupImporterType -> ZipImporter

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the shrinkwrap-issues mailing list