Package org.openbravo.base
Class ConfigParameters
- java.lang.Object
-
- org.openbravo.base.ConfigParameters
-
- All Implemented Interfaces:
Serializable
public class ConfigParameters extends Object implements Serializable
Application parameters stored in web.xml as init parameters.- Author:
- Ben Sommerville
- See Also:
- Serialized Form
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ConfigParameters(javax.servlet.ServletContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBaseDesignPath()
String
getFormatPath()
String
getJavaDateTimeFormat()
static String
getMachineName()
Properties
getOBProperties()
String
getOBProperty(String skey)
String
getOBProperty(String skey, String sdefault)
String
getOpenbravoPropertiesPath()
long
getPeriodicBackgroundTime()
String
getPoolFilePath()
String
getSqlDateTimeFormat()
String
getXmlEngineFileFormatPath()
boolean
haveLogFileAcctServer()
boolean
havePeriodicBackgroundTime()
Properties
loadOBProperties()
static void
overrideProperties(Properties obProperties, String path)
Looks for file to override some of the properties in the Openbravo.properties.static ConfigParameters
retrieveFrom(javax.servlet.ServletContext context)
void
storeIn(javax.servlet.ServletContext context)
-
-
-
Field Detail
-
CONFIG_ATTRIBUTE
public static final String CONFIG_ATTRIBUTE
- See Also:
- Constant Field Values
-
strBaseDesignPath
public final String strBaseDesignPath
-
strDefaultDesignPath
public final String strDefaultDesignPath
-
strLocalReplaceWith
public final String strLocalReplaceWith
-
strBBDD
public final String strBBDD
-
strVersion
public final String strVersion
-
strParentVersion
public final String strParentVersion
-
prefix
public String prefix
-
strContext
public final String strContext
-
strSystemLanguage
public final String strSystemLanguage
-
strDefaultServlet
public final String strDefaultServlet
-
strReplaceWhat
public final String strReplaceWhat
-
strTextDividedByZero
public final String strTextDividedByZero
-
loginServlet
public final String loginServlet
-
strServletSinIdentificar
public final String strServletSinIdentificar
-
strFTPDirectory
public final String strFTPDirectory
-
periodicBackgroundTime
public final Long periodicBackgroundTime
-
strLogFileAcctServer
public final String strLogFileAcctServer
-
-
Method Detail
-
retrieveFrom
public static ConfigParameters retrieveFrom(javax.servlet.ServletContext context)
-
storeIn
public void storeIn(javax.servlet.ServletContext context)
-
getPoolFilePath
public String getPoolFilePath()
-
getBaseDesignPath
public String getBaseDesignPath()
-
getXmlEngineFileFormatPath
public String getXmlEngineFileFormatPath()
-
getOpenbravoPropertiesPath
public String getOpenbravoPropertiesPath()
-
getFormatPath
public String getFormatPath()
-
havePeriodicBackgroundTime
public boolean havePeriodicBackgroundTime()
-
getPeriodicBackgroundTime
public long getPeriodicBackgroundTime()
-
haveLogFileAcctServer
public boolean haveLogFileAcctServer()
-
getOBProperties
public Properties getOBProperties()
-
loadOBProperties
public Properties loadOBProperties()
-
overrideProperties
public static void overrideProperties(Properties obProperties, String path)
Looks for file to override some of the properties in the Openbravo.properties. This is intended to be used in Tomcat cluster environments sharing same context directory to allow to define specific values for some properties in different machines.
The file with overridden properties is selected based on the first fulfilled rule of these:
- If
properties.path
JVM property is defined, it indicates the absolute path to take the file from. - If
machine.name
JVM property is defined, this value will be used asprefix
to look for a file inconfig
directory namedprefix.Openbravo.properties
. - Other case,
prefix
is defined byInetAddress.getLocalHost().getHostName()
. The actual name forhostName
can be determined byant host.name
.
- If
-
getMachineName
public static String getMachineName()
-
getJavaDateTimeFormat
public String getJavaDateTimeFormat()
-
getSqlDateTimeFormat
public String getSqlDateTimeFormat()
-
-