org.modeshape.web.jcr.webdav
Class ModeShapeWebdavStore

java.lang.Object
  extended by org.modeshape.web.jcr.webdav.ModeShapeWebdavStore
All Implemented Interfaces:
net.sf.webdav.IWebdavStore

public class ModeShapeWebdavStore
extends Object
implements net.sf.webdav.IWebdavStore

Implementation of the IWebdavStore interface that uses a JCR repository as a backing store.

This implementation takes several OSX-specific WebDAV workarounds from the WebDAVImpl class in Drools Guvnor.


Nested Class Summary
protected static class ModeShapeWebdavStore.SessionKey
           
 
Constructor Summary
ModeShapeWebdavStore(RequestResolver requestResolver, ContentMapper contentMapper)
           
 
Method Summary
 net.sf.webdav.ITransaction begin(Principal principal)
          
 void checkAuthentication(net.sf.webdav.ITransaction transaction)
          
 void commit(net.sf.webdav.ITransaction transaction)
          
 void createFolder(net.sf.webdav.ITransaction transaction, String folderUri)
          
 void createResource(net.sf.webdav.ITransaction transaction, String resourceUri)
          
 String[] getChildrenNames(net.sf.webdav.ITransaction transaction, String folderUri)
          
 InputStream getResourceContent(net.sf.webdav.ITransaction transaction, String resourceUri)
          
 long getResourceLength(net.sf.webdav.ITransaction transaction, String uri)
          
 net.sf.webdav.StoredObject getStoredObject(net.sf.webdav.ITransaction transaction, String uri)
          
protected static List<String> namesOfChildren(Node node)
           
 void removeObject(net.sf.webdav.ITransaction transaction, String uri)
          
protected  RequestResolver requestResolver()
           
 void rollback(net.sf.webdav.ITransaction transaction)
          
 long setResourceContent(net.sf.webdav.ITransaction transaction, String resourceUri, InputStream content, String contentType, String characterEncoding)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModeShapeWebdavStore

public ModeShapeWebdavStore(RequestResolver requestResolver,
                            ContentMapper contentMapper)
Method Detail

begin

public net.sf.webdav.ITransaction begin(Principal principal)

Specified by:
begin in interface net.sf.webdav.IWebdavStore

commit

public void commit(net.sf.webdav.ITransaction transaction)

Specified by:
commit in interface net.sf.webdav.IWebdavStore

rollback

public void rollback(net.sf.webdav.ITransaction transaction)

Specified by:
rollback in interface net.sf.webdav.IWebdavStore

checkAuthentication

public void checkAuthentication(net.sf.webdav.ITransaction transaction)

Specified by:
checkAuthentication in interface net.sf.webdav.IWebdavStore

createFolder

public void createFolder(net.sf.webdav.ITransaction transaction,
                         String folderUri)

Specified by:
createFolder in interface net.sf.webdav.IWebdavStore
See Also:
IWebdavStore.createFolder(net.sf.webdav.ITransaction, java.lang.String)

createResource

public void createResource(net.sf.webdav.ITransaction transaction,
                           String resourceUri)

Specified by:
createResource in interface net.sf.webdav.IWebdavStore

getChildrenNames

public String[] getChildrenNames(net.sf.webdav.ITransaction transaction,
                                 String folderUri)

Specified by:
getChildrenNames in interface net.sf.webdav.IWebdavStore

namesOfChildren

protected static List<String> namesOfChildren(Node node)
                                       throws RepositoryException
Throws:
RepositoryException

getResourceContent

public InputStream getResourceContent(net.sf.webdav.ITransaction transaction,
                                      String resourceUri)

Specified by:
getResourceContent in interface net.sf.webdav.IWebdavStore

getResourceLength

public long getResourceLength(net.sf.webdav.ITransaction transaction,
                              String uri)

Specified by:
getResourceLength in interface net.sf.webdav.IWebdavStore

getStoredObject

public net.sf.webdav.StoredObject getStoredObject(net.sf.webdav.ITransaction transaction,
                                                  String uri)

Specified by:
getStoredObject in interface net.sf.webdav.IWebdavStore

removeObject

public void removeObject(net.sf.webdav.ITransaction transaction,
                         String uri)

Specified by:
removeObject in interface net.sf.webdav.IWebdavStore

setResourceContent

public long setResourceContent(net.sf.webdav.ITransaction transaction,
                               String resourceUri,
                               InputStream content,
                               String contentType,
                               String characterEncoding)

Specified by:
setResourceContent in interface net.sf.webdav.IWebdavStore

requestResolver

protected final RequestResolver requestResolver()


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.