jacquard 1.12.0 by The Web Engineering Factory and Toolworks

uk.co.weft.configurator
Class FirstTime

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byuk.co.weft.maybeupload.MaybeUploadServlet
              extended byuk.co.weft.htform.Servlet
                  extended byuk.co.weft.htform.WithExceptionHandlerServlet
                      extended byuk.co.weft.htform.Page
                          extended byuk.co.weft.htform.Form
                              extended byuk.co.weft.htform.AuthenticatedForm
                                  extended byuk.co.weft.configurator.FirstTime
All Implemented Interfaces:
DocumentGenerator, ResourceConsumer, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

Deprecated. this mechanism for initialising applications is no longer maintained

public class FirstTime
extends AuthenticatedForm

Part of the 'virginity' mechanism; a servlet to be called just once, when a newly installed web-app is accessed for the first time. This basic version sets up the database; use it as a model to extend if you need to do other stuff. Note that SQL scripts processed by this class must use Postgres-style -- comment syntax.

See Also:
Serialized Form

Nested Class Summary
protected  class FirstTime.InitialisationWidget
          Deprecated. a special action widget which knows about initialisation
 
Field Summary
static java.lang.String AFTERWARDSMAGICTOKEN
          Deprecated. A token whose value in the service context should be where we go after completing first time initialisation.
static java.lang.String INITREPORTMAGICTOKEN
          Deprecated. A token whose value in the service context (if any) is a textual report of what happened when the database was initialised
protected  java.lang.String sqlSource
          Deprecated. where I find my SQL source
static java.lang.String SQLSOURCEMAGICTOKEN
          Deprecated. A token whose value in the config should be the file path, relative to the webapp root, of the SQL initialisation file
 
Fields inherited from class uk.co.weft.htform.AuthenticatedForm
allowLogout, ALLOWLOGOUTCONFIGTOKEN, AUTHENTICATEDUSERMAGICTOKEN, authenticator, AUTHENTICATORCLASSMAGICTOKEN, authentificationWidgets, logoutPrompt, LOGOUTPROMPTCONFIGTOKEN, logoutWidget, onLogoutRedirect
 
Fields inherited from class uk.co.weft.htform.Form
action, actionExecutedToken, ACTIONEXECUTEDTOKEN, auxiliaries, contextMenuMagicToken, CONTEXTMENUMAGICTOKEN, cssHelp, CSSHELP, cssPrompt, CSSPROMPT, defaultScriptBase, mandatoryPrompt, MIN_WIDGETS, onloadFunctionToken, ONLOADFUNCTIONTOKEN, optionalPrompt, selectedWidgetSetMagicToken, SELECTEDWIDGETSETMAGICTOKEN, showHeadline, submitMethod, SUBMITMETHODCONFIGTOKEN, SUBMITMETHODGET, SUBMITMETHODPOST, validationWhingeToken, VALIDATIONWHINGETOKEN, whingeHeader, widgets, widgetSets
 
Fields inherited from class uk.co.weft.htform.Page
DOCTYPECONFIGTOKEN, dynamicFootInclude, dynamicHeadInclude, footInclude, footIncludeURL, headInclude, headIncludeURL, imageUrlBase, layout, printStylesheet, PRINTSTYLESHEETCONFIGTOKEN, stylesheet, STYLESHEETCONFIGTOKEN, title, titleMagicToken, TITLEMAGICTOKEN
 
Fields inherited from class uk.co.weft.htform.WithExceptionHandlerServlet
EXCEPTIONHANDLERCLASSCONFIGTOKEN
 
Fields inherited from class uk.co.weft.htform.Servlet
calendar, conf, contentType, CONTENTTYPECONFIGTOKEN, cookieDomain, cookiePath, COOKIESCONFIGTOKEN, cookieTTL, dbPassword, dbUrl, dbUsername, debug, DEBUGCONFIGTOKEN, driverName, embedded, here, identity, localeMagicToken, LOCALEMAGICTOKEN, outputStreamMagicToken, OUTPUTSTREAMMAGICTOKEN, parsePathInfo, PATHINFOMAGICTOKEN, ready, redirectMagicToken, REDIRECTMAGICTOKEN, requestMagicToken, REQUESTMAGICTOKEN, resourceBundleName, responseMagicToken, RESPONSEMAGICTOKEN, servletMagicToken, SERVLETMAGICTOKEN, sessionMagicToken, SESSIONMAGICTOKEN, USEHTTPSCONFIGTOKEN, zone
 
