abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Calavera" <david.calav...@gmail.com>
Subject Multipart/Related server support
Date Tue, 01 Jul 2008 12:03:32 GMT
Hi, I'm working on the support for Murtipart/Related packages (
https://issues.apache.org/jira/browse/ABDERA-166) and I'd like to explain
you how I'm doing it:

First, the client support: I've created a new "RequestEntry" called
MultipartRequestEntry that creates a multipart/related package from an entry
and an inputstream given. Thus, the AbderaClient include a new post method
that receives a Base object and an InputStream object and sends the package
created with them.

The server support: I've created a new FOMMultimediaCollection class that
extends the FOMCollection class and wraps the addAccepts and setAccepts
methods. Moreover I've added a new method to the FOMWorkpace in order to
create new instances of that class. I endorse a use case:

     Factory factory = abdera.getFactory();
      Service svc = factory.newService();
      Workspace ws = svc.addWorkspace("test-ws");
      FOMMultipartCollection coll = (FOMMultipartCollection)
ws.addMultipartCollection("test multipart coll", "/test-coll");
      coll.addAccepts("image/*", true);  //media type that supports

Then the AbstractCollectionAdapter contains two methods that extract the
Media Link Entry and the Media Resource from the RequestContext inputStream.

I think this could be enought in order to support the ietf draft(

Please, don't hesitate sending comments, I'd like to know your opinion
before to continue the development.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message