incubator-photark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luciano Resende <luckbr1...@gmail.com>
Subject Re: Displaying images stored in JCR with Tuscany
Date Fri, 05 Feb 2010 05:49:54 GMT
On Tue, Feb 2, 2010 at 7:46 PM, Avdhesh Yadav <avd@avdheshyadav.com> wrote:
> Right now the uploaded images from admin-ui saved into the file system
> according to this convention(/gallery/albumname/image) and a key goes to the
> JCR repository.Images should go to JCR repository not to filesystem.what I
> am looking for is how to show the images(inputsream) returned rom the JCR
> repository using tuscany.I know it can be done using a servlet.But is it
> possible to do it with tuscany ?
>
> Thoughts.
>

Two ways come to mind:

   - Create a REST service based on the Servlet interface [1]

   - Create a service based on the Tuscany Collection of InputStream,
and then expose it with the HTTP Binding. [2] This will make a HTTP
Get file.jpg to be translated to a Collection.get("file.jpg") and the
file contents are returned to the HTTP client application.

Well, this is very high level, but can get you started... please fire
questions my way ... I'll have more time in the next couple days to
take a look at this with more time.

[1] https://svn.apache.org/repos/asf/tuscany/sca-java-1.x/trunk/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/FileServiceImpl.java
[2] https://svn.apache.org/repos/asf/tuscany/sca-java-1.x/trunk/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/Resource.java

-- 
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Mime
View raw message