Interface IWSUploaderAcceptor

  • All Known Implementing Classes:

    public interface IWSUploaderAcceptor
    Interface that handles accepting uploads of files. A client session must be configured to accept file uploads from that particular client and prepares the destination as to what is accepted and where to.
    Christopher Mindus
    • Method Detail

      • isAccepted

        boolean isAccepted​(HttpServletRequest request)
        Checks if the uploader service would accept this upload request or not.
        request - The request.
        true if accepted, false otherwise.
      • getAlternateAcceptor

        default IWSUploaderAcceptor getAlternateAcceptor​(HttpServletRequest request)
        Checks if the service wishes to return an alternate uploader. This can only be done once and the new instance's "getAlternateAcceptor(request)" will not be called.
        The IWSUploaderAcceptor instance registered for the target URL, or null for default.
      • getUploadDirectory getUploadDirectory​( defaultDir,
                                        java.util.List<WSUploadPart> parts)
        Gets the directory where to store the files.
        defaultDir - The default directory where to place the files.
        parts - The parts that would be saved to disk.
        The directory where to store the files, or null to reject the request.
      • onUploaded

        boolean onUploaded​(java.util.List<WSUploadPart> parts)
        Called when the upload has completed.
        parts - The parts that have been written to disk.
        true To delete the files, false to keep them. If an IOException is thrown, the default is to delete the files!
        Throws: - If there are error e.g. reading the files.