|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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 | |
void |
begin(java.security.Principal principal,
java.util.Hashtable parameters)
Indicates that a new request or transaction with this store involved has been started. |
void |
checkAuthentication()
Checks if authentication information passed in #begin(Service, Principal, Object, LoggerFacade, Hashtable)
is valid. |
void |
commit()
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(java.lang.String folderUri)
Creates a folder at the position specified by folderUri. |
void |
createResource(java.lang.String resourceUri)
Creates a content resource at the position specified by resourceUri. |
java.lang.String[] |
getChildrenNames(java.lang.String folderUri)
Gets the names of the children of the folder specified by folderUri. |
java.util.Date |
getCreationDate(java.lang.String uri)
Gets the date of the creation of the object specified by uri. |
java.util.Date |
getLastModified(java.lang.String uri)
Gets the date of the last modiciation of the object specified by uri. |
java.io.InputStream |
getResourceContent(java.lang.String resourceUri)
Gets the content of the resource specified by resourceUri. |
long |
getResourceLength(java.lang.String resourceUri)
Gets the length of the content resource specified by resourceUri. |
boolean |
isFolder(java.lang.String uri)
Checks if there is an object at the position specified by uri and if so if it is a folder. |
boolean |
isResource(java.lang.String uri)
Checks if there is an object at the position specified by uri and if so if it is a content resource. |
boolean |
objectExists(java.lang.String uri)
Checks if there is an object at the position specified by uri. |
void |
removeObject(java.lang.String uri)
Removes the object specified by uri. |
void |
rollback()
Indicates that all changes done inside this request shall be undone and any transactions, connections and other temporary resources shall be terminated. |
void |
setResourceContent(java.lang.String resourceUri,
java.io.InputStream content,
java.lang.String contentType,
java.lang.String characterEncoding)
Sets / stores the content of the resource specified by resourceUri. |
| Method Detail |
public void begin(java.security.Principal principal,
java.util.Hashtable parameters)
throws java.lang.Exception
commit()
or rollback(). If only non-read methods have been called, the
request will be terminated by a commit(). 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 availableparameters - Hashtable containing the parameters' names and associated
values configured in the java.lang.Exception
public void checkAuthentication()
throws java.lang.SecurityException
#begin(Service, Principal, Object, LoggerFacade, Hashtable)
is valid. If not throws an exception.
java.lang.SecurityException - if authentication is not valid
public void commit()
throws java.io.IOException
java.io.IOException - if something goes wrong on the store level
public void rollback()
throws java.io.IOException
java.io.IOException - if something goes wrong on the store level
public boolean objectExists(java.lang.String uri)
throws java.io.IOException
uri.
uri - URI of the object to check
true if the object at uri exists
java.io.IOException - if something goes wrong on the store level
public boolean isFolder(java.lang.String uri)
throws java.io.IOException
uri and if so if it is a folder.
uri - URI of the object to check
true if the object at uri exists
and is a folder
java.io.IOException - if something goes wrong on the store level
public boolean isResource(java.lang.String uri)
throws java.io.IOException
uri and if so if it is a content resource.
uri - URI of the object to check
true if the object at uri exists
and is a content resource
java.io.IOException - if something goes wrong on the store level
public void createFolder(java.lang.String folderUri)
throws java.io.IOException
folderUri.
folderUri - URI of the folder
java.io.IOException - if something goes wrong on the store level
public void createResource(java.lang.String resourceUri)
throws java.io.IOException
resourceUri.
resourceUri - URI of the content resource
java.io.IOException - if something goes wrong on the store level
public void setResourceContent(java.lang.String resourceUri,
java.io.InputStream content,
java.lang.String contentType,
java.lang.String characterEncoding)
throws java.io.IOException
resourceUri.
resourceUri - 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
java.io.IOException - if something goes wrong on the store level
public java.util.Date getLastModified(java.lang.String uri)
throws java.io.IOException
uri.
uri - URI of the object, i.e. content resource or folder
null declares this
value as invalid and asks the adapter to try to set it from the
properties if possible
java.io.IOException - if something goes wrong on the store level
public java.util.Date getCreationDate(java.lang.String uri)
throws java.io.IOException
uri.
uri - URI of the object, i.e. content resource or folder
null declares this value as
invalid and asks the adapter to try to set it from the properties
if possible
java.io.IOException - if something goes wrong on the store level
public java.lang.String[] getChildrenNames(java.lang.String folderUri)
throws java.io.IOException
folderUri.
folderUri - URI of the folder
java.io.IOException - if something goes wrong on the store level
public java.io.InputStream getResourceContent(java.lang.String resourceUri)
throws java.io.IOException
resourceUri.
resourceUri - URI of the content resource
java.io.IOException - if something goes wrong on the store level
public long getResourceLength(java.lang.String resourceUri)
throws java.io.IOException
resourceUri.
resourceUri - URI of the content resource
-1 declares this value as invalid and asks the
adapter to try to set it from the properties if possible
java.io.IOException - if something goes wrong on the store level
public void removeObject(java.lang.String uri)
throws java.io.IOException
uri.
uri - URI of the object, i.e. content resource or folder
java.io.IOException - if something goes wrong on the store level
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||