On Wed, Mar 4, 2009 at 19:26, Sergiu Dumitriu <[email protected]> wrote: > Dan Miron wrote: >> Hi guys, >> >> Proposal: create a new bridge called WikiAccessBridge whose purpose is, >> for now, to get the temporary directory's location. >> Reason: in my ChartMacro I need a temporary folder for storing images, >> and then sending them to the output. >> >> I'm thinking of providing two methods: >> File getTemporaryDirectory() - to get the directory as a File, thus >> having the ability to write files within it >> URL getAttachmentURL(String fileName) - to get a newly created file as a >> web URL (e.g: http://localhost/my_newly_created_temporary_file.png) >> >> I plan to put the specifications of the bridge within org.xwiki.bridge >> and the implementation within com.xpn.xwiki >> > > This is not a wiki functionality, so I'm -1 for the name > WikiAccessBridge. Maybe ContainerBridge?
What about put getTemporaryDirectory() in ApplicationContext (core-container-api module) which contains getResourceAsStream and getResource ? I don't understand getAttachmentURL, how do you find the attachement whith just the attachement name ? isn't an attachment in a document ? By the way DocumentAccessBridge already contains a getAttachmentURL(String documentName, String attachmentName) > > -- > Sergiu Dumitriu > http://purl.org/net/sergiu/ > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

