|
ModeShape Distribution 3.0.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IWebdavStore
Interface for simple implementation of any store for the WebdavServlet
based on the BasicWebdavStore from Oliver Zeigermann, that was part of the Webdav Construcktion Kit from slide
| Method Summary | |
|---|---|
ITransaction |
begin(Principal principal)
Indicates that a new request or transaction with this store involved has been started. |
void |
checkAuthentication(ITransaction transaction)
Checks if authentication information passed in is valid. |
void |
commit(ITransaction transaction)
Indicates that all changes done inside this request shall be made permanent and any transactions, connections and other temporary resources shall be terminated. |
void |
createFolder(ITransaction transaction,
String folderUri)
Creates a folder at the position specified by folderUri. |
void |
createResource(ITransaction transaction,
String resourceUri)
Creates a content resource at the position specified by resourceUri. |
void |
destroy()
Life cycle method, called by WebdavServlet's destroy() method. |
String[] |
getChildrenNames(ITransaction transaction,
String folderUri)
Gets the names of the children of the folder specified by folderUri. |
InputStream |
getResourceContent(ITransaction transaction,
String resourceUri)
Gets the content of the resource specified by resourceUri. |
long |
getResourceLength(ITransaction transaction,
String resourceUri)
Gets the length of the content resource specified by resourceUri. |
StoredObject |
getStoredObject(ITransaction transaction,
String uri)
Gets the storedObject specified by uri |
void |
removeObject(ITransaction transaction,
String uri)
Removes the object specified by uri. |
void |
rollback(ITransaction transaction)
Indicates that all changes done inside this request shall be undone and any transactions, connections and other temporary resources shall be terminated. |
long |
setResourceContent(ITransaction transaction,
String resourceUri,
InputStream content,
String contentType,
String characterEncoding)
Sets / stores the content of the resource specified by resourceUri. |
| Method Detail |
|---|
void destroy()
ITransaction begin(Principal principal)
commit(ITransaction)
or rollback(ITransaction). If only non-read methods have been called, the
request will be terminated by a commit(ITransaction). This method will be
called by (@link WebdavStoreAdapter} at the beginning of each request.
principal - the principal that started this request or null if
there is non available
transaction
WebdavExceptionvoid checkAuthentication(ITransaction transaction)
transaction - indicates that the method is within the scope of a WebDAV
transactionvoid commit(ITransaction transaction)
transaction - indicates that the method is within the scope of a WebDAV
transaction
WebdavException - if something goes wrong on the store levelvoid rollback(ITransaction transaction)
transaction - indicates that the method is within the scope of a WebDAV
transaction
WebdavException - if something goes wrong on the store level
void createFolder(ITransaction transaction,
String folderUri)
folderUri.
transaction - indicates that the method is within the scope of a WebDAV
transactionfolderUri - URI of the folder
WebdavException - if something goes wrong on the store level
void createResource(ITransaction transaction,
String resourceUri)
resourceUri.
transaction - indicates that the method is within the scope of a WebDAV
transactionresourceUri - URI of the content resource
WebdavException - if something goes wrong on the store level
InputStream getResourceContent(ITransaction transaction,
String resourceUri)
resourceUri.
transaction - indicates that the method is within the scope of a WebDAV
transactionresourceUri - URI of the content resource
WebdavException - if something goes wrong on the store level
long setResourceContent(ITransaction transaction,
String resourceUri,
InputStream content,
String contentType,
String characterEncoding)
resourceUri.
transaction - indicates that the method is within the scope of a WebDAV
transactionresourceUri - URI of the resource where the content will be storedcontent - input stream from which the content will be read fromcontentType - content type of the resource or null if unknowncharacterEncoding - character encoding of the resource or null if unknown
or not applicable
WebdavException - if something goes wrong on the store level
String[] getChildrenNames(ITransaction transaction,
String folderUri)
folderUri.
transaction - indicates that the method is within the scope of a WebDAV
transactionfolderUri - URI of the folder
null if the
uri points to a file
WebdavException - if something goes wrong on the store level
long getResourceLength(ITransaction transaction,
String resourceUri)
resourceUri.
transaction - indicates that the method is within the scope of a WebDAV
transactionresourceUri - URI of the resource for which the length should be retrieved
-1 declares this
value as invalid and asks the adapter to try to set it from the
properties if possible
WebdavException - if something goes wrong on the store level
void removeObject(ITransaction transaction,
String uri)
uri.
transaction - indicates that the method is within the scope of a WebDAV
transactionuri - URI of the object, i.e. content resource or folder
WebdavException - if something goes wrong on the store level
StoredObject getStoredObject(ITransaction transaction,
String uri)
uri
transaction - indicates that the method is within the scope of a WebDAV
transactionuri - URI
|
ModeShape Distribution 3.0.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||