Package io.milton.resource
Interface DeletableResource
- All Superinterfaces:
Resource
- All Known Subinterfaces:
DeletableCollectionResource,FileResource,FolderResource
Implement this to allow your resource to be deleted by webdav clients.
Milton will ensure there are no locks which prevent the delete, however the
current user might have the resource locked in which case your implementation
should permit the operation and remove the lock.
Usually milton will recursively call delete on all children within a collection
being deleted. However you can prevent this my implementing DeletableCollectionResource
which causes milton to ONLY call delete on the specific resource being deleted. In
which case it is your responsibility to test for locks on all child resources
-
Method Summary
Methods inherited from interface io.milton.resource.Resource
authenticate, authorise, checkRedirect, getModifiedDate, getName, getRealm, getUniqueId
-
Method Details
-
delete
void delete() throws io.milton.http.exceptions.NotAuthorizedException, io.milton.http.exceptions.ConflictException, io.milton.http.exceptions.BadRequestExceptionNon-recursive delete of this resource. Milton will call delete on child resources first.- Throws:
io.milton.http.exceptions.NotAuthorizedException- - if the operation should not be permitted for security reasonsio.milton.http.exceptions.ConflictException- - if there is some pre-condition that has not been met, or there is aspect of the resource state which prevents the resource from being deletedio.milton.http.exceptions.BadRequestException- - if there is some aspect of the request which means it is not sufficient to perform a delete.
-