|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object platform.AbstractOS
public abstract class AbstractOS
This abstract class provides access to OS-specific implementations of certain functions. It tries to instantiate an OS-specific class by determining on which operating system JAP is currently running.
Nested Class Summary | |
---|---|
static class |
AbstractOS.AbstractRetryCopyProcess
|
static class |
AbstractOS.AbstractURLOpener
|
private class |
AbstractOS.InitEnvRunner
|
static interface |
AbstractOS.IURLErrorNotifier
|
Field Summary | |
---|---|
private static java.lang.String[] |
BROWSERLIST
|
private java.util.Properties |
m_envVars
|
private AbstractOS.IURLErrorNotifier |
m_notifier
|
private AbstractOS.AbstractURLOpener |
m_URLOpener
|
private static AbstractOS |
ms_operatingSystem
The instanciated operation system class. |
private static java.io.File |
ms_tmpDir
|
private static java.lang.Class[] |
REGISTERED_PLATFORM_CLASSES
Make sure that the default OS is the last OS in the array. |
static java.lang.String |
URL_MAIL_TO
|
private static java.lang.String |
WHITESPACE_ENCODED
|
Constructor Summary | |
---|---|
AbstractOS()
|
Method Summary | |
---|---|
boolean |
copyAsRoot(java.io.File a_sourceFile,
java.io.File a_targetDirectory,
AbstractOS.AbstractRetryCopyProcess a_checkRetry)
Copies a file with root/administrator rights to the specified directory. |
static java.lang.String |
createBrowserCommand(java.lang.String pFFExecutable)
|
JAPDialog.ILinkedInformation |
createURLLink(java.net.URL a_url,
java.lang.String a_optionalText)
|
JAPDialog.ILinkedInformation |
createURLLink(java.net.URL a_url,
java.lang.String a_optionalText,
java.lang.String a_helpContext)
|
java.util.Vector |
getActiveVMs()
Returns a vector of all running VMs. |
java.lang.String |
getAppdataDefaultDirectory(java.lang.String a_applicationName)
If available, returns the specific directory path where the application data (config files etc.) is stored by default. |
protected java.lang.String |
getAsString(java.net.URL a_url)
|
abstract java.lang.String |
getConfigPath(java.lang.String a_applicationName)
Implementations must return a valid path to the config file. |
java.lang.String |
getDefaultBrowserPath()
|
java.lang.String |
getDefaultHelpPath(java.lang.String a_applicationName)
returns the default destination path for an external installtion of the help files. |
static java.lang.String |
getDefaultTempPath()
|
java.lang.String |
getenv(java.lang.String a_environmentVariable)
|
static AbstractOS |
getInstance()
Instantiates an OS-specific class. |
java.lang.String |
getProperty(java.lang.String a_systemProperty)
|
java.lang.String |
getTempPath()
|
void |
init(AbstractOS.IURLErrorNotifier a_notifier,
AbstractOS.AbstractURLOpener a_URLOpener)
|
protected void |
initEnv(java.lang.String a_envCommand)
|
boolean |
isDefaultURLAvailable()
|
boolean |
isHelpAutoInstalled()
|
boolean |
openBrowser()
Just opens the browser with the default URL. |
boolean |
openBrowser(java.lang.String a_browserCommand)
|
boolean |
openEMail(java.lang.String a_mailto)
Returns if the caller was able to open the URL in the browser |
protected abstract boolean |
openLink(java.lang.String a_link)
|
boolean |
openURL(java.net.URL a_url)
Returns if the caller was able to open the URL in the browser |
static java.lang.String |
toAbsolutePath(java.lang.String path)
|
static java.lang.String |
toRelativePath(java.lang.String a_path)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String URL_MAIL_TO
private static java.lang.Class[] REGISTERED_PLATFORM_CLASSES
private static final java.lang.String[] BROWSERLIST
private static final java.lang.String WHITESPACE_ENCODED
private static AbstractOS ms_operatingSystem
private AbstractOS.IURLErrorNotifier m_notifier
private AbstractOS.AbstractURLOpener m_URLOpener
private java.util.Properties m_envVars
private static java.io.File ms_tmpDir
Constructor Detail |
---|
public AbstractOS()
Method Detail |
---|
public static final AbstractOS getInstance()
public static java.lang.String createBrowserCommand(java.lang.String pFFExecutable)
public static java.lang.String toRelativePath(java.lang.String a_path)
public static java.lang.String toAbsolutePath(java.lang.String path)
public void init(AbstractOS.IURLErrorNotifier a_notifier, AbstractOS.AbstractURLOpener a_URLOpener)
public JAPDialog.ILinkedInformation createURLLink(java.net.URL a_url, java.lang.String a_optionalText)
public JAPDialog.ILinkedInformation createURLLink(java.net.URL a_url, java.lang.String a_optionalText, java.lang.String a_helpContext)
public final boolean openEMail(java.lang.String a_mailto)
JAPHelp.IExternalEMailCaller
openEMail
in interface JAPHelp.IExternalEMailCaller
a_mailto
- an E-Mail address
public final java.lang.String getDefaultBrowserPath()
public final boolean isDefaultURLAvailable()
public final boolean openBrowser()
public final boolean openBrowser(java.lang.String a_browserCommand)
public final boolean openURL(java.net.URL a_url)
JAPHelp.IExternalURLCaller
openURL
in interface JAPHelp.IExternalURLCaller
a_url
- a URL
public abstract java.lang.String getConfigPath(java.lang.String a_applicationName)
protected abstract boolean openLink(java.lang.String a_link)
protected java.lang.String getAsString(java.net.URL a_url)
public boolean isHelpAutoInstalled()
public java.lang.String getDefaultHelpPath(java.lang.String a_applicationName)
public java.lang.String getAppdataDefaultDirectory(java.lang.String a_applicationName)
public java.util.Vector getActiveVMs()
public boolean copyAsRoot(java.io.File a_sourceFile, java.io.File a_targetDirectory, AbstractOS.AbstractRetryCopyProcess a_checkRetry)
a_sourceFile
- a_targetDirectory
- a_passwordReader
- a password reader for getting the root/user password if needed
public java.lang.String getTempPath()
public static java.lang.String getDefaultTempPath()
public java.lang.String getProperty(java.lang.String a_systemProperty)
public java.lang.String getenv(java.lang.String a_environmentVariable)
protected void initEnv(java.lang.String a_envCommand)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |