|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.ifeth.sehr.lib.SEHRCfg
This method is the only one and basic configuration layer between the SEHR modules and the operating system.
The configuration file knows (due to the setup procedure) where to find the databases, environments like Apache, SAMBA etc.
To retrieve the running configuration one of the methods listed below should be used in accordence to the context:
SEHRCfg cfg = new SEHRCfg(true);SEHRCfg cfg = new SEHRCfg(host,port); to get the
running configuration.
(...)
SEHRCFg cfg= new SEHRCfg();
if (!cfg.loadSEHRCfg(true)){
//return/exit with error
return false;
}
//continue
(...)
Important: This object requires always a local read access to the
running or defined configuration file for security reasons.
On external, remote clients get relevant data of the running SEHR system by
the implemented SOAP interface.
| Constructor Summary | |
SEHRCfg()
Parameterless instance for using in JSP beans. |
|
SEHRCfg(boolean load)
Init SEHR environment object either by scaning for the configuration or by accessing the default host/port |
|
SEHRCfg(java.lang.String file)
Init SEHR environment object using specified configuration file |
|
SEHRCfg(java.lang.String ip,
int port)
Init SEHR environment object using specified host/port to get the configuration file to load. |
|
| Method Summary | |
java.sql.Connection |
getCon()
|
java.lang.String |
getCssfile()
Get the style file for WEB pages. |
java.lang.String |
getdbHost()
|
java.lang.String |
getdbHostname()
|
java.lang.String |
getdbSec()
|
java.lang.String |
getdbSecUser()
|
java.lang.String |
getdbSecUserPw()
|
java.lang.String |
getDebug()
|
int |
getDebugInt()
|
java.lang.String |
getDomain()
|
SEHRDataSource |
getFbds()
|
java.lang.String |
getFQNN()
|
java.lang.String |
getIMAPServer()
|
java.lang.String |
getLANIP()
Get LAN IP where current server by SERVER IP running in Due to IP conventions the LAN Ip can be build from SERVER IP otherwise the server would not work :) > |
java.lang.String |
getLogfile()
|
java.lang.String |
getModuleOwner()
|
java.lang.String |
getModuleRoot()
|
java.lang.String |
getPOP3Server()
|
java.lang.String |
getRunningCfgFile()
|
java.lang.String |
getSERVERIP()
|
java.lang.String |
getSERVERPort()
|
java.lang.String |
getSMTPServer()
|
java.lang.String |
getSubdomain()
|
java.lang.String |
getSYSHOME()
|
java.lang.String |
getTitle()
|
java.lang.String |
getURLSEHRAdminAsIP()
Returns the URL to access the SEHR-OSI module by Tomcat for administration purposes. |
java.lang.String |
getZoneID()
|
void |
initDBConnection()
Init a db connection to 'intrasec' using settings of this object |
boolean |
isSEHRCfgLoaded()
Returns the status if the SEHR object. |
boolean |
isSEHRCfgProp()
Check wether SEHR environment is initialized (configuration is avlb.) |
boolean |
loadSEHRCfg()
Load the SEHR configuration. |
boolean |
loadSEHRCfg(java.lang.String f)
Load SEHR configuration from a given configuration file. |
boolean |
loadSEHRCfg(java.lang.String host,
int port)
Get the configuration from the running server but from another port. |
void |
logDebug(java.lang.String message)
|
void |
logError(java.lang.String message)
|
void |
logInfo(java.lang.String message)
|
void |
logWarn(java.lang.String message)
|
static void |
main(java.lang.String[] args)
|
boolean |
readSEHRCfgFile(java.lang.String file)
Read configuration file and store key value pairs as properties. |
void |
readSEHRCfgFileToProp(java.lang.String file)
Deprecated. (for downgrading compatibility) from modules use 'loadSEHRCfg()' |
void |
saveCfgFile(java.lang.String file)
Save configuration in memory as configuration property file This method is used by the SEHRServer task to store the 'runnning' configuration and may be used by the user to redefine settings... |
void |
setCon(java.sql.Connection con)
|
void |
setdbHost(java.lang.String dbHost)
|
void |
setdbSecUser(java.lang.String dbSecUser)
|
void |
setdbSecUserPw(java.lang.String dbSecUserPw)
|
void |
setFbds(SEHRDataSource fbds)
|
java.lang.String |
toString()
|
static java.lang.String |
trimnull(java.lang.String s)
Helper method to set 'null' strings to "" strings for a better review from database. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SEHRCfg()
Using this don't forget to load the configuration by
sehrcfg.loadSEHRCfg([options]);
public SEHRCfg(boolean load)
public SEHRCfg(java.lang.String file)
public SEHRCfg(java.lang.String ip,
int port)
Note: Finally you must have a physical read access to the file to
load the configuration. On WEB services 127.0.0.1/24100 is the default and
you can use the simplified instantiation by using
SEHRCfg(true); use this in testing environments...
| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getModuleRoot()
public java.lang.String getModuleOwner()
public java.lang.String getLogfile()
public java.lang.String getTitle()
public java.lang.String getZoneID()
public java.lang.String getDomain()
public java.lang.String getSubdomain()
public java.lang.String getSERVERPort()
public java.lang.String getSERVERIP()
public java.lang.String getLANIP()
Due to IP conventions the LAN Ip can be build from SERVER IP otherwise the server would not work :) >
public java.lang.String getFQNN()
public java.lang.String getURLSEHRAdminAsIP()
public java.lang.String getSMTPServer()
public java.lang.String getPOP3Server()
public java.lang.String getIMAPServer()
public java.lang.String getDebug()
public int getDebugInt()
public java.lang.String getdbSec()
public java.lang.String getdbHost()
public java.lang.String getdbHostname()
public void setdbHost(java.lang.String dbHost)
public java.lang.String getdbSecUser()
public void setdbSecUser(java.lang.String dbSecUser)
public java.lang.String getdbSecUserPw()
public void setdbSecUserPw(java.lang.String dbSecUserPw)
public java.sql.Connection getCon()
public void setCon(java.sql.Connection con)
con - Set (store) the current connection to IntraSEC by this object.public SEHRDataSource getFbds()
public void setFbds(SEHRDataSource fbds)
fbds - The fbds to set.public java.lang.String getSYSHOME()
public java.lang.String getRunningCfgFile()
public void initDBConnection()
public boolean isSEHRCfgLoaded()
Use this method to check if the configuration is avbl. and the db 'intrasec' is accessable
public boolean isSEHRCfgProp()
public boolean loadSEHRCfg()
Use this method to get/init the SEHR configuration for all modules.
The default configuration file is 'path_to_sehrroot/etc/.sehr'. The method
tries to get the configuration using some different methods. To use another
specific configuration file use either
'loadSEHRCfg(fullpath_and_name)' or
'loadSEHRCfg(ip, port)'
Note:
Keep in mind that there must be finally a physical request to the
local configuration file - You can't hop to an external SEHR node
configuration file due to important security aspects!
public boolean loadSEHRCfg(java.lang.String host,
int port)
This is a helper function to get the path and name of the configuration
file on a server running on a different port than 24100. If the server is
not running the method returns "false".
This method also usable as an indicator for a correctly running SEHR core.
host - port - public boolean loadSEHRCfg(java.lang.String f)
public java.lang.String getCssfile()
Notes:
The default CSS file to use is defined in WEB.XML
Path must be included within HTML code and depends on the location the
styles are located
public static java.lang.String trimnull(java.lang.String s)
The method is static so it can be used by other classes :)
public void readSEHRCfgFileToProp(java.lang.String file)
throws java.io.IOException
from modules use 'loadSEHRCfg()'
java.io.IOExceptionpublic boolean readSEHRCfgFile(java.lang.String file)
Use
public void saveCfgFile(java.lang.String file)
throws java.io.IOException
This method is used by the SEHRServer task to store the 'runnning' configuration and may be used by the user to redefine settings...
java.io.IOExceptionpublic void logInfo(java.lang.String message)
public void logDebug(java.lang.String message)
public void logWarn(java.lang.String message)
public void logError(java.lang.String message)
public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||