Fwd: Regarding propfindtype request ...

2009-03-23 Thread imadhusudhanan


 Forwarded Mail 
From : imadhusudhanan madhusudhana...@gmail.com
To : users us...@jackrabbit.apache.org
Date :Mon, 23 Mar 2009 00:05:23 -0700
Subject : Regarding propfindtype request ...
 Forwarded Mail 

  Dear All,
  
  I m customizing jackrabbit to use  mysql server with the  table 
  structures as mentioned below  ,
   
  DavResourceLocator 
  ---+--+--+-+-+---+
  | Field  | Type | Null | Key | Default | Extra |
  ++--+--+-+-+---+
  | RESOURCE_ID| bigint(19)   | NO   | PRI | NULL|   |
  | DOC_FOLDER_ID  | bigint(19)   | NO   | | NULL|   |
  | AUTHOR_USER_ID | varchar(100) | NO   | | NULL|   |
  | RESOURCE_NAME  | varchar(255) | NO   | | NULL|   |
  | RESOURCE_TYPE  | varchar(60)  | NO   | | NULL|  
  
  DavResourceMapping
  
  ++--+-+-+---+
  | Field   | Type   | Null | Key | Default | Extra |
  +-++--+-+-+---+
  | RESOURCE_MAPPING_ID | bigint(19) | NO   | PRI | NULL|   |
  | RESOURCE_ID | bigint(19) | NO   | | NULL|   |
  | AUTHOR_USER_ID  | bigint(19) | NO   | | NULL|   |
  | PARENT_RESOURCE_ID  | bigint(19) | NO   | | NULL|   |
  +-++--+-+-+---+
  
   
  The first table will be used to store a node either its nt:file or 
  nt:folder and the second one the mapping between the nodes like which 
  nt:file node present in nt:folder node. What i did is I overrode the 
  AbstractWebdavServlet to fetch data from my db and deliver the same using 
  the JCR Objects such the MultiStatus and the MultiStatusResponse for 
  propFind Type of requests. 
  While doing so initially when I connect to webdav thru cadaver I got the 
  propfind type as '0' and its PROPFIND_BY_PROPERTY in DavConstants. And for a 
  subsequent propFind Type I get the propFindType as '0' again followed by a 
  Error 404  RESOURCE-NAME  kinda response. Kindly let me know anything I 
  miss ... 
   
  


Re: Regarding propfindtype request ...

2009-03-23 Thread Torgeir Veimo
If you want a webdav frontend to connect to your custom database schema, you
cannot override the abstract debdav servlet, it will simply break in
numerous ways. Either implement a custom backend to jackrabbit, or simply
use a different webdav servlet. I'd suggest using the simple webdav servlet
that comes with tomcat, which uses jndi to lookup files and directories, and
which can easily be modified to lookup stuff in your custom schema.

2009/3/23 imadhusudhanan madhusudhana...@gmail.com



  Forwarded Mail 
 From : imadhusudhanan madhusudhana...@gmail.com
 To : users us...@jackrabbit.apache.org
 Date :Mon, 23 Mar 2009 00:05:23 -0700
 Subject : Regarding propfindtype request ...
  Forwarded Mail 

 Dear All,

 I m customizing jackrabbit to use  mysql server with the  table
 structures as mentioned below  ,

DavResourceLocator
   ---+--+--+-+-+---+
 | Field  | Type | Null | Key | Default | Extra |
 ++--+--+-+-+---+
 | RESOURCE_ID| bigint(19)   | NO   | PRI | NULL|   |
 | DOC_FOLDER_ID  | bigint(19)   | NO   | | NULL|   |
 | AUTHOR_USER_ID | varchar(100) | NO   | | NULL|   |
 | RESOURCE_NAME  | varchar(255) | NO   | | NULL|   |
 | RESOURCE_TYPE  | varchar(60)  | NO   | | NULL|

 DavResourceMapping

   ++--+-+-+---+
 | Field   | Type   | Null | Key | Default | Extra |
 +-++--+-+-+---+
 | RESOURCE_MAPPING_ID | bigint(19) | NO   | PRI | NULL|   |
 | RESOURCE_ID | bigint(19) | NO   | | NULL|   |
 | AUTHOR_USER_ID  | bigint(19) | NO   | | NULL|   |
 | PARENT_RESOURCE_ID  | bigint(19) | NO   | | NULL|   |
 +-++--+-+-+---+


 The first table will be used to store a node either its nt:file or
 nt:folder and the second one the mapping between the nodes like which
 nt:file node present in nt:folder node. What i did is I overrode the
 AbstractWebdavServlet to fetch data from my db and deliver the same using
 the JCR Objects such the MultiStatus and the MultiStatusResponse for
 propFind Type of requests.
 While doing so initially when I connect to webdav thru cadaver I got the
 propfind type as '0' and its PROPFIND_BY_PROPERTY in DavConstants. And for a
 subsequent propFind Type I get the propFindType as '0' again followed by a
 Error 404  RESOURCE-NAME  kinda response. Kindly let me know anything I
 miss ...