Package org.pentaho.di.ui.util
Class EnvironmentUtils
- java.lang.Object
-
- org.pentaho.di.ui.util.EnvironmentUtils
-
public class EnvironmentUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAC_BROWSER
static String
UBUNTU_BROWSER
static String
WINDOWS_BROWSER
-
Constructor Summary
Constructors Constructor Description EnvironmentUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Process
ExecuteCommand(String command)
String
getBrowserName()
Ask for the browser name.protected BufferedReader
getBufferedReaderFromProcess(Process p)
static EnvironmentUtils
getInstance()
protected String
getOsName()
protected int
getSupportedVersion(String property)
Gets the supported version of the required Property.protected String
getUserAgent()
Ask for user Agent of the available browser.protected String
getWebkitPath()
Ask for the path in the system for the webkit library.boolean
isBrowserEnvironmentCheckDisabled()
Ask if the browsing environment checks are disabled.boolean
isUnsupportedBrowserEnvironment()
Checks the available browser to see if it is an unsupported one.boolean
isWebkitUnavailable()
Checks the existence of the webkit library on ubuntu.
-
-
-
Field Detail
-
UBUNTU_BROWSER
public static final String UBUNTU_BROWSER
- See Also:
- Constant Field Values
-
MAC_BROWSER
public static final String MAC_BROWSER
- See Also:
- Constant Field Values
-
WINDOWS_BROWSER
public static final String WINDOWS_BROWSER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static EnvironmentUtils getInstance()
-
isUnsupportedBrowserEnvironment
public boolean isUnsupportedBrowserEnvironment()
Checks the available browser to see if it is an unsupported one.- Returns:
- 'true' if in a unSupported browser environment 'false' otherwise.
-
getUserAgent
protected String getUserAgent()
Ask for user Agent of the available browser.- Returns:
- a string that contains the user agent of the browser.
-
isWebkitUnavailable
public boolean isWebkitUnavailable()
Checks the existence of the webkit library on ubuntu.- Returns:
- 'true' if the webkit library is not present in ubuntu, 'false' otherwise.
-
getWebkitPath
protected String getWebkitPath()
Ask for the path in the system for the webkit library.- Returns:
- a string that contains the path or 'null' if not found.
-
getOsName
protected String getOsName()
-
getSupportedVersion
protected int getSupportedVersion(String property)
Gets the supported version of the required Property.- Parameters:
property
- a string with the required property.- Returns:
- the value of the requiredProperty.
-
isBrowserEnvironmentCheckDisabled
public boolean isBrowserEnvironmentCheckDisabled()
Ask if the browsing environment checks are disabled.- Returns:
- 'true' if disabled 'false' otherwise.
-
ExecuteCommand
protected Process ExecuteCommand(String command) throws IOException
- Throws:
IOException
-
getBufferedReaderFromProcess
protected BufferedReader getBufferedReaderFromProcess(Process p)
-
getBrowserName
public String getBrowserName()
Ask for the browser name.- Returns:
- a String that contains the browser name.
-
-