org.vectorbase.gdav
Class ServletInfo

java.lang.Object
  extended by org.vectorbase.gdav.ServletInfo

public class ServletInfo
extends java.lang.Object

reads all relevant information from the compulsory (gdav.xml) config file stores this information and provides accessor classes for this and other information.

Author:
seth.redmond@imperial.ac.uk Seth Redmond

Constructor Summary
ServletInfo(org.xml.sax.InputSource is)
          constructor - requires InputSource of config file
ServletInfo(javax.servlet.ServletContext ctx)
          constructor - requires servlet context to retrieve config file
 
Method Summary
 java.lang.String getDbHost()
          return host name for gdav DB
 java.lang.String getDbName()
          return name for gdav DB
 java.lang.String getDbPass()
          return password for gdav DB
 int getDbPort()
          return port for gdav DB
 java.lang.String getDbString()
          return full url string (jdbc:mysql//host:port/name?user=user&pass=pass) for gdav DB
 java.lang.String getDbUser()
          return user name for gdav DB
 java.lang.String getDocumentRoot()
          return document root for gdav.xml
 java.lang.String getHost()
          return root URL for website.
 java.lang.String getRemoteHeader()
          return the header HTML grabbed from a remote URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletInfo

public ServletInfo(javax.servlet.ServletContext ctx)
            throws org.xml.sax.SAXException,
                   javax.xml.parsers.ParserConfigurationException,
                   java.io.IOException
constructor - requires servlet context to retrieve config file

Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException

ServletInfo

public ServletInfo(org.xml.sax.InputSource is)
            throws org.xml.sax.SAXException,
                   javax.xml.parsers.ParserConfigurationException,
                   java.io.IOException
constructor - requires InputSource of config file

Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException
Method Detail

getHost

public java.lang.String getHost()
return root URL for website. This is defined in the tillview.xml file in order to allow the site to be run from the root, or for aliases to be employed


getDbHost

public java.lang.String getDbHost()
return host name for gdav DB


getDbName

public java.lang.String getDbName()
return name for gdav DB


getDbUser

public java.lang.String getDbUser()
return user name for gdav DB


getDbPass

public java.lang.String getDbPass()
return password for gdav DB


getDbPort

public int getDbPort()
return port for gdav DB


getDbString

public java.lang.String getDbString()
return full url string (jdbc:mysql//host:port/name?user=user&pass=pass) for gdav DB


getDocumentRoot

public java.lang.String getDocumentRoot()
return document root for gdav.xml


getRemoteHeader

public java.lang.String getRemoteHeader()
return the header HTML grabbed from a remote URL