org.emboss.jemboss
Class JembossParams

java.lang.Object
  |
  +--org.emboss.jemboss.JembossParams

public class JembossParams
extends java.lang.Object


Field Summary
private  java.lang.String acdDirToParse
           
private  java.lang.String acdDirToParseName
           
private  java.lang.String browserProxyHost
           
private  java.lang.String browserProxyHostName
           
private  int browserProxyPort
           
private  java.lang.String browserProxyPortName
           
private  java.lang.String currentMode
           
private  java.lang.String currentModeName
           
private  boolean debug
           
private  java.lang.String debugName
           
private  java.lang.String embossBin
           
private  java.lang.String embossBinName
           
private  java.lang.String embossData
           
private  java.lang.String embossDataName
           
private  java.lang.String embossEnvironment
           
private  java.lang.String embossEnvironmentName
           
private  java.lang.String embossPath
           
private  java.lang.String embossPathName
           
private  java.lang.String embossURL
           
private  java.lang.String embURL
           
private  boolean hasBatchMode
           
private  java.lang.String hasBatchModeName
           
private  boolean hasInteractiveMode
           
private  java.lang.String hasInteractiveModeName
           
private  java.lang.String javaNoProxy
           
private  java.util.Vector javaNoProxyEntries
           
private  java.lang.String javaProxyHost
           
private  java.lang.String javaProxyPort
           
private  int javaProxyPortNum
           
private static boolean jembossServer
          Jemboss java server
private  java.lang.String jembossServerName
           
(package private)  java.util.Properties jembossSettings
           
private  java.lang.String plplot
           
private  java.lang.String plplotName
           
private  boolean privateServerFailOver
           
private  java.util.Vector privateServers
           
private  java.lang.String privateSoapService
           
private  java.lang.String privateSoapServiceName
           
private  java.lang.String privateSoapURL
           
private  java.lang.String privateSoapURLName
           
private  java.lang.String proxyAuthPasswd
           
private  java.lang.String proxyAuthPasswdName
           
private  java.lang.String proxyAuthUser
           
private  java.lang.String proxyAuthUserName
           
private  java.lang.String proxyHost
           
private  java.lang.String proxyHostName
           
private  boolean proxyOverride
           
private  java.lang.String proxyOverrideName
           
private  int proxyPortNum
           
private  java.lang.String proxyPortNumName
           
private  boolean publicServerFailOver
           
private  java.util.Vector publicServers
           
private  java.lang.String publicSoapService
           
private  java.lang.String publicSoapServiceName
           
private  java.lang.String publicSoapURL
           
private  java.lang.String publicSoapURLName
           
static int SERVER_DOWN
           
static int SERVER_ERR
           
static int SERVER_OK
           
private  java.lang.String serverPrivateList
           
private  java.lang.String serverPrivateListName
           
private  java.lang.String serverPublicList
           
private  java.lang.String serverPublicListName
           
private  java.util.Hashtable serverStatusHash
           
private  char[] servicePasswd
           
private  byte[] servicePasswdByte
           
private  java.lang.String serviceUserName
           
private  java.lang.String serviceUserNameName
           
private  java.lang.String soapService
           
private  java.lang.String soapServiceName
           
private  boolean useAuth
           
private  java.lang.String useAuthName
           
private  boolean useBrowserProxy
           
private  java.lang.String useBrowserProxyName
           
private  boolean useJavaNoProxy
           
private  boolean useJavaProxy
           
private  boolean useProxy
           
private  boolean useProxyAuth
           
private  java.lang.String useProxyAuthName
           
private  java.lang.String useProxyName
           
private  java.lang.String userHome
           
private  java.lang.String userHomeName
           
private  boolean useTFM
           
private  java.lang.String useTFMName
           
 
Constructor Summary
JembossParams()
          Loads and holds the properties
 
