Package org.gatein.pc.test.unit.web
Class AbstractUniversalTestPortlet
java.lang.Object
org.gatein.pc.test.unit.web.AbstractUniversalTestPortlet
- All Implemented Interfaces:
javax.portlet.EventPortlet,javax.portlet.Portlet,javax.portlet.ResourceServingPortlet
public abstract class AbstractUniversalTestPortlet
extends Object
implements javax.portlet.Portlet, javax.portlet.EventPortlet, javax.portlet.ResourceServingPortlet
Universal test portlet that enables to reuse portlet instances across several tests
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe runtime status of a portlet. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a test portlet with a test id computed with the methodgetComponentId(). -
Method Summary
Modifier and TypeMethodDescriptionprotected org.exoplatform.services.log.LogCan be subclassed to provide an alternative way to create the logger.voiddestroy()final org.exoplatform.services.log.LogReturn the logger.javax.portlet.PortletConfigReturns the PortletConfig object of this portlet.javax.portlet.PortletContextReturns thePortletContextof the portlet application the portlet is in.static Stringvoidinit(javax.portlet.PortletConfig config) final voidprocessAction(javax.portlet.ActionRequest req, javax.portlet.ActionResponse resp) invokes current action from SequencevoidprocessEvent(javax.portlet.EventRequest req, javax.portlet.EventResponse resp) final voidrender(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp) Invokes current action from Sequence.protected voidreset()voidserveResource(javax.portlet.ResourceRequest req, javax.portlet.ResourceResponse resp)
-
Constructor Details
-
AbstractUniversalTestPortlet
public AbstractUniversalTestPortlet()Construct a test portlet with a test id computed with the methodgetComponentId().
-
-
Method Details
-
getPortletName
-
init
public void init(javax.portlet.PortletConfig config) throws javax.portlet.PortletException - Specified by:
initin interfacejavax.portlet.Portlet- Throws:
javax.portlet.PortletException
-
getPortletConfig
public javax.portlet.PortletConfig getPortletConfig()Returns the PortletConfig object of this portlet.- Returns:
- the PortletConfig object of this portlet
-
getPortletContext
public javax.portlet.PortletContext getPortletContext()Returns thePortletContextof the portlet application the portlet is in.- Returns:
- the portlet application context
-
processAction
public final void processAction(javax.portlet.ActionRequest req, javax.portlet.ActionResponse resp) throws javax.portlet.PortletException, IOException invokes current action from Sequence- Specified by:
processActionin interfacejavax.portlet.Portlet- Parameters:
req-resp-- Throws:
javax.portlet.PortletExceptionjavax.portlet.PortletSecurityExceptionIOException
-
processEvent
public void processEvent(javax.portlet.EventRequest req, javax.portlet.EventResponse resp) throws javax.portlet.PortletException, IOException - Specified by:
processEventin interfacejavax.portlet.EventPortlet- Throws:
javax.portlet.PortletExceptionIOException
-
render
public final void render(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp) throws javax.portlet.PortletException, IOException Invokes current action from Sequence. If failed AssertResult was returned in previouse portlet action phase it will be marshalled.- Specified by:
renderin interfacejavax.portlet.Portlet- Parameters:
req-resp-- Throws:
javax.portlet.PortletExceptionjavax.portlet.PortletSecurityExceptionIOException
-
serveResource
public void serveResource(javax.portlet.ResourceRequest req, javax.portlet.ResourceResponse resp) throws javax.portlet.PortletException, IOException - Specified by:
serveResourcein interfacejavax.portlet.ResourceServingPortlet- Throws:
javax.portlet.PortletExceptionIOException
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.portlet.Portlet
-
getRuntimeStatus
-
getActionJointpoint
-
getRenderJointpoint
-
reset
protected void reset() -
createLogger
protected org.exoplatform.services.log.Log createLogger()Can be subclassed to provide an alternative way to create the logger. -
getLogger
public final org.exoplatform.services.log.Log getLogger()Return the logger.
-