|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResourceAdapter
This is resource adapter interface that simplifies access to resource from WebDAV handler
| Method Summary | |
|---|---|
Object[] |
collectionElements(Object resource)
Returns collection elements for given resource |
void |
copy(Object source,
Object destination,
boolean recursive)
Copies the resource to given destination. |
void |
delete(Object resource)
Deletes resource |
boolean |
exists(Object resource)
Returns true if resource exists |
Object |
findParentResource(Object resource)
Returns parent resource for given resource. |
Object |
findResource(String path)
Obtains resource object. |
RequestProperty[] |
getDefaultRequestProperties(Object resource)
|
ResponseProperty[] |
getDefaultResponseProperties(Object resource)
|
InputStream |
getInpusStream(Object resource,
long from,
long length)
Returns input stream of a resource's range |
InputStream |
getInputStream(Object resource)
Returns input stream of a resource |
LockingMechanism |
getLockingMechanism()
Returns locking mechanism |
NamespacesProvider |
getNamespacesProvider()
Returns namespace privider |
OutputStream |
getOutputStream(Object resource)
Returns output stream of a resource. |
OutputStream |
getOutputStream(Object resource,
long from,
long length)
Returns output stream of a resource. |
String |
getResourceETag(Object resource)
Returns resource ETag (as specified in RFC-2616) |
String |
getResourceName(Object resource)
Returns resource name |
boolean |
isCollection(Object resource)
Returns true if resource is a collection |
void |
makeCollection(Object resource)
Makes a collection |
void |
move(Object source,
Object destination)
Noves the resource to given destination |
long |
resourceCreated(Object resource)
Returns when resource was created or -1 if unknown |
long |
resourceLastModified(Object resource)
Returns when resource was last modified or -1 if unknown |
long |
resourceLength(Object resource)
Returns resource's length or -1 if unknown |
| Method Detail |
|---|
Object findResource(String path)
Obtains resource object. It is supposed to be resource
itself or an proxy as File is.
If this method returns null then rest of the method
relying on the resource must be able to deal with it since
this class users might not care what the value is.
path - path to the resource
Object findParentResource(Object resource)
resource - existing resource
null if resource is already root of the hierarchylong resourceLength(Object resource)
resource - resource
long resourceLastModified(Object resource)
resource - resource
long resourceCreated(Object resource)
resource - resource
String getResourceName(Object resource)
resource - resource name
String getResourceETag(Object resource)
resource - resource
boolean exists(Object resource)
true if resource exists
resource - resource
true if resource existsboolean isCollection(Object resource)
true if resource is a collection
resource - resource
true if resource is a collection
void delete(Object resource)
throws IOException
resource - resource
IOException - thrown if there was a problem deleting the resource
void makeCollection(Object resource)
throws IOException
resource - resource that identifies collection
IOException - thrown if there was a problem while creating the collection
void copy(Object source,
Object destination,
boolean recursive)
throws IOException
source - source resourcedestination - destination resourcerecursive - will it perform deep copy or not
IOException - thrown if there is a problem with copying.
void move(Object source,
Object destination)
throws IOException
source - sourcedestination - destination
IOException - thrown if moving failedObject[] collectionElements(Object resource)
resource - resource
null if there is no elemetns or resource is not a collecitonResponseProperty[] getDefaultResponseProperties(Object resource)
RequestProperty[] getDefaultRequestProperties(Object resource)
InputStream getInputStream(Object resource)
throws IOException
resource - resource
null if not supported
IOException - thrown if there is a problem returning the input stream
InputStream getInpusStream(Object resource,
long from,
long length)
throws IOException
resource - resourcefrom - from offsetlength - amount of bytes to be trasmitted
null if not supported
IOException - thrown if there is a problem returning the input stream
OutputStream getOutputStream(Object resource)
throws IOException
resource - resource
null if not supported
IOException - thrown if there is a problem creating new resource or replaying existing
OutputStream getOutputStream(Object resource,
long from,
long length)
throws IOException
resource - resourcefrom - from offsetlength - number of bytes to be trasmitted
null if not supported
IOException - thrown if there is a problem creating new resource or replaying existingNamespacesProvider getNamespacesProvider()
LockingMechanism getLockingMechanism()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||