public class

DiagnosticsViewerTransform

extends AbstractDiagnosticsTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractAppTransform
         ↳ com.microstrategy.web.admin.transforms.AbstractAdminTransform
           ↳ com.microstrategy.web.admin.transforms.AbstractDiagnosticsTransform
             ↳ com.microstrategy.web.admin.transforms.DiagnosticsViewerTransform

Class Overview

Title DiagnosticsViewerTransform This class is used to view diagnostic log contents which are applicable to all servers

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractAppTransform
[Expand]
Inherited Fields
From class com.microstrategy.web.admin.transforms.AbstractDiagnosticsTransform
From class com.microstrategy.web.admin.transforms.AbstractAdminTransform
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
DiagnosticsViewerTransform()
Class constructor, initializes formal parameters.
Public Methods
String getDescription()
Returns the description of this transform
void initializeCss()
Initializes the Css Classes to use.
void renderDateComboBoxes(MarkupOutput out, LocaleInfo locale, String label, String paramDay, String paramMonth, 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).
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.
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.
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.
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
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
boolean renderLogFile(MarkupOutput out, DOMSupport domSupport, Document errorsXML)
Show the log file contents, according to the specified filters and sorting
void renderViewerError(MarkupOutput out, String message)
Display any error message found while processing the log files
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.
Protected Methods
AnchorTag generateAnchor(WebEvent event)
Overwrites the parent method by setting the typical url information on the link (thus disabling any default onclick definition)
WebEvent getApplyDiagnosticsEvent(DiagnosticsBean bean)
Generate the event that will be used for applying or saving the diagnostics configuration specified on the form.
WebEvent getSortEvent(DiagnosticsBean bean)
Get the event to use for sorting the contents of the diagnostics file.
String getSortImage(int sort)
This method is deprecated. This method is no longer used. Use CSS classes via getSortImageCss(int sort)
String getSortImageCss(int sort)
Get the image css to render based on the current sort mode.
String getTitle()
Returns the title for the interface to display
void setSortOrderEvent(WebEvent event, int sortOrder)
Sets the event to execute the indicated sort if requested.
[Expand]
Inherited Methods
From class com.microstrategy.web.admin.transforms.AbstractDiagnosticsTransform
From class com.microstrategy.web.admin.transforms.AbstractAdminTransform
From class com.microstrategy.web.app.transforms.AbstractAppTransform
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.AppTransform
From interface com.microstrategy.web.transform.Transform

Public Constructors

public DiagnosticsViewerTransform ()

Class constructor, initializes formal parameters.

Public Methods

public String getDescription ()

Returns the description of this transform

Returns
  • String value with the description of this transform

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.

public void renderDateComboBoxes (MarkupOutput out, LocaleInfo locale, String label, String paramDay, String paramMonth, 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

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

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.

Parameters
out MarkupOutput instance where to create the HTML output

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

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

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

public boolean renderLogFile (MarkupOutput out, DOMSupport domSupport, 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
domSupport DOMSupport instance for processing the Document instance to render
errorsXML Document instance with the logging information to render to the user
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.

public void renderViewerError (MarkupOutput out, 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

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

Protected Methods

protected AnchorTag generateAnchor (WebEvent event)

Overwrites the parent method by setting the typical url information on the link (thus disabling any default onclick definition)

Parameters
event WebEvent base information for the link
Returns

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.

Parameters
bean DiagnosticsBean being transformed
Returns
  • a WebEvent with the corresponding event, null if the application does not support it.

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.

protected String getSortImage (int sort)

This method is 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: SORT_BY_LEVEL_DESCENDING, SORT_BY_TIMESTAMP_DESCENDING, etc.
Returns
  • the corresponding sorting image to render

protected String getSortImageCss (int sort)

Get the image css to render based on the current sort mode.

Parameters
sort int value indicating the type of sorting. For example: SORT_BY_LEVEL_DESCENDING, SORT_BY_TIMESTAMP_DESCENDING, etc.
Returns
  • the corresponding sorting image to render

protected String getTitle ()

Returns the title for the interface to display

Returns
  • the text to display as title of the transform

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 SORT_BY_TIMESTAMP_DESCENDING, etc.