|
||||||||||
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.
Field Summary | |
private static java.lang.Class[] |
ACTION_LOOKUP
|
private PortletConfig |
config
. |
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(JBossRenderRequest request,
JBossRenderResponse response)
|
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. |
private java.lang.reflect.Method |
lookupMethod(java.lang.String operation,
java.lang.Class[] parameterTypes)
Locate a method. |
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 |
processDispatch(JBossActionRequest req,
JBossActionResponse resp)
This method looks up the method corresponding to the action. |
void |
processEdit(JBossActionRequest req,
JBossActionResponse resp)
Default doEdit method that works in coordination with doEdit(JBossRenderRequest,JBossRenderResponse). |
void |
processHelp(JBossActionRequest req,
JBossActionResponse resp)
|
void |
processView(JBossActionRequest req,
JBossActionResponse resp)
|
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 |
Field Detail |
private static final java.lang.Class[] ACTION_LOOKUP
private PortletConfig config
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 processDispatch(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 processEdit(JBossActionRequest req, JBossActionResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
PortletSecurityException
java.io.IOException
public void processHelp(JBossActionRequest req, JBossActionResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
PortletException
PortletSecurityException
java.io.IOException
public void processView(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:
processAction
in interface Portlet
request
- the action requestresponse
- 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 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:
private java.lang.reflect.Method lookupMethod(java.lang.String operation, java.lang.Class[] parameterTypes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |