www.element4solution.com

e4s.servlet
Interface E4ServletImplementation_Intf

All Known Implementing Classes:
E4ServletImplementation_Applet, E4ServletImplementation_Servlet, E4ServletImplementation_Symbol

public interface E4ServletImplementation_Intf

Interface for the different implementations.

Since:
JDK 1.4
See Also:
E4ServletImplementation_Servlet

Field Summary
static java.lang.String PARAM_FUNCTION
          This is the main function identifier.
static java.lang.String PARAM_PRESERVED
          This is a HTML parameter to be used for pre-stored frame contents.
 
Method Summary
 void assignCSS(int level, CSS_Name name)
          Assign a E4CSS style to the current session.
 java.lang.String closeHtmlOutput()
           
 E4DocumentBase defaultE4DocumentBase()
           
 E4PersistantBase defaultPersistantBase()
           
 E4ApplObj_Intf getApplObj()
          Get the application object.
 E4Client getClient()
          Get the current E4Client.
 java.lang.Object getClientObject(E4Client client, java.lang.String id)
          Get an object for the specified client, identified by a specified id, which is common and shared to all instances running the same current client.
 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.
 java.lang.String getClientValue(java.lang.String id)
          Get a value, associated with an client and identified by a key.
 boolean getClientValueBool(java.lang.String id)
          Get a value, associated with an client and identified by a key.
 java.util.Date getClientValueDate(java.lang.String id)
          Get a value, associated with an client and identified by a key.
 float getClientValueFloat(java.lang.String id)
          Get a value, associated with an client and identified by a key.
 int getClientValueInt(java.lang.String id)
          Get a value, associated with an client and identified by a key.
 long getClientValueLong(java.lang.String id)
          Get a value, associated with an client and identified by a key.
 java.lang.String getCookie(java.lang.String name)
          Read a value from a cookie by the specified cookie name.
 java.lang.String[] getCookieArr(java.lang.String name)
          Get an array of values in a cookie.
 boolean getCookieBool(java.lang.String name)
          Read a value from a cookie by the specified cookie name.
 java.util.Date getCookieDate(java.lang.String name)
          Read a value from a cookie by the specified cookie name.
 long getCookieLong(java.lang.String name)
          Read a value from a cookie by the specified cookie name.
 CountryCode getCountryCode()
          Get the country-code which depends on the client.
 CSS_Name getCSS(int level)
          Get the E4CSS style for the current session.
 java.text.SimpleDateFormat getDateFormat()
          Get the date format currently associated with the logged in user.
 java.text.SimpleDateFormat getDateTimeFormat()
           
 E4DecimalSign getDecimalSign()
          Get the decimal sign, as to be used for float representation.
 java.lang.String getHttpAddr()
          Get the HTTP Address (server mode only)
 Language getLanguage()
          Get the user's language.
 E4CgiParams getParameters()
          Collect the HTML (CGI) Parameters.
 java.lang.String getPersistantParameter(java.lang.String paramname)
          Get a user dependent parameter from the user value settings.
 int[] getPersistantParameterIntArr(java.lang.String paramname)
          Get a user dependent parameter from the user value settings.
 E4MethodPickup.PickParams getPickParams()
          This is more an internal function, not recommended for usage within applications.
 E4StringBufferHtml getPreserved(java.lang.String preservedId)
          Get the buffer for the preserved element.
 java.lang.String getRemoteAddr()
          Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.
 HttpSession getSession()
          Get the servlet's session.
 java.lang.String getSessionId()
          Get the servlet's session identification.
 boolean getSessionObject_Boolean(java.lang.String obj_id)
          Get a session object as boolean for the current user session.
 long getSessionObject_Long(java.lang.String obj_id)
          Get a session object as long for the current user session.
 java.lang.String getSessionObject_String(java.lang.String obj_id)
          Get a session object as String for the current user session.
 java.lang.Object getSessionObject(java.lang.String obj_id)
          Get a session object for the current user session.
 java.lang.Object getSessionObject(java.lang.String obj_id, boolean exception_not_found)
          Get a session object for the current user session.
 java.util.Hashtable getSessionObjects()
          Get a Hashtable containing all session objects.
 java.text.SimpleDateFormat getTimeFormat()
          Get the date format currently associated with the logged in user.
 TimeZone getTimeZone()
           
 java.lang.String getUrl()
          Get the URL of the servlet itself.
 java.lang.String getUserValue(java.lang.String id)
          Get a value, associated with a userand identified by a key.
 boolean getUserValueBool(java.lang.String id)
          Get a value, associated with a userand identified by a key.
 java.util.Date getUserValueDate(java.lang.String id)
          Get a value, associated with a userand identified by a key.
 int getUserValueInt(java.lang.String id)
          Get a value, associated with a userand identified by a key.
 long getUserValueLong(java.lang.String id)
          Get a value, associated with a userand identified by a key.
 void invalidateSession(boolean immediatly)
          Invalidates the session, unbinds any objects related to this session.
 boolean invoceFunction()
           
 HTML invoceFunctionHTML(E4Method_Intf mref)
           
 HTML invoceFunctionHTML(E4Method_Intf mref, E4CgiParams params)
           
 boolean isRunningClient()
          Check, if the implementation of this interface is running in E4Client mode.
 boolean isRunningServer()
          Check, if the implementation of this interface is running in Server mode.
 boolean isRunningWindow()
          Check, if the current context is running within a window.
 void onExitTask()
          This function is called on exit of the current task.
 void openHtmlOutput()
           
 void rem(java.lang.String s)
           
 void removeApplicationObject()
          Remove the application object.
 void removeClientObject(E4ClientObject_Intf obj)
          Remove an object for the specified client, which is common and shared to all instances running the same current client.
 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.
 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.
 boolean removeClientValue(java.lang.String id)
          Remove a value, associated with an client and identified by a key.
 void removeSessionObject(E4SessionObject_Intf obj)
          Remove a session object for the current user session.
 void removeSessionObject(java.lang.String obj_id)
          Remove a session object for the current user session.
 void removeSessionObjects()
          Removes all session objects for the current session.
 void removeUserValue(java.lang.String id)
          Remove a value, associated with the current user and identified by a key.
 boolean sessionCanEditHints()
           
 void sessionCanEditHints(boolean mode)
           
 boolean sessionCanEditStyles()
           
 void sessionCanEditStyles(boolean mode)
           
 boolean sessionCanEditTranslations()
           
 void sessionCanEditTranslations(boolean mode)
           
 void setApplicationObject(E4ApplObj_Intf applobj)
          Set the application object.
 void setClientObject(E4ClientObject_Intf obj)
          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.
 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.
 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.
 boolean setClientValue(java.lang.String id, boolean val)
          Set a value, associated with an client and identified by a key.
 boolean setClientValue(java.lang.String id, java.util.Date val)
          Set a value, associated with an client and identified by a key.
 boolean setClientValue(java.lang.String id, E4String val)
          Set a value, associated with an client and identified by a key.
 boolean setClientValue(java.lang.String id, float val)
          Set a value, associated with an client and identified by a key.
 boolean setClientValue(java.lang.String id, int val)
          Set a value, associated with an client and identified by a key.
 boolean setClientValue(java.lang.String id, long val)
          Set a value, associated with an client and identified by a key.
 boolean setClientValue(java.lang.String id, java.lang.String val)
          Set a value, associated with an client and identified by a key.
 void setCookie(java.lang.String name, boolean val)
          Store a value in a cookie.
 void setCookie(java.lang.String name, java.util.Date val)
          Store a value in a cookie.
 void setCookie(java.lang.String name, E4Long val)
          Store a value in a cookie.
 void setCookie(java.lang.String name, E4String val)
          Store a value in a cookie.
 void setCookie(java.lang.String name, int val)
          Store a value in a cookie.
 void setCookie(java.lang.String name, long val)
          Store a value in a cookie.
 void setCookie(java.lang.String name, java.lang.String val)
          Store a value in a cookie.
 void setCookie(java.lang.String name, java.lang.String[] val)
          Store an array of values in a cookie.
 void setPersistantParameter(java.lang.String paramname, java.lang.String paramvalue)
          Save a user dependent parameter in the user value settings.
 void setSessionObject(E4SessionObject_Intf obj)
          Set a session object for the current user session.
 void setSessionObject(java.lang.String obj_id, boolean val)
          Set a session object for the current user session.
 void setSessionObject(java.lang.String obj_id, long val)
          Set a session object for the current user session.
 void setSessionObject(java.lang.String obj_id, java.lang.Object obj)
          Set a session object for the current user session.
 void setUserValue(java.lang.String id, boolean val)
          Set a value, associated with a userand identified by a key.
 void setUserValue(java.lang.String id, java.util.Date val)
          Set a value, associated with a userand identified by a key.
 void setUserValue(java.lang.String id, E4Long val)
          Set a value, associated with a userand identified by a key.
 void setUserValue(java.lang.String id, E4String val)
          Set a value, associated with a userand identified by a key.
 void setUserValue(java.lang.String id, int val)
          Set a value, associated with a userand identified by a key.
 void setUserValue(java.lang.String id, long val)
          Set a value, associated with a userand identified by a key.
 void setUserValue(java.lang.String id, java.lang.String val)
          Set a value, associated with a userand identified by a key.
 void SystemError(E4DBException dbe)
           
 void SystemError(int errortype, java.lang.Throwable t, java.lang.String txt)
           
 void SystemError(java.io.IOException ioe)
           
 void SystemError(java.lang.String errormsg)
           
 void SystemError(java.lang.Throwable t)
           
 void write(E4HtmlElement element)
          Execute the E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) functions for this element and append the HTML content generated to the current output buffer.
 void write(java.lang.String s)
           
 void writeln(java.lang.String s)
           
 void writePreserved(java.lang.String id, E4HtmlElement_Intf element)
          Store any (typically frame) content for later output by the function writePreservedOut().
 boolean writePreservedOut()
          Process (write out) any prestored output.
 

