Interface DeletableResource

  • All Superinterfaces:
    Resource
    All Known Subinterfaces:
    DeletableCollectionResource, FileResource, FolderResource

    public interface DeletableResource
    extends Resource
    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 Detail

      • delete

        void delete()
             throws io.milton.http.exceptions.NotAuthorizedException,
                    io.milton.http.exceptions.ConflictException,
                    io.milton.http.exceptions.BadRequestException
        Non-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 reasons
        io.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 deleted
        io.milton.http.exceptions.BadRequestException - - if there is some aspect of the request which means it is not sufficient to perform a delete.