站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

AbstractUniversalTestServlet - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.test.framework.portlet.components
Class AbstractUniversalTestServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.jboss.portal.test.framework.portlet.components.AbstractUniversalTestServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
UTS1, UTS2

public abstract class AbstractUniversalTestServlet
extends javax.servlet.http.HttpServlet

Universal test servlet that enables to reuse servlet instances across several tests

Version:
$Revision: 5493 $
Author:
Boleslaw Dawidowicz
See Also:
Serialized Form

Field Summary
private  java.lang.String componentId
          The test id.
private  org.apache.log4j.Logger log
           
protected  Joinpoint serviceJoinpoint
          Jointpoints for service method
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
AbstractUniversalTestServlet()
          Construct a test servlet with a test id computed with the method getTestId(Class).
AbstractUniversalTestServlet(java.lang.String componentId)
          Construct a test servlet with the specified id.
 
Method Summary
protected  java.lang.String createComponentId(java.lang.Class clazz)
          Get the componentId from the class name.
protected  java.lang.String getComponentId()
           
protected  Sequence getSequence()
          Returns Sequence for current testId Returns null if there is no Sequence for current testId
private  SequenceRegistry getSequenceRegistry()
          Returns SequenceRegistry which should be injected into ServletContext Returns null if there is no SequenceRegistry in context
 Joinpoint getServiceJointpoint()
           
abstract  void reset()
           
protected  void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Standart implementation of service() method to handle requests and invoke actions from sequence
protected  void setComponentId(java.lang.String componentId)
           
protected  void setServiceJointpoint(Joinpoint serviceJoinpoint)
           
 
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, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final org.apache.log4j.Logger log

componentId

private java.lang.String componentId
The test id.


serviceJoinpoint

protected Joinpoint serviceJoinpoint
Jointpoints for service method

Constructor Detail

AbstractUniversalTestServlet

public AbstractUniversalTestServlet()
Construct a test servlet with a test id computed with the method getTestId(Class).


AbstractUniversalTestServlet

public AbstractUniversalTestServlet(java.lang.String componentId)
Construct a test servlet with the specified id.

Parameters:
componentId -
Method Detail

service

protected void service(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       java.io.IOException
Standart implementation of service() method to handle requests and invoke actions from sequence

Parameters:
request -
response -
Throws:
javax.servlet.ServletException
java.io.IOException

createComponentId

protected java.lang.String createComponentId(java.lang.Class clazz)
Get the componentId from the class name.


getSequenceRegistry

private SequenceRegistry getSequenceRegistry()
Returns SequenceRegistry which should be injected into ServletContext Returns null if there is no SequenceRegistry in context

Returns:
SequenceRegistry

getSequence

protected Sequence getSequence()
                        throws javax.servlet.ServletException
Returns Sequence for current testId Returns null if there is no Sequence for current testId

Returns:
Throws:
javax.servlet.ServletException - if there is no SequenceRegistry

getComponentId

protected java.lang.String getComponentId()

setComponentId

protected void setComponentId(java.lang.String componentId)

getServiceJointpoint

public Joinpoint getServiceJointpoint()

setServiceJointpoint

protected void setServiceJointpoint(Joinpoint serviceJoinpoint)

reset

public abstract void reset()