Class DiagnosticsViewerTransform

  • All Implemented Interfaces:
    AppTransform, Transform

    public class DiagnosticsViewerTransform
    extends AbstractDiagnosticsTransform
    Title DiagnosticsViewerTransform This class is used to view diagnostic log contents which are applicable to all servers
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Constructor Detail

      • DiagnosticsViewerTransform

        public DiagnosticsViewerTransform()
        Class constructor, initializes formal parameters.
        Since:
        MicroStrategy Web 8.0.0
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Returns the description of this transform
        Returns:
        String value with the description of this transform
      • initializeCss

        public void initializeCss()
        Initializes the Css Classes to use. For each one of the css classes to use, the prefix indicated on the formal parameter is added to the name of the class to use.
        Overrides:
        initializeCss in class AbstractDiagnosticsTransform
      • renderDiagnosticOutput

        public void renderDiagnosticOutput​(MarkupOutput out)
        Generates the graphical output for the DiagnosticsBean, which for this transform's definition, will consist on an option box for the user to select which information s/he wants to read, plus a list of the logs recorded that are within the search parameters specified.
        Specified by:
        renderDiagnosticOutput in class AbstractDiagnosticsTransform
        Parameters:
        out - MarkupOutput instance where to create the HTML output
      • renderViewerOptions

        public void renderViewerOptions​(MarkupOutput out,
                                        WebEvent applyEvent,
                                        WebEvent loadDefaultsEvent,
                                        DiagnosticsBean bean)
        Render the interface that shows the user the different options for viewing the log contents: type of logs and dates to cover.
        Parameters:
        out - MarkupOutput instance where the HTML to render is to be saved
        applyEvent - WebEvent used for submitting the form changes
        loadDefaultsEvent - WebEvent used for loading the default values on the form
        bean - DiagnosticsBean instance being transformed
      • renderFormHiddenInputs

        public void renderFormHiddenInputs​(MarkupOutput out,
                                           WebEvent applyEvent,
                                           WebEvent loadDefaults)
        Add to the global output any hidden inputs that should be rendered for the proper functionality of the form
        Parameters:
        out - MarkupOutput instance where the HTML contents are to be saved.
        applyEvent - WebEvent for applying the changes indicated on the form
        loadDefaults - WebEvent for loading the default values on the form
      • renderDisplayViewingOptionsRow

        public void renderDisplayViewingOptionsRow​(MarkupOutput out,
                                                   WebEvent applyEvent)
        Show the options for viewing the log: which type of messages to see and from which date to which.
        The contents generated by this method are inside several TR tags with two columns, therefore the parent TABLE should be already opened. By default the caller renderViewerOptions() takes care of it.
        Parameters:
        out - MarkupOutput instance that contains the HTML to display
        applyEvent - WebEvent instance with the information for applying the options displayed here
      • renderDateViewingOptionsRow

        public void renderDateViewingOptionsRow​(MarkupOutput out,
                                                WebEvent applyEvent)
        Append to the MarkupOutput the rows and cells with the TO and FROM information for filtering the log contents.
        The contents generated by this method are inside several TR tags with two columns, therefore the parent TABLE should be already opened. By default the caller renderViewerOptions() takes care of it.
        Parameters:
        out - the MarkupOutput to modify
        applyEvent - WebEvent instance with the information for applying the options displayed here
      • renderLogFile

        public boolean renderLogFile​(MarkupOutput out,
                                     DOMSupport domSupport,
                                     org.w3c.dom.Document errorsXML)
        Show the log file contents, according to the specified filters and sorting
        Parameters:
        out - the MarkupOutput instance to modify with the HTML to be displayed
        errorsXML - Document instance with the logging information to render to the user
        domSupport - DOMSupport instance for processing the Document instance to render
        Returns:
        True if the execution of the method ended in error (therefore the out parameter contains the error message, not the log display). False if no errors happened.
      • renderViewerError

        public void renderViewerError​(MarkupOutput out,
                                      java.lang.String message)
        Display any error message found while processing the log files
        Parameters:
        out - MarkupOutput instance
        message - string with message to show to the user
      • renderDateComboBoxes

        public void renderDateComboBoxes​(MarkupOutput out,
                                         LocaleInfo locale,
                                         java.lang.String label,
                                         java.lang.String paramDay,
                                         java.lang.String paramMonth,
                                         java.lang.String paramYear,
                                         int day,
                                         int month,
                                         int year,
                                         boolean hasError)
        Display the requested date combo box inside two TD cells (therefore, the parent TR and TABLE should be already opened).
        Parameters:
        out - MarkupOutput instance to modify
        locale - LocaleInfo instance, for getting the mm-dd-yy format (default)
        label - The label to display next to the combo boxes
        paramDay - name of the day parameter
        paramMonth - name of the month parameter
        paramYear - name of the year parameter
        day - current day
        month - current month
        year - current year
        hasError - boolean value indicating if the information to render has an error
      • renderIncrementalFetch

        public void renderIncrementalFetch​(MarkupOutput out,
                                           int pageNumber,
                                           int low,
                                           int up,
                                           int total,
                                           int pageSize)
        Add the incremental fetch information given the information passed as parameters
        Parameters:
        out - MarkupOutput instance to update
        pageNumber - number of page currently displayed
        low - Lower limit on the display
        up - Upper limit on the display
        total - Total number of records to display
        pageSize - Size of the page to display
      • getTitle

        protected java.lang.String getTitle()
        Returns the title for the interface to display
        Specified by:
        getTitle in class AbstractDiagnosticsTransform
        Returns:
        the text to display as title of the transform
      • getApplyDiagnosticsEvent

        protected WebEvent getApplyDiagnosticsEvent​(DiagnosticsBean bean)
        Generate the event that will be used for applying or saving the diagnostics configuration specified on the form. Overwrites the original method for generating one that will make the log files from the selected date to be loaded.
        Overrides:
        getApplyDiagnosticsEvent in class AbstractDiagnosticsTransform
        Parameters:
        bean - DiagnosticsBean being transformed
        Returns:
        a WebEvent with the corresponding event, null if the application does not support it.
      • getSortImage

        @Deprecated
        protected java.lang.String getSortImage​(int sort)
        Deprecated.
        This method is no longer used. Use CSS classes via getSortImageCss(int sort)
        Get the image to render based on the current sort mode.
        Parameters:
        sort - int value indicating the type of sorting. For example: DiagnosticsBean.SORT_BY_LEVEL_DESCENDING, DiagnosticsBean.SORT_BY_TIMESTAMP_DESCENDING, etc.
        Returns:
        the corresponding sorting image to render
      • getSortEvent

        protected WebEvent getSortEvent​(DiagnosticsBean bean)
        Get the event to use for sorting the contents of the diagnostics file.
        Parameters:
        bean - DiagnosticsBean currently being transformed.
        Returns:
        WebEvent initialized with the event, but without specifying which sorting will be executed if requested.
      • setSortOrderEvent

        protected void setSortOrderEvent​(WebEvent event,
                                         int sortOrder)
        Sets the event to execute the indicated sort if requested.
        Parameters:
        event - a not-null WebEvent instance, where to set the sort order requested
        sortOrder - int indicating the sort order to request if the event is called. Valid values include DiagnosticsBean.SORT_BY_TIMESTAMP_DESCENDING, etc.
      • generateAnchor

        protected AnchorTag generateAnchor​(WebEvent event)
        Overwrites the parent method by setting the typical url information on the link (thus disabling any default onclick definition)
        Overrides:
        generateAnchor in class AbstractAppTransform
        Parameters:
        event - WebEvent base information for the link
        Returns:
        AnchorTag instance initialized
        Since:
        MicroStrategy Web 8.0.0