Method Summary
 java.lang.String getAcdDirToParse()
           
 java.lang.String getBrowserProxyHost()
          The name of the proxy server for the browser
 int getBrowserProxyPort()
          The port number of the proxy server for the browser
 java.lang.String getCurrentMode()
          The current mode (interactive or batch).
 boolean getDebug()
          Whether to show debugging information
 java.lang.String getEmbossBin()
           
 java.lang.String getEmbossData()
           
 java.lang.String getEmbossEnvironment()
           
 java.lang.String[] getEmbossEnvironmentArray(java.lang.String[] envp)
           
 java.lang.String getEmbossPath()
           
 java.lang.String getembURL()
           
 boolean getHasBatchMode()
          Whether this service supports batch mode
 boolean getHasInteractiveMode()
          Whether this service supports interactive mode
 java.lang.String getPlplot()
           
 boolean getPrivateServerFailover()
          Return whether we have failover on the private server
 java.util.Vector getPrivateServers()
          Return a vector containing the list of private servers
 java.lang.String getPrivateSoapService()
          Get the name of the private soap service we're using
 java.lang.String getPrivateSoapURL()
          Returns the URL of the private soap server
 java.lang.String getProxyAuthPasswd()
          password needed to use for the proxy server
 java.lang.String getProxyAuthUser()
          username needed to use for the proxy server
 java.lang.String getProxyHost()
          The name of the proxy server
 int getProxyPortNum()
          The port the proxy server listens on
 boolean getPublicServerFailover()
          Return whether we have failover on the public server
 java.util.Vector getPublicServers()
          Return a vector containing the list of public servers
 java.lang.String getPublicSoapService()
          Get the name of the public soap service we're using
 java.lang.String getPublicSoapURL()
          Returns the URL of the public soap server
 char[] getServicePasswd()
          Return the password needed for the remote service
 byte[] getServicePasswdByte()
           
 java.lang.String getServiceUserName()
          Return the username needed for the remote service
 java.lang.String getSoapService()
          Get the name of the soap service we're using
 boolean getUseAuth()
          Whether the main service requires authentication
 boolean getUseProxy()
          If using a proxy server
 boolean getUseProxy(java.lang.String s)
          If using a proxy server for a given URL
 boolean getUseProxyAuth()
          If using authenticate with the proxy
 java.lang.String getUserHome()
           
 boolean isBrowserProxy()
          True is using a proxy server for the browser
static boolean isJembossServer()
           
 boolean isUseTFM()
           
private  void loadIn(java.lang.String folder)
           
 java.util.Vector modeVector()
          Return the mode list as a vector, suitable for loading into a combobox.
 java.lang.String proxyDescription()
          A description of the proxy settings
 java.lang.String serverDescription()
          A description of the server settings
 void setCurrentMode(java.lang.String newMode)
          Set the current mode (interactive or batch).
 void setPrivateSoapService(java.lang.String s)
          Set the name of the private soap service we're using
 void setPrivateSoapURL(java.lang.String s)
          Set the URL of the private soap server
 void setPublicSoapService(java.lang.String s)
          Set the name of the public soap service we're using
 void setPublicSoapURL(java.lang.String s)
          Set the URL of the public soap server
 void setServerStatus(java.lang.String server, int i)
          Mark a server as bad
 void setServicePasswd(char[] newPasswd)
          Save the password needed for the remote service
 void setServiceUserName(java.lang.String newUserName)
          Save the username needed for the remote service
protected  void setupServerRedundancy()
          Initialize the server redundancy data.
 void setUserHome(java.lang.String s)
           
private static byte[] toByteArr(char[] ch)
          Return the password as byte array
 void updateJembossProperty(java.lang.String name, java.lang.String newvalue)
          Update the properties structure.
 void updateJembossPropHash(java.util.Hashtable hash)
          Update properties from a Hashtable
 void updateJembossPropString(java.lang.String entry)
          Parse a key=value string to update the properties structure
 void updateJembossPropStrings(java.lang.String[] entries)
          Parse an array of key=value strings to update the properties structure
protected  void updateSettingsFromProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_OK

public static final int SERVER_OK
See Also:
Constant Field Values

SERVER_ERR

public static final int SERVER_ERR
See Also:
Constant Field Values

SERVER_DOWN

public static final int SERVER_DOWN
See Also:
Constant Field Values

useProxy

private boolean useProxy

useProxyName

private java.lang.String useProxyName

proxyHost

private java.lang.String proxyHost

proxyHostName

private java.lang.String proxyHostName

proxyPortNum

private int proxyPortNum

proxyPortNumName

private java.lang.String proxyPortNumName

useBrowserProxy

private boolean useBrowserProxy

useBrowserProxyName

private java.lang.String useBrowserProxyName

browserProxyHost

private java.lang.String browserProxyHost

browserProxyHostName

private java.lang.String browserProxyHostName

browserProxyPort

private int browserProxyPort

browserProxyPortName

private java.lang.String browserProxyPortName

useTFM

private boolean useTFM

useTFMName

private java.lang.String useTFMName

useProxyAuth

private boolean useProxyAuth

useProxyAuthName

private java.lang.String useProxyAuthName

proxyAuthUser

private java.lang.String proxyAuthUser

proxyAuthUserName

private java.lang.String proxyAuthUserName

proxyAuthPasswd

private java.lang.String proxyAuthPasswd

proxyAuthPasswdName

