platform
Class MacOS

java.lang.Object
  extended by platform.AbstractOS
      extended by platform.MacOS
All Implemented Interfaces:
JAPHelp.IExternalEMailCaller, JAPHelp.IExternalURLCaller

public class MacOS
extends AbstractOS

This class is instantiated by AbstractOS if the current OS is MacOS or MacOSX


Nested Class Summary
 
Nested classes/interfaces inherited from class platform.AbstractOS
AbstractOS.AbstractRetryCopyProcess, AbstractOS.AbstractURLOpener, AbstractOS.IURLErrorNotifier
 
Field Summary
(package private) static java.lang.String BUNDLE_CONTENTS
           
(package private) static java.lang.String BUNDLE_EXECUTABLE_PROPERTY_KEY
           
(package private) static java.lang.String BUNDLE_MAC_OS_EXECUTABLES
           
(package private) static java.lang.String BUNDLE_PROPERTY_FILE_NAME
           
(package private) static java.lang.String BUNDLE_RESOURCES
           
private  java.lang.String m_bundlePath
           
(package private) static java.lang.String[] OPEN_UPDATER_CMD
           
static java.lang.String OS_NAME
           
(package private) static java.lang.String OSA_APPLET_NAME
           
(package private) static java.lang.String OSA_APPLET_PATH
           
(package private) static java.lang.String OSA_EXEC_SHELLSCRIPT_STMT
           
(package private) static java.lang.String[] OSACOMPILE_CMD
          Mac OS X built-in command for compiling AppleScript code
(package private) static java.lang.String[] OSASCRIPT_CMD
          Mac OS X built-in command for interpreting AppleScript statements
(package private) static java.lang.String ROOT_SHELLSCRIPT_NAME
           
 
Fields inherited from class platform.AbstractOS
URL_MAIL_TO
 
Constructor Summary
MacOS()
           
 
Method Summary
 boolean copyAsRoot(java.io.File src, java.io.File destDir, AbstractOS.AbstractRetryCopyProcess a_checkRetry)
          Copies a file with root/administrator rights to the specified directory.
 java.lang.String getBundleExecutablePath()
           
 java.lang.String getBundlePath()
           
 java.lang.String getConfigPath(java.lang.String a_applicationName)
          Implementations must return a valid path to the config file.
private static int handleAppleScriptCmds(java.lang.String[] statements, java.lang.Process handler)
          handle some AppleScriptStatements by passing them to the stdin of the specified handler process.
 boolean isBundle()
           
 boolean isHelpAutoInstalled()
           
protected  boolean openLink(java.lang.String a_link)
           
 void setBundlePath()
           
 
Methods inherited from class platform.AbstractOS
createBrowserCommand, createURLLink, createURLLink, getActiveVMs, getAppdataDefaultDirectory, getAsString, getDefaultBrowserPath, getDefaultHelpPath, getDefaultTempPath, getenv, getInstance, getProperty, getTempPath, init, initEnv, isDefaultURLAvailable, openBrowser, openBrowser, openEMail, openURL, toAbsolutePath, toRelativePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_NAME

public static final java.lang.String OS_NAME
See Also:
Constant Field Values

BUNDLE_CONTENTS

static final java.lang.String BUNDLE_CONTENTS

BUNDLE_RESOURCES

static final java.lang.String BUNDLE_RESOURCES

BUNDLE_MAC_OS_EXECUTABLES

static final java.lang.String BUNDLE_MAC_OS_EXECUTABLES

BUNDLE_PROPERTY_FILE_NAME

static final java.lang.String BUNDLE_PROPERTY_FILE_NAME
See Also:
Constant Field Values

BUNDLE_EXECUTABLE_PROPERTY_KEY

static final java.lang.String BUNDLE_EXECUTABLE_PROPERTY_KEY
See Also:
Constant Field Values

ROOT_SHELLSCRIPT_NAME

static final java.lang.String ROOT_SHELLSCRIPT_NAME
See Also:
Constant Field Values

OSA_EXEC_SHELLSCRIPT_STMT

static final java.lang.String OSA_EXEC_SHELLSCRIPT_STMT
See Also:
Constant Field Values

OSA_APPLET_NAME

static final java.lang.String OSA_APPLET_NAME
See Also:
Constant Field Values

OSA_APPLET_PATH

static final java.lang.String OSA_APPLET_PATH

OSASCRIPT_CMD

static final java.lang.String[] OSASCRIPT_CMD
Mac OS X built-in command for interpreting AppleScript statements


OSACOMPILE_CMD

static final java.lang.String[] OSACOMPILE_CMD
Mac OS X built-in command for compiling AppleScript code


OPEN_UPDATER_CMD

static final java.lang.String[] OPEN_UPDATER_CMD

m_bundlePath

private java.lang.String m_bundlePath
Constructor Detail

MacOS

public MacOS()
      throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

openLink

protected boolean openLink(java.lang.String a_link)
Specified by:
openLink in class AbstractOS

isHelpAutoInstalled

public boolean isHelpAutoInstalled()
Overrides:
isHelpAutoInstalled in class AbstractOS

getConfigPath

public java.lang.String getConfigPath(java.lang.String a_applicationName)
Description copied from class: AbstractOS
Implementations must return a valid path to the config file.

Specified by:
getConfigPath in class AbstractOS

setBundlePath

public void setBundlePath()

getBundlePath

public java.lang.String getBundlePath()

isBundle

public boolean isBundle()

getBundleExecutablePath

public java.lang.String getBundleExecutablePath()

handleAppleScriptCmds

private static int handleAppleScriptCmds(java.lang.String[] statements,
                                         java.lang.Process handler)
                                  throws java.io.IOException,
                                         java.lang.InterruptedException
handle some AppleScriptStatements by passing them to the stdin of the specified handler process. The process can be either an osacript-Process which interpretes and executes the statements immediately or a osacompile-process which creates and executable outputfile

Returns:
returns the exit value of the handler process
Throws:
java.io.IOException
java.lang.InterruptedException

copyAsRoot

public boolean copyAsRoot(java.io.File src,
                          java.io.File destDir,
                          AbstractOS.AbstractRetryCopyProcess a_checkRetry)
Description copied from class: AbstractOS
Copies a file with root/administrator rights to the specified directory.

Overrides:
copyAsRoot in class AbstractOS
Returns:
true if copying the file was successful; false is an error occurred or if this operation is not supported on this platform