public abstract class PrintJob extends java.lang.Object implements java.util.concurrent.Callable<PrintJobResult>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
PrintJob.PrintAction
Interface encapsulating the code to run with the open output stream.
|
static class |
PrintJob.PrintResult
Holds the info that goes with the result of a print.
|
| Constructor and Description |
|---|
PrintJob() |
| Modifier and Type | Method and Description |
|---|---|
PrintJobResult |
call() |
protected abstract PrintJobResult |
createResult(java.lang.String fileName,
java.lang.String fileExtension,
java.lang.String mimeType)
Create Print Job Result.
|
protected void |
deleteReport()
Delete the report (used if the report is sent by email).
|
PrintJobEntry |
getEntry() |
protected java.io.File |
getReportFile() |
void |
setEntry(PrintJobEntry entry) |
void |
setSecurityContext(org.springframework.security.core.context.SecurityContext securityContext)
The security context that contains the information about the user that made the request.
|
protected PrintJob.PrintResult |
withOpenOutputStream(PrintJob.PrintAction function)
Open an OutputStream and execute the function using the OutputStream.
|
public final PrintJobEntry getEntry()
public final void setEntry(PrintJobEntry entry)
protected java.io.File getReportFile()
protected PrintJob.PrintResult withOpenOutputStream(PrintJob.PrintAction function) throws java.lang.Exception
function - the function to executejava.lang.Exceptionprotected abstract PrintJobResult createResult(java.lang.String fileName, java.lang.String fileExtension, java.lang.String mimeType) throws java.net.URISyntaxException, java.io.IOException
fileName - the file namefileExtension - the file extensionmimeType - the mime typejava.net.URISyntaxExceptionjava.io.IOExceptionpublic final PrintJobResult call() throws java.lang.Exception
call in interface java.util.concurrent.Callable<PrintJobResult>java.lang.Exceptionprotected void deleteReport()
public final void setSecurityContext(org.springframework.security.core.context.SecurityContext securityContext)
SecurityContextHolder when the thread starts
executing.securityContext - the conext object