Interface DiagnosticsBean
-
- All Superinterfaces:
AppComponent
,EnumWebPersistableState
,Persistable
,RequestPersistable
,Transformable
,WebComponent
public interface DiagnosticsBean extends RequestPersistable, AppComponent
Title: DiagnosticsBean. This bean provides the methods required for displaying and modifying information related with the log processing and handling on the application.
- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ADVANCED_LOGGER_CONSOLE_HANDLER
static java.lang.String
ADVANCED_LOGGER_HANDLER
String that represents the name of an advanced handler.static java.lang.String
COUNT_PROPERTY_NAME
String that represents the property on the diagnostics configuration file corresponding to how many output files to cycle throughstatic java.lang.String
DEFAULT_LOGGER_NAME
String that represents the name of a default loggerstatic java.lang.String
DIAGNOSTICS_CONFIG_DEFAULT_FILE
String that represents the name of the diagnostics configuration filestatic int
DIAGNOSTICS_TYPE_CUSTOM
Value that specifies the type of diagnostics to apply is a custom onestatic int
DIAGNOSTICS_TYPE_DEFAULT
Value that specifies the type of diagnostics to apply is the default onestatic int
DIAGNOSTICS_TYPE_NOT_INITIALIZED
Value that specifies the integer property has not yet been initializedstatic int
DIAGNOSTICS_TYPE_STATISTICS
Value that specifies that statistics is the type of diagnostics to apply.static java.lang.String
LEVEL_PROPERTY_NAME
String that represents the property on the diagnostics configuration file corresponding to the level of logging detailstatic java.lang.String
LIMIT_PROPERTY_NAME
String that represents the property on the diagnostics configuration file corresponding to the maximum amount to write to any one filestatic int
LOCAL_SHOW_ERRORS
Local flag that represents the display mode: show errorsstatic int
LOCAL_SHOW_MESSAGES
Local flag that represents the display mode: show messagestatic int
LOCAL_SHOW_WARNINGS
Local flag that represents the display mode: show warningsstatic java.lang.String
LOG_DEFAULT_FILE_PREFIX
String that represents the property on the diagnostics configuration file corresponding to the name prefix for the logging file to generatestatic java.lang.String
LOG_DEFAULT_FILE_SUFFIX
String that represents the property on the diagnostics configuration file corresponding to the name extension for the logging file to generatestatic java.lang.String
PATTERN_PROPERTY_NAME
String that represents the property on the diagnostics configuration file corresponding to the location of the target log filestatic int
SORT_BY_LEVEL_ASCENDING
Indicates sorting order level (severity) ascending when showing log contentsstatic int
SORT_BY_LEVEL_DESCENDING
Indicates sorting order level (severity) descending when showing log contentsstatic int
SORT_BY_TIMESTAMP_ASCENDING
Indicates sorting order timestamp ascending when showing log contentsstatic int
SORT_BY_TIMESTAMP_DESCENDING
Indicates sorting order timestamp descending when showing log contentsstatic int
SORT_BY_USER_IP_ASCENDING
Indicates sorting order user ip ascending when showing log contentsstatic int
SORT_BY_USER_IP_DESCENDING
Indicates sorting order user ip ascending when showing log contentsstatic int
SORT_BY_USER_NAME_ASCENDING
Indicates sorting order user name ascending when showing log contentsstatic int
SORT_BY_USER_NAME_DESCENDING
Indicates sorting order user name descending when showing log contentsstatic int
STATE_SHOW_CONFIGURATION
Indicates the current state of the bean is showing the log configuration interfacestatic int
STATE_SHOW_LOGS
Indicates the current state of the bean is showing the log contentsstatic int
STATE_SHOW_STATISTICS
Indicates the current state of the bean is showing the statistic logging settings-
Fields inherited from interface com.microstrategy.web.app.beans.AppComponent
COMPONENT_POSITION_NOT_INITIALIZED
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addValidationFailure(java.lang.String fieldName, java.lang.String value)
EditableLogger
getAdvancedLogger(java.lang.String name)
java.util.List
getAdvancedLoggerNames()
int
getCurrentPage()
Get the current page displayed when viewing the log file contentsjava.lang.String
getCustomDiagnosticsFileLocation()
Get the path and file used as configuration file properties, other than the defaultjava.lang.String
getDefaultDiagnosticsFileLocation()
Get the path and file used as the default configuration file propertiesjava.lang.String
getDefaultDiagnosticsFileLocation(boolean populate)
Get the path and file used as the default configuration file propertiesEditableLogger
getDefaultLogger()
java.lang.String
getDiagnosticLevel()
Deprecated.the level can be obtained fromEditableLogger.getLevel()
int
getDiagnosticType()
Get the diagnostic type that the bean has as selectedint
getDisplayFlag()
Get the flag to be used for defining which types of messages to displayjava.lang.String
getErrorField()
Obtain the error field that generated an error with the user's inputint
getFromDay()
Get the starting day to be considered when displaying log file contentsint
getFromMonth()
Get the starting month to be considered when displaying log file contentsint
getFromYear()
Get the starting year to be considered when displaying log file contentsjava.lang.String
getLogFileFolder()
Deprecated.the folder can be obtained from the default logger and then read the property:getDefaultLogger().getProperty(DiagnosticsBean.PATTERN_PROPERTY_NAME)
int
getShowState()
Get the state of the bean, that indicates the information that will be/is displayed to the userint
getSort()
Get the sorting order to use when showing log file contentsjava.lang.String
getStatisticsFileLocation()
Get the path and file used as statistics file, other than the defaultjava.lang.String
getStatisticsMode()
Get the statistics level currently defined on the beanint
getToDay()
Get the ending day to be considered when displaying log file contentsint
getToMonth()
Get the ending month to be considered when displaying log file contentsint
getToYear()
Get the ending year to be considered when displaying log file contentsjava.lang.String
getValidationFailureValue(java.lang.String fieldName)
boolean
isValidField(java.lang.String fieldName)
void
setCurrentPage(int page)
Set the current page to display when viewing the log file contentsvoid
setCustomDiagnosticsFileLocation(java.lang.String fileLocation)
Set the path and file used as configuration file properties, other than the defaultvoid
setDiagnosticLevel(java.lang.String diagnosticLevel)
Deprecated.the level can be set directly to the default logger obtained fromgetDefaultLogger()
void
setDiagnosticType(int diagnosticType)
Set the diagnostic type that the bean has as selectedvoid
setDisplayFlag(int displayFlag)
Set the flag to be used for defining which types of messages to displayvoid
setErrorField(java.lang.String fieldName)
Set the error field (event argument name) that generated an error with the user's inputvoid
setFromDay(int day)
Set the starting day to be considered when displaying log file contentsvoid
setFromMonth(int month)
Set the starting month to be considered when displaying log file contentsvoid
setFromYear(int year)
Set the starting year to be considered when displaying log file contentsvoid
setLogFileFolder(java.lang.String filePath)
Deprecated.the folder can be set to the default logger:getDefaultLogger().setProperty(DiagnosticsBean.PATTERN_PROPERTY_NAME, value)
void
setShowState(int state)
Set the state of the bean, to specify what information it should be displaying to the user.void
setSort(int sort)
Set the sorting order to use when showing log file contentsvoid
setStatisticsFileLocation(java.lang.String fileLocation)
Set the path and file used as configuration file properties, other than the defaultvoid
setStatisticsMode(java.lang.String mode)
Set the statistics level currently defined on the beanvoid
setToDay(int day)
Set the ending day to be considered when displaying log file contentsvoid
setToMonth(int month)
Set the ending month to be considered when displaying log file contentsvoid
setToYear(int year)
Set the ending year to be considered when displaying log file contents-
Methods inherited from interface com.microstrategy.web.app.beans.AppComponent
getAppContext, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getLeft, getResultFilterMode, getTop, isDialog, isForcedChildrenStateSaving, isModal, isModalOpen, isOpen, setExtraInput, setExtraUrl, setForcedChildrenStateSaving, setHasJustOpened, setIsDialog, setIsModal, setIsOpen, setLeft, setTop
-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
Methods inherited from interface com.microstrategy.web.beans.RequestPersistable
restoreStateFromRequest, restoreStateFromRequest
-
Methods inherited from interface com.microstrategy.web.beans.Transformable
addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, getBeanContext, getMessageString, getMyTransformInstances, getTransformInstance, getTransformInstance, getTransformInstances, getType, hasTransform, hasTransform, invalidateTransformCache, setBeanContext, transform, transform
-
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, addChildStateInfo, addChildStateInfo, collectData, collectMinimalData, generateOutput, getBeanContext, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getFeaturesManager, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBean, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, getXMLStatus, handleRequest, hasChanged, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler
-
-
-
-
Field Detail
-
DIAGNOSTICS_TYPE_NOT_INITIALIZED
static final int DIAGNOSTICS_TYPE_NOT_INITIALIZED
Value that specifies the integer property has not yet been initialized- See Also:
- Constant Field Values
-
DIAGNOSTICS_TYPE_DEFAULT
static final int DIAGNOSTICS_TYPE_DEFAULT
Value that specifies the type of diagnostics to apply is the default one- See Also:
- Constant Field Values
-
DIAGNOSTICS_TYPE_CUSTOM
static final int DIAGNOSTICS_TYPE_CUSTOM
Value that specifies the type of diagnostics to apply is a custom one- See Also:
- Constant Field Values
-
DIAGNOSTICS_TYPE_STATISTICS
static final int DIAGNOSTICS_TYPE_STATISTICS
Value that specifies that statistics is the type of diagnostics to apply.- See Also:
- Constant Field Values
-
SORT_BY_TIMESTAMP_DESCENDING
static final int SORT_BY_TIMESTAMP_DESCENDING
Indicates sorting order timestamp descending when showing log contents- See Also:
- Constant Field Values
-
SORT_BY_TIMESTAMP_ASCENDING
static final int SORT_BY_TIMESTAMP_ASCENDING
Indicates sorting order timestamp ascending when showing log contents- See Also:
- Constant Field Values
-
SORT_BY_LEVEL_DESCENDING
static final int SORT_BY_LEVEL_DESCENDING
Indicates sorting order level (severity) descending when showing log contents- See Also:
- Constant Field Values
-
SORT_BY_LEVEL_ASCENDING
static final int SORT_BY_LEVEL_ASCENDING
Indicates sorting order level (severity) ascending when showing log contents- See Also:
- Constant Field Values
-
SORT_BY_USER_NAME_DESCENDING
static final int SORT_BY_USER_NAME_DESCENDING
Indicates sorting order user name descending when showing log contents- See Also:
- Constant Field Values
-
SORT_BY_USER_NAME_ASCENDING
static final int SORT_BY_USER_NAME_ASCENDING
Indicates sorting order user name ascending when showing log contents- See Also:
- Constant Field Values
-
SORT_BY_USER_IP_DESCENDING
static final int SORT_BY_USER_IP_DESCENDING
Indicates sorting order user ip ascending when showing log contents- See Also:
- Constant Field Values
-
SORT_BY_USER_IP_ASCENDING
static final int SORT_BY_USER_IP_ASCENDING
Indicates sorting order user ip ascending when showing log contents- See Also:
- Constant Field Values
-
LOCAL_SHOW_ERRORS
static final int LOCAL_SHOW_ERRORS
Local flag that represents the display mode: show errors- See Also:
- Constant Field Values
-
LOCAL_SHOW_MESSAGES
static final int LOCAL_SHOW_MESSAGES
Local flag that represents the display mode: show message- See Also:
- Constant Field Values
-
LOCAL_SHOW_WARNINGS
static final int LOCAL_SHOW_WARNINGS
Local flag that represents the display mode: show warnings- See Also:
- Constant Field Values
-
STATE_SHOW_CONFIGURATION
static final int STATE_SHOW_CONFIGURATION
Indicates the current state of the bean is showing the log configuration interface- See Also:
- Constant Field Values
-
STATE_SHOW_LOGS
static final int STATE_SHOW_LOGS
Indicates the current state of the bean is showing the log contents- See Also:
- Constant Field Values
-
STATE_SHOW_STATISTICS
static final int STATE_SHOW_STATISTICS
Indicates the current state of the bean is showing the statistic logging settings- See Also:
- Constant Field Values
-
PATTERN_PROPERTY_NAME
static final java.lang.String PATTERN_PROPERTY_NAME
String that represents the property on the diagnostics configuration file corresponding to the location of the target log file- See Also:
- Constant Field Values
-
LEVEL_PROPERTY_NAME
static final java.lang.String LEVEL_PROPERTY_NAME
String that represents the property on the diagnostics configuration file corresponding to the level of logging detail- See Also:
- Constant Field Values
-
DIAGNOSTICS_CONFIG_DEFAULT_FILE
static final java.lang.String DIAGNOSTICS_CONFIG_DEFAULT_FILE
String that represents the name of the diagnostics configuration file- See Also:
- Constant Field Values
-
LOG_DEFAULT_FILE_PREFIX
static final java.lang.String LOG_DEFAULT_FILE_PREFIX
String that represents the property on the diagnostics configuration file corresponding to the name prefix for the logging file to generate- See Also:
- Constant Field Values
-
LOG_DEFAULT_FILE_SUFFIX
static final java.lang.String LOG_DEFAULT_FILE_SUFFIX
String that represents the property on the diagnostics configuration file corresponding to the name extension for the logging file to generate- See Also:
- Constant Field Values
-
ADVANCED_LOGGER_HANDLER
static final java.lang.String ADVANCED_LOGGER_HANDLER
String that represents the name of an advanced handler. Creates on the advanced options section of the Diagnostics configuration page- Since:
- MicroStrategy Web 8.0.2
- See Also:
- Constant Field Values
-
ADVANCED_LOGGER_CONSOLE_HANDLER
static final java.lang.String ADVANCED_LOGGER_CONSOLE_HANDLER
- Since:
- MicroStrategy Web 8.1.1
- See Also:
- Constant Field Values
-
DEFAULT_LOGGER_NAME
static final java.lang.String DEFAULT_LOGGER_NAME
String that represents the name of a default logger- Since:
- MicroStrategy Web 8.0.2
- See Also:
- Constant Field Values
-
LIMIT_PROPERTY_NAME
static final java.lang.String LIMIT_PROPERTY_NAME
String that represents the property on the diagnostics configuration file corresponding to the maximum amount to write to any one file- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
COUNT_PROPERTY_NAME
static final java.lang.String COUNT_PROPERTY_NAME
String that represents the property on the diagnostics configuration file corresponding to how many output files to cycle through- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCurrentPage
int getCurrentPage()
Get the current page displayed when viewing the log file contents- Returns:
- the page number currently viewed
-
setCurrentPage
void setCurrentPage(int page)
Set the current page to display when viewing the log file contents- Parameters:
page
- the page number to be viewed
-
getErrorField
java.lang.String getErrorField()
Obtain the error field that generated an error with the user's input- Returns:
- the field of the bean event that was not correctly populated and generated an error
-
setErrorField
void setErrorField(java.lang.String fieldName)
Set the error field (event argument name) that generated an error with the user's input- Parameters:
fieldName
- the field of the bean event that was not correctly populated and generated an error
-
isValidField
boolean isValidField(java.lang.String fieldName)
-
addValidationFailure
void addValidationFailure(java.lang.String fieldName, java.lang.String value)
-
getValidationFailureValue
java.lang.String getValidationFailureValue(java.lang.String fieldName)
-
setShowState
void setShowState(int state)
Set the state of the bean, to specify what information it should be displaying to the user.- Parameters:
state
- anint
value that could beSTATE_SHOW_CONFIGURATION
,STATE_SHOW_LOGS
orSTATE_SHOW_STATISTICS
-
getShowState
int getShowState()
Get the state of the bean, that indicates the information that will be/is displayed to the user- Returns:
- an
int
value that could beSTATE_SHOW_CONFIGURATION
,STATE_SHOW_LOGS
orSTATE_SHOW_STATISTICS
-
getDiagnosticType
int getDiagnosticType()
Get the diagnostic type that the bean has as selected- Returns:
- the type of diagnostic that is being used:
DIAGNOSTICS_TYPE_DEFAULT
orDIAGNOSTICS_TYPE_CUSTOM
-
getDiagnosticLevel
@Deprecated java.lang.String getDiagnosticLevel()
Deprecated.the level can be obtained fromEditableLogger.getLevel()
Get the diagnostic level that the bean (log configuration file) has as selected- Returns:
- a String value representing the level of logging, like Severe, All, Fine, etc.
-
getLogFileFolder
@Deprecated java.lang.String getLogFileFolder()
Deprecated.the folder can be obtained from the default logger and then read the property:getDefaultLogger().getProperty(DiagnosticsBean.PATTERN_PROPERTY_NAME)
Get the path of the log file folder that the bean (log configuration file) has as selected- Returns:
- a String with the path information
-
getDefaultDiagnosticsFileLocation
java.lang.String getDefaultDiagnosticsFileLocation()
Get the path and file used as the default configuration file properties- Returns:
- a String with the path and file used
- Since:
- MicroStrategy Web 7.5.1
-
getDefaultDiagnosticsFileLocation
java.lang.String getDefaultDiagnosticsFileLocation(boolean populate)
Get the path and file used as the default configuration file properties- Parameters:
populate
- ifTrue
and the value is not yet available, it will execute the logic for obtaining it. Otherwise, it will return the value available (null if not found or not initialized yet)- Returns:
- a String with the path and file used
- Since:
- MicroStrategy Web 7.5.1
-
getCustomDiagnosticsFileLocation
java.lang.String getCustomDiagnosticsFileLocation()
Get the path and file used as configuration file properties, other than the default- Returns:
- a String with the path and file used
-
getStatisticsFileLocation
java.lang.String getStatisticsFileLocation()
Get the path and file used as statistics file, other than the default- Returns:
- a String with the path and file used
-
getStatisticsMode
java.lang.String getStatisticsMode()
Get the statistics level currently defined on the bean- Returns:
- a
String
value representing the statistics mode defined, corresponding to theint
constants defined onStatsHandlerSupport
.
-
setFromDay
void setFromDay(int day)
Set the starting day to be considered when displaying log file contents- Parameters:
day
- number of the day when to start
-
getFromDay
int getFromDay()
Get the starting day to be considered when displaying log file contents- Returns:
- day number of the day when to start
-
setFromYear
void setFromYear(int year)
Set the starting year to be considered when displaying log file contents- Parameters:
year
- number of the year when to start
-
getFromYear
int getFromYear()
Get the starting year to be considered when displaying log file contents- Returns:
- year number of the year when to start
-
setFromMonth
void setFromMonth(int month)
Set the starting month to be considered when displaying log file contents- Parameters:
month
- number of the month when to start
-
getFromMonth
int getFromMonth()
Get the starting month to be considered when displaying log file contents- Returns:
- month number of the month when to start
-
setToDay
void setToDay(int day)
Set the ending day to be considered when displaying log file contents- Parameters:
day
- number of the day when to finish
-
getToDay
int getToDay()
Get the ending day to be considered when displaying log file contents- Returns:
- day number of the day when to finish
-
setToYear
void setToYear(int year)
Set the ending year to be considered when displaying log file contents- Parameters:
year
- number of the year when to finish
-
getToYear
int getToYear()
Get the ending year to be considered when displaying log file contents- Returns:
- year number of the year when to finish
-
setToMonth
void setToMonth(int month)
Set the ending month to be considered when displaying log file contents- Parameters:
month
- number of the month when to finish
-
getToMonth
int getToMonth()
Get the ending month to be considered when displaying log file contents- Returns:
- month number of the month when to finish
-
setDisplayFlag
void setDisplayFlag(int displayFlag)
Set the flag to be used for defining which types of messages to display- Parameters:
displayFlag
- a binary value, combination of the LOCAL_SHOW (errors, messages, warnings) constants
-
getDisplayFlag
int getDisplayFlag()
Get the flag to be used for defining which types of messages to display- Returns:
- a binary value, combination of the LOCAL_SHOW (errors, messages, warnings) constants
-
setSort
void setSort(int sort)
Set the sorting order to use when showing log file contents- Parameters:
sort
- an integer value coming from one of the SORT_BY_LEVEL or SORT_BY_TIMESTAMP constants
-
getSort
int getSort()
Get the sorting order to use when showing log file contents- Returns:
- an integer value coming from one of the
SORT_BY_LEVEL
,SORT_BY_USER_NAME
orSORT_BY_TIMESTAMP
constants. Defaults to SORT_BY_TIMESTAMP_DESCENDING
-
setDiagnosticType
void setDiagnosticType(int diagnosticType)
Set the diagnostic type that the bean has as selected- Parameters:
diagnosticType
- the type of diagnostic that is being used: DIAGNOSTICS_TYPE_DEFAULT or DIAGNOSTICS_TYPE_CUSTOM
-
setDiagnosticLevel
@Deprecated void setDiagnosticLevel(java.lang.String diagnosticLevel)
Deprecated.the level can be set directly to the default logger obtained fromgetDefaultLogger()
Set the diagnostic level that the bean (log configuration file) has as selected- Parameters:
diagnosticLevel
- a String value representing the level of logging
-
setLogFileFolder
@Deprecated void setLogFileFolder(java.lang.String filePath)
Deprecated.the folder can be set to the default logger:getDefaultLogger().setProperty(DiagnosticsBean.PATTERN_PROPERTY_NAME, value)
Set the path of the log file folder that the bean (log configuration file) has as selected- Parameters:
filePath
- a String with the path information
-
setCustomDiagnosticsFileLocation
void setCustomDiagnosticsFileLocation(java.lang.String fileLocation)
Set the path and file used as configuration file properties, other than the default- Parameters:
fileLocation
- a String with the path and file used
-
setStatisticsFileLocation
void setStatisticsFileLocation(java.lang.String fileLocation)
Set the path and file used as configuration file properties, other than the default- Parameters:
fileLocation
- a String with the path and file used
-
setStatisticsMode
void setStatisticsMode(java.lang.String mode)
Set the statistics level currently defined on the bean- Parameters:
mode
- aString
value representing the statistics mode defined, corresponding to theint
constants defined onStatsHandlerSupport
.
-
getAdvancedLoggerNames
java.util.List getAdvancedLoggerNames()
- Returns:
- a
List
with the names of the advanced loggers. An advanced logger is determined by having a Handler with name: DiagnosticsBean.ADVANCED_LOGGER_HANDLER - Since:
- MicroStrategy Web 8.0.2
-
getDefaultLogger
EditableLogger getDefaultLogger()
- Returns:
- an
EditableLogger
linked to the default logger. The default logger is determined by having the name: DiagnosticsBean.DEFAULT_LOGGER_NAME - Since:
- MicroStrategy Web 8.0.2
-
getAdvancedLogger
EditableLogger getAdvancedLogger(java.lang.String name)
- Returns:
- an
EditableLogger
which is liked to a Logger specified Adds a Handler with the name: DiagnosticsBean.ADVANCED_LOGGER_HANDLER - Since:
- MicroStrategy Web 8.0.2
-
-