com.offerready.xslt.destination.DocumentGenerationDestination Maven / Gradle / Ivy
package com.offerready.xslt.destination;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import java.io.OutputStream;
/**
* Documents (= XSLT Reports) can be generated to a "destination".
*
* A "destination" must be capable of having:
*
* - its MIME content type set (e.g. "text/html") with {@link #setContentType(String)},
*
- and offering an OutputStream to which the bytes of the document can be sent with {@link #getOutputStream()}.
*
*/
public interface DocumentGenerationDestination {
void setContentType(@Nonnull String contentType);
/** @param filename can be null indicating no particular filename is preferred */
void setContentDispositionToDownload(@CheckForNull String filename);
@Nonnull OutputStream getOutputStream();
}