Class AbstractPDFGenerator

    • Constructor Detail

      • AbstractPDFGenerator

        public AbstractPDFGenerator()
    • Method Detail

      • accepts

        public abstract Class[] accepts()
        The type of data the generator accepts.
        Returns:
        the classes
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Default implementation returns null.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • check

        protected String check​(Object[] objects)
        Hook method for checking the objects before processing them.
        Default implementation does nothing.
        Parameters:
        objects - the objects to check
        Returns:
        null if successful, otherwise error message
      • doProcess

        protected abstract String doProcess​(Object[] objects,
                                            File outputFile)
        Processes the objects to generate the PDF.
        Parameters:
        objects - the objects to process
        outputFile - the output file to generate
        Returns:
        null if successful, otherwise error message
      • process

        public String process​(Object[] objects,
                              File outputFile)
        Processes the objects to generate the PDF.
        Parameters:
        objects - the objects to process
        outputFile - the output file to generate
        Returns:
        null if successful, otherwise error message