private java.lang.String proxyAuthPasswdName

proxyOverride

private boolean proxyOverride

proxyOverrideName

private java.lang.String proxyOverrideName

useAuth

private boolean useAuth

useAuthName

private java.lang.String useAuthName

publicSoapURL

private java.lang.String publicSoapURL

publicSoapURLName

private java.lang.String publicSoapURLName

privateSoapURL

private java.lang.String privateSoapURL

privateSoapURLName

private java.lang.String privateSoapURLName

soapService

private java.lang.String soapService

soapServiceName

private java.lang.String soapServiceName

privateSoapService

private java.lang.String privateSoapService

privateSoapServiceName

private java.lang.String privateSoapServiceName

publicSoapService

private java.lang.String publicSoapService

publicSoapServiceName

private java.lang.String publicSoapServiceName

debug

private boolean debug

debugName

private java.lang.String debugName

hasBatchMode

private boolean hasBatchMode

hasBatchModeName

private java.lang.String hasBatchModeName

hasInteractiveMode

private boolean hasInteractiveMode

hasInteractiveModeName

private java.lang.String hasInteractiveModeName

currentMode

private java.lang.String currentMode

currentModeName

private java.lang.String currentModeName

serverPublicList

private java.lang.String serverPublicList

serverPublicListName

private java.lang.String serverPublicListName

serverPrivateList

private java.lang.String serverPrivateList

serverPrivateListName

private java.lang.String serverPrivateListName

serviceUserName

private java.lang.String serviceUserName

serviceUserNameName

private java.lang.String serviceUserNameName

servicePasswd

private char[] servicePasswd

servicePasswdByte

private byte[] servicePasswdByte

jembossSettings

java.util.Properties jembossSettings

useJavaProxy

private boolean useJavaProxy

javaProxyPort

private java.lang.String javaProxyPort

javaProxyHost

private java.lang.String javaProxyHost

useJavaNoProxy

private boolean useJavaNoProxy

javaNoProxy

private java.lang.String javaNoProxy

javaNoProxyEntries

private java.util.Vector javaNoProxyEntries

javaProxyPortNum

private int javaProxyPortNum

publicServerFailOver

private boolean publicServerFailOver

privateServerFailOver

private boolean privateServerFailOver

serverStatusHash

private java.util.Hashtable serverStatusHash

publicServers

private java.util.Vector publicServers

privateServers

private java.util.Vector privateServers

jembossServer

private static boolean jembossServer
Jemboss java server


jembossServerName

private java.lang.String jembossServerName

plplot

private java.lang.String plplot

plplotName

private java.lang.String plplotName

embossData

private java.lang.String embossData

embossDataName

private java.lang.String embossDataName

embossBin

private java.lang.String embossBin

embossBinName

private java.lang.String embossBinName

embossPath

private java.lang.String embossPath

embossPathName

private java.lang.String embossPathName

embossEnvironment

private java.lang.String embossEnvironment

embossEnvironmentName

private java.lang.String embossEnvironmentName

acdDirToParse

private java.lang.String acdDirToParse

acdDirToParseName

private java.lang.String acdDirToParseName

embURL

private java.lang.String embURL

embossURL

private java.lang.String embossURL

userHome

private java.lang.String userHome

userHomeName

private java.lang.String userHomeName
Constructor Detail

JembossParams

public JembossParams()
Loads and holds the properties

Method Detail

loadIn

private void loadIn(java.lang.String folder)

updateSettingsFromProperties

protected void updateSettingsFromProperties()

setupServerRedundancy

protected void setupServerRedundancy()
Initialize the server redundancy data. This is a separate method because the server info might not be initialized in the constructor, but may be imported later from the command line.


getUseProxy

public boolean getUseProxy()
If using a proxy server


getUseProxy

public boolean getUseProxy(java.lang.String s)
If using a proxy server for a given URL

Parameters:
s - The URL we wish to connect to

getProxyHost

public java.lang.String getProxyHost()
The name of the proxy server


getProxyPortNum

public int getProxyPortNum()
The port the proxy server listens on


isBrowserProxy

public boolean isBrowserProxy()
True is using a proxy server for the browser


getBrowserProxyHost

public java.lang.String getBrowserProxyHost()
The name of the proxy server for the browser


getBrowserProxyPort

public int getBrowserProxyPort()
The port number of the proxy server for the browser


isUseTFM

public boolean isUseTFM()

getUseProxyAuth

public boolean getUseProxyAuth()
If using authenticate with the proxy


getProxyAuthUser

public java.lang.String getProxyAuthUser()
username needed to use for the proxy server


getProxyAuthPasswd

