www.element4solution.com

e4s.servlet
Class E4ModuleImplementation

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.E4HtmlObject
          extended by e4s.servlet.E4ModuleImplementation
Direct Known Subclasses:
E4DBDictPlugInRepository, E4ModuleAjaxDispacher, E4ModuleBlockMenuHandling, E4ModuleCalendar, E4ModuleColorPickup, E4ModuleControlCenter, E4ModuleDictionary, E4ModuleDictionaryCompare, E4ModuleDictionaryCopyDatabase, E4ModuleDictionaryIO, E4ModuleDictionarySQL, E4ModuleDictionaryTables, E4ModuleDictionaryTypes, E4ModuleDictionaryViews, E4ModuleEditFieldLayout, E4ModuleEditingHandlingSettings, E4ModuleEditProperties, E4ModuleEditStyles, E4ModuleFieldsetTabbed, E4ModuleFileselection, E4ModuleFrameSpacer, E4ModuleGridHandling, E4ModuleImageResize, E4ModuleImplementationApplication, E4ModuleListHandling, E4ModuleMenuHandling, E4ModuleMethodStatistics, E4ModuleSystem, E4ModuleTabbedMenuHandling, E4ModuleTreeHandling, E4ModuleWindowSize

public abstract class E4ModuleImplementation
extends E4HtmlObject

Basic class for inheritance of application modules. Each module, used in an application, shell be inheritated from this class, and it also needs to be registered by E4MethodRegistry

Since:
JDK 1.4
See Also:
E4ModuleImplementationApplication

Field Summary
 
Fields inherited from class e4s.html.E4HtmlObject
m_parent_e4sID
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
E4ModuleImplementation()
          The default constructor, no permission check and no persistance.
E4ModuleImplementation(boolean persistant)
          The whole module can be session persistant, this means that all member variables as the whole module will be stored in a session object until the session terminates (by logout or by timeout).
E4ModuleImplementation(boolean persistant, E4Permission permission)
          This constructor handles the required permission to the base class of your application module.
E4ModuleImplementation(E4Permission permission)
          This constructor handles the required permission to the base class of your application module.
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
protected  boolean canDo(E4Permission_Intf permission)
          Check, if the current logged in user (E4ApplObj_Intf) is allowed to use, read, modify or execute the functionality associated with the specified permission.
protected  boolean canDo(E4Permission_Intf permission, boolean throw_exception)
          Check, if the current logged in user (E4ApplObj_Intf) is allowed to use, read, modify or execute the functionality associated with the specified permission.
 boolean canRun()
          If a module permission is defined (getRequiredModulePermission()), check this permission against the permissions assigned to the current user.
protected  java.lang.String closeHtmlOutput()
           
static java.lang.String empty2nbsp(E4String s)
          Test a String, if it is null or blank (except blanks) then return a value of "&npsp;" or otherwise the String itself.
static java.lang.String empty2nbsp(java.lang.String s)
          Test a String, if it is null or blank (except blanks) then return a value of "&npsp;" or otherwise the String itself.
static E4Permission[] getApplication_Permissions()
          Get an array of permissions that are defined on application level.
static java.lang.String getApplication()
          Get the application identifier.
 E4ApplObj_Intf getApplObj()
          Get the application object.
protected  E4Client getClient()
          Get the current E4Client.
 IMG getClientImage()
          Get the client's logo.
protected  java.lang.Object getClientObject(E4Client client, java.lang.String id)
          Get an object, identified by a specified id, which is common and shared to all instances running the same current client.
protected  java.lang.Object getClientObject(java.lang.String id)
          Get an object for the current client, identified by a specified id, which is common and shared to all instances running the same current client.
protected  java.lang.Object getClientObject(java.lang.String id, boolean exception_not_found)
          Get an object for the current client, identified by a specified id, which is common and shared to all instances running the same current client.
protected  java.lang.String getClientValue(java.lang.String id)
          Get a value, associated with an client and identified by a key.
protected  boolean getClientValueBool(java.lang.String id)
          Get a value, associated with an client and identified by a key.
protected  java.util.Date getClientValueDate(java.lang.String id)
          Get a value, associated with an client and identified by a key.
protected  float getClientValueFloat(java.lang.String id)
          Get a value, associated with an client and identified by a key.
protected  int getClientValueInt(java.lang.String id)
          Get a value, associated with an client and identified by a key.
protected  long getClientValueLong(java.lang.String id)
          Get a value, associated with an client and identified by a key.
protected  java.lang.String getCookie(java.lang.String name)
          Read a value from a cookie by the specified cookie name.
protected  java.lang.String[] getCookieArr(java.lang.String name)
          Get an array of values in a cookie.
protected  boolean getCookieBool(java.lang.String name)
          Read a value from a cookie by the specified cookie name.
protected  java.util.Date getCookieDate(java.lang.String name)
          Read a value from a cookie by the specified cookie name.
protected  long getCookieLong(java.lang.String name)
          Read a value from a cookie by the specified cookie name.
protected  CountryCode getCountryCode()
          Get the country-code which depends on the client.
protected  E4CssFile[] getCSS()
          Get the default E4CSS (cascading style sheet) associated with this session.
protected  java.text.SimpleDateFormat getDateFormat()
          Get the user's date format.
protected  E4DBConnection_Intf getDbConnection()
          Get the default database connection.
protected  E4DecimalSign getDecimalSign()
          Get the decimal sign, as to be used for float representation.
 E4ClientLogo getE4ClientLogo()
          Get the client's logo.
static E4Permission[] getE4S_Permissions()
          Get an array of permissions that are defined on E4S system level.
static Language getLanguage_App()
          This is the application language which might be different from the system language (getLanguage_Sys()) where Strings (e.g. labels) in the application environment are written in the programm-code.
static Language getLanguage_Sys()
          This is the system language where Strings (e.g. labels) in the e4s environment are written in the programm-code.
 Language getLanguage()
          Get the user's language.
protected  E4CgiParams getParameters()
          Collect the HTML (CGI) Parameters.
protected  java.lang.String getPersistantParameter(java.lang.String paramname)
          Get a user dependent parameter from the user value settings.
protected  boolean getPersistantParameterBoolean(java.lang.String paramname)
          Get a user dependent parameter from the user value settings.
protected  java.util.Date getPersistantParameterDate(java.lang.String paramname)
          Get a user dependent parameter from the user value settings.
protected  int getPersistantParameterInt(java.lang.String paramname)
          Get a user dependent parameter from the user value settings.
protected  int[] getPersistantParameterIntArr(java.lang.String paramname)
          Get a user dependent parameter from the user value settings.
protected  long getPersistantParameterLong(java.lang.String paramname)
          Get a user dependent parameter from the user value settings.
protected  E4MethodPickup.PickParams getPickParams()
          Get parameters for a pickup.
protected  java.lang.String getRemoteAddr()
          Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.
 E4Permission getRequiredModulePermission()
          Get the module's permission.
 E4ServletImplementation_Intf getServlet()
          Get the servlet associated and currently running this module.
protected  HttpSession getSession()
          Get the servlet server's session
protected  java.lang.String getSessionId()
          Get the servlet server's session identification
protected  boolean getSessionObject_Boolean(java.lang.String obj_id)
          Get a session object as boolean for the current user session.
protected  long getSessionObject_Long(java.lang.String obj_id)
          Get a session object as long for the current user session.
