|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.portal.test.framework.portlet.components.AbstractTestPortlet
Field Summary | |
private PortletConfig |
config
To keep PortletConfig for some tests* |
private java.lang.String |
testCaseId
The test id. |
Constructor Summary | |
AbstractTestPortlet()
Construct a test portlet with a test id computed with the method getTestId(Class) . |
|
AbstractTestPortlet(java.lang.String testCaseId)
Construct a test portlet with the specified id. |
Method Summary | |
protected java.lang.String |
createCaseTestId(java.lang.Class clazz)
Get the test id from the class name. |
void |
destroy()
Called by the portlet container to indicate to a portlet that the portlet is being taken out of service. |
protected void |
doProcessAction(ActionRequest req,
ActionResponse resp)
|
protected void |
doRender(RenderRequest req,
RenderResponse resp)
|
PortletConfig |
getPortletConfig()
Returns the PortletConfig object of this portlet. |
PortletContext |
getPortletContext()
Returns the PortletContext of the portlet application the portlet is in. |
void |
init(PortletConfig config)
Called by the portlet container to indicate to a portlet that the portlet is being placed into service. |
static void |
marshall(Result result)
|
void |
processAction(ActionRequest req,
ActionResponse resp)
Called by the portlet container to allow the portlet to process an action request. |
void |
render(RenderRequest req,
RenderResponse resp)
Called by the portlet container to allow the portlet to generate the content of the response based on its current state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.lang.String testCaseId
private PortletConfig config
Constructor Detail |
public AbstractTestPortlet()
getTestId(Class)
.
public AbstractTestPortlet(java.lang.String testCaseId)
testCaseId
- Method Detail |
public void init(PortletConfig config) throws PortletException
Portlet
The portlet container calls the init
method exactly once after instantiating the portlet. The
init
method must complete successfully before the portlet can receive any requests.
The portlet container cannot place the portlet into service if the init
method
PortletException
config
- a PortletConfig
object containing the portlet's configuration and initialization
parameters
PortletException
- if an exception has occurred that interferes with the portlet's normal operation.public PortletConfig getPortletConfig()
public PortletContext getPortletContext()
PortletContext
of the portlet application the portlet is in.
public final void processAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
Portlet
RenderResponse.createActionURL()
method.
Typically, in response to an action request, a portlet updates state based on the information sent in the action
request parameters. In an action the portlet may:
processAction
in interface Portlet
req
- the action requestresp
- the action response
PortletException
- if the portlet has problems fulfilling the request
java.io.IOException
- if the streaming causes an I/O problem
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasonspublic final void render(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
Portlet
req
- the render requestresp
- the render response
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
PortletException
- if the portlet has problems fulfilling the rendering request
java.io.IOException
- if the streaming causes an I/O problempublic void destroy()
Portlet
This method enables the portlet to do the following:
protected void doProcessAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
PortletSecurityException
java.io.IOException
protected void doRender(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
PortletSecurityException
java.io.IOException
protected java.lang.String createCaseTestId(java.lang.Class clazz)
public static void marshall(Result result)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |