net.proxy.sunproxy
Class ConfigProperties

java.lang.Object
  extended by net.proxy.sunproxy.ConfigProperties

public class ConfigProperties
extends java.lang.Object

Interface to manipulate the JavaWS config file


Nested Class Summary
static class ConfigProperties.JREInformation
          Helper class to store version information about a JRE
 
Field Summary
static java.lang.String ALLOW_PREFERENCES_KEY
           
static java.lang.String AUTO_UPDATER_URL_KEY
           
static java.lang.String BROWSER_PATH_KEY
           
static java.lang.String CACHE_DIR_KEY
           
static java.lang.String CACHE_KEY
           
static java.lang.String CACHE_SIZE_KEY
           
static java.lang.String CHECK_UPDATE_AT_START_KEY
           
static java.lang.String CONSOLE_SIZE_KEY
           
static long DEFAULT_MUFFIN_LIMIT
           
static java.lang.String DEFAULT_UPDATE_TIMEOUT
           
static java.lang.String FAVORITE_SIZE_KEY
           
static java.lang.String FAVORITES_KEY
           
static java.lang.String FORCE_UPDATE_CHECK
           
static java.lang.String HTTP_PROXY_KEY
           
static java.lang.String HTTP_PROXY_OVERRIDE_KEY
           
static java.lang.String HTTP_PROXY_PORT_KEY
           
static int JA_ALL
           
static int JA_BOTH
           
static int JA_DOWNLOAD
           
static int JA_NONE
           
static int JA_PROXY
           
static java.lang.String JAUTHENTICATOR_KEY
           
static java.lang.String JRE_INSTALL_URL_KEY
           
static java.lang.String JRE_ISENABLED
           
static java.lang.String JRE_KEY
           
static java.lang.String JRE_OS_ARCH
           
static java.lang.String JRE_OS_NAME
           
static java.lang.String JRE_PATH
           
static java.lang.String JRE_PLATFORM_ID
           
static java.lang.String JRE_PRODUCT_ID
           
static java.lang.String JRE_PRODUCT_LOCATION
           
static java.lang.String LOG_FILENAME_KEY
           
static java.lang.String LOG_TO_FILE_KEY
           
static java.lang.String MUFFIN_DIR_KEY
           
static java.lang.String MUFFIN_KEY
           
static java.lang.String MUFFIN_LIMIT_KEY
           
static java.lang.String NETSCAPE_BROWSER_KEY
           
static java.lang.String PLAYER_BOUNDS_KEY
           
static java.lang.String PLAYER_MANAGER_KEY
           
static java.lang.String PLAYER_MODE_KEY
           
static java.lang.String PROXY_AUTO
           
static java.lang.String PROXY_KEY
           
static java.lang.String PROXY_MANUAL
           
static java.lang.String PROXY_NONE
           
static java.lang.String PROXY_TYPE_KEY
           
static java.lang.String REMOTE_APPS_KEY
           
static java.lang.String SHOW_CONSOLE_KEY
           
static java.lang.String SPLASH_CACHE_KEY
           
static java.lang.String TRUSTED_PLAYER_URL
           
static java.lang.String UPDATE_TIMEOUT_KEY
           
static java.lang.String WHAT_INSTALL_KEY
           
static java.lang.String WHEN_INSTALL_KEY
           
 
Method Summary
 boolean doesNewVersionExist()
          Returns true if a new version exists on the file system.
 java.lang.String get(java.lang.String key)
           
static java.lang.String getApplicationHome()
           
 java.lang.String getAutoUpdateURL()
           
 java.lang.String getBrowserPath()
           
 java.lang.String getCacheDir()
           
 int getCacheSize()
           
 boolean getCheckUpdateOnStart()
           
 int getConsoleSize()
           
 java.lang.String getDefaultMuffinDir10()
          Returns the default muffin cache dir for javaws 1.0
 boolean getEnablePreferences()
           
 java.util.Iterator getFavorites()
           
 boolean getForceUpdateCheck()
           
 java.lang.String getHTTPProxy()
           
 java.lang.String getHTTPProxyPort()
           
static ConfigProperties getInstance()
          Returns a potential cached version of the property object
 int getJAuthenticator()
           
static java.lang.String getJavaWSJarFilePath()
           
 ConfigProperties.JREInformation getJRE(java.net.URL location, java.lang.String versionId)
          Return a specific version
 java.util.ArrayList getJREInformationList()
          Returns a set of JREs from a given URL as JREInformation objects
 java.net.URL getJREInstallURL()
          Returns the location to get JNL files for install from.
 java.lang.String getKnownPlatforms()
          Returns list of instanceoflled platforms
 java.lang.String getLogFilename()
           
static int getMaxUrlsLength()
           
 java.lang.String getMuffinDir()
          Returns the muffin cache dir
 java.lang.String getMuffinDir10()
          Returns the muffin cache dir for javaws 1.0
 long getMuffinSizeLimit()
           
static int getNextAvailableUserJREIndex()
           
static java.awt.Rectangle getPlayerBounds()
           
static int getPlayerManager()
           
static int getPlayerMode()
           
 java.util.List getProxyOverrideList()
          This method will get the hostnames which do not need proxies, normally used in the get call in Main, so we return a List
 java.lang.String getProxyOverrideString()
          Returns a String of comma seperated hostnames which could be used to set TextFields etc.
 int getProxyType()
           
 int getRapidUpdateTimeout()
           
 java.lang.String getRemoteURL()
           
 java.lang.String[] getRemoteURLs()
           
 boolean getshowConsole()
           
 java.lang.String getSplashCache()
          Returns the splash cache index filename
 java.lang.String getSplashDir()
          Returns the splash cache dir
static java.lang.String getStartCommand()
          Returns the command used to start up a new version of Java Web Start.
static java.lang.String getUninstallCommand(java.lang.String path)
          Returns the command used uninstall Java Web Start
 int getWhatInstall()
           
 int getWhenInstall()
           
 boolean isBrowserNetscape()
           
 boolean isDirty()
          Returns true if the properties have changed.
 boolean isLogToFileEnabled()
           
 void put(java.lang.String key, java.lang.String value)
           
 void refresh()
           
 void refreshIfNecessary()
          Reloads the config properties, throwing away any changes.
 void setCacheDir(java.lang.String dir)
           
 void setFavorites(java.util.Iterator favorites)
          Load Config file from file/url
static void setPlayerBounds(java.awt.Rectangle bounds)
           
static void setPlayerManager(int index)
           
static void setPlayerMode(int index)
           
 void setProxy(int proxyType, java.lang.String httpHost, int httpPort, java.lang.String overrides)
          This is an all purpose proxy setter method depending on the proxyType params will have the strings the ex: if proxyType is null then params will be null if proxyType is Manual then params will contain the nodename and port.
 void setRemoteURLs(java.lang.String[] urls)
           
 void setSplashCache(java.lang.String indexFile)
           
 void setWhatInstall(int value)
           
 void setWhenInstall(int value)
           
 void store()
          Store user-specific properties
 void storeApplicationProperties()
          Store the application specific properties.
 java.lang.String toString()
          Debugging
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROXY_AUTO

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

PROXY_MANUAL

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

PROXY_NONE

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

JRE_KEY

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

JRE_PLATFORM_ID

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

JRE_PRODUCT_ID

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

JRE_PRODUCT_LOCATION

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

JRE_PATH

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

JRE_OS_NAME

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

JRE_OS_ARCH

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

JRE_ISENABLED

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

SPLASH_CACHE_KEY

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

DEFAULT_MUFFIN_LIMIT

public static final long DEFAULT_MUFFIN_LIMIT
See Also:
Constant Field Values

MUFFIN_KEY

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

MUFFIN_DIR_KEY

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

MUFFIN_LIMIT_KEY

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

CACHE_KEY

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

CACHE_DIR_KEY

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

CACHE_SIZE_KEY

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

PROXY_KEY

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

AUTO_UPDATER_URL_KEY

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

CHECK_UPDATE_AT_START_KEY

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

JAUTHENTICATOR_KEY

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

PROXY_TYPE_KEY

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

HTTP_PROXY_KEY

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

HTTP_PROXY_PORT_KEY

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

HTTP_PROXY_OVERRIDE_KEY

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

SHOW_CONSOLE_KEY

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

CONSOLE_SIZE_KEY

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

LOG_TO_FILE_KEY

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

LOG_FILENAME_KEY

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

BROWSER_PATH_KEY

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

NETSCAPE_BROWSER_KEY

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

JRE_INSTALL_URL_KEY

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

FAVORITE_SIZE_KEY

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

FAVORITES_KEY

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

REMOTE_APPS_KEY

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

PLAYER_BOUNDS_KEY

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

PLAYER_MANAGER_KEY

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

PLAYER_MODE_KEY

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

ALLOW_PREFERENCES_KEY

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

FORCE_UPDATE_CHECK

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

UPDATE_TIMEOUT_KEY

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

TRUSTED_PLAYER_URL

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

DEFAULT_UPDATE_TIMEOUT

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

WHEN_INSTALL_KEY

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

WHAT_INSTALL_KEY

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

JA_ALL

public static final int JA_ALL
See Also:
Constant Field Values

JA_PROXY

public static final int JA_PROXY
See Also:
Constant Field Values

JA_DOWNLOAD

public static final int JA_DOWNLOAD
See Also:
Constant Field Values

JA_BOTH

public static final int JA_BOTH
See Also:
Constant Field Values

JA_NONE

public static final int JA_NONE
See Also:
Constant Field Values
Method Detail

getNextAvailableUserJREIndex

public static int getNextAvailableUserJREIndex()

getApplicationHome

public static java.lang.String getApplicationHome()

getStartCommand

public static java.lang.String getStartCommand()
Returns the command used to start up a new version of Java Web Start.


getJavaWSJarFilePath

public static java.lang.String getJavaWSJarFilePath()

getUninstallCommand

public static java.lang.String getUninstallCommand(java.lang.String path)
Returns the command used uninstall Java Web Start


setPlayerBounds

public static void setPlayerBounds(java.awt.Rectangle bounds)

getPlayerBounds

public static java.awt.Rectangle getPlayerBounds()

setPlayerManager

public static void setPlayerManager(int index)

getPlayerManager

public static int getPlayerManager()

setPlayerMode

public static void setPlayerMode(int index)

getPlayerMode

public static int getPlayerMode()

setSplashCache

public void setSplashCache(java.lang.String indexFile)

getInstance

public static ConfigProperties getInstance()
Returns a potential cached version of the property object


getMuffinSizeLimit

public long getMuffinSizeLimit()

getCacheSize

public int getCacheSize()

getCacheDir

public java.lang.String getCacheDir()

setCacheDir

public void setCacheDir(java.lang.String dir)

getHTTPProxy

public java.lang.String getHTTPProxy()

getHTTPProxyPort

public java.lang.String getHTTPProxyPort()

getEnablePreferences

public boolean getEnablePreferences()

getForceUpdateCheck

public boolean getForceUpdateCheck()

getCheckUpdateOnStart

public boolean getCheckUpdateOnStart()

getRapidUpdateTimeout

public int getRapidUpdateTimeout()

getshowConsole

public boolean getshowConsole()

getConsoleSize

public int getConsoleSize()

isLogToFileEnabled

public boolean isLogToFileEnabled()

getLogFilename

public java.lang.String getLogFilename()

isBrowserNetscape

public boolean isBrowserNetscape()

getBrowserPath

public java.lang.String getBrowserPath()

getRemoteURL

public java.lang.String getRemoteURL()

setRemoteURLs

public void setRemoteURLs(java.lang.String[] urls)

getRemoteURLs

public java.lang.String[] getRemoteURLs()

getMaxUrlsLength

public static int getMaxUrlsLength()

getAutoUpdateURL

public java.lang.String getAutoUpdateURL()

getJREInformationList

public java.util.ArrayList getJREInformationList()
Returns a set of JREs from a given URL as JREInformation objects


getJRE

public ConfigProperties.JREInformation getJRE(java.net.URL location,
                                              java.lang.String versionId)
Return a specific version


getKnownPlatforms

public java.lang.String getKnownPlatforms()
Returns list of instanceoflled platforms


getJAuthenticator

public int getJAuthenticator()

setWhenInstall

public void setWhenInstall(int value)

getWhenInstall

public int getWhenInstall()

setWhatInstall

public void setWhatInstall(int value)

getWhatInstall

public int getWhatInstall()

getJREInstallURL

public java.net.URL getJREInstallURL()
Returns the location to get JNL files for install from.


getSplashDir

public java.lang.String getSplashDir()
Returns the splash cache dir


getSplashCache

public java.lang.String getSplashCache()
Returns the splash cache index filename


getMuffinDir

public java.lang.String getMuffinDir()
Returns the muffin cache dir


getDefaultMuffinDir10

public java.lang.String getDefaultMuffinDir10()
Returns the default muffin cache dir for javaws 1.0


getMuffinDir10

public java.lang.String getMuffinDir10()
Returns the muffin cache dir for javaws 1.0


getProxyType

public int getProxyType()

setProxy

public void setProxy(int proxyType,
                     java.lang.String httpHost,
                     int httpPort,
                     java.lang.String overrides)
This is an all purpose proxy setter method depending on the proxyType params will have the strings the ex: if proxyType is null then params will be null if proxyType is Manual then params will contain the nodename and port.


getProxyOverrideString

public java.lang.String getProxyOverrideString()
Returns a String of comma seperated hostnames which could be used to set TextFields etc.


getProxyOverrideList

public java.util.List getProxyOverrideList()
This method will get the hostnames which do not need proxies, normally used in the get call in Main, so we return a List


setFavorites

public void setFavorites(java.util.Iterator favorites)
Load Config file from file/url


getFavorites

public java.util.Iterator getFavorites()

put

public void put(java.lang.String key,
                java.lang.String value)

get

public java.lang.String get(java.lang.String key)

isDirty

public boolean isDirty()
Returns true if the properties have changed.


doesNewVersionExist

public boolean doesNewVersionExist()
Returns true if a new version exists on the file system.


refreshIfNecessary

public void refreshIfNecessary()
Reloads the config properties, throwing away any changes.


refresh

public void refresh()

store

public void store()
Store user-specific properties


storeApplicationProperties

public void storeApplicationProperties()
Store the application specific properties. This should ONLY be called during installation of Java Web Start, e.g, from the -updateJREs flag


toString

public java.lang.String toString()
Debugging

Overrides:
toString in class java.lang.Object