innoQ Logo

com.innoq.generator.jsp
Class JspAbstractBase

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.innoq.generator.jsp.JspAbstractBase
All Implemented Interfaces:
javax.servlet.jsp.HttpJspPage, javax.servlet.jsp.JspPage, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
JspBase

public abstract class JspAbstractBase
extends javax.servlet.http.HttpServlet
implements javax.servlet.jsp.HttpJspPage

See Also:
Serialized Form

Field Summary
static java.lang.String TRANSFORMATION_PROPERTIES_KEY
           
 
Constructor Summary
JspAbstractBase()
           
 
Method Summary
abstract  void _jspService(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This method will be automatically implemented by the JSP engine.
 void addProperties(java.util.Properties pProps)
          Adds the given properties to the transformation properties.
 void destroy()
          Destroys this JSP.
abstract  java.lang.String getFilename()
          Creates the fully qualified filename.
 IMetaModelFacade getMetaModel()
          Returns an instance of the current IMetaModelFacade.
abstract  java.lang.String getName()
          Returns the name of the current model element.
 java.util.Properties getProperties()
          Returns the whole set of transformation properties
 java.lang.String getProperty(java.lang.String pKey)
          Returns a transformation property with the given key
 java.lang.String getProperty(java.lang.String pKey, java.lang.String pDefault)
          Returns a transformation property with the given key
 javax.servlet.ServletConfig getServletConfig()
           
 void init()
          Is called to initialize this JSP.
 void init(javax.servlet.ServletConfig servletconfig)
          Overwriting this method suppresses an unnecessary init-logmessage.
 boolean isMainJSP()
           
 void jspDestroy()
          Called when the JSP is destroyed.
 void jspInit()
          Initializes this JSP.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Service method of JSP.
 void setMetaModel(IMetaModelFacade pMetaModel)
          Sets the current IMetaModelFacade.
 void setProperties(java.util.Properties pProps)
          Replaces transformation properties with pProps.
 void setProperty(java.lang.String pKey, java.lang.String pValue)
          Sets a property with given key and value
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletContext, getServletInfo, getServletName, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.Servlet
getServletInfo, service
 

Field Detail

TRANSFORMATION_PROPERTIES_KEY

public static java.lang.String TRANSFORMATION_PROPERTIES_KEY
Constructor Detail

JspAbstractBase

public JspAbstractBase()
Method Detail

jspInit

public void jspInit()
Initializes this JSP. You may overwrite this method to initialize the JSP when it is first loaded, i.e. after it has been compiled. The default implementation is empty.

Specified by:
jspInit in interface javax.servlet.jsp.JspPage

jspDestroy

public void jspDestroy()
Called when the JSP is destroyed. The default implementation is empty.

Specified by:
jspDestroy in interface javax.servlet.jsp.JspPage

init

public void init(javax.servlet.ServletConfig servletconfig)
          throws javax.servlet.ServletException
Overwriting this method suppresses an unnecessary init-logmessage.

Specified by:
init in interface javax.servlet.Servlet
Throws:
javax.servlet.ServletException

init

public final void init()
                throws javax.servlet.ServletException
Is called to initialize this JSP.

This method will be called by the container. Do not call it yourself!

Throws:
javax.servlet.ServletException
See Also:
jspInit()

destroy

public final void destroy()
Destroys this JSP.

This method will be called by the container. Do not call it yourself!

Specified by:
destroy in interface javax.servlet.Servlet
See Also:
jspDestroy()

isMainJSP

public boolean isMainJSP()

_jspService

public abstract void _jspService(javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
This method will be automatically implemented by the JSP engine.

Specified by:
_jspService in interface javax.servlet.jsp.HttpJspPage
Throws:
javax.servlet.ServletException
java.io.IOException

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Specified by:
getServletConfig in interface javax.servlet.Servlet

getMetaModel

public IMetaModelFacade getMetaModel()
Returns an instance of the current IMetaModelFacade.

Returns:
instance of the current IMetaModelFacade

setMetaModel

public void setMetaModel(IMetaModelFacade pMetaModel)
Sets the current IMetaModelFacade.

Parameters:
pMetaModel - instance of the current IMetaModelFacade

getFilename

public abstract java.lang.String getFilename()
Creates the fully qualified filename. Be careful to overwrite this method. The filename will be created like this: getDirectory() + File.separator + getPath(File.separatorChar, element) + File.separator + getName() + "." + getFileExtension();

Returns:
filename.
See Also:
getName()

getName

public abstract java.lang.String getName()
Returns the name of the current model element.


service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
             throws javax.servlet.ServletException,
                    java.io.IOException
Service method of JSP.

This method will be called by the container. Do not call it yourself!

Throws:
javax.servlet.ServletException
java.io.IOException

getProperty

public final java.lang.String getProperty(java.lang.String pKey)
Returns a transformation property with the given key

Parameters:
pKey - Key for lookup
Returns:
The property stored under the key

getProperty

public final java.lang.String getProperty(java.lang.String pKey,
                                          java.lang.String pDefault)
Returns a transformation property with the given key

Parameters:
pKey - Key for lookup
pDefault - default value
Returns:
The property storde under the key - default when nothing is stored

getProperties

public final java.util.Properties getProperties()
Returns the whole set of transformation properties

Returns:
transformation properties

setProperty

public final void setProperty(java.lang.String pKey,
                              java.lang.String pValue)
Sets a property with given key and value

Parameters:
pKey - key
pValue - value

setProperties

public final void setProperties(java.util.Properties pProps)
Replaces transformation properties with pProps.

Parameters:
pProps - new Transformation properties

addProperties

public final void addProperties(java.util.Properties pProps)
Adds the given properties to the transformation properties. Dublicate keys will be overwritten by the value in pProps

Parameters:
pProps - Properties to add

innoQ Logo

iQgen Logo

Copyright © 2001-2004 innoQ GmbH. Alle Rechte vorbehalten. All Rights Reserved.