adapforms.web
Class WebRuntime

java.lang.Object
  extended by adapforms.web.WebRuntime

public class WebRuntime
extends java.lang.Object

Main mediator for handling adaptive form web sessions, and manipulating shared settings.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Constructor Summary
WebRuntime()
           
 
Method Summary
static void cleanUpSessions()
          Clean up any outdated sessions, to prevent a memory leak.
static void endSession(WebSession session)
          End a given web session.
static java.lang.String getServletPath()
          Get the path of the AdapForms servlet/controller within the website context.
static WebSession getSession(FormInstance instance)
          Retrieve a web session that has already been created using startSession(FormInstance).
static WebSession getSession(GUID guid)
          Retrieve a web session that has already been created using startSession(FormInstance).
static void setServletPath(java.lang.String path)
          Set the AdapForms servlet path.
static void setUseDefaultCSS(boolean value)
          Specify if the built-in default CSS should be used or not.
static WebSession startSession(FormInstance instance)
          Start a new web session, given a FormInstance.
static boolean useDefaultCSS()
          Determine if the built-it default CSS will be used when rendering forms to the web client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebRuntime

public WebRuntime()
Method Detail

startSession

public static WebSession startSession(FormInstance instance)
Start a new web session, given a FormInstance. The new session is assigned a GUID and stored for later retrieval.

See Also:
getSession(GUID).

cleanUpSessions

public static void cleanUpSessions()
Clean up any outdated sessions, to prevent a memory leak. This is done periodically by the framework itself.


endSession

public static void endSession(WebSession session)
End a given web session. This will end the session and remove any references to it inside the web runtime system.


getSession

public static WebSession getSession(GUID guid)
Retrieve a web session that has already been created using startSession(FormInstance).
If the session was not found, null is returned.


getSession

public static WebSession getSession(FormInstance instance)
Retrieve a web session that has already been created using startSession(FormInstance).
If the session was not found, null is returned.


getServletPath

public static java.lang.String getServletPath()
Get the path of the AdapForms servlet/controller within the website context. Has leading slash, but no trailing slash.


setServletPath

public static void setServletPath(java.lang.String path)
Set the AdapForms servlet path. Slashes will be applied accordingly, but the path is assumed to be absolute according to the base of the website context (not including http://, hostname etc).

See Also:
for more info.

useDefaultCSS

public static boolean useDefaultCSS()
Determine if the built-it default CSS will be used when rendering forms to the web client.


setUseDefaultCSS

public static void setUseDefaultCSS(boolean value)
Specify if the built-in default CSS should be used or not.

See Also:
useDefaultCSS()