Fields inherited from class uk.co.weft.maybeupload.MaybeUploadServlet
allowOverwrite, maxUpload, saveUploadedFilesToDisk, silentlyRename, uploadDir, uploadDirPath, uploadDirURL
 
Fields inherited from interface uk.co.weft.htform.ResourceConsumer
RESOURCEBUNDLEMAGICTOKEN
 
Constructor Summary
FirstTime()
          Deprecated.  
 
Method Summary
 void init(Context config)
          Deprecated. Find my SQL source file, set up my widget.
protected  void preForm(Context context)
          Deprecated. show the database initialisation report, if present.
 
Methods inherited from class uk.co.weft.htform.AuthenticatedForm
login, logout
 
Methods inherited from class uk.co.weft.htform.Form
addAuxiliary, addWidget, defaultActionHandler, doBody, doHead, doHeadBodySep, fixupMagicValues, generate, getLayout, getNextActionURL, getSelectedWidgetSet, getTitle, getTransformURL, getWidgetSetByName, handleAction, hasWidgets, makeReady, postForm, postProcess, preProcess, selectNextWidgetSet, setContextMenuQuery
 
Methods inherited from class uk.co.weft.htform.Page
doFoot, doFoot, generateContent, getFootInclude, getFootIncludeURL, getFootIncludeURL, getHeadInclude, getHeadIncludeURL, getHeadIncludeURL, getStylesheet, getStylesheets, getTables, getTitle, outputRedirectBlock, readStringFromURL
 
Methods inherited from class uk.co.weft.htform.WithExceptionHandlerServlet
whinge, whinge, whinge
 
Methods inherited from class uk.co.weft.htform.Servlet
addCookie, addCookie, coerceCookiesToContext, coerceToContext, coerceToContext, coerceToContext, coerceToContext, coerceToUrl, createContext, doGet, doPost, getCalendar, getContentType, getDebug, getLocale, getOutputStream, getResource, getResourceString, getServletInfo, grs, grs, handleCookies, handleRedirect, init, setCookieValues, storeOnSession
 
Methods inherited from class uk.co.weft.maybeupload.MaybeUploadServlet
doDelete, doHead, doOptions, doPut, doTrace, getUploadDir, getUploadURL, service
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.co.weft.domutil.DocumentGenerator
destroy
 

Field Detail

AFTERWARDSMAGICTOKEN

public static final java.lang.String AFTERWARDSMAGICTOKEN
Deprecated. 
A token whose value in the service context should be where we go after completing first time initialisation.

See Also:
Constant Field Values

INITREPORTMAGICTOKEN

public static final java.lang.String INITREPORTMAGICTOKEN
Deprecated. 
A token whose value in the service context (if any) is a textual report of what happened when the database was initialised

See Also:
Constant Field Values

SQLSOURCEMAGICTOKEN

public static final java.lang.String SQLSOURCEMAGICTOKEN
Deprecated. 
A token whose value in the config should be the file path, relative to the webapp root, of the SQL initialisation file

See Also:
Constant Field Values

sqlSource

protected java.lang.String sqlSource
Deprecated. 
where I find my SQL source

Constructor Detail

FirstTime

public FirstTime()
Deprecated. 
Method Detail

init

public void init(Context config)
          throws InitialisationException
Deprecated. 
Find my SQL source file, set up my widget.

Specified by:
init in interface DocumentGenerator
Overrides:
init in class AuthenticatedForm
Throws:
InitialisationException

preForm

protected void preForm(Context context)
                throws java.lang.Exception
Deprecated. 
show the database initialisation report, if present.

Overrides:
preForm in class Form
Throws:
java.lang.Exception

jacquard 1.12.0 by The Web Engineering Factory and Toolworks