Field Detail

PARAM_FUNCTION

static final java.lang.String PARAM_FUNCTION
This is the main function identifier. Each function is represented by a public static E4Method object that contains an alias code (E4Method.getAlias(). When a function is called, this is done by referencing the E4Method object in the program first (e.g. by a A object), then the alias code is passed throught E4CgiParams to the servlet. The servlet looks in the alias table using the E4Method.findMethod(int) method and invoces the method using invoceFunction().

This constant defines the parameter name used in the E4CgiParams for the calling alias code.

See Also:
E4Method_Intf.getAlias(), e4s.html.E4Method#findAlias(int), Constant Field Values

PARAM_PRESERVED

static final java.lang.String PARAM_PRESERVED
This is a HTML parameter to be used for pre-stored frame contents.

See Also:
FRAMESET, FRAME, Constant Field Values
Method Detail

openHtmlOutput

void openHtmlOutput()

closeHtmlOutput

java.lang.String closeHtmlOutput()

writeln

void writeln(java.lang.String s)

write

void write(java.lang.String s)

write

void write(E4HtmlElement element)
           throws java.lang.Exception
Execute the E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) functions for this element and append the HTML content generated to the current output buffer.

Parameters:
element - the HTML element to be rendered
Throws:
java.lang.Exception
See Also:
E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf)

rem

void rem(java.lang.String s)

getUrl

java.lang.String getUrl()
Get the URL of the servlet itself. 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

getDateFormat

java.text.SimpleDateFormat getDateFormat()
Get the date format currently associated with the logged in user.

Returns:
the date format, e.g. new SimpleDateFormat("dd.MM.yyyy")
See Also:
getTimeFormat(), T_E4S_COMPANY_USER_Sel.CI_DATEFORMAT

getTimeFormat

java.text.SimpleDateFormat getTimeFormat()
Get the date format currently associated with the logged in user.

Returns:
the time format, e.g. new SimpleDateFormat("dd.MM.yyyy")
See Also:
getTimeFormat(), T_E4S_COMPANY_USER_Sel.CI_TIMEFORMAT

getDateTimeFormat

java.text.SimpleDateFormat getDateTimeFormat()

getTimeZone

TimeZone getTimeZone()

isRunningServer

boolean isRunningServer()
Check, if the implementation of this interface is running in Server mode. A server needs an Apache Tomcat or similar, URL's are passed to the server and the CGI interface is used.

Returns:
true, if running in Server environment, false if running in E4Client environment
See Also:
E4ServletImplementation_Servlet, isRunningClient()

isRunningClient

boolean isRunningClient()
Check, if the implementation of this interface is running in E4Client mode. A client covers the CGI implementation and URL handling with E4JavaScript functions, instead of a servlet a applet is included into a web page that handles all the interaction between the browser and the e4s.

Returns:
true, if running in E4Client environment, false if running in Server environment
See Also:
isRunningServer()

writePreserved

void writePreserved(java.lang.String id,
                    E4HtmlElement_Intf element)
Store any (typically frame) content for later output by the function writePreservedOut().

Parameters:
id - the value of the PARAM_PRESERVED parameter as generated by the FRAMESET.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function.
element - the element to convert into plain Html
See Also:
getPreserved( String ), writePreservedOut()

writePreservedOut

boolean writePreservedOut()
Process (write out) any prestored output. See FRAMESET and writePreserved(java.lang.String, e4s.html.E4HtmlElement_Intf). This function needs to be placed in doPost() or doGet() before any other actions take place.

Returns:
true, if there was a requested ID (by the PARAM_PRESERVED parameter. In this case, no further output or action is needed. false, no preserved requested ID available, normal proceeding recommended.
See Also:
writePreserved( String, E4HtmlElement_Intf ), getPreserved( String )

getPreserved

E4StringBufferHtml getPreserved(java.lang.String preservedId)
Get the buffer for the preserved element.

Returns:
the buffer associated with preservedId
See Also:
writePreservedOut(), writePreserved( String, E4HtmlElement_Intf ), e4s.E4Constants#PARAM_PRESERVED

invoceFunction

boolean invoceFunction()

invoceFunctionHTML

HTML invoceFunctionHTML(E4Method_Intf mref)

invoceFunctionHTML

HTML invoceFunctionHTML(E4Method_Intf mref,
                        E4CgiParams params)

getParameters

E4CgiParams getParameters()
                          throws java.lang.Exception
Collect the HTML (CGI) Parameters.

Returns:
an object containing all the CGI parameters
Throws:
java.lang.Exception

SystemError

void SystemError(java.lang.Throwable t)

SystemError

void SystemError(E4DBException dbe)

SystemError

void SystemError(java.io.IOException ioe)

SystemError

void SystemError(int errortype,
                 java.lang.Throwable t,
                 java.lang.String txt)

SystemError

void SystemError(java.lang.String errormsg)

defaultE4DocumentBase

E4DocumentBase defaultE4DocumentBase()

defaultPersistantBase

E4PersistantBase defaultPersistantBase()

getSessionId

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

Returns:
the session handler-id.
See Also:
invalidateSession(boolean), getSession()

getSession

HttpSession getSession()
Get the servlet's session.

Returns:
the session object.
See Also:
invalidateSession(boolean), getSessionId()

getSessionObject

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(), getSessionObject( String, boolean ), setSessionObject( String, boolean ), setSessionObject( String, long ), getSessionObject_String( String ), getSessionObject_Long( String ), getSessionObject_Boolean( String )

getSessionObject

java.lang.Object getSessionObject(java.lang.String obj_id,
                                  boolean exception_not_found)
                                  throws E4Exception
Get a session object for the current user session.

Parameters:
obj_id - identifyer for the object
exception_not_found - throw an exception if the object can't be found
Returns:
null if not found, or the object associated with this id.
Throws:
E4Exception
See Also:
getSessionObject( String ), removeSessionObject( String ), setSessionObject( String, Object ), getSessionObjects(), setSessionObject( String, boolean ), setSessionObject( String, long ), getSessionObject_String( String ), getSessionObject_Long( String ), getSessionObject_Boolean( String )

getSessionObject_String

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

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

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

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

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

Parameters:
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

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

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 )

