Package com.microstrategy.utils
Class SystemInfo
- java.lang.Object
-
- com.microstrategy.utils.SystemInfo
-
public class SystemInfo extends java.lang.Object
Utility class for checking Java system properties.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_VERSION_NUMBER_SECTIONS
-
Constructor Summary
Constructors Constructor Description SystemInfo()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isEnabled(java.lang.String systemProperty)
Checks whether aSystem.getProperty(String)
is enabled.static boolean
isIIS()
static boolean
isServerType(java.lang.String serverType)
-
-
-
Field Detail
-
MAX_VERSION_NUMBER_SECTIONS
public static final int MAX_VERSION_NUMBER_SECTIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
isIIS
public static boolean isIIS()
- Returns:
- whether the application is run from IIS Older public method kept in case of compatiblity issues
-
isServerType
public static boolean isServerType(java.lang.String serverType)
- Returns:
- whether the application is run from param serverType (i.e. IIS or Websphere)
-
isEnabled
public static boolean isEnabled(java.lang.String systemProperty)
Checks whether aSystem.getProperty(String)
is enabled. If a property is explicitly set to "1" or "true" or simply defined without any parameters, it is considered enabled. For example for "someProperty":- Enabled: -DsomeProperty -DsomeProperty=1 -DsomeProperty=true -DsomeProperty=abc
- Disabled: -DsomeProperty=0 -DsomeProperty=false
- Parameters:
systemProperty
- Key name of the system property- Returns:
- whether property is enabled
-
-