com.astroshare.astroonline.application
Class install

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.astroshare.astroonline.application.install
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class install
extends javax.servlet.http.HttpServlet

Servlet to perform Astro-Online installation.

Astro-Online needs a database to store astrological as well as configuration data. This installation procedure creates all necessary tables and imports all necessary data.

The function doRequest handles the installation steps and makes sure the installation proceeds in the right sequense.

The function importTable is written to specifically import Astro-Online data. It creates the Astro-Online tables from the sql installation files and reads the data from the installation xml files. All installation files were generated with the mysqldump utility without any manual changes afterwards.

The function importTable generates insert statements with the data subtracted from the xml files. To recognize the date type of a column and whether nulls are allowed, the "show column" mysql statements is used. This function importTable does not cover all possible imports. Developers who want to use this code in other projects must be carefull to test all datatypes used in their project.

Finally the function importTable handles only int datatypes differently than the rest! (e.g. no quotes around values for int types and quotes for all others)

The installation utility is still under development...

See Also:
Serialized Form

Constructor Summary
install()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           Process a HTTP get request.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           Process a HTTP post request.
 void doRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           This function handles the installation steps and makes sure the installation proceeds in the right sequense.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

install

public install()
Method Detail

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)

Process a HTTP post request.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - HTTP request object.
response - HTTP response object.
See Also:
doRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)

Process a HTTP get request.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - HTTP request object.
response - HTTP response object.
See Also:
doRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

doRequest

public void doRequest(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)

This function handles the installation steps and makes sure the installation proceeds in the right sequense.

Parameters:
request - HTTP request object.
response - HTTP response object.


Astro-Online © 2001 − 2008 Astro Share
Documentation generated on: Thursday August 12th 2008 (PS)