com.facetmap.servlet
Class FacetmapServlet

java.lang.Object
  extended by HttpServlet
      extended by com.facetmap.servlet.FacetmapServlet
Direct Known Subclasses:
MovieFacetmapServlet, SqlFacetMapServlet

public class FacetmapServlet
extends HttpServlet

Bootstrap servlet instantiates a Facetmap object and puts it in the ServletContext ready for use. A Properties object is accepted, which acts as the default Properties for Facetmap operations that require one. Note that you can access this object and edit its property values, which will take effect for future operations.

The FacetmapServlet is stored in the application context as an attribute; the name of the attribute is the servlet name (assigned in the web-app deployment descriptor, or by your server administration tools). To retrieve the Facetmap itself from within a servlet context, call ((FacetmapServlet)ServletContext.getAttribute(SERVLET-NAME)).getFacetmap()


Field Summary
protected  java.lang.Exception configException
           
protected  java.util.Properties configProps
           
protected  boolean configured
           
static java.lang.String DEFAULT_PROPERTIES_FILENAME
           
protected  Facetmap facetmap
           
static Logger logger
           
protected  ServletUtil processor
           
protected  com.facetmap.servlet.PropertiesPersister propsPersister
           
protected  TransformerPersister viewPersister
           
 
Constructor Summary
FacetmapServlet()
           
 
Method Summary
 Facetmap createFacetmap()
           
protected  void doInit()
           
 java.lang.Exception getConfigurationException()
           
 Facetmap getFacetmap()
           
 ServletUtil getProcessor()
           
 java.util.Properties getProperties()
           
 TransformerPersister getViewPersister()
          Support for XSLT views.
 void init()
          Wraps the initialization process so that the servlet container can call it on startup.
 boolean isConfigured()
           
 void readProps()
          Populate configProps from file.
 void reconfigure()
           
 void setProcessor(ServletUtil processor)
           
 void writeProps(java.lang.String info)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final Logger logger

DEFAULT_PROPERTIES_FILENAME

public static final java.lang.String DEFAULT_PROPERTIES_FILENAME
See Also:
Constant Field Values

facetmap

protected Facetmap facetmap

configProps

protected java.util.Properties configProps

propsPersister

protected com.facetmap.servlet.PropertiesPersister propsPersister

viewPersister

protected TransformerPersister viewPersister

configured

protected boolean configured

configException

protected java.lang.Exception configException

processor

protected ServletUtil processor
Constructor Detail

FacetmapServlet

public FacetmapServlet()
Method Detail

isConfigured

public boolean isConfigured()

getConfigurationException

public java.lang.Exception getConfigurationException()

getFacetmap

public Facetmap getFacetmap()

getProperties

public java.util.Properties getProperties()

getViewPersister

public TransformerPersister getViewPersister()
Support for XSLT views. This may move to a more specific subclass.


init

public void init()
          throws ServletException
Wraps the initialization process so that the servlet container can call it on startup.

Throws:
ServletException

doInit

protected void doInit()
               throws java.io.IOException,
                      ConfigurationException,
                      DataException,
                      InternalException
Throws:
java.io.IOException
ConfigurationException
DataException
InternalException

reconfigure

public void reconfigure()
                 throws ConfigurationException
Throws:
ConfigurationException

createFacetmap

public Facetmap createFacetmap()
                        throws DataException,
                               InternalException
Throws:
DataException
InternalException

readProps

public void readProps()
               throws ConfigurationException
Populate configProps from file.

Throws:
ConfigurationException

writeProps

public void writeProps(java.lang.String info)
                throws ConfigurationException
Throws:
ConfigurationException

getProcessor

public ServletUtil getProcessor()

setProcessor

public void setProcessor(ServletUtil processor)