Class HtmlReport

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BUTTON_ADVANCED
      Constant for the "Advanced" button in the build button methods.
      static int BUTTON_BACK
      Constant for the "Back" button in the build button methods.
      static int BUTTON_CANCEL
      Constant for the "Cancel" button in the build button methods.
      static int BUTTON_CLOSE
      Constant for the "Close" button in the build button methods.
      static int BUTTON_CONTINUE
      Constant for the "Continue" button in the build button methods.
      static int BUTTON_DETAILS
      Constant for the "Details" button in the build button methods.
      static int BUTTON_DISCARD
      Constant for the "Discard" button in the build button methods (same function as "Cancel" button but different text on button.
      static int BUTTON_DOWNLOAD
      Constant for the "Download" button in the build button methods.
      static int BUTTON_EDIT
      Constant for the "Edit" button in the build button methods (same function as "Ok" button but different text on button.
      static int BUTTON_OK
      Constant for the "OK" button in the build button methods.
      static int BUTTON_OK_NO_SUBMIT
      Constant for the "OK" button in the build button methods (without form submission).
      static int BUTTON_SET
      Constant for the "Set" button in the build button methods.
      protected java.util.List<java.io.Serializable> content
      The list of report objects e.g.
      static java.lang.String DELIMITER_RESOURCES
      The delimiter that is used in the resource list request parameter.
      static java.lang.String DIALOG_BACK
      Request parameter value for the action: back.
      static java.lang.String DIALOG_CANCEL
      Request parameter value for the action: cancel.
      static java.lang.String DIALOG_CONTINUE
      Request parameter value for the action: continue.
      static java.lang.String DIALOG_SET
      Request parameter value for the action: set.
      static java.lang.String DIALOG_URI  
      static java.lang.String FORM_URI  
      static int HTML_END
      Helper variable to deliver the html end part.
      static int HTML_START
      Helper variable to deliver the html start part.
      protected int indexNext
      Counter to remember what is already shown, indicates the next index of the content list that has to be reported.
      protected boolean isTransient
      If set to true nothing is kept in memory.
      protected static java.lang.String LINEBREAK
      Constant for a HTML linebreak with added "real" line break.
      protected static java.lang.String LINEBREAK_TRADITIONAL
      Constant for a HTML linebreak with added "real" line break- traditional style for report threads that still use XML templates for their output.
      protected java.util.List<java.io.Serializable> logContent
      The list of report objects e.g.
      protected java.io.File logFile
      Log file.
      protected java.lang.String logFileName
      Log file name.
      protected java.io.FileOutputStream logFileOutputStream
      Log file output stream.
      static java.lang.String module  
      static java.lang.String PARAM_RESOURCELIST
      Request parameter name for the resource list.
      protected java.lang.String paramAction  
      protected java.lang.String paramRefreshWorkplace
      Flag for refreching workplace .
      protected java.lang.String paramReportContinueKey
      The key name which contains the localized message for the continue checkbox.
      protected java.lang.String paramResource  
      protected java.lang.String paramResourcelist
      The resource list parameter value.
      protected java.lang.String paramThread
      The thread to display in this report.
      protected java.lang.String paramThreadHasNext
      The next thread to display after this report.
      protected java.lang.String paramTitle  
      static java.lang.String resource  
      protected java.util.List<java.lang.String> resourceList
      The list of resource names for the multi operation.
      protected long sequenceNum  
      protected boolean showExceptionStackTrace
      Flag to indicate if an exception should be displayed long or short.
      protected boolean writeHtml
      Boolean flag indicating whether this report should generate HTML or JavaScript output.
    • Constructor Summary

      Constructors 
      Constructor Description
      HtmlReport​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Constructs a new report using the provided locale for the output language.
      HtmlReport​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean writeHtml, boolean isTransient)
      Constructs a new report using the provided locale for the output language.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addLogFile​(java.lang.String logFileName)
      Add a log file to the report.
      protected java.lang.String appendDelimiter​(java.lang.String attribute)
      Appends a space char.
      java.lang.String bodyEnd()
      Builds the end html of the body.
      java.lang.String bodyStart​(java.lang.String className, java.lang.String parameters)
      Builds the start html of the body.
      java.lang.String closeLogFile()
      Close log file if necessary.
      java.lang.String dialog​(int segment, java.lang.String attributes)
      Builds the outer dialog window border.
      java.lang.String dialogButtonRow​(int segment)
      Builds the button row under the dialog content area without the buttons.
      java.lang.String dialogButtons​(int[] buttons, java.lang.String[] attributes)
      Builds the html for the button row under the dialog content area, including buttons.
      java.lang.String dialogButtonsContinue​(java.lang.String okAttrs, java.lang.String cancelAttrs)
      Builds a button row with an "Ok" and a "Cancel" button.
      protected void dialogButtonsHtml​(java.lang.StringBuffer result, int button, java.lang.String attribute)
      Renders the HTML for a single input button of a specified type.
      java.lang.String dialogButtonsOkCancel​(javax.servlet.http.HttpServletRequest request, java.lang.String okAttrs, java.lang.String cancelAttrs)
      Builds a button row with an "OK" and a "Cancel" button.
      java.lang.String dialogButtonsOkCancelDownload​(javax.servlet.http.HttpServletRequest request, java.lang.String okAttrs, java.lang.String cancelAttrs, java.lang.String downloadAttrs)
      Builds a button row with an "OK", a "Cancel" and a "Download" button.
      java.lang.String dialogContent​(int segment, java.lang.String title)
      Builds the content area of the dialog window.
      java.lang.String dialogContentEnd()
      Returns the end html for the content area of the dialog window.
      java.lang.String dialogContentStart​(java.lang.String title)
      Returns the start html for the content area of the dialog window.
      java.lang.String dialogEnd()
      Returns the end html for the outer dialog window border.
      java.lang.String dialogHead​(java.lang.String title)
      Builds the title of the dialog window.
      java.lang.String dialogScriptSubmit()
      Builds the standard javascript for submitting the dialog.
      java.lang.String dialogStart()
      Returns the start html for the outer dialog window border.
      java.lang.String getDialogRealUri​(javax.servlet.http.HttpServletRequest request)
      Returns the http URI of the current dialog, to be used as value for the "action" attribute of a html form.
      java.lang.String getFormRealUri​(javax.servlet.http.HttpServletRequest request)
      Get the report form uri.
      static HtmlReport getInstance​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static HtmlReport getInstance​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean writeHtml, boolean isTransient)  
      static HtmlReport getInstance​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean writeHtml, boolean isTransient, java.lang.String logFileName)  
      protected java.lang.String getLineBreak()
      Returns the correct line break notation depending on the output style of this report.
      java.lang.String getLogFileName()  
      java.lang.String getParamAction​(javax.servlet.http.HttpServletRequest request)  
      java.lang.String getParamRefreshWorkplace()
      Returns if the workplace must be refreshed.
      java.lang.String getParamReportContinueKey()
      Returns the key name which contains the localized message for the continue checkbox.
      java.lang.String getParamResource​(javax.servlet.http.HttpServletRequest request)
      Returns the value of the file parameter, or null if this parameter was not provided.
      java.lang.String getParamResourcelist​(javax.servlet.http.HttpServletRequest request)
      Returns the value of the resource list parameter, or null if the parameter is not provided.
      java.lang.String getParamThread​(javax.servlet.http.HttpServletRequest request)
      Returns the thread parameter value.
      java.lang.String getParamThreadHasNext​(javax.servlet.http.HttpServletRequest request)
      Returns the threadhasnext parameter value.
      java.lang.String getParamTitle​(javax.servlet.http.HttpServletRequest request)
      Returns the value of the title parameter, or null if this parameter was not provided.
      java.lang.String getReportUpdate()
      Updates this report, this processes all new output added since the last call to this method.
      java.util.List<java.lang.String> getResourceList​(javax.servlet.http.HttpServletRequest request)
      Returns the resources that are defined for the dialog operation.
      java.lang.String getResourceListAsParam​(javax.servlet.http.HttpServletRequest request)
      Returns the value of the resourcelist parameter in form of a String separated with DELIMITER_RESOURCES, or the value of the resource parameter if the first parameter is not provided (no multiple choice has been done.
      long getSequenceNum()  
      java.lang.String htmlEnd()
      Builds the end html of the page.
      java.lang.String htmlStart()
      Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.
      java.lang.String htmlStart​(boolean loadStyles)
      Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.
      boolean isAlive​(javax.servlet.http.HttpServletRequest request)
      Returns true if the report Thread is still alive (i.e.
      boolean isMultiOperation​(javax.servlet.http.HttpServletRequest request)
      Returns true if the dialog operation has to be performed on multiple resources.
      boolean isWriteHtml()
      Returns if the report writes html or javascript code.
      java.lang.String pageBody​(int segment, java.lang.String className, java.lang.String parameters)
      Builds the html of the body.
      java.lang.String pageHtml​(int segment, boolean loadStyles)
      Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.
      java.lang.String pageHtml​(int segment, java.lang.String title)
      Returns the default html for a workplace page, including setting of DOCTYPE and inserting a header with the content-type.
      java.lang.String pageHtmlStyle​(int segment, java.lang.String title, java.lang.String stylesheet)
      Returns the default html for a workplace page, including setting of DOCTYPE and inserting a header with the content-type, allowing the selection of an individual style sheet.
      java.lang.String paramsAsHidden​(javax.servlet.http.HttpServletRequest request)
      Returns all initialized parameters of the current workplace class as hidden field tags that can be inserted in a form.
      java.lang.String paramsAsHidden​(javax.servlet.http.HttpServletRequest request, java.util.Collection<?> excludes)
      Returns all initialized parameters of the current workplace class that are not in the given exclusion list as hidden field tags that can be inserted in a form.
      protected java.util.Map<java.lang.String,​java.lang.Object> paramValues​(javax.servlet.http.HttpServletRequest request)
      Returns the values of all parameter methods of this workplace class instance.
      void print​(java.lang.String value, int format)
      Prints a String to the report, using the indicated formatting.
      void println()
      Adds a line break to the report.
      void println​(java.lang.Throwable t)
      Adds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp.
      void printMessageWithParam​(int m, int n, java.lang.String uiLabel, java.lang.Object param)
      Convenience method to print a localized message, followed by a parameter and dots to the report.
      void printMessageWithParam​(java.lang.String uiLabel, java.lang.Object param)
      Prints a localized message followed by a parameter and dots to the report.
      java.lang.String reportConclusionText()
      Returns an optional conclusion text to be displayed below the report output.
      java.lang.String reportIntroductionText()
      Returns an optional introduction text to be displayed above the report output.
      void setFormRealUri​(javax.servlet.http.HttpServletRequest request, java.lang.String formUri)
      Set the report form uri.
      void setParamAction​(java.lang.String action)  
      void setParamThread​(java.lang.String name)  
      void setSequenceNum​(long sequenceNum)
      Set log's sequence number.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
      • DELIMITER_RESOURCES

        public static final java.lang.String DELIMITER_RESOURCES
        The delimiter that is used in the resource list request parameter.
        See Also:
        Constant Field Values
      • PARAM_RESOURCELIST

        public static final java.lang.String PARAM_RESOURCELIST
        Request parameter name for the resource list.
        See Also:
        Constant Field Values
      • LINEBREAK

        protected static final java.lang.String LINEBREAK
        Constant for a HTML linebreak with added "real" line break.
        See Also:
        Constant Field Values
      • LINEBREAK_TRADITIONAL

        protected static final java.lang.String LINEBREAK_TRADITIONAL
        Constant for a HTML linebreak with added "real" line break- traditional style for report threads that still use XML templates for their output.
        See Also:
        Constant Field Values
      • content

        protected java.util.List<java.io.Serializable> content
        The list of report objects e.g. String, Exception ...
      • logContent

        protected java.util.List<java.io.Serializable> logContent
        The list of report objects e.g. String, Exception ...
      • indexNext

        protected int indexNext
        Counter to remember what is already shown, indicates the next index of the content list that has to be reported.
      • showExceptionStackTrace

        protected boolean showExceptionStackTrace
        Flag to indicate if an exception should be displayed long or short.
      • isTransient

        protected boolean isTransient
        If set to true nothing is kept in memory.
      • writeHtml

        protected boolean writeHtml
        Boolean flag indicating whether this report should generate HTML or JavaScript output.
      • HTML_END

        public static final int HTML_END
        Helper variable to deliver the html end part.
        See Also:
        Constant Field Values
      • HTML_START

        public static final int HTML_START
        Helper variable to deliver the html start part.
        See Also:
        Constant Field Values
      • paramThread

        protected java.lang.String paramThread
        The thread to display in this report.
      • paramThreadHasNext

        protected java.lang.String paramThreadHasNext
        The next thread to display after this report.
      • paramAction

        protected java.lang.String paramAction
      • paramTitle

        protected java.lang.String paramTitle
      • paramResource

        protected java.lang.String paramResource
      • paramRefreshWorkplace

        protected java.lang.String paramRefreshWorkplace
        Flag for refreching workplace .
      • BUTTON_OK

        public static final int BUTTON_OK
        Constant for the "OK" button in the build button methods.
        See Also:
        Constant Field Values
      • BUTTON_CANCEL

        public static final int BUTTON_CANCEL
        Constant for the "Cancel" button in the build button methods.
        See Also:
        Constant Field Values
      • BUTTON_CLOSE

        public static final int BUTTON_CLOSE
        Constant for the "Close" button in the build button methods.
        See Also:
        Constant Field Values
      • BUTTON_ADVANCED

        public static final int BUTTON_ADVANCED
        Constant for the "Advanced" button in the build button methods.
        See Also:
        Constant Field Values
      • BUTTON_SET

        public static final int BUTTON_SET
        Constant for the "Set" button in the build button methods.
        See Also:
        Constant Field Values
      • BUTTON_DETAILS

        public static final int BUTTON_DETAILS
        Constant for the "Details" button in the build button methods.
        See Also:
        Constant Field Values
      • BUTTON_OK_NO_SUBMIT

        public static final int BUTTON_OK_NO_SUBMIT
        Constant for the "OK" button in the build button methods (without form submission).
        See Also:
        Constant Field Values
      • BUTTON_EDIT

        public static final int BUTTON_EDIT
        Constant for the "Edit" button in the build button methods (same function as "Ok" button but different text on button.
        See Also:
        Constant Field Values
      • BUTTON_DISCARD

        public static final int BUTTON_DISCARD
        Constant for the "Discard" button in the build button methods (same function as "Cancel" button but different text on button.
        See Also:
        Constant Field Values
      • BUTTON_BACK

        public static final int BUTTON_BACK
        Constant for the "Back" button in the build button methods.
        See Also:
        Constant Field Values
      • BUTTON_CONTINUE

        public static final int BUTTON_CONTINUE
        Constant for the "Continue" button in the build button methods.
        See Also:
        Constant Field Values
      • BUTTON_DOWNLOAD

        public static final int BUTTON_DOWNLOAD
        Constant for the "Download" button in the build button methods.
        See Also:
        Constant Field Values
      • DIALOG_BACK

        public static final java.lang.String DIALOG_BACK
        Request parameter value for the action: back.
        See Also:
        Constant Field Values
      • DIALOG_CANCEL

        public static final java.lang.String DIALOG_CANCEL
        Request parameter value for the action: cancel.
        See Also:
        Constant Field Values
      • DIALOG_CONTINUE

        public static final java.lang.String DIALOG_CONTINUE
        Request parameter value for the action: continue.
        See Also:
        Constant Field Values
      • DIALOG_SET

        public static final java.lang.String DIALOG_SET
        Request parameter value for the action: set.
        See Also:
        Constant Field Values
      • paramResourcelist

        protected java.lang.String paramResourcelist
        The resource list parameter value.
      • resourceList

        protected java.util.List<java.lang.String> resourceList
        The list of resource names for the multi operation.
      • paramReportContinueKey

        protected java.lang.String paramReportContinueKey
        The key name which contains the localized message for the continue checkbox.
      • logFile

        protected java.io.File logFile
        Log file.
      • logFileName

        protected java.lang.String logFileName
        Log file name.
      • logFileOutputStream

        protected java.io.FileOutputStream logFileOutputStream
        Log file output stream.
      • sequenceNum

        protected long sequenceNum
    • Constructor Detail

      • HtmlReport

        public HtmlReport​(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
        Constructs a new report using the provided locale for the output language.

        Parameters:
        request - HttpServletRequest
        response - HttpServletResponse
      • HtmlReport

        public HtmlReport​(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response,
                          boolean writeHtml,
                          boolean isTransient)
        Constructs a new report using the provided locale for the output language.

        Parameters:
        request - HttpServletRequest
        response - HttpServletResponse
        writeHtml - if true, this report should generate HTML instead of JavaScript output
        isTransient - If set to true nothing is kept in memory
    • Method Detail

      • getInstance

        public static HtmlReport getInstance​(javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response)
      • getInstance

        public static HtmlReport getInstance​(javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response,
                                             boolean writeHtml,
                                             boolean isTransient)
      • getInstance

        public static HtmlReport getInstance​(javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response,
                                             boolean writeHtml,
                                             boolean isTransient,
                                             java.lang.String logFileName)
      • getParamAction

        public java.lang.String getParamAction​(javax.servlet.http.HttpServletRequest request)
      • setParamAction

        public void setParamAction​(java.lang.String action)
      • setParamThread

        public void setParamThread​(java.lang.String name)
      • getReportUpdate

        public java.lang.String getReportUpdate()
        Description copied from interface: InterfaceReport
        Updates this report, this processes all new output added since the last call to this method.

        This is only required in case the output is written to a HTML page, if the shell output is used, this will just return an empty String.

        Returns:
        new elements that have been added to the report and not yet processed.
      • isWriteHtml

        public boolean isWriteHtml()
        Returns if the report writes html or javascript code.

        Returns:
        true if the report writes html, and false if the report writes javascript code
      • print

        public void print​(java.lang.String value,
                          int format)
        Description copied from class: AbstractReport
        Prints a String to the report, using the indicated formatting.

        Use the contants starting with FORMAT from this interface to indicate which formatting to use.

        Specified by:
        print in interface InterfaceReport
        Specified by:
        print in class AbstractReport
        Parameters:
        value - the message container to add
        format - the formatting to use for the output
      • println

        public void println()
        Description copied from interface: InterfaceReport
        Adds a line break to the report.

      • println

        public void println​(java.lang.Throwable t)
        Description copied from interface: InterfaceReport
        Adds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp. for HTML pages.

        The exception will be stored and the output will later be processed in a special way.

        Parameters:
        t - the exception to add
      • getLineBreak

        protected java.lang.String getLineBreak()
        Returns the correct line break notation depending on the output style of this report.
        Returns:
        the correct line break notation
      • printMessageWithParam

        public void printMessageWithParam​(java.lang.String uiLabel,
                                          java.lang.Object param)
        Description copied from interface: InterfaceReport
        Prints a localized message followed by a parameter and dots to the report.

        Parameters:
        uiLabel - the Message to add
        param - the Parameter to add
      • printMessageWithParam

        public void printMessageWithParam​(int m,
                                          int n,
                                          java.lang.String uiLabel,
                                          java.lang.Object param)
        Description copied from interface: InterfaceReport
        Convenience method to print a localized message, followed by a parameter and dots to the report.

        The output follows the pattern: ( 3 / 8 ) Deleting filename.txt ...

        Parameters:
        m - the number of the report output
        n - the total number of report outputs
        uiLabel - the Message to add
        param - the Parameter to add
      • htmlStart

        public java.lang.String htmlStart()
        Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.

        This overloads the default method of the parent class.

        Returns:
        the start html of the page
      • htmlStart

        public java.lang.String htmlStart​(boolean loadStyles)
        Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.

        This overloads the default method of the parent class.

        Parameters:
        loadStyles - if true, the defaul style sheet will be loaded
        Returns:
        the start html of the page
      • pageHtml

        public java.lang.String pageHtml​(int segment,
                                         boolean loadStyles)
        Builds the start html of the page, including setting of DOCTYPE and inserting a header with the content-type.

        This overloads the default method of the parent class.

        Parameters:
        segment - the HTML segment (START / END)
        loadStyles - if true, the defaul style sheet will be loaded
        Returns:
        the start html of the page
      • dialogScriptSubmit

        public java.lang.String dialogScriptSubmit()
        Builds the standard javascript for submitting the dialog.

        Returns:
        the standard javascript for submitting the dialog
      • isAlive

        public boolean isAlive​(javax.servlet.http.HttpServletRequest request)
        Returns true if the report Thread is still alive (i.e. running), false otherwise.

        Returns:
        true if the report Thread is still alive
      • getParamThread

        public java.lang.String getParamThread​(javax.servlet.http.HttpServletRequest request)
        Returns the thread parameter value.

        Returns:
        the thread parameter value
      • getParamThreadHasNext

        public java.lang.String getParamThreadHasNext​(javax.servlet.http.HttpServletRequest request)
        Returns the threadhasnext parameter value.

        Returns:
        the threadhasnext parameter value
      • bodyStart

        public java.lang.String bodyStart​(java.lang.String className,
                                          java.lang.String parameters)
        Builds the start html of the body.

        Parameters:
        className - optional class attribute to add to the body tag
        parameters - optional parameters to add to the body tag
        Returns:
        the start html of the body
      • pageBody

        public java.lang.String pageBody​(int segment,
                                         java.lang.String className,
                                         java.lang.String parameters)
        Builds the html of the body.

        Parameters:
        segment - the HTML segment (START / END)
        className - optional class attribute to add to the body tag
        parameters - optional parameters to add to the body tag
        Returns:
        the html of the body
      • bodyEnd

        public java.lang.String bodyEnd()
        Builds the end html of the body.

        Returns:
        the end html of the body
      • htmlEnd

        public java.lang.String htmlEnd()
        Builds the end html of the page.

        Returns:
        the end html of the page
      • pageHtml

        public java.lang.String pageHtml​(int segment,
                                         java.lang.String title)
        Returns the default html for a workplace page, including setting of DOCTYPE and inserting a header with the content-type.

        Parameters:
        segment - the HTML segment (START / END)
        title - the title of the page, if null no title tag is inserted
        Returns:
        the default html for a workplace page
      • pageHtmlStyle

        public java.lang.String pageHtmlStyle​(int segment,
                                              java.lang.String title,
                                              java.lang.String stylesheet)
        Returns the default html for a workplace page, including setting of DOCTYPE and inserting a header with the content-type, allowing the selection of an individual style sheet.

        Parameters:
        segment - the HTML segment (START / END)
        title - the title of the page, if null no title tag is inserted
        stylesheet - the used style sheet, if null the default stylesheet 'workplace.css' is inserted
        Returns:
        the default html for a workplace page
      • dialogStart

        public java.lang.String dialogStart()
        Returns the start html for the outer dialog window border.
        Returns:
        the start html for the outer dialog window border
      • dialog

        public java.lang.String dialog​(int segment,
                                       java.lang.String attributes)
        Builds the outer dialog window border.
        Parameters:
        segment - the HTML segment (START / END)
        attributes - optional additional attributes for the opening dialog table
        Returns:
        a dialog window start / end segment
      • dialogContentStart

        public java.lang.String dialogContentStart​(java.lang.String title)
        Returns the start html for the content area of the dialog window.

        Parameters:
        title - the title for the dialog
        Returns:
        the start html for the content area of the dialog window
      • dialogContent

        public java.lang.String dialogContent​(int segment,
                                              java.lang.String title)
        Builds the content area of the dialog window.

        Parameters:
        segment - the HTML segment (START / END)
        title - the title String for the dialog window
        Returns:
        a content area start / end segment
      • dialogHead

        public java.lang.String dialogHead​(java.lang.String title)
        Builds the title of the dialog window.

        Parameters:
        title - the title String for the dialog window
        Returns:
        the HTML title String for the dialog window
      • getParamTitle

        public java.lang.String getParamTitle​(javax.servlet.http.HttpServletRequest request)
        Returns the value of the title parameter, or null if this parameter was not provided.

        This parameter is used to build the title of the dialog. It is a parameter so that the title can be passed to included elements.

        Returns:
        the value of the title parameter
      • paramsAsHidden

        public java.lang.String paramsAsHidden​(javax.servlet.http.HttpServletRequest request)
        Returns all initialized parameters of the current workplace class as hidden field tags that can be inserted in a form.

        Returns:
        all initialized parameters of the current workplace class as hidden field tags that can be inserted in a html form
      • paramsAsHidden

        public java.lang.String paramsAsHidden​(javax.servlet.http.HttpServletRequest request,
                                               java.util.Collection<?> excludes)
        Returns all initialized parameters of the current workplace class that are not in the given exclusion list as hidden field tags that can be inserted in a form.

        Parameters:
        excludes - the parameters to exclude
        Returns:
        all initialized parameters of the current workplace class that are not in the given exclusion list as hidden field tags that can be inserted in a form
      • paramValues

        protected java.util.Map<java.lang.String,​java.lang.Object> paramValues​(javax.servlet.http.HttpServletRequest request)
        Returns the values of all parameter methods of this workplace class instance.

        Returns:
        the values of all parameter methods of this workplace class instance
      • reportIntroductionText

        public java.lang.String reportIntroductionText()
        Returns an optional introduction text to be displayed above the report output.

        Returns:
        an optional introduction text
      • reportConclusionText

        public java.lang.String reportConclusionText()
        Returns an optional conclusion text to be displayed below the report output.

        Returns:
        an optional conclusion text
      • dialogContentEnd

        public java.lang.String dialogContentEnd()
        Returns the end html for the content area of the dialog window.

        Returns:
        the end html for the content area of the dialog window
      • dialogButtonsContinue

        public java.lang.String dialogButtonsContinue​(java.lang.String okAttrs,
                                                      java.lang.String cancelAttrs)
        Builds a button row with an "Ok" and a "Cancel" button.

        This row is displayed when the first report is running.

        Parameters:
        okAttrs - optional attributes for the ok button
        cancelAttrs - optional attributes for the cancel button
        Returns:
        the button row
      • dialogButtonsOkCancel

        public java.lang.String dialogButtonsOkCancel​(javax.servlet.http.HttpServletRequest request,
                                                      java.lang.String okAttrs,
                                                      java.lang.String cancelAttrs)
        Builds a button row with an "OK" and a "Cancel" button.

        This row is used when a single report is running or after the first report has finished.

        Parameters:
        okAttrs - optional attributes for the ok button
        cancelAttrs - optional attributes for the cancel button
        Returns:
        the button row
      • dialogButtonsOkCancelDownload

        public java.lang.String dialogButtonsOkCancelDownload​(javax.servlet.http.HttpServletRequest request,
                                                              java.lang.String okAttrs,
                                                              java.lang.String cancelAttrs,
                                                              java.lang.String downloadAttrs)
        Builds a button row with an "OK", a "Cancel" and a "Download" button.

        This row is used when a single report is running or after the first report has finished.

        Parameters:
        okAttrs - optional attributes for the ok button
        cancelAttrs - optional attributes for the cancel button
        downloadAttrs - optional attributes for the download button
        Returns:
        the button row
      • dialogButtons

        public java.lang.String dialogButtons​(int[] buttons,
                                              java.lang.String[] attributes)
        Builds the html for the button row under the dialog content area, including buttons.

        Parameters:
        buttons - array of constants of which buttons to include in the row
        attributes - array of Strings for additional button attributes
        Returns:
        the html for the button row under the dialog content area, including buttons
      • dialogButtonRow

        public java.lang.String dialogButtonRow​(int segment)
        Builds the button row under the dialog content area without the buttons.

        Parameters:
        segment - the HTML segment (START / END)
        Returns:
        the button row start / end segment
      • dialogButtonsHtml

        protected void dialogButtonsHtml​(java.lang.StringBuffer result,
                                         int button,
                                         java.lang.String attribute)
        Renders the HTML for a single input button of a specified type.

        Parameters:
        result - a string buffer where the rendered HTML gets appended to
        button - a integer key to identify the button
        attribute - an optional string with possible tag attributes, or null
      • appendDelimiter

        protected java.lang.String appendDelimiter​(java.lang.String attribute)
        Appends a space char. between tag attributes.

        Parameters:
        attribute - a tag attribute
        Returns:
        the tag attribute with a leading space char
      • isMultiOperation

        public boolean isMultiOperation​(javax.servlet.http.HttpServletRequest request)
        Returns true if the dialog operation has to be performed on multiple resources.

        Returns:
        true if the dialog operation has to be performed on multiple resources, otherwise false
      • getResourceList

        public java.util.List<java.lang.String> getResourceList​(javax.servlet.http.HttpServletRequest request)
        Returns the resources that are defined for the dialog operation. For single resource operations, the list contains one item: the resource name found in the request parameter value of the "resource" parameter.
        Returns:
        the resources that are defined for the dialog operation
      • getParamResourcelist

        public java.lang.String getParamResourcelist​(javax.servlet.http.HttpServletRequest request)
        Returns the value of the resource list parameter, or null if the parameter is not provided.

        This parameter selects the resources to perform operations on.

        Returns:
        the value of the resource list parameter or null, if the parameter is not provided
      • getParamResource

        public java.lang.String getParamResource​(javax.servlet.http.HttpServletRequest request)
        Returns the value of the file parameter, or null if this parameter was not provided.

        The file parameter selects the file on which the dialog action is to be performed.

        Returns:
        the value of the file parameter
      • getParamRefreshWorkplace

        public java.lang.String getParamRefreshWorkplace()
        Returns if the workplace must be refreshed.

        Returns:
        "true" if the workplace must be refreshed.
      • getParamReportContinueKey

        public java.lang.String getParamReportContinueKey()
        Returns the key name which contains the localized message for the continue checkbox.

        Returns:
        the key name which contains the localized message for the continue checkbox
      • getResourceListAsParam

        public java.lang.String getResourceListAsParam​(javax.servlet.http.HttpServletRequest request)
        Returns the value of the resourcelist parameter in form of a String separated with DELIMITER_RESOURCES, or the value of the resource parameter if the first parameter is not provided (no multiple choice has been done.

        This may be used for jsps as value for the parameter for resources PARAM_RESOURCELIST.

        Returns:
        the value of the resourcelist parameter or null, if the parameter is not provided
      • dialogEnd

        public java.lang.String dialogEnd()
        Returns the end html for the outer dialog window border.

        Returns:
        the end html for the outer dialog window border
      • getDialogRealUri

        public java.lang.String getDialogRealUri​(javax.servlet.http.HttpServletRequest request)
        Returns the http URI of the current dialog, to be used as value for the "action" attribute of a html form.

        This URI is the real one.

        Returns:
        the http URI of the current dialog
      • setFormRealUri

        public void setFormRealUri​(javax.servlet.http.HttpServletRequest request,
                                   java.lang.String formUri)
        Set the report form uri.
        Parameters:
        request -
        formUri -
      • getFormRealUri

        public java.lang.String getFormRealUri​(javax.servlet.http.HttpServletRequest request)
        Get the report form uri.
        Parameters:
        request -
        Returns:
      • addLogFile

        public void addLogFile​(java.lang.String logFileName)
        Description copied from interface: InterfaceReport
        Add a log file to the report.
      • closeLogFile

        public java.lang.String closeLogFile()
        Description copied from interface: InterfaceReport
        Close log file if necessary.
      • getLogFileName

        public java.lang.String getLogFileName()
      • getSequenceNum

        public long getSequenceNum()
      • setSequenceNum

        public void setSequenceNum​(long sequenceNum)
        Description copied from interface: InterfaceReport
        Set log's sequence number.