hi,
Where are you looking for the files being created? They would be created
under a directory called files(look at the rootpath parameter under content
store in the Domain.xml file) which would be under the directory from where
you are running the version example.I am attaching the Test.java in
examples/version file which i was able to use  to successfully create files
on the hard disk.
    rajkumar



-----Original Message-----
From: Thomson, Judi R [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 10:46 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Using the slide API


Thanks Raj,
        That was extremely helpful.  Our only problem now is that we can't see
any files being saved to disk...none at all.  Do we need to have some
environment variables set or something like that?  (I know that the
webdav-part
uses the TOMCAT_HOME variable, but that didn't seem to make much difference
when
we tried setting it).

Thanks again!
Judi Thomson


>-----Original Message-----
>From: Raj Kumar [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, July 18, 2001 10:24 AM
>To: [EMAIL PROTECTED]
>Subject: RE: Using the slide API
>
>
>
>To be able to create a file on the hard disk you need the
>following entry in
>the Domain.xml file.
>
>    <contentstore name="file"
>         classname="slidestore.file.FileContentStoreNoVersioning">
>          <parameter name="rootpath">files</parameter>
>    </contentstore>
>             or
>    <contentstore name="file"
>         classname="slidestore.reference.FileContentStore">
>          <parameter name="rootpath">files</parameter>
>    </contentstore>
>
>depending on whether you need versioning or not.
>If you run the version example(in examples/version directory)
>with the above
>entry for the
>contentstore in the Domain.xml file and have  code which looks
>this in the
>Test.java file you should see some files
>being created on your hard disk.
>
>               String sample = "This is sample content being created";
>
>            // get the revision descriptors for the node /test
>            NodeRevisionDescriptors revisionDescriptors =
>                content.retrieve(slideToken, "/test");
>            // get the latest revision descriptor for the node /test
>            NodeRevisionDescriptor  revisionDescriptor =
>content.retrieve
>                (slideToken, revisionDescriptors);
>               revisionDescriptor.setContentLength(sample.length());
>
>               NodeRevisionContent chars = new NodeRevisionContent();
>               StringBufferInputStream reader =  new
>StringBufferInputStream(sample);
>            // set the content
>               chars.setContent(reader);
>
>            // this should create the file on your hard disk
>            content.create(slideToken, "/test",
>revisionDescriptor, chars);
>
>   rajkumar
>

Test.java

Reply via email to