public java.lang.String getProxyAuthPasswd()
password needed to use for the proxy server


proxyDescription

public java.lang.String proxyDescription()
A description of the proxy settings


getUseAuth

public boolean getUseAuth()
Whether the main service requires authentication


getPublicSoapURL

public java.lang.String getPublicSoapURL()
Returns the URL of the public soap server


isJembossServer

public static boolean isJembossServer()

getPlplot

public java.lang.String getPlplot()

getUserHome

public java.lang.String getUserHome()

setUserHome

public void setUserHome(java.lang.String s)

getembURL

public java.lang.String getembURL()

getEmbossData

public java.lang.String getEmbossData()

getEmbossBin

public java.lang.String getEmbossBin()

getEmbossPath

public java.lang.String getEmbossPath()

getEmbossEnvironment

public java.lang.String getEmbossEnvironment()

getEmbossEnvironmentArray

public java.lang.String[] getEmbossEnvironmentArray(java.lang.String[] envp)

getAcdDirToParse

public java.lang.String getAcdDirToParse()

setPublicSoapURL

public void setPublicSoapURL(java.lang.String s)
Set the URL of the public soap server


getPrivateSoapURL

public java.lang.String getPrivateSoapURL()
Returns the URL of the private soap server


setPrivateSoapURL

public void setPrivateSoapURL(java.lang.String s)
Set the URL of the private soap server


getPublicServerFailover

public boolean getPublicServerFailover()
Return whether we have failover on the public server


getPrivateServerFailover

public boolean getPrivateServerFailover()
Return whether we have failover on the private server


getPublicServers

public java.util.Vector getPublicServers()
Return a vector containing the list of public servers


getPrivateServers

public java.util.Vector getPrivateServers()
Return a vector containing the list of private servers


setServerStatus

public void setServerStatus(java.lang.String server,
                            int i)
Mark a server as bad


getServiceUserName

public java.lang.String getServiceUserName()
Return the username needed for the remote service


setServiceUserName

public void setServiceUserName(java.lang.String newUserName)
Save the username needed for the remote service

Parameters:
newUserName - The username

getServicePasswd

public char[] getServicePasswd()
Return the password needed for the remote service


getServicePasswdByte

public byte[] getServicePasswdByte()

toByteArr

private static byte[] toByteArr(char[] ch)
Return the password as byte array


setServicePasswd

public void setServicePasswd(char[] newPasswd)
Save the password needed for the remote service

Parameters:
newPasswd - The username

getSoapService

public java.lang.String getSoapService()
Get the name of the soap service we're using


getPrivateSoapService

public java.lang.String getPrivateSoapService()
Get the name of the private soap service we're using


setPrivateSoapService

public void setPrivateSoapService(java.lang.String s)
Set the name of the private soap service we're using

Parameters:
s - The name of the service

getPublicSoapService

public java.lang.String getPublicSoapService()
Get the name of the public soap service we're using


setPublicSoapService

public void setPublicSoapService(java.lang.String s)
Set the name of the public soap service we're using

Parameters:
s - The name of the service

serverDescription

public java.lang.String serverDescription()
A description of the server settings


getDebug

public boolean getDebug()
Whether to show debugging information


getHasBatchMode

public boolean getHasBatchMode()
Whether this service supports batch mode


getHasInteractiveMode

public boolean getHasInteractiveMode()
Whether this service supports interactive mode


getCurrentMode

public java.lang.String getCurrentMode()
The current mode (interactive or batch).

Returns:
a String containing the current mode

setCurrentMode

public void setCurrentMode(java.lang.String newMode)
Set the current mode (interactive or batch).

Parameters:
newMode - The new execution mode

modeVector

public java.util.Vector modeVector()
Return the mode list as a vector, suitable for loading into a combobox.


updateJembossProperty

public void updateJembossProperty(java.lang.String name,
                                  java.lang.String newvalue)
Update the properties structure. This doesn't update the actual properties, just the Properties object so you must call updateSettingsFromProperties yoursefl

Parameters:
name - A String naming the property to be updated
newvalue - A String containing the new value of the property

updateJembossPropString

public void updateJembossPropString(java.lang.String entry)
Parse a key=value string to update the properties structure

Parameters:
entry - String containing a key=value message

updateJembossPropStrings

public void updateJembossPropStrings(java.lang.String[] entries)
Parse an array of key=value strings to update the properties structure

Parameters:
entries - Array of Strings containing key=value messages

updateJembossPropHash

public void updateJembossPropHash(java.util.Hashtable hash)
Update properties from a Hashtable

Parameters:
hash - Hashtable containg properties