|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.vfs.VFSDAVStore
public final class VFSDAVStore
a DAVStore implementation for the VirtualFileSystem .
| Constructor Summary | |
|---|---|
VFSDAVStore()
|
|
| Method Summary | |
|---|---|
boolean |
addDeadProperty(java.net.URI uri, User user, DeadProperty prop)
sets a dead property for the object identified by the given URI. |
boolean |
addDeadProperty(VirtualFile file, User user, DeadProperty prop)
sets a dead property for the given VirtualFile. |
boolean |
canRead(java.net.URI uri, User user)
checks whether the given User can read the VirtualFile
identified by the given URI. |
boolean |
canWrite(java.net.URI uri, User user)
checks whether the given User can read the VirtualFile
identified by the given URI. |
void |
copy(java.net.URI sourceURI,
java.net.URI destinationURI, User user, MultiStatusResponse response)
performs a recursive copy command. |
boolean |
createResourceCollection(java.net.URI uri, User user)
creates a new resource collection at the specified URI. |
java.net.URI |
enforceTailingSlash(java.net.URI uri)
enforces a tailing slash (needed for collection URIs). |
java.lang.String |
getCharacterEncoding(java.net.URI uri, User user)
returns the character encoding of the URI or null, if the
encoding is unknown. |
java.util.Collection<java.net.URI> |
getChildren(java.net.URI uri, User user)
returns the children of the given URI which are readable for the given user. |
java.io.InputStream |
getContent(java.net.URI uri, User user)
returns an InputStream for the given URI, if the given user is
allow to read the resource. |
long |
getContentLength(java.net.URI uri, User user)
returns the length of the resource. |
java.lang.String |
getContentType(java.net.URI uri, User user)
returns the content-type of the URI. |
long |
getCreationDate(java.net.URI uri, User user)
returns the creation-date of the URI. |
org.jdom.Content |
getDAVProperty(java.net.URI uri, User user, DAVProperties prop)
returns the requested property for the given URI provided the user has read access. |
org.jdom.Content |
getDAVProperty(VirtualFile file, User user, DAVProperties prop)
returns the requested property for the given VirtualFile provided
the user has read access. |
java.util.Collection<DeadProperty> |
getDeadProperties()
returns a collection of all dead property types known to the server. |
java.util.Collection<DeadProperty> |
getDeadProperties(java.net.URI uri)
returns a collection of all dead properties of the given URI. |
java.util.Collection<DeadProperty> |
getDeadProperties(VirtualFile file)
returns a collection of all dead properties of the given file. |
DeadProperty |
getDeadProperty(java.net.URI uri, User user, DeadProperty prop)
returns the requested dead property for the given URI provided the User has read access. |
DeadProperty |
getDeadProperty(VirtualFile file, User user, DeadProperty prop)
returns the requested dead property for the given VirtualFile
provided the User has read access. |
java.lang.String |
getETag(java.net.URI uri)
returns an ETag for the VirtualFile identified by the given
URI. |
long |
getLastModified(java.net.URI uri, User user)
returns the last modification date of the URI. |
java.net.URI |
getParentURI(java.net.URI resourceURI)
returns the URI of the parent or the URI itself, if it denotes the root. |
boolean |
isCollection(java.net.URI uri)
returns true, if the given URI points to a collection. |
boolean |
isResource(java.net.URI uri)
returns true, if the given URI points to a resource. |
void |
move(java.net.URI sourceURI,
java.net.URI destinationURI, User user, MultiStatusResponse response)
performs a recursive move command. |
boolean |
objectExists(java.net.URI uri)
returns true, if the given URI points to an existing object. |
void |
removeObject(java.net.URI uri, User user)
removes a single object. |
void |
setContent(java.net.URI uri, User user,
java.io.InputStream content,
java.lang.String contentType,
java.lang.String characterEncoding, HttpDAVServletResponse res)
sets the content of a resource and optionally creates it, if it does not exist yet. |
java.net.URI |
translateDavURI(java.lang.String uri)
translates a WebDAV URI string to a VirtualFileSystem URI. |
java.net.URI |
translateStoreURI(java.net.URI uri)
translates a store URI to a DAV URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VFSDAVStore()
| Method Detail |
|---|
public java.net.URI enforceTailingSlash(java.net.URI uri)
enforceTailingSlash in interface DAVStoreuri - the URI
public java.net.URI translateDavURI(java.lang.String uri)
VirtualFileSystem URI.
translateDavURI in interface DAVStoreuri - the WebDAV URI to convert
VirtualFileSystem URIpublic java.net.URI translateStoreURI(java.net.URI uri)
translateStoreURI in interface DAVStoreuri - the store URI.
DAVStore.translateStoreURI(URI)public java.net.URI getParentURI(java.net.URI resourceURI)
getParentURI in interface DAVStoreresourceURI - the URI
public boolean createResourceCollection(java.net.URI uri, User user)
createResourceCollection in interface DAVStoreuri - the URI of the new collectionuser - the user
true, if and only if the collection has been successfully
created. Otherwise false.DAVStore.createResourceCollection(java.net.URI,
org.torweg.pulse.accesscontrol.User)public java.lang.String getCharacterEncoding(java.net.URI uri, User user)
null, if the
encoding is unknown.
getCharacterEncoding in interface DAVStoreuri - the URIuser - the user
null, if the
encoding is unknown.DAVStore.getCharacterEncoding(java.net.URI,
org.torweg.pulse.accesscontrol.User)public java.util.Collection<java.net.URI> getChildren(java.net.URI uri, User user)
getChildren in interface DAVStoreuri - the URIuser - the user
DAVStore.getChildren(java.net.URI,
org.torweg.pulse.accesscontrol.User)
public java.io.InputStream getContent(java.net.URI uri, User user)
throws java.io.IOException
InputStream for the given URI, if the given user is
allow to read the resource.
getContent in interface DAVStoreuri - the URIuser - the user
InputStream for the given URI or null, if the
user is not allowed to read the resource
java.io.IOException - on errorsDAVStore.getContent(java.net.URI,
org.torweg.pulse.accesscontrol.User)public long getContentLength(java.net.URI uri, User user)
getContentLength in interface DAVStoreuri - the URIuser - the user
DAVStore.getContentLength(java.net.URI,
org.torweg.pulse.accesscontrol.User)public java.lang.String getContentType(java.net.URI uri, User user)
getContentType in interface DAVStoreuri - the URIuser - the user
DAVStore.getContentType(java.net.URI,
org.torweg.pulse.accesscontrol.User)public long getCreationDate(java.net.URI uri, User user)
getCreationDate in interface DAVStoreuri - the URIuser - the user
DAVStore.getCreationDate(java.net.URI,
org.torweg.pulse.accesscontrol.User)public long getLastModified(java.net.URI uri, User user)
getLastModified in interface DAVStoreuri - the URIuser - the user
DAVStore.getLastModified(java.net.URI,
org.torweg.pulse.accesscontrol.User)
public org.jdom.Content getDAVProperty(java.net.URI uri, User user, DAVProperties prop)
throws java.io.IOException
getDAVProperty in interface DAVStoreuri - the uriuser - the userprop - the property
java.io.IOException - on errors retrieving the propertyDAVStore.getDAVProperty(java.net.URI,
org.torweg.pulse.accesscontrol.User,
org.torweg.pulse.webdav.util.DAVProperties)public org.jdom.Content getDAVProperty(VirtualFile file, User user, DAVProperties prop)
VirtualFile provided
the user has read access.
file - the virtual fileuser - the userprop - the property
public boolean addDeadProperty(java.net.URI uri, User user, DeadProperty prop)
throws java.io.IOException
addDeadProperty in interface DAVStoreuri - the URIuser - the userprop - the property to set
true, if and only if the property has been set. Otherwise
false.
java.io.IOException - on errors accessing the VirtualFile identified by the
given URIDAVStore.addDeadProperty(URI, User, DeadProperty)
public boolean addDeadProperty(VirtualFile file, User user, DeadProperty prop)
throws java.io.IOException
VirtualFile.
file - the virtual filesuser - the userprop - the property to set
true, if and only if the property has been set. Otherwise
false.
java.io.IOException - on errors accessing the objectDAVStore.addDeadProperty(URI, User, DeadProperty)
public DeadProperty getDeadProperty(java.net.URI uri, User user, DeadProperty prop)
throws java.io.IOException
User has read access.
getDeadProperty in interface DAVStoreuri - the uriuser - the userprop - the property
java.io.IOException - on errors accessing the VirtualFile identified by the
given URIDAVStore.getDeadProperty(URI, User, DeadProperty)public DeadProperty getDeadProperty(VirtualFile file, User user, DeadProperty prop)
VirtualFile
provided the User has read access.
file - the virtual fileuser - the userprop - the property
DAVStore.getDeadProperty(URI, User, DeadProperty)public java.util.Collection<DeadProperty> getDeadProperties()
getDeadProperties in interface DAVStoreDAVStore.getDeadProperties()public java.util.Collection<DeadProperty> getDeadProperties(java.net.URI uri)
getDeadProperties in interface DAVStoreuri - the URI
DAVStore.getDeadProperties()public java.util.Collection<DeadProperty> getDeadProperties(VirtualFile file)
file - the virtual file
DAVStore.getDeadProperties()public boolean isCollection(java.net.URI uri)
true, if the given URI points to a collection.
isCollection in interface DAVStoreuri - the uri
true, if the given URI points to a collectionDAVStore.isCollection(java.net.URI)public boolean isResource(java.net.URI uri)
true, if the given URI points to a resource.
isResource in interface DAVStoreuri - the uri
true, if the given URI points to a resourceDAVStore.isResource(java.net.URI)public boolean objectExists(java.net.URI uri)
true, if the given URI points to an existing object.
objectExists in interface DAVStoreuri - the uri
true, if the given URI points to an existing objectDAVStore.objectExists(java.net.URI)
public void setContent(java.net.URI uri, User user,
java.io.InputStream content,
java.lang.String contentType,
java.lang.String characterEncoding, HttpDAVServletResponse res)
throws java.io.IOException
setContent in interface DAVStoreuri - the URIuser - the usercontent - the input streamcontentType - the content type specified by the clientcharacterEncoding - the character encoding specified by the clientres - the response
java.io.IOException - on errors setting the contentpublic java.lang.String getETag(java.net.URI uri)
VirtualFile identified by the given
URI.
getETag in interface DAVStoreuri - the URI
public boolean canRead(java.net.URI uri, User user)
User can read the VirtualFile
identified by the given URI.
canRead in interface DAVStoreuri - the URIuser - the user
true, if and only if the user has read access. Otherwise
false.public boolean canWrite(java.net.URI uri, User user)
User can read the VirtualFile
identified by the given URI.
canWrite in interface DAVStoreuri - the uriuser - the user
true, if and only if the user has read access. Otherwise
false.
public void removeObject(java.net.URI uri, User user)
throws java.io.IOException
removeObject in interface DAVStoreuri - the URIuser - the user
java.io.IOException - on errors removing the objectDAVStore.removeObject(java.net.URI,
org.torweg.pulse.accesscontrol.User)
public void copy(java.net.URI sourceURI,
java.net.URI destinationURI, User user, MultiStatusResponse response)
throws java.io.IOException
copy in interface DAVStoresourceURI - the source URIdestinationURI - the destination URIuser - the userresponse - the multi-status response
java.io.IOException - on errorsDAVStore.copy(URI, URI, User,
MultiStatusResponse)
public void move(java.net.URI sourceURI,
java.net.URI destinationURI, User user, MultiStatusResponse response)
throws java.io.IOException
move in interface DAVStoresourceURI - the source URIdestinationURI - the destination URIuser - the userresponse - the multi-status response
java.io.IOException - on errorsDAVStore.move(URI, URI, User,
MultiStatusResponse)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||