protected  java.lang.String getSessionObject_String(java.lang.String obj_id)
          Get a session object as String for the current user session.
protected  java.lang.Object getSessionObject(java.lang.String obj_id)
          Get a session object for the current user session.
protected  java.lang.Object getSessionObject(java.lang.String obj_id, boolean except_not_avail)
          Get a session object for the current user session but throw an exception when not available.
protected  java.util.Hashtable getSessionObjects()
          Get a Hashtable containing all session objects.
protected  java.text.SimpleDateFormat getTimeFormat()
          Get the user's time format.
protected  TimeZone getTimeZone()
          Get the user's time zone.
 java.lang.String getUrl()
          Get the URL of the servlet itself.
protected  java.lang.String getUserEmail()
          Find a user's email address associated by the user.
protected  java.lang.String getUserValue(E4InputFieldName_Intf id)
          Get a value, associated with the current running user and identified by a key.
protected  java.lang.String getUserValue(java.lang.String id)
          Get a value, associated with the current running user and identified by a key.
 java.lang.String[] getUserValueArr(java.lang.String id)
          Get an array of user values.
protected  boolean getUserValueBool(E4InputFieldName_Intf id)
          Get a value, associated with the current running user and identified by a key.
protected  boolean getUserValueBool(java.lang.String id)
          Get a value, associated with the current running user and identified by a key.
protected  java.util.Date getUserValueDate(E4InputFieldName_Intf id)
          Get a value, associated with the current running user and identified by a key.
protected  java.util.Date getUserValueDate(java.lang.String id)
          Get a value, associated with the current running user and identified by a key.
protected  int getUserValueInt(E4InputFieldName_Intf id)
          Get a value, associated with the current running user and identified by a key.
protected  int getUserValueInt(java.lang.String id)
          Get a value, associated with the current running user and identified by a key.
protected  long getUserValueLong(E4InputFieldName_Intf id)
          Get a value, associated with the current running user and identified by a key.
protected  long getUserValueLong(java.lang.String id)
          Get a value, associated with the current running user and identified by a key.
static boolean isok(java.lang.String s)
          Test, if this String is not null and if it contains some value, except blanks.
protected  boolean isPersistant()
          Determine, weather this module was declared persistant or not
protected  boolean isRunningWindow()
          Check, if the current context is running within a window.
protected  boolean isTimeout(HTML html)
          Check, if there is a timeout (application object is not available), and if so, add a BODY tag to the HTML element containing an event handler redirecting to e4s.application.appmodule.E4ModuleLogin#sessionTimeout.
static java.lang.String ok(java.lang.String s)
          Change null to empty string.
protected  void openHtmlOutput()
           
protected  void removeApplicationObject()
          Remove the application object.
protected  void removeClientObject(E4ClientObject_Intf obj)
           
protected  void removeClientObject(E4Client client, java.lang.String id)
          Remove an object for the specified client, identified by a specified id, which is common and shared to all instances running the same current client. be careful, as removing the object might cause other instances to fail.
protected  void removeClientObject(java.lang.String id)
          Remove an object for the current client, identified by a specified id, which is common and shared to all instances running the same current client. be careful, as removing the object might cause other instances to fail.
protected  void removeClientValue(java.lang.String id)
          Remove a value, associated with an client and identified by a key.
protected  void removeSessionObject(E4SessionObject_Intf obj)
           
protected  void removeSessionObject(java.lang.String obj_id)
          Remove a session object for the current user session.
protected  void removeUserValue(E4InputFieldName_Intf id)
          Remove a value, associated with the current running user and identified by a key.
protected  void removeUserValue(java.lang.String id)
          Remove a value, associated with the current running user and identified by a key.
protected  void resetClientLogo()
           
 void setAjaxTrace(boolean mode)
          This function can be used to force ajax output beeing written into a html file which is under the directory E4Client.getRootPathAbsolute() /tmp/ajaxtrace.
static void setApplication(java.lang.String application)
           
protected  void setApplicationObject(E4ApplObj_Intf applobj)
          Set the application object.
protected  void setClientObject(E4ClientObject_Intf obj)
          Get an object, identified by an internal id, which is common and shared to all instances running the same current client.
protected  void setClientObject(E4Client client, java.lang.String id, java.lang.Object obj)
          Set an object for the specified client, identified by a specified id, which is common and shared to all instances running the same current client.
protected  void setClientObject(java.lang.String id, java.lang.Object obj)
          Set an object for the current client, identified by a specified id, which is common and shared to all instances running the same current client.
protected  boolean setClientValue(java.lang.String id, boolean val)
          Set a value, associated with an client and identified by a key.
protected  boolean setClientValue(java.lang.String id, java.util.Date val)
          Set a value, associated with an client and identified by a key.
protected  boolean setClientValue(java.lang.String id, E4String val)
          Set a value, associated with an client and identified by a key.
protected  boolean setClientValue(java.lang.String id, float val)
          Set a value, associated with an client and identified by a key.
protected  boolean setClientValue(java.lang.String id, int val)
          Set a value, associated with an client and identified by a key.
protected  boolean setClientValue(java.lang.String id, long val)
          Set a value, associated with an client and identified by a key.
protected  boolean setClientValue(java.lang.String id, java.lang.String val)
          Set a value, associated with an client and identified by a key.
protected  void setCookie(java.lang.String name, boolean val)
          Store a value in a cookie.
protected  void setCookie(java.lang.String name, java.util.Date val)
          Store a value in a cookie.
protected  void setCookie(java.lang.String name, E4Long val)
          Store a value in a cookie.
protected  void setCookie(java.lang.String name, E4String val)
          Store a value in a cookie.
protected  void setCookie(java.lang.String name, int val)
          Store a value in a cookie.
protected  void setCookie(java.lang.String name, long val)
          Store a value in a cookie.
protected  void setCookie(java.lang.String name, java.lang.String val)
          Store a value in a cookie.
protected  void setCookie(java.lang.String name, java.lang.String[] val)
          Store an array of values in a cookie.
protected  void setPersistantParameter(java.lang.String paramname, boolean paramvalue)
          Save a user dependent parameter in the user value settings.
protected  void setPersistantParameter(java.lang.String paramname, java.util.Date paramvalue)
          Save a user dependent parameter in the user value settings.
protected  void setPersistantParameter(java.lang.String paramname, int paramvalue)
          Save a user dependent parameter in the user value settings.
protected  void setPersistantParameter(java.lang.String paramname, int[] paramvalue)
          Save a user dependent parameter in the user value settings.
protected  void setPersistantParameter(java.lang.String paramname, long paramvalue)
          Save a user dependent parameter in the user value settings.
protected  void setPersistantParameter(java.lang.String paramname, java.lang.String paramvalue)
          Save a user dependent parameter in the user value settings.
 void setServlet(E4ServletImplementation_Intf servlet)
          Internal use of the e4s only, not recommended to be used in applications.
protected  void setSessionObject(E4SessionObject_Intf obj)
          Set a session object for the current user session.
protected  void setSessionObject(java.lang.String obj_id, boolean val)
          Set a session object for the current user session.
protected  void setSessionObject(java.lang.String obj_id, long val)
          Set a session object for the current user session.
protected  void setSessionObject(java.lang.String obj_id, java.lang.Object obj)
          Set a session object for the current user session.
