|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.util.E4Settings
public class E4Settings
System properties.
System properties are treatened in this way:
You must include the following lines to your web.xml file:
<init-param>
<param-name>E4S.PROPERTIES</param-name>
<param-value>e4s.ini</param-value>
</init-param>
This specifies the property file, which is used by several modules which make use
of E4Settings or an inherited class. This module handles the editing
of those values.
A property has a unique name (ID) and a value. A value is typically a String, but it can contain
other ID's recursivley, e.g. DIRECTORY = %BASEDIR%/myDir/ which looks for an ID BASEDIR and
expands it.
E4ModuleEditProperties,
E4DBSettings| Nested Class Summary | |
|---|---|
static class |
E4Settings.DATATYPE_DEF
|
| Field Summary | |
|---|---|
static int |
_DATATYPE_BOOLEAN
|
static int |
_DATATYPE_NUMBER
|
static int |
_DATATYPE_PASSWORD
|
static int |
_DATATYPE_SELECTION
|
static int |
_DATATYPE_STRING
|
protected static char |
INCLUDE_CHAR
|
static java.lang.String |
SERVLET_WEB_XML_PARAMETER_PROPERTIES
Definition for parameter of the property file as to be used in tomcat web.xml. |
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Constructor Summary | |
|---|---|
E4Settings()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
_getSVNVersionString()
Get version info string from subversion. |
static void |
defineDatatype(java.lang.String id,
E4Label_Intf rem)
|
static void |
defineDatatype(java.lang.String id,
E4SelectValues options,
E4Label_Intf rem)
|
static void |
defineDatatype(java.lang.String id,
E4SelectValues options,
java.lang.String rem)
|
static void |
defineDatatype(java.lang.String id,
int datatype,
E4Label_Intf rem)
|
static void |
defineDatatype(java.lang.String id,
int datatype,
java.lang.String rem)
|
static void |
defineDatatype(java.lang.String id,
java.lang.String rem)
|
static void |
defineDatatypes()
|
static void |
definePropertyFile(java.lang.String propertyfile)
Define the filename for the property (.ini) file. |
static Language |
getAppCoreLanguage()
Get the application core language. |
static E4Settings.DATATYPE_DEF |
getDatatype(java.lang.String id)
|
static int |
getDefaultAlias()
Default alias code for startup. |
static E4DocumentBase |
getDocBase()
Default document base. |
static java.lang.String |
getErrorMailto()
Specifies an eMail address where errors are beeing mailed to. |
static boolean |
getForceUploadLowercase()
|
static boolean |
getHtmlStrict()
|
static java.lang.String |
getHttpAddr()
Definition of the application home path (e.g. http://www.myhost.com/zone/servlet). |
static java.lang.String |
getHttpRoot()
Definition of the application root path within the properties file. |
static java.lang.String |
getLoginPath()
Definition of the application's login path (used in the mail me my password function) |
static int |
getMaxUploadSize()
Maximum upload file size for E4MultipartRequest. |
static int |
getMenuStyle()
Get the menu style, server requires restart. |
static java.util.Enumeration |
getPredefinedKeys()
|
static java.util.Properties |
getProperties()
|
static java.lang.String |
getProperty(E4InputFieldName_Intf id)
Read a property value from the properties file. |
static java.lang.String |
getProperty(java.lang.String id)
Read a property value from the properties file. |
static java.lang.String |
getProperty(java.lang.String id,
boolean except_not_found)
Read a property value from the properties file. |
static java.lang.String |
getProperty(java.lang.String id,
java.lang.String default_value,
boolean expand)
Read a property value from the properties file. |
static java.lang.String |
getProperty(java.lang.String id,
java.lang.String default_value,
boolean expand,
boolean null_on_error)
Read a property value from the properties file. |
static boolean |
getPropertyBool(java.lang.String id)
Read a property value from the properties file. |
static java.lang.String |
getPropertyFile()
Get the filename for the property (.ini) file. |
static int |
getPropertyInt(java.lang.String id)
Read a property value from the properties file. |
static long |
getPropertyLong(java.lang.String id)
Read a property value from the properties file. |
static java.lang.String |
getServer()
Server address, e.g. |
static java.lang.String |
getSysLogFilePath()
|
static java.lang.String |
getSysTempPath()
Get a place for the temporary directory on the server |
static java.lang.String |
getSysTraceLogPath()
Get the path for TRACE logging. |
static boolean |
preventBackButton()
|
static boolean |
preventRightClick()
|
static java.util.Enumeration |
propertyNames()
Get a list (Enumeration) for all properties. |
static void |
readIniFile()
|
static void |
reloadFile()
Force to reload the properties file before the next access. |
static void |
removeProperty(java.lang.String id)
|
static void |
setHttpAddr(java.lang.String address)
Definition of the application home path (e.g. http://www.myhost.com/zone/servlet). |
static void |
setProperty(java.lang.String id,
boolean value)
|
static void |
setProperty(java.lang.String id,
long value)
|
static void |
setProperty(java.lang.String id,
java.lang.String value)
|
static void |
validate(HTML html)
|
| Methods inherited from class e4s.util.E4Object |
|---|
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, toString, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int _DATATYPE_STRING
public static final int _DATATYPE_BOOLEAN
public static final int _DATATYPE_PASSWORD
public static final int _DATATYPE_NUMBER
public static final int _DATATYPE_SELECTION
protected static final char INCLUDE_CHAR
public static final java.lang.String SERVLET_WEB_XML_PARAMETER_PROPERTIES
<web-app>
<servlet>
<servlet-name>..</servlet-name>
<servlet-class>..</servlet-class>
<init-param>
<param-name>E4S.PROPERTIES</param-name>
<param-value>myapplication.ini</param-value>
</init-param>
..
</servlet>
..
</web-app>
| Constructor Detail |
|---|
public E4Settings()
| Method Detail |
|---|
public static java.lang.String getProperty(java.lang.String id,
boolean except_not_found)
throws java.lang.Exception
id - the identification of the value, must be unique within the
current properties file
java.lang.ExceptiongetProperty(String, String, boolean, boolean),
getPropertyLong(String),
getPropertyInt(String),
getPropertyBool(String),
setProperty(String,String)public static java.lang.String getProperty(java.lang.String id)
id - the identification of the value, must be unique within the
current properties file
getProperty(String, String, boolean, boolean),
getPropertyLong(String),
getPropertyInt(String),
getPropertyBool(String),
setProperty(String,String)public static java.lang.String getProperty(E4InputFieldName_Intf id)
id - the identification of the value, must be unique within the
current properties file
getProperty(String, String, boolean, boolean),
getPropertyLong(String),
getPropertyInt(String),
getPropertyBool(String),
setProperty(String,String)
public static java.lang.String getProperty(java.lang.String id,
java.lang.String default_value,
boolean expand,
boolean null_on_error)
id - the identification of the value, must be unique within the
current properties filedefault_value - for the case, that the value is not defined in the properties
file, use this valueexpand - if true, then including terms like %XY% are expanded by recursivley
lookups in the propertiesnull_on_error - if true, and an expansion fails then no incorrect value will
be returned but null instead, if false, and an
expansion fails then a value might be wrong. If you are unsure, set
this parameter to true.
getProperty(String, String, boolean),
getPropertyLong(String),
getPropertyInt(String),
getPropertyBool(String),
getProperty(String),
setProperty(java.lang.String, java.lang.String)
public static java.lang.String getProperty(java.lang.String id,
java.lang.String default_value,
boolean expand)
id - the identification of the value, must be unique within the
current properties filedefault_value - for the case, that the value is not defined in the properties
file, use this valueexpand - if true, then including terms like %XY% are expanded by recursivley
lookups in the properties
getProperty(String, String, boolean),
getPropertyLong(String),
getPropertyInt(String),
getPropertyBool(String),
getProperty(String),
setProperty(java.lang.String, java.lang.String)public static int getPropertyInt(java.lang.String id)
id - the identification of the value, must be unique within the
current properties file
getProperty(String, String, boolean, boolean),
getProperty(String),
getPropertyBool(String),
getPropertyLong(String),
setProperty(java.lang.String, java.lang.String)public static java.lang.String getErrorMailto()
SYS_ERROR_MAILTOpublic static int getMenuStyle()
E4Menu.MENU_STYLE_IMAGES_B2 as a default value.E4Menupublic static long getPropertyLong(java.lang.String id)
id - the identification of the value, must be unique within the
current properties file
getProperty(String, String, boolean, boolean),
getProperty(String),
getPropertyBool(String),
setProperty(java.lang.String, java.lang.String)public static boolean getPropertyBool(java.lang.String id)
id - the identification of the value, must be unique within the
current properties file
getProperty(String, String, boolean, boolean),
getPropertyLong(String),
getProperty(String),
setProperty(String, boolean)
public static void setProperty(java.lang.String id,
java.lang.String value)
public static void readIniFile()
throws java.io.IOException
java.io.IOException
public static void setProperty(java.lang.String id,
long value)
public static void setProperty(java.lang.String id,
boolean value)
public static void removeProperty(java.lang.String id)
public static void definePropertyFile(java.lang.String propertyfile)
SERVLET_WEB_XML_PARAMETER_PROPERTIES in the web.xml file.
getPropertyFile(),
SERVLET_WEB_XML_PARAMETER_PROPERTIESpublic static java.lang.String getPropertyFile()
definePropertyFile(String)public static java.util.Enumeration propertyNames()
public static void reloadFile()
public static java.lang.String getHttpRoot()
SYS_HTTPROOT,
getDocBase(),
e4s.application.E4Client#getAbsolutePath()public static java.lang.String getHttpAddr()
E4ServletImplementation_Intf.getHttpAddr().
SYS_HTTPADR,
getHttpRoot(),
e4s.application.E4Client#getRootPath(boolean),
E4ServletImplementation_Intf.getHttpAddr()public static java.lang.String getLoginPath()
SYS_LOGINPATHpublic static void setHttpAddr(java.lang.String address)
SYS_HTTPADR,
getHttpAddr()public static int getDefaultAlias()
public static int getMaxUploadSize()
E4MultipartRequest.
E4MultipartRequest.MAX_READ_BYTES,
SYS_UPLOAD_MAXSIZE,
FILESELECTION.getMaxUploadSize()public static Language getAppCoreLanguage()
APP_CORE_LANGUAGE,
E4Object.E4S_CORE_SYSTEM_LANGUAGEpublic static java.lang.String getSysLogFilePath()
public static java.lang.String getSysTempPath()
SYS_TEMP_PATHpublic static java.lang.String getSysTraceLogPath()
e4s.util.E4Object#TRACE(String),
E4Object.setLogFile4Trace(String),
SYS_TRACE_LOG_PATHpublic static E4DocumentBase getDocBase()
DOCBASEpublic static java.lang.String getServer()
getDocBase(),
SYS_SERVERpublic static boolean preventRightClick()
public static boolean preventBackButton()
public static void validate(HTML html)
public static java.util.Properties getProperties()
public static void defineDatatype(java.lang.String id,
E4SelectValues options,
java.lang.String rem)
public static void defineDatatype(java.lang.String id,
E4SelectValues options,
E4Label_Intf rem)
public static void defineDatatype(java.lang.String id,
java.lang.String rem)
public static void defineDatatype(java.lang.String id,
E4Label_Intf rem)
public static void defineDatatype(java.lang.String id,
int datatype,
java.lang.String rem)
public static void defineDatatype(java.lang.String id,
int datatype,
E4Label_Intf rem)
public static E4Settings.DATATYPE_DEF getDatatype(java.lang.String id)
public static java.util.Enumeration getPredefinedKeys()
public static void defineDatatypes()
public static boolean getForceUploadLowercase()
public static boolean getHtmlStrict()
public static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||