You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Guillaume Chervet <Gu...@rentalresult.com> on 2005/05/26 13:37:25 UTC

Store object

Hello,

Do you know where I can find more informations about slide? I don't
understand the store system. I am using (org.apache.slide.content) but I
don't find how to store some java objects. I can store "String" object
using this example
http://wiki.apache.org/jakarta-slide/Sample_API_application, but nothing
more.
Do you know how it works?

Thanks

Guillaume

 Disclaimer, Security & Viruses :
=========================================================================================================================
 This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Result Group Ltd. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing,or copying of this email is strictly prohibited.

 If you have received this email in error please notify the sender by reply or by telephone on +44 (0)1422 327000.

 Please note that this e-mail has been created in the knowledge that the Internet e-mail is not a 100% secure communications medium.
 We advise that you understand and observe this lack of security when e-mailing us.

 Although we have taken steps to ensure that this e-mail and attachments are free from any virus, we advise that in keeping with good computing practice the recipient is responsible for ensuring they are actually virus free.
=========================================================================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Store object

Posted by Martin Kalén <mk...@apache.org>.
Guillaume Chervet wrote:
> Do you know where I can find more informations about slide? I don't
> understand the store system. I am using (org.apache.slide.content) but I
> don't find how to store some java objects. I can store "String" object
> using this example
> http://wiki.apache.org/jakarta-slide/Sample_API_application, but nothing
> more.
> Do you know how it works?

If you can serialize your objects, you can use Java serialization to
byte array or ObjectOutputStream/ObjectInputStream and store the
contents by calling:

void store(SlideToken token, String strUri,
                NodeRevisionDescriptor revisionDescriptor,
                NodeRevisionContent revisionContent)

The NodeRevisionContent is the Slide API object carrying the content
itself and you need to attach content to it like so:
   NodeRevisionContent content = new NodeRevisionContent();
   content.setContent(bytes[] or char[] or Reader or InputStream);


To understand how to use the API it's a good idea to browse through
different methods in the WebDAV servlet implementation. Or you can
try WCK for an API that might be easier to "digest" than the full
Content / Storage etc in Slide.

HTH,
  Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org