protected  void setUserValue(E4InputFieldName_Intf id, boolean val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(E4InputFieldName_Intf id, java.util.Date val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(E4InputFieldName_Intf id, E4Long val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(E4InputFieldName_Intf id, E4String val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(E4InputFieldName_Intf id, int val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(E4InputFieldName_Intf id, long val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(E4InputFieldName_Intf id, java.lang.String val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(java.lang.String id, boolean val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(java.lang.String id, java.util.Date val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(java.lang.String id, E4Long val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(java.lang.String id, E4String val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(java.lang.String id, int val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(java.lang.String id, long val)
          Set a value, associated with the current running user and identified by a key.
protected  void setUserValue(java.lang.String id, java.lang.String val)
          Set a value, associated with the current running user and identified by a key.
 void setUserValue(java.lang.String id, java.lang.String[] val)
          Set a value (array), associated with a user and identified by a key.
protected  void SystemError(java.lang.Throwable t)
           
protected  void write(E4HtmlElement element)
           
protected  void write(int n)
           
protected  void write(long n)
           
protected  void write(java.lang.String s)
           
protected  void write(java.lang.StringBuffer s)
           
protected  void writeln()
           
protected  void writeln(int n)
           
protected  void writeln(long n)
           
protected  void writeln(java.lang.String s)
           
 
Methods inherited from class e4s.html.E4HtmlObject
E4ID, E4ID, set_e4sID
 
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, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, 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
 

Constructor Detail

E4ModuleImplementation

public E4ModuleImplementation(E4Permission permission)
This constructor handles the required permission to the base class of your application module. Unless there is a user logged in, and this user does have the required permission, the module will not be started (an error message will occure instead). In general, an application module which is inheritaed from this E4ModuleImplementation object must be declared: E4MethodRegistry.declareClass(Class).

Parameters:
permission - a permission required to run any of the functions declared within your module
See Also:
#canDo(e4s.db.systabledef.E4Permission), getRequiredModulePermission(), #getPermission

E4ModuleImplementation

public E4ModuleImplementation(boolean persistant,
                              E4Permission permission)
This constructor handles the required permission to the base class of your application module. Unless there is a user logged in, and this user does have the required permission, the module will not be started (an error message will occure instead). The whole module can be session persistant, this means that all member variables as the whole module will be stored in a session object until the session terminates (by logout or by timeout). Be careful, as session persistance will be done on user level and can become very memory consuming. In general, an application module which is inheritaed from this E4ModuleImplementation object must be declared: E4MethodRegistry.declareClass(Class).

Parameters:
persistant - a value of true indicates to preserve this module for later usage, making your local variables to be preserved
permission - a permission required to run any of the functions declared within your module
See Also:
isPersistant(), #canDo(e4s.db.systabledef.E4Permission), #getPermission(), getRequiredModulePermission()

E4ModuleImplementation

public E4ModuleImplementation(boolean persistant)
The whole module can be session persistant, this means that all member variables as the whole module will be stored in a session object until the session terminates (by logout or by timeout). Be careful, as session persistance will be done on user level and can become very memory consuming. In general, an application module which is inheritaed from this E4ModuleImplementation object must be declared: E4MethodRegistry.declareClass(Class).

Parameters:
persistant - a value of true indicates to preserve this module for later usage, making your local variables to be preserved
See Also:
isPersistant()

E4ModuleImplementation

public E4ModuleImplementation()
The default constructor, no permission check and no persistance.

Method Detail

isPersistant

protected boolean isPersistant()
Determine, weather this module was declared persistant or not

Returns:
true, if persistant

getServlet

public E4ServletImplementation_Intf getServlet()
Get the servlet associated and currently running this module. The servlet is a parameter, when modules becom instanciated. Along with the servlet, all important functions are handled that refer almost to the Web-Application server environment or platform dependent implementations.

See Also:
E4ServletImplementation_Servlet, E4ServletImplementation_Symbol, E4ServletImplementation_Applet

setServlet

public void setServlet(E4ServletImplementation_Intf servlet)
Internal use of the e4s only, not recommended to be used in applications.


openHtmlOutput

protected void openHtmlOutput()

closeHtmlOutput

protected java.lang.String closeHtmlOutput()

writeln

protected void writeln(java.lang.String s)

writeln

protected void writeln(long n)

writeln

protected void writeln(int n)

writeln

protected void writeln()

write

protected void write(java.lang.String s)

write

protected void write(java.lang.StringBuffer s)

write

protected void write(long n)

write

protected void write(int n)

write

protected void write(E4HtmlElement element)

SystemError

protected void SystemError(java.lang.Throwable t)

getParameters

protected E4CgiParams getParameters()
Collect the HTML (CGI) Parameters.

Returns:
an object containing all the CGI parameters

getDateFormat

protected java.text.SimpleDateFormat getDateFormat()
Get the user's date format.

Returns:
the date format as defined in the T_E4S_COMPANY_USER_Sel database table (e.g. "dd.MM.yyyy").
See Also:
getTimeFormat(), getTimeZone(), E4ApplObj_Intf.getDateFormat()

getTimeZone

protected TimeZone getTimeZone()
Get the user's time zone.

Returns:
the time zone for the user as defined in the T_E4S_COMPANY_USER_Sel database table.
See Also:
getTimeFormat(), getDateFormat(), E4ApplObj_Intf.getTimeZone()

getTimeFormat

protected java.text.SimpleDateFormat getTimeFormat()
Get the user's time format.

Returns:
the time format as defined in the T_E4S_COMPANY_USER_Sel database table (e.g. "HH:mm:ss").
See Also:
getDateFormat(), getTimeZone(), E4ApplObj_Intf.getTimeFormat()

getSession

protected HttpSession getSession()
Get the servlet server's session


getSessionId

protected java.lang.String getSessionId()
Get the servlet server's session identification


getSessionObject

protected java.lang.Object getSessionObject(java.lang.String obj_id)
Get a session object for the current user session.

Parameters:
obj_id - identifyer for the object
Returns:
null if not found, or the object associated with this id.
See Also:
removeSessionObject( String ), setSessionObject( String, Object ), getSessionObjects(), setSessionObject( String, boolean ), setSessionObject( String, long ), getSessionObject_String( String ), getSessionObject_Long( String ), getSessionObject_Boolean( String )

getSessionObject

protected java.lang.Object getSessionObject(java.lang.String obj_id,
                                            boolean except_not_avail)
                                     throws E4ObjectNotAvailableException
Get a session object for the current user session but throw an exception when not available.

Parameters:
obj_id - identifyer for the object
except_not_avail - if true and the object is not found an exception is thrown
Returns:
null if not found, or the object associated with this id.
Throws:
E4ObjectNotAvailableException
See Also:
removeSessionObject( String ), setSessionObject( String, Object ), getSessionObjects(), setSessionObject( String, boolean ), setSessionObject( String, long ), getSessionObject_String( String ), getSessionObject_Long( String ), getSessionObject_Boolean( String )

getSessionObject_String

protected java.lang.String getSessionObject_String(java.lang.String obj_id)
Get a session object as String for the current user session.

Parameters:
obj_id - identifyer for the object
Returns:
null if not found, or the String associated with this id.
See Also:
removeSessionObject( String ), setSessionObject( String, Object ), getSessionObjects()

getSessionObject_Long

protected long getSessionObject_Long(java.lang.String obj_id)
Get a session object as long for the current user session.

Parameters:
obj_id - identifyer for the object
Returns:
null if not found, or the long value associated with this id.
See Also:
removeSessionObject( String ), setSessionObject( String, long ), getSessionObjects()

getSessionObject_Boolean

protected boolean getSessionObject_Boolean(java.lang.String obj_id)
Get a session object as boolean for the current user session.

Parameters:
obj_id - identifyer for the object
Returns:
null if not found, or the boolean value associated with this id.
See Also:
removeSessionObject( String ), setSessionObject( String, boolean ), getSessionObjects()

setSessionObject

protected void setSessionObject(E4SessionObject_Intf obj)
Set a session object for the current user session.

Parameters:
obj_id - identifyer for the object
obj - the object to be stored
See Also:
removeSessionObject( String ), getSessionObject( String ), getSessionObjects(), setSessionObject( String, boolean ), setSessionObject( String, long ), getSessionObject_String( String ), getSessionObject_Long( String ), getSessionObject_Boolean( String )

setSessionObject

protected void setSessionObject(java.lang.String obj_id,
                                java.lang.Object obj)
Set a session object for the current user session.

Parameters:
obj_id - identifyer for the object
obj - the object to be stored
See Also:
removeSessionObject( String ), getSessionObject( String ), getSessionObjects(), setSessionObject( String, boolean ), setSessionObject( String, long ), getSessionObject_String( String ), getSessionObject_Long( String ), getSessionObject_Boolean( String )

setSessionObject

protected void setSessionObject(java.lang.String obj_id,
                                long val)
Set a session object for the current user session. Stores the long value internal as Long.

Parameters:
obj_id - identifyer for the object
val - the value to be stored
See Also:
getSessionObject_Long( String ), removeSessionObject( String ), getSessionObjects(), setSessionObject( String, boolean ), setSessionObject( String, Object )

setSessionObject

protected void setSessionObject(java.lang.String obj_id,
                                boolean val)
Set a session object for the current user session. Stores the boolean value internal as Boolean.

Parameters:
obj_id - identifyer for the object
val - the value to be stored
See Also:
getSessionObject_Boolean( String ), removeSessionObject( String ), getSessionObjects(), setSessionObject( String, boolean ), setSessionObject( String, Object )

removeSessionObject

protected void removeSessionObject(java.lang.String obj_id)
Remove a session object for the current user session.

Parameters:
obj_id - identifyer for the object
See Also:
getSessionObject( String ), setSessionObject( String, Object ), getSessionObjects(), setSessionObject( String, boolean ), setSessionObject( String, long ), getSessionObject_String( String ), getSessionObject_Long( String ), getSessionObject_Boolean( String )

removeSessionObject

protected void removeSessionObject(E4SessionObject_Intf obj)

getSessionObjects

protected java.util.Hashtable getSessionObjects()
Get a Hashtable containing all session objects.

Returns:
null if no Hashtable is defined, or a Hashtable containing the objects.
See Also:
removeSessionObject( String ), setSessionObject( String, Object ), getSessionObject( String ), setSessionObject( String, boolean ), setSessionObject( String, long ), getSessionObject_String( String ), getSessionObject_Long( String ), getSessionObject_Boolean( String )

setPersistantParameter

protected void setPersistantParameter(java.lang.String paramname,
                                      java.lang.String paramvalue)
Save a user dependent parameter in the user value settings.

Parameters:
paramname - name of the parameter
paramvalue - value for this parameter

setPersistantParameter

protected void setPersistantParameter(java.lang.String paramname,
                                      int paramvalue)
Save a user dependent parameter in the user value settings.

Parameters:
paramname - name of the parameter
paramvalue - value for this parameter

setPersistantParameter

protected void setPersistantParameter(java.lang.String paramname,
                                      int[] paramvalue)
Save a user dependent parameter in the user value settings.

Parameters:
paramname - name of the parameter
paramvalue - values for this parameter

setPersistantParameter

protected void setPersistantParameter(java.lang.String paramname,
                                      long paramvalue)
Save a user dependent parameter in the user value settings.

Parameters:
paramname - name of the parameter
paramvalue - value for this parameter

setPersistantParameter

protected void setPersistantParameter(java.lang.String paramname,
                                      boolean paramvalue)
Save a user dependent parameter in the user value settings.

Parameters:
paramname - name of the parameter
paramvalue - value for this parameter

setPersistantParameter

protected void setPersistantParameter(java.lang.String paramname,
                                      java.util.Date paramvalue)
Save a user dependent parameter in the user value settings.

Parameters:
paramname - name of the parameter
paramvalue - value for this parameter

getPersistantParameter

protected java.lang.String getPersistantParameter(java.lang.String paramname)
Get a user dependent parameter from the user value settings.

Parameters:
paramname - name of the parameter
Returns:
value of the parameter

getPersistantParameterInt

protected int getPersistantParameterInt(java.lang.String paramname)
Get a user dependent parameter from the user value settings. For integer values only.

Parameters:
paramname - name of the parameter
Returns:
value of the parameter

getPersistantParameterIntArr

protected int[] getPersistantParameterIntArr(java.lang.String paramname)
Get a user dependent parameter from the user value settings. For integer array value only.

Parameters:
paramname - name of the parameter
Returns:
value of the parameters

getPersistantParameterLong

protected long getPersistantParameterLong(java.lang.String paramname)
Get a user dependent parameter from the user value settings. For integer values only.

Parameters:
paramname - name of the parameter
Returns:
value of the parameter

getPersistantParameterBoolean

protected boolean getPersistantParameterBoolean(java.lang.String paramname)
Get a user dependent parameter from the user value settings. For boolean values only.

Parameters:
paramname - name of the parameter
Returns:
value of the parameter

getPersistantParameterDate

protected java.util.Date getPersistantParameterDate(java.lang.String paramname)
Get a user dependent parameter from the user value settings. For date values only.

Parameters:
paramname - name of the parameter
Returns:
value of the parameter

empty2nbsp

public static java.lang.String empty2nbsp(java.lang.String s)
Test a String, if it is null or blank (except blanks) then return a value of "&npsp;" or otherwise the String itself.

Parameters:
s - value to be tested
Returns:
NBSP or the String

empty2nbsp

public static java.lang.String empty2nbsp(E4String s)
Test a String, if it is null or blank (except blanks) then return a value of "&npsp;" or otherwise the String itself.

Parameters:
s - value to be tested
Returns:
NBSP or the String

isok

public static boolean isok(java.lang.String s)
Test, if this String is not null and if it contains some value, except blanks.

Parameters:
s - the String to be tested
Returns:
true if not null, and not s.trim().equals("")

ok

public static java.lang.String ok(java.lang.String s)
Change null to empty string.

Parameters:
s - the String to be converted
Returns:
"" if s is null, othervise the String itself

isRunningWindow

protected boolean isRunningWindow()
Check, if the current context is running within a window.

Returns:
true, if running in a window
See Also:
A.openInNewWindow(), E4ServletImplementation_Intf.isRunningWindow()

getPickParams

protected E4MethodPickup.PickParams getPickParams()
Get parameters for a pickup.

Returns:
the parameters
See Also:
E4MethodPickup, E4ServletImplementation_Intf.getPickParams()

getCSS

protected E4CssFile[] getCSS()
                      throws java.lang.Exception
Get the default E4CSS (cascading style sheet) associated with this session.

Returns:
the default E4CssFile object
Throws:
java.lang.Exception
See Also:
e4s.html.style.E4CssFile#getCSS(), e4s.servlet.E4ServletImplementation_Intf#getCSS()

getApplObj

public E4ApplObj_Intf getApplObj()
Get the application object. The application object holds information such as E4Client, E4User-Name, etc..

Returns:
the application object
See Also:
setApplicationObject(e4s.application.E4ApplObj_Intf), E4ServletImplementation_Intf.getApplObj(), E4ServletImplementation_Intf.setApplicationObject(E4ApplObj_Intf)

setApplicationObject

protected void setApplicationObject(E4ApplObj_Intf applobj)
Set the application object. The application object holds information such as E4Client, E4User-Name, etc..

Parameters:
applobj - the application object
See Also:
getApplObj(), removeApplicationObject(), E4ServletImplementation_Intf.getApplObj(), E4ServletImplementation_Intf.setApplicationObject(E4ApplObj_Intf)

removeApplicationObject

protected void removeApplicationObject()
Remove the application object.

See Also:
getApplObj(), setApplicationObject(e4s.application.E4ApplObj_Intf), E4ServletImplementation_Intf.removeApplicationObject()

setClientValue

protected boolean setClientValue(java.lang.String id,
                                 java.lang.String val)
                          throws E4DBException
Set a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of null will cause deletion
Returns:
true, if this is a new or changed value
Throws:
E4DBException
See Also:
getClientValue(String), setCookie(String,String), E4ServletImplementation_Intf.setClientValue(String,String)

setClientValue

protected boolean setClientValue(java.lang.String id,
                                 E4String val)
                          throws E4DBException
Set a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of null will cause deletion
Returns:
true, if this is a new or changed value
Throws:
E4DBException
See Also:
getClientValue(String), setCookie(String,String), E4ServletImplementation_Intf.setClientValue(String,e4s.util.E4String)

setClientValue

protected boolean setClientValue(java.lang.String id,
                                 long val)
                          throws E4DBException
Set a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Returns:
true, if this is a new or changed value
Throws:
E4DBException
See Also:
getClientValueLong(String), setCookie(String,String), E4ServletImplementation_Intf.setClientValue(String,long)

setClientValue

protected boolean setClientValue(java.lang.String id,
                                 float val)
                          throws E4DBException
Set a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Returns:
true, if this is a new or changed value
Throws:
E4DBException
See Also:
getClientValueLong(String), setCookie(String,String), E4ServletImplementation_Intf.setClientValue(String,long)

setClientValue

protected boolean setClientValue(java.lang.String id,
                                 int val)
                          throws E4DBException
Set a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Returns:
true, if this is a new or changed value
Throws:
E4DBException
See Also:
getClientValueInt(String), setCookie(String,String), E4ServletImplementation_Intf.setClientValue(String,int)

setClientValue

protected boolean setClientValue(java.lang.String id,
                                 boolean val)
                          throws E4DBException
Set a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of true is stored as "1" and a value of false as "0"
Returns:
true, if this is a new or changed value
Throws:
E4DBException
See Also:
getClientValue(String), setCookie(String,String), E4ServletImplementation_Intf.setClientValue(String,boolean)

setClientValue

protected boolean setClientValue(java.lang.String id,
                                 java.util.Date val)
                          throws E4DBException
Set a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, the value is stored in the format E4DBSelect.DB_DATEFORMAT
Returns:
true, if this is a new or changed value
Throws:
E4DBException
See Also:
getClientValueDate(String), setCookie(String,java.util.Date), E4ServletImplementation_Intf.setClientValue(String,java.util.Date)

getClientValue

protected java.lang.String getClientValue(java.lang.String id)
                                   throws E4DBException
Get a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, null if not existing
Throws:
E4DBException
See Also:
setClientValue(String,long), getClientValueLong(String), getClientValueInt(String), getClientValueBool(String), getClientValueDate(String), getCookie(String), E4ServletImplementation_Intf.getClientValue(String)

getClientValueLong

protected long getClientValueLong(java.lang.String id)
                           throws E4DBException
Get a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setClientValue(String,long), getClientValue(String), getClientValueInt(String), getClientValueBool(String), getClientValueDate(String), getCookieLong(String), E4ServletImplementation_Intf.getClientValueLong(String)

getClientValueFloat

protected float getClientValueFloat(java.lang.String id)
                             throws E4DBException
Get a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, Float.NaN if not existing
Throws:
E4DBException
See Also:
setClientValue(String,long), getClientValue(String), getClientValueInt(String), getClientValueBool(String), getClientValueDate(String), getCookieLong(String), E4ServletImplementation_Intf.getClientValueLong(String)

getClientValueInt

protected int getClientValueInt(java.lang.String id)
                         throws E4DBException
Get a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setClientValue(String,int), getClientValueLong(String), getClientValue(String), getClientValueBool(String), getClientValueDate(String), #getCookieInt(String), E4ServletImplementation_Intf.getClientValueInt(String)

getClientValueDate

protected java.util.Date getClientValueDate(java.lang.String id)
                                     throws E4DBException
Get a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setClientValue(String,java.util.Date), getClientValueLong(String), getClientValue(String), getClientValueBool(String), getClientValueInt(String), getCookieDate(String), E4ServletImplementation_Intf.getClientValueDate(String)

getClientValueBool

protected boolean getClientValueBool(java.lang.String id)
                              throws E4DBException
Get a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setClientValue(String,boolean), getClientValueLong(String), getClientValue(String), getClientValueDate(String), getClientValueInt(String), getCookieBool(String), E4ServletImplementation_Intf.getClientValueBool(String)

removeClientValue

protected void removeClientValue(java.lang.String id)
                          throws E4Exception
Remove a value, associated with an client and identified by a key. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
Throws:
E4Exception
See Also:
setClientValue(java.lang.String, java.lang.String), getClientValue(java.lang.String), e4s.servlet.E4ServletImplementation_Intf#removeClientValue()

getApplication

public static java.lang.String getApplication()
Get the application identifier.

Returns:
a String identifing the application.
See Also:
setApplication(String)

setApplication

public static void setApplication(java.lang.String application)

setClientObject

protected void setClientObject(E4Client client,
                               java.lang.String id,
                               java.lang.Object obj)
Set an object for the specified client, identified by a specified id, which is common and shared to all instances running the same current client. You can use this function also to update the associated object. A difference to the setClientValue(java.lang.String, java.lang.String) functionality is that client-objects are not database persistant.

Parameters:
id - a unique identifier associated with the object, not null
obj - the object to be stored, a value of null will be ignored
See Also:
setClientObject(String,Object), removeClientObject(String), getClientObject(String), E4Client

setClientObject

protected void setClientObject(java.lang.String id,
                               java.lang.Object obj)
Set an object for the current client, identified by a specified id, which is common and shared to all instances running the same current client. You can use this function also to update the associated object. A difference to the setClientValue(java.lang.String, java.lang.String) functionality is that client-objects are not database persistant.

Parameters:
id - a unique identifier associated with the object, not null
obj - the object to be stored, a value of null will be ignored
See Also:
setClientObject(e4s.application.E4Client,String,Object), removeClientObject(String), getClientObject(String), E4Client

getClientObject

protected java.lang.Object getClientObject(E4Client client,
                                           java.lang.String id)
                                    throws E4ObjectNotAvailableException
Get an object, identified by a specified id, which is common and shared to all instances running the same current client.

Parameters:
id - a unique identifier associated with the object
Returns:
null, if no object is available or the associated object
Throws:
E4ObjectNotAvailableException
See Also:
getClientObject(String), removeClientObject(String), setClientObject(String,Object), E4Client

setClientObject

protected void setClientObject(E4ClientObject_Intf obj)
Get an object, identified by an internal id, which is common and shared to all instances running the same current client.

Parameters:
obj - the object to be added
See Also:
getClientObject(String), removeClientObject(String), setClientObject(String,Object), E4Client

getClientObject

protected java.lang.Object getClientObject(java.lang.String id)
                                    throws E4ObjectNotAvailableException
Get an object for the current client, identified by a specified id, which is common and shared to all instances running the same current client.

Parameters:
id - a unique identifier associated with the object
Returns:
null, if no object is available or the associated object
Throws:
E4ObjectNotAvailableException
See Also:
getClientObject(e4s.application.E4Client,String), removeClientObject(String), setClientObject(String,Object), E4Client

getClientObject

protected java.lang.Object getClientObject(java.lang.String id,
                                           boolean exception_not_found)
                                    throws E4Exception
Get an object for the current client, identified by a specified id, which is common and shared to all instances running the same current client. Throw an exception if object is not found.

Parameters:
id - a unique identifier associated with the object
exception_not_found - true: throws an exception if the object is not found
Returns:
the associated object or null if not found and exception_not_found is set to false
Throws:
E4Exception
See Also:
getClientObject(e4s.application.E4Client,String), removeClientObject(String), setClientObject(String,Object), E4Client

removeClientObject

protected void removeClientObject(java.lang.String id)
Remove an object for the current client, identified by a specified id, which is common and shared to all instances running the same current client. be careful, as removing the object might cause other instances to fail.

Parameters:
id - a unique identifier associated with the object
See Also:
removeClientObject(e4s.application.E4Client,String), getClientObject(String), setClientObject(String,Object), E4Client

removeClientObject

protected void removeClientObject(E4ClientObject_Intf obj)

removeClientObject

protected void removeClientObject(E4Client client,
                                  java.lang.String id)
Remove an object for the specified client, identified by a specified id, which is common and shared to all instances running the same current client. be careful, as removing the object might cause other instances to fail.

Parameters:
id - a unique identifier associated with the object
See Also:
removeClientObject(String), getClientObject(String), setClientObject(String,Object), E4Client

getDecimalSign

protected E4DecimalSign getDecimalSign()
Get the decimal sign, as to be used for float representation.

Returns:
decimalsign (common used either ',' or '.')
See Also:
e4s.html.input.extended.FLOATFIELD#setDecimalSign(char), e4s.html.input.extended.E4Fieldset#setDecimalSign(char), E4ApplObj_Intf.getDecimalSign(), E4ServletImplementation_Intf.getDecimalSign()

getCountryCode

protected CountryCode getCountryCode()
Get the country-code which depends on the client. Note, that this is not the user's countrycode as it is necessary to have a E4Client dependent value, e.g. for a calendar.

Returns:
countrycode, using ISO abbreviations
See Also:
E4ServletImplementation_Intf.getCountryCode(), E4ApplObj_Intf.getCountryCode()

getClient

protected E4Client getClient()
Get the current E4Client. It is important, that an E4ApplObj_Intf has been created common after a user login.

Returns:
the current client
See Also:
E4ServletImplementation_Intf.getClient(), E4ApplObj_Intf.getClient()

canDo

protected boolean canDo(E4Permission_Intf permission)
Check, if the current logged in user (E4ApplObj_Intf) is allowed to use, read, modify or execute the functionality associated with the specified permission.

Returns:
true, if allowed
Throws:
E4PermissionException
See Also:
e4s.application.E4ApplObj_Intf#canDo(e4s.db.systabledef.E4Permission), E4ApplObjBasic.readPermissions(), E4Permission, canRun()

canDo

protected boolean canDo(E4Permission_Intf permission,
                        boolean throw_exception)
                 throws E4PermissionException
Check, if the current logged in user (E4ApplObj_Intf) is allowed to use, read, modify or execute the functionality associated with the specified permission.

Returns:
true, if allowed
Throws:
E4PermissionException
See Also:
e4s.application.E4ApplObj_Intf#canDo(e4s.db.systabledef.E4Permission), E4ApplObjBasic.readPermissions(), E4Permission, canRun()

getDbConnection

protected E4DBConnection_Intf getDbConnection()
                                       throws E4DBException
Get the default database connection.

Returns:
the default database connection.
Throws:
E4DBException
See Also:
E4DBConnectionDefault.getDefaultConnection()

setCookie

protected void setCookie(java.lang.String name,
                         java.lang.String val)
Store a value in a cookie. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
val - the value of the cookie
See Also:
setCookie(String,String[]), setCookie(String,boolean), setCookie(String,long), setCookie(String,int), setCookie(String,e4s.util.E4String), setCookie(String,e4s.util.E4Long), setCookie(String,java.util.Date), getCookie(String)

setCookie

protected void setCookie(java.lang.String name,
                         E4String val)
Store a value in a cookie. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
val - the value of the cookie
See Also:
setCookie(String,String[]), setCookie(String,boolean), setCookie(String,long), setCookie(String,int), setCookie(String,String), setCookie(String,e4s.util.E4Long), setCookie(String,java.util.Date), getCookie(String)

setCookie

protected void setCookie(java.lang.String name,
                         long val)
Store a value in a cookie. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
val - the value of the cookie
See Also:
setCookie(String,String[]), setCookie(String,String), setCookie(String,boolean), setCookie(String,int), setCookie(String,e4s.util.E4String), setCookie(String,e4s.util.E4Long), setCookie(String,java.util.Date), getCookieLong(String)

setCookie

protected void setCookie(java.lang.String name,
                         E4Long val)
Store a value in a cookie. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
val - the value of the cookie
See Also:
setCookie(String,String[]), setCookie(String,boolean), setCookie(String,long), setCookie(String,int), setCookie(String,e4s.util.E4String), setCookie(String,String), setCookie(String,java.util.Date), getCookieLong(String)

setCookie

protected void setCookie(java.lang.String name,
                         int val)
Store a value in a cookie. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
val - the value of the cookie
See Also:
setCookie(String,String[]), setCookie(String,long), setCookie(String,boolean), setCookie(String,String), setCookie(String,e4s.util.E4String), setCookie(String,e4s.util.E4Long), setCookie(String,java.util.Date), #getCookieInt(String)

setCookie

protected void setCookie(java.lang.String name,
                         boolean val)
Store a value in a cookie. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
val - the value of the cookie, a value of true will be stored as "1" and a value of false as "0"
See Also:
setCookie(String,String[]), setCookie(String,long), setCookie(String,int), setCookie(String,String), setCookie(String,e4s.util.E4String), setCookie(String,e4s.util.E4Long), setCookie(String,java.util.Date), getCookieBool(String)

setCookie

protected void setCookie(java.lang.String name,
                         java.util.Date val)
Store a value in a cookie. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
val - the value of the cookie, the value is stored in the format E4DBSelect.DB_DATEFORMAT
See Also:
setCookie(String,String[]), setCookie(String,boolean), setCookie(String,long), setCookie(String,int), setCookie(String,e4s.util.E4String), setCookie(String,e4s.util.E4Long), setCookie(String,String), getCookieDate(String)

setCookie

protected void setCookie(java.lang.String name,
                         java.lang.String[] val)
Store an array of values in a cookie. This function is useful, when several values needed to be stored in cookies but too many cookies shall be avoided. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings. The number of elements in the array is not important, but all values together shall not exceed a value of (255 - number of elements - some space for escape characters), so we recommend not to exceed 128 bytes. The values are concatenated by a seperator defined in E4ServletImplementation.COOKIE_SEPERATOR.

Parameters:
name - the name of the cookie
val - the values of the cookie
See Also:
setCookie(String,String), getCookieArr(String)

getCookie

protected java.lang.String getCookie(java.lang.String name)
Read a value from a cookie by the specified cookie name. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
Returns:
the value of the cookie, or null if the cookie does not exist
See Also:
setCookie(java.lang.String, java.lang.String), getCookieArr(String), getCookieLong(String), getCookieBool(String), getCookieDate(String)

getCookieArr

protected java.lang.String[] getCookieArr(java.lang.String name)
Get an array of values in a cookie. This function is useful, when several values needed to be stored in cookies but too many cookies shall be avoided.

Parameters:
name - the name of the cookie
See Also:
setCookie(String,String[])

getCookieLong

protected long getCookieLong(java.lang.String name)
Read a value from a cookie by the specified cookie name. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
Returns:
the value of the cookie, or -1 if the cookie does not exist
See Also:
setCookie(java.lang.String, java.lang.String), getCookieArr(String), getCookie(String), getCookieBool(String), getCookieDate(String)

getCookieBool

protected boolean getCookieBool(java.lang.String name)
Read a value from a cookie by the specified cookie name. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
Returns:
the value of the cookie, or false if the cookie does not exist
See Also:
setCookie(java.lang.String, java.lang.String), getCookieArr(String), getCookieLong(String), getCookie(String), getCookieDate(String)

getCookieDate

protected java.util.Date getCookieDate(java.lang.String name)
                                throws java.lang.Exception
Read a value from a cookie by the specified cookie name. A cookie is an object that is stored locally on the client's machine, and requires clients who enable cookies in their browser settings.

Parameters:
name - the name of the cookie
Returns:
the value of the cookie, or null if the cookie does not exist
Throws:
java.lang.Exception
See Also:
setCookie(java.lang.String, java.lang.String), getCookieArr(String), getCookieLong(String), getCookieBool(String), getCookie(String)

getRemoteAddr

protected java.lang.String getRemoteAddr()
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request. For HTTP servlets.

Returns:
a String containing the IP address of the client that sent the request
See Also:
E4ServletImplementation_Intf.getRemoteAddr()

getLanguage_Sys

public static Language getLanguage_Sys()
This is the system language where Strings (e.g. labels) in the e4s environment are written in the programm-code. This must be known for translation purpouses.

Returns:
E4Object.E4S_CORE_SYSTEM_LANGUAGE
See Also:
getLanguage(), getLanguage_App(), E4Label.TRANS_TYPE_SYS

getLanguage_App

public static Language getLanguage_App()
This is the application language which might be different from the system language (getLanguage_Sys()) where Strings (e.g. labels) in the application environment are written in the programm-code. This must be known for translation purpouses.

Returns:
e4s.E4Settings#getAppCoreLanguage()
See Also:
getLanguage_Sys(), getLanguage(), E4Settings.getAppCoreLanguage(), E4Label.TRANS_TYPE_APP

getLanguage

public Language getLanguage()
Get the user's language. This is the language currently running, depending on the user and login mode. The running language might be different from the definition languages used in the program code (getLanguage_App() or getLanguage_Sys()). Translations are beeing involved using E4Label.

Returns:
language, using ISO abbreviations
See Also:
getLanguage_Sys(), getLanguage_App(), E4Label, E4ServletImplementation_Intf.getLanguage(), E4ApplObj_Intf.getLanguage()

getApplication_Permissions

public static E4Permission[] getApplication_Permissions()
Get an array of permissions that are defined on application level.

Returns:
an array of permissions if defined.
See Also:
getE4S_Permissions(), E4PermissionRegistry

getE4S_Permissions

public static E4Permission[] getE4S_Permissions()
Get an array of permissions that are defined on E4S system level.

Returns:
an array of permissions.
See Also:
getApplication_Permissions(), E4PermissionRegistry, E4Permission.CONSTANTS()

getRequiredModulePermission

public E4Permission getRequiredModulePermission()
Get the module's permission.

Returns:
null if execution of functions is not restricted to any permission, or get the permission
See Also:
E4Permission

canRun

public boolean canRun()
               throws java.lang.Exception
If a module permission is defined (getRequiredModulePermission()), check this permission against the permissions assigned to the current user.

Returns:
true, if no module permission was defined or if the user is allowed to execute this defined permission, false otherwise.
Throws:
java.lang.Exception
See Also:
#canDo(e4s.db.systabledef.E4Permission), getRequiredModulePermission(), E4Permission

getUserValue

protected java.lang.String getUserValue(java.lang.String id)
                                 throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, null if not existing
Throws:
E4DBException
See Also:
setUserValue(String,long), getUserValueLong(String), getUserValueInt(String), getUserValueBool(String), getUserValueDate(String), E4ServletImplementation_Intf.getUserValue(String)

getUserValue

protected java.lang.String getUserValue(E4InputFieldName_Intf id)
                                 throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, null if not existing
Throws:
E4DBException
See Also:
setUserValue(String,long), getUserValueLong(String), getUserValueInt(String), getUserValueBool(String), getUserValueDate(String), E4ServletImplementation_Intf.getUserValue(String)

getUserValueLong

protected long getUserValueLong(java.lang.String id)
                         throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setUserValue(String,long), getUserValue(String), getUserValueInt(String), getUserValueBool(String), getUserValueDate(String), E4ServletImplementation_Intf.getUserValueLong(String)

getUserValueLong

protected long getUserValueLong(E4InputFieldName_Intf id)
                         throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setUserValue(String,long), getUserValue(String), getUserValueInt(String), getUserValueBool(String), getUserValueDate(String), E4ServletImplementation_Intf.getUserValueLong(String)

getUserValueInt

protected int getUserValueInt(java.lang.String id)
                       throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setUserValue(String,int), getUserValueLong(String), getUserValue(String), getUserValueBool(String), getUserValueDate(String), #getCookieInt(String), E4ServletImplementation_Intf.getUserValueInt(String)

getUserValueInt

protected int getUserValueInt(E4InputFieldName_Intf id)
                       throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setUserValue(String,int), getUserValueLong(String), getUserValue(String), getUserValueBool(String), getUserValueDate(String), #getCookieInt(String), E4ServletImplementation_Intf.getUserValueInt(String)

getUserValueDate

protected java.util.Date getUserValueDate(java.lang.String id)
                                   throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setUserValue(String,java.util.Date), getUserValueLong(String), getUserValue(String), getUserValueBool(String), getUserValueInt(String), getCookieDate(String), E4ServletImplementation_Intf.getUserValueDate(String)

getUserValueDate

protected java.util.Date getUserValueDate(E4InputFieldName_Intf id)
                                   throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setUserValue(String,java.util.Date), getUserValueLong(String), getUserValue(String), getUserValueBool(String), getUserValueInt(String), getCookieDate(String), E4ServletImplementation_Intf.getUserValueDate(String)

getUserValueBool

protected boolean getUserValueBool(java.lang.String id)
                            throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setUserValue(String,boolean), getUserValueLong(String), getUserValue(String), getUserValueDate(String), getUserValueInt(String), getCookieBool(String), E4ServletImplementation_Intf.getUserValueBool(String)

getUserValueBool

protected boolean getUserValueBool(E4InputFieldName_Intf id)
                            throws E4DBException
Get a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Returns:
the value, -1 if not existing
Throws:
E4DBException
See Also:
setUserValue(String,boolean), getUserValueLong(String), getUserValue(String), getUserValueDate(String), getUserValueInt(String), getCookieBool(String), E4ServletImplementation_Intf.getUserValueBool(String)

removeUserValue

protected void removeUserValue(java.lang.String id)
                        throws E4DBException
Remove a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Throws:
E4DBException
See Also:
setUserValue(java.lang.String, java.lang.String), getUserValue(java.lang.String), e4s.servlet.E4ServletImplementation_Intf#removeUserValue()

removeUserValue

protected void removeUserValue(E4InputFieldName_Intf id)
                        throws E4DBException
Remove a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
Throws:
E4DBException
See Also:
setUserValue(java.lang.String, java.lang.String), getUserValue(java.lang.String), e4s.servlet.E4ServletImplementation_Intf#removeUserValue()

setUserValue

protected void setUserValue(java.lang.String id,
                            java.lang.String val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of null will cause deletion
Throws:
E4DBException
See Also:
getUserValue(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,String)

setUserValue

protected void setUserValue(E4InputFieldName_Intf id,
                            java.lang.String val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of null will cause deletion
Throws:
E4DBException
See Also:
getUserValue(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,String)

setUserValue

protected void setUserValue(java.lang.String id,
                            E4String val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of null will cause deletion
Throws:
E4DBException
See Also:
getUserValue(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,e4s.util.E4String)

setUserValue

protected void setUserValue(E4InputFieldName_Intf id,
                            E4String val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of null will cause deletion
Throws:
E4DBException
See Also:
getUserValue(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,e4s.util.E4String)

setUserValue

protected void setUserValue(java.lang.String id,
                            long val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Throws:
E4DBException
See Also:
getUserValueLong(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,long)

setUserValue

protected void setUserValue(java.lang.String id,
                            E4Long val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Throws:
E4DBException
See Also:
getUserValueLong(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,long)

setUserValue

protected void setUserValue(E4InputFieldName_Intf id,
                            long val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Throws:
E4DBException
See Also:
getUserValueLong(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,long)

setUserValue

protected void setUserValue(java.lang.String id,
                            int val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Throws:
E4DBException
See Also:
getUserValueInt(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,int)

setUserValue

protected void setUserValue(E4InputFieldName_Intf id,
                            int val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Throws:
E4DBException
See Also:
getUserValueInt(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,int)

setUserValue

protected void setUserValue(E4InputFieldName_Intf id,
                            E4Long val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored
Throws:
E4DBException
See Also:
getUserValueInt(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,int)

setUserValue

protected void setUserValue(java.lang.String id,
                            boolean val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of true is stored as "1" and a value of false as "0"
Throws:
E4DBException
See Also:
getUserValue(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,boolean)

setUserValue

protected void setUserValue(E4InputFieldName_Intf id,
                            boolean val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of true is stored as "1" and a value of false as "0"
Throws:
E4DBException
See Also:
getUserValue(String), setCookie(String,String), E4ServletImplementation_Intf.setUserValue(String,boolean)

setUserValue

protected void setUserValue(java.lang.String id,
                            java.util.Date val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, the value is stored in the format E4DBSelect.DB_DATEFORMAT
Throws:
E4DBException
See Also:
getUserValueDate(String), setCookie(String,java.util.Date), E4ServletImplementation_Intf.setUserValue(String,java.util.Date)

setUserValue

protected void setUserValue(E4InputFieldName_Intf id,
                            java.util.Date val)
                     throws E4DBException
Set a value, associated with the current running user and identified by a key. A user value is a value, identified by an id, which is local for one user and database persistant in T_E4S_USER_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, the value is stored in the format E4DBSelect.DB_DATEFORMAT
Throws:
E4DBException
See Also:
getUserValueDate(String), setCookie(String,java.util.Date), E4ServletImplementation_Intf.setUserValue(String,java.util.Date)

getUserEmail

protected java.lang.String getUserEmail()
                                 throws E4DBException
Find a user's email address associated by the user. If no email is specified at the user level then takes the company's email.

Returns:
null if user or company not found or email is empty
Throws:
E4DBException
See Also:
e4s.db.systabledef.T_E4S_COMPANY_USER_Sel.get_EMAIL(), e4s.db.systabledef.T_E4S_COMPANY_Sel.get_EMAIL()

getUrl

public java.lang.String getUrl()
Get the URL of the servlet itself. Same as getServlet().getUrl(). Example: when your servlet zone in Tomcat is named "zoneX" and your servlet is mapped to "servletY" then this function would return "/zoneX/servletY".

Returns:
the servlet's URL
See Also:
E4ServletImplementation_Intf.getUrl()

getClientImage

public IMG getClientImage()
                   throws E4Exception
Get the client's logo.

Returns:
the logo as image (relative path)
Throws:
E4Exception
See Also:
getE4ClientLogo()

resetClientLogo

protected void resetClientLogo()

getE4ClientLogo

public E4ClientLogo getE4ClientLogo()
                             throws E4Exception
Get the client's logo.

Returns:
the logo (relative path)
Throws:
E4Exception
See Also:
getClientImage()

setUserValue

public void setUserValue(java.lang.String id,
                         java.lang.String[] val)
                  throws E4DBException
Set a value (array), associated with a user and identified by a key. The length of the array may not exceed 255 less the number of array elements characters. A client value is a value, identified by an id, which is shared between all sessions running the current E4Client. E4Client values are stored in a database table T_E4S_CLIENT_VAL_Sel.

Parameters:
id - the id for this value
val - the value to be stored, a value of null will cause deletion
Throws:
E4DBException
See Also:
getUserValueArr(String)

getUserValueArr

public java.lang.String[] getUserValueArr(java.lang.String id)
                                   throws E4DBException
Get an array of user values.

Parameters:
id - the identification
Returns:
null if no values found or the value array
Throws:
E4DBException
See Also:
setUserValue(String, String[])

isTimeout

protected boolean isTimeout(HTML html)
Check, if there is a timeout (application object is not available), and if so, add a BODY tag to the HTML element containing an event handler redirecting to e4s.application.appmodule.E4ModuleLogin#sessionTimeout.

Parameters:
html - a HTML context
Returns:
true if there is a timeout, false if not and application shall continue

setAjaxTrace

public void setAjaxTrace(boolean mode)
This function can be used to force ajax output beeing written into a html file which is under the directory E4Client.getRootPathAbsolute() /tmp/ajaxtrace. It will be enabled or disabled for the current session only.

Parameters:
mode - true to enable trace, false to disable trace
See Also:
e4s.application.sysmodule.ajax

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com