| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.stanford.ejalbert.launching.windows.WindowsBrowserLaunching
Handles initialization, configuration, and calls to open a url.
| Field Summary | |
protected  AbstractLogger | 
logger
 | 
static String | 
WINKEY_WIN2000
config file key for Windows 2000  | 
static String | 
WINKEY_WIN9X
config file key for Windows 9x  | 
static String | 
WINKEY_WINNT
config file key for Windows NT  | 
| Fields inherited from interface edu.stanford.ejalbert.launching.IBrowserLaunching | 
BROWSER_DEFAULT, BROWSER_SYSTEM_PROPERTY, PROP_KEY_BROWSER_PREFIX, PROP_KEY_DELIMITER, PROTOCOL_FILE, PROTOCOL_HTTP, PROTOCOL_MAILTO | 
| Constructor Summary | |
WindowsBrowserLaunching(AbstractLogger logger,
                        String windowsKey)
Checks that the windows key is valid.  | 
|
| Method Summary | |
 List | 
getBrowserList()
Returns a list of browsers to be used for browser targetting.  | 
 boolean | 
getNewWindowPolicy()
Returns the policy used for opening a url in a browser.  | 
 void | 
initialize()
Initializes the browser launcher from the windows config file.  | 
 void | 
openUrl(List browsers,
        String urlString)
Allows user to target several browsers.  | 
 void | 
openUrl(String urlString)
Opens a url using the default browser.  | 
 void | 
openUrl(String browser,
        String urlString)
Opens a url using a specific browser.  | 
 void | 
setNewWindowPolicy(boolean forceNewWindow)
Sets the policy used for opening a url in a browser.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final String WINKEY_WIN2000
public static final String WINKEY_WIN9X
public static final String WINKEY_WINNT
protected final AbstractLogger logger
| Constructor Detail | 
public WindowsBrowserLaunching(AbstractLogger logger,
                               String windowsKey)
logger - AbstractLoggerwindowsKey - String| Method Detail | 
public void initialize()
                throws BrowserLaunchingInitializingException
initialize in interface IBrowserLaunchingBrowserLaunchingInitializingExceptionwindowsKey
public void openUrl(String urlString)
             throws UnsupportedOperatingSystemException,
                    BrowserLaunchingExecutionException,
                    BrowserLaunchingInitializingException
openUrl in interface IBrowserLaunchingurlString - String
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException
public void openUrl(String browser,
                    String urlString)
             throws UnsupportedOperatingSystemException,
                    BrowserLaunchingExecutionException,
                    BrowserLaunchingInitializingException
If the specified browser is not available, the method will fall through to calling the default openUrl method.
openUrl in interface IBrowserLaunchingbrowser - StringurlString - String
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException
public void openUrl(List browsers,
                    String urlString)
             throws UnsupportedOperatingSystemException,
                    BrowserLaunchingExecutionException,
                    BrowserLaunchingInitializingException
getBrowserList method.
 The browsers from the list will be tried in order (first to last) until one of the calls succeeds. If all the calls to the requested browsers fail, the code will fail over to the default browser.
openUrl in interface IBrowserLaunchingbrowsers - ListurlString - String
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingExceptionpublic List getBrowserList()
getBrowserList in interface IBrowserLaunchingpublic boolean getNewWindowPolicy()
If the policy is true, an attempt will be made to force the url to be opened in a new instance (window) of the browser.
If the policy is false, the url may open in a new window or a new tab.
Some browsers on Windows systems have command line options to support this feature.
getNewWindowPolicy in interface IBrowserLaunchingpublic void setNewWindowPolicy(boolean forceNewWindow)
setNewWindowPolicy in interface IBrowserLaunchingforceNewWindow - boolean
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||