Class PrintJob

    • Constructor Detail

      • PrintJob

        public PrintJob()
    • Method Detail

      • getReportFile

        protected java.io.File getReportFile()
      • withOpenOutputStream

        protected PrintJob.PrintResult withOpenOutputStream​(PrintJob.PrintAction function)
                                                     throws java.lang.Exception
        Open an OutputStream and execute the function using the OutputStream.
        Parameters:
        function - the function to execute
        Returns:
        the URI and the file size
        Throws:
        java.lang.Exception
      • createResult

        protected abstract PrintJobResult createResult​(java.lang.String fileName,
                                                       java.lang.String fileExtension,
                                                       java.lang.String mimeType)
                                                throws java.net.URISyntaxException,
                                                       java.io.IOException
        Create Print Job Result.
        Parameters:
        fileName - the file name
        fileExtension - the file extension
        mimeType - the mime type
        Returns:
        the job result
        Throws:
        java.net.URISyntaxException
        java.io.IOException
      • call

        public final PrintJobResult call()
                                  throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<PrintJobResult>
        Throws:
        java.lang.Exception
      • deleteReport

        protected void deleteReport()
        Delete the report (used if the report is sent by email).
      • setSecurityContext

        public final void setSecurityContext​(org.springframework.security.core.context.SecurityContext securityContext)
        The security context that contains the information about the user that made the request. This must be set on SecurityContextHolder when the thread starts executing.
        Parameters:
        securityContext - the context object