getSessionObjects

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 )

removeSessionObject

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

void removeSessionObject(E4SessionObject_Intf obj)
Remove a session object for the current user session.

Parameters:
obj_id - identifyer for the object
See Also:
#getSessionObject( e4s.servlet.E4SessionObject_Intf ), setSessionObject( String, boolean )

setPersistantParameter

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
See Also:
getPersistantParameter(java.lang.String), #getSystemParameter

getPersistantParameter

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
See Also:
setPersistantParameter(java.lang.String, java.lang.String), #setSystemParameter, getPersistantParameterIntArr(java.lang.String)

getPersistantParameterIntArr

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
See Also:
getPersistantParameter(java.lang.String), getPersistantParameterIntArr(java.lang.String)

isRunningWindow

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

Returns:
true, if running in a window
See Also:
e4s.E4Constants#PARAM_ISWINDOW, A.openInNewWindow(), A.openInNewWindow(String)

getPickParams

E4MethodPickup.PickParams getPickParams()
This is more an internal function, not recommended for usage within applications. If this does not return not null, that indicates that there is a pickup in progress (user opened a window for selection), and the relevant values for this pickup are stored in this member.

Returns:
null: no pickup is in progress, else a pickup is in progress and the source parameters are stored in the returning object (e.g. from which field it was called).
See Also:
e4s.E4Constants#PARAM_ISPICKUP, E4MethodPickup

assignCSS

void assignCSS(int level,
               CSS_Name name)
               throws E4Exception
Assign a E4CSS style to the current session. Note that there might be several E4CSS definitions, each containing of STYLE definitions for different useres running in different sessions.

Parameters:
name - the name of the E4CSS to be associated with this session
Throws:
E4Exception
See Also:
E4CssFile, getCSS(int)

getCSS

CSS_Name getCSS(int level)
Get the E4CSS style for the current session.

Returns:
the name of the E4CSS, or if no E4CSS is defined return the default E4CSS name.
See Also:
E4CssFile, CSS_Name.DEFAULT(int), #assignCSS(int)

getApplObj

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(E4ApplObj_Intf), removeApplicationObject()

setApplicationObject

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()

removeApplicationObject

void removeApplicationObject()
Remove the application object.

See Also:
setApplicationObject(E4ApplObj_Intf), getApplObj()

sessionCanEditStyles

boolean sessionCanEditStyles()

sessionCanEditStyles

void sessionCanEditStyles(boolean mode)

sessionCanEditTranslations

boolean sessionCanEditTranslations()

sessionCanEditTranslations

void sessionCanEditTranslations(boolean mode)

sessionCanEditHints

boolean sessionCanEditHints()

sessionCanEditHints

void sessionCanEditHints(boolean mode)

setClientObject

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

setClientObject

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

getClientObject

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

setClientObject

void setClientObject(E4ClientObject_Intf obj)
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
See Also:
getClientObject(String), removeClientObject(e4s.servlet.E4ClientObject_Intf)

getClientObject

java.lang.Object getClientObject(E4Client client,
                                 java.lang.String id)
                                 throws E4ObjectNotAvailableException
Get an object for the specified 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(String), removeClientObject(String), setClientObject(String,Object), E4Client

removeClientObject

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

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:
client - a client identifier
id - a unique identifier associated with the object
See Also:
removeClientObject(String), getClientObject(String), setClientObject(String,Object), E4Client

removeClientObject

void removeClientObject(E4ClientObject_Intf obj)
Remove an object for the specified client, 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:
obj - the object to be removed
See Also:
setClientObject(e4s.servlet.E4ClientObject_Intf)

setClientValue

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:
#setClientValue(String), getClientValue(String), setCookie(String,String), setClientObject(String,Object)

setClientValue

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)

setClientValue

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)

setClientValue

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)

setClientValue

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)

setClientValue

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:
getClientValueBool(String), setCookie(String,String)

setClientValue

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)

