|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portlet.JBossPortlet
The JBossPortlet.
Constructor Summary | |
JBossPortlet()
|
Method Summary | |
void |
destroy()
Called by the portlet container to indicate to a portlet that the portlet is being taken out of service. |
protected void |
doDispatch(JBossActionRequest req,
JBossActionResponse resp)
This method looks up the method corresponding to the action. |
protected void |
doDispatch(JBossRenderRequest request,
JBossRenderResponse response)
|
void |
doEdit(JBossActionRequest req,
JBossActionResponse resp)
Default doEdit method that works in coordination with doEdit(JBossRenderRequest,JBossRenderResponse). |
protected void |
doEdit(JBossRenderRequest request,
JBossRenderResponse response)
Provide a default generic editor for preferences that produce HTML markup. |
protected void |
doHelp(JBossRenderRequest request,
JBossRenderResponse response)
Throw a PortletException . |
protected void |
doView(JBossRenderRequest request,
JBossRenderResponse response)
Throw a PortletException . |
java.lang.String |
getDefaultOperation()
Return the string main, it can be overriden to return another value by subclasses. |
java.lang.String |
getInitParameter(java.lang.String name)
|
java.util.Enumeration |
getInitParameterNames()
|
java.lang.String |
getOperationName()
Return the string op, it can be overriden to return another value by subclasses. |
PortletConfig |
getPortletConfig()
|
PortletContext |
getPortletContext()
|
java.lang.String |
getPortletName()
|
java.util.ResourceBundle |
getResourceBundle(java.util.Locale locale)
|
protected java.lang.String |
getTitle(RenderRequest request)
|
void |
init()
|
void |
init(PortletConfig config)
Called by the portlet container to indicate to a portlet that the portlet is being placed into service. |
void |
processAction(ActionRequest request,
ActionResponse response)
Called by the portlet container to allow the portlet to process an action request. |
protected void |
processAction(JBossActionRequest req,
JBossActionResponse resp)
Calls doDispatch(JBossActionRequest,JBossActionResponse) . |
protected void |
render(JBossRenderRequest req,
JBossRenderResponse resp)
Calls doDispatch(JBossRenderRequest,JBossRenderResponse) . |
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 |
Constructor Detail |
public JBossPortlet()
Method Detail |
public java.lang.String getDefaultOperation()
public java.lang.String getOperationName()
public void init() throws PortletException
PortletException
public PortletConfig getPortletConfig()
public java.lang.String getPortletName()
public PortletContext getPortletContext()
protected void processAction(JBossActionRequest req, JBossActionResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
doDispatch(JBossActionRequest,JBossActionResponse)
.
PortletException
PortletSecurityException
java.io.IOException
protected void doDispatch(JBossActionRequest req, JBossActionResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
This method looks up the method corresponding to the action. It uses the action parameter using the parameter name
defines by the operationName
field of this class. If not method is found it uses the method defined by the return of the method
getDefaultOperation()
of this class. In order to be found a method must use JBossActionRequest
and
If not valid dispatcher is found it throws a PortletException, otherwise it invokes the method by reflection. The invoked method may declare exceptions in the throws clause of the method. Whenever an exception is raised during the invocation of the method, a decision is taken depending on the nature of the exception :
PortletException
, IOException
then this exception
is rethrown as is since this method declares them in its throws clauseRuntimeException
or Error>/code>, it is rethrown as is
PortletException
is created with the caught exception as cause and thrown
PortletException
PortletSecurityException
java.io.IOException
public void doEdit(JBossActionRequest req, JBossActionResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
PortletSecurityException
java.io.IOException
protected void render(JBossRenderRequest req, JBossRenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
doDispatch(JBossRenderRequest,JBossRenderResponse)
.
PortletException
PortletSecurityException
java.io.IOException
protected void doDispatch(JBossRenderRequest request, JBossRenderResponse response) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
PortletSecurityException
java.io.IOException
protected void doView(JBossRenderRequest request, JBossRenderResponse response) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
.
PortletException
PortletSecurityException
java.io.IOException
protected void doHelp(JBossRenderRequest request, JBossRenderResponse response) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
.
PortletException
PortletSecurityException
java.io.IOException
protected void doEdit(JBossRenderRequest request, JBossRenderResponse response) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
PortletSecurityException
java.io.IOException
public java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
protected java.lang.String getTitle(RenderRequest request)
public java.lang.String getInitParameter(java.lang.String name) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.util.Enumeration getInitParameterNames()
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 void processAction(ActionRequest request, ActionResponse response) 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:
A client request triggered by an action URL translates into one action request and many render requests, one per portlet in the portal page. The action processing must be finished before the render requests can be issued.
processAction
in interface Portlet
request
- the action requestresponse
- the action response
java.io.IOException
- if the streaming causes an I/O problem
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
PortletException
- if the portlet has problems fulfilling the
requestpublic void render(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
Portlet
req
- the render requestresp
- the render response
PortletException
- if the portlet has problems fulfilling the
rendering request
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
java.io.IOException
- if the streaming causes an I/O problempublic void destroy()
Portlet
Before the portlet container calls the destroy method, it should allow any threads that are currently processing requests within the portlet object to complete execution. To avoid waiting forever, the portlet container can optionally wait for a predefined time before destroying the portlet object.
This method enables the portlet to do the following:
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |