[Building Sakai] need to be able to load a ZIP file through some REST interface (/direct?)
Hedrick Charles
hedrick at rutgers.edu
Sat Apr 21 15:10:35 PDT 2012
Im going to try translatable, and return the input stream as the object. We'll see if that works.
On Apr 21, 2012, at 6:06:36 PM, Aaron Zeckoski wrote:
> Most of the time the data is coming in as json or xml or request
> params so things are geared to handle those cases with little extra
> work. You case is a little more unusual so you will have to do
> something a little more involved.
>
> Most of the docs are in the javadocs but you can either handle this
> through something like this:
> https://source.sakaiproject.org/svn/entitybroker/trunk/api/src/java/org/sakaiproject/entitybroker/entityprovider/capabilities/InputTranslatable.java
>
> Or you can simply use an annotation to define it so you grab the incoming data:
> EntityCustomAction
>
> Or you can just grab the Request and do anything you like with it like so:
> https://source.sakaiproject.org/svn/entitybroker/trunk/api/src/java/org/sakaiproject/entitybroker/entityprovider/capabilities/RequestAware.java
>
> Let me know if you have trouble getting what you need from that.
> -AZ
>
>
> On Sat, Apr 21, 2012 at 3:55 PM, Charles Hedrick <hedrick at rutgers.edu> wrote:
>> I've had a reasonable request to allow Common Cartridge files to be loaded directly into lesson builder.
>>
>> I assume the right way to do this is to use /direct somehow. But all the examples I find seem to operate entirely be undocumented magic, which seem to create new objects by supplying field values. I need something like
>>
>> /direct/lessonbuilder/loadcc
>>
>> which is a PUT supplying a ZIP file. If I were writing a normal servlet this would be easy. But I don't see how to navigate my way through the various APIs.
>>
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
>
>
> --
> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
More information about the sakai-dev
mailing list