getClientValue

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,String), getClientValueLong(String), getClientValueInt(String), getClientValueBool(String), getClientValueDate(String), getCookie(String)

getClientValueLong

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)

getClientValueFloat

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)

getClientValueInt

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)

getClientValueDate

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)

getClientValueBool

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)

removeClientValue

boolean removeClientValue(java.lang.String id)
                          throws E4DBException
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
Returns:
true if the value has been changed (so if it was truly removed)
Throws:
E4DBException
See Also:
setClientValue(java.lang.String, java.lang.String), getClientValue(java.lang.String)

getDecimalSign

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(e4s.application.E4DecimalSign), e4s.html.input.extended.E4Fieldset#setDecimalSign(e4s.application.E4DecimalSign), E4ApplObj_Intf.getDecimalSign()

getCountryCode

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:
E4ApplObj_Intf.getCountryCode()

getLanguage

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. Translations are beeing involved using E4Label.

Returns:
language-code, using ISO abbreviations
See Also:
E4ApplObj_Intf.getLanguage(), E4ModuleImplementation.getLanguage(), E4ModuleImplementation.getLanguage_Sys(), E4ModuleImplementation.getLanguage_App()

getClient

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:
E4ApplObj_Intf.getClient()

setCookie

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

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

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

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

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

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

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

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

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

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

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

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

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

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

setUserValue

void setUserValue(java.lang.String id,
                  java.lang.String val)
                  throws E4DBException
Set a value, associated with a userand 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
Throws:
E4DBException
See Also:
getUserValue(String), setCookie(String,String), setClientObject(String,Object)

setUserValue

void setUserValue(java.lang.String id,
                  E4String val)
                  throws E4DBException
Set a value, associated with a userand 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)

setUserValue

void setUserValue(java.lang.String id,
                  long val)
                  throws E4DBException
Set a value, associated with a userand 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)

setUserValue

void setUserValue(java.lang.String id,
                  E4Long val)
                  throws E4DBException
Set a value, associated with a userand 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)

setUserValue

void setUserValue(java.lang.String id,
                  int val)
                  throws E4DBException
Set a value, associated with a userand 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)

setUserValue

void setUserValue(java.lang.String id,
                  boolean val)
                  throws E4DBException
Set a value, associated with a userand 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:
getUserValueBool(String), setCookie(String,String)

setUserValue

void setUserValue(java.lang.String id,
                  java.util.Date val)
                  throws E4DBException
Set a value, associated with a userand 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)

getUserValue

java.lang.String getUserValue(java.lang.String id)
                              throws E4DBException
Get a value, associated with a userand 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,String), getUserValueLong(String), getUserValueInt(String), getUserValueBool(String), getUserValueDate(String), getCookie(String)

getUserValueLong

long getUserValueLong(java.lang.String id)
                      throws E4DBException
Get a value, associated with a userand 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), getCookieLong(String)

getUserValueInt

int getUserValueInt(java.lang.String id)
                    throws E4DBException
Get a value, associated with a userand 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)

getUserValueDate

java.util.Date getUserValueDate(java.lang.String id)
                                throws E4DBException
Get a value, associated with a userand 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)

getUserValueBool

boolean getUserValueBool(java.lang.String id)
                         throws E4DBException
Get a value, associated with a userand 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)

removeUserValue

void removeUserValue(java.lang.String id)
                     throws E4DBException
Remove a value, associated with the current 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)

invalidateSession

void invalidateSession(boolean immediatly)
Invalidates the session, unbinds any objects related to this session. In the servlet implementation, this performes a call to getSession().invalidate().

Parameters:
immediatly - true: immediatly terminates the session now, false: terminates the session an servlet exit
See Also:
getSession(), getSessionId()

onExitTask

void onExitTask()
This function is called on exit of the current task.


removeSessionObjects

void removeSessionObjects()
Removes all session objects for the current session.


getHttpAddr

java.lang.String getHttpAddr()
Get the HTTP Address (server mode only)

See Also:
E4ServletImplementation_Servlet.getHttpAddr(), e4s.E4Settings#getHttpAddr()

www.element4solution.com