Differences between revisions 3 and 4
Revision 3 as of 2004-10-04 18:58:43
Size: 1242
Revision 4 as of 2009-09-20 22:02:42
Size: 1242
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

(As taken from the gracious people on the Mailing List and testing)

Purpose: To integrate Slide into your own purpose(s).

Assumptions: You have a running Slide server and can authenticate and are authorized to add, remove, and make changes to the store. Most of these examples should be usable from the standard binary install (2.1M1 was last binary tested).

Dependent libraries:

  • jakarta-slide-webdavlib-<version>.jar

  • commons-httpclient.jar
  • commons-httpclient-contrib.jar
  • commons-logging.jar
  • antlr.jar

Set up a connection to your server (using Client API):

HttpURL url = new HttpURL("http://localhost:8080/slide");
WebdavResource wdr = new WebdavResource(hrl);

Add a file using the above connection:

String filename = "/test.jpg";
File fn = new File(filename);
String path = wdr.getPath() + "/" + filename;
boolean rslt = wdr.putMethod(path,fn);

Add a single property to the above file:

boolean prop = wdr.proppatchMethod(path,new PropertyName("DAV:", "mykey"),"myvalue",true);

Retrieve the above file:

java.io.InputStream is = wdr.getMethodData(path);

PropertiesAndSearching (last edited 2009-09-20 22:02:42 by localhost)