|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.portlet.GenericPortlet
javax.portlet.faces.GenericFacesPortlet
public class GenericFacesPortlet
The GenericFacesPortlet
is provided to simplify development of a portlet that in
whole or part relies on the Faces bridge to process requests. If all requests are to be handled
by the bridge, GenericFacesPortlet
is a turnkey implementation. Developers do not
need to subclass it. However, if there are some situations where the portlet doesn't require
bridge services then GenericFacesPortlet
can be subclassed and overriden.
Since GenericFacesPortlet
subclasses GenericPortlet
care is taken
to all subclasses to override naturally. For example, though doDispatch()
is
overriden, requests are only dispatched to the bridge from here if the PortletMode
isn't VIEW
, EDIT
, or HELP
.
The GenericFacesPortlet
recognizes the following portlet init parameters:
javax.portlet.faces.defaultViewId.[mode]
: specifies on a per mode
basis the default viewId the Bridge executes when not already encoded in the incoming request. A
value must be defined for each PortletMode
the Bridge
is expected
to process. GenericFacesPortlet
recognizes the following
PortletContext
init parameters:
javax.portlet.faces.BridgeImplClass
: specifies the Bridge
implementation
class used by this portlet. This init parameter must be specified or else an exception is thrown.
Field Summary | |
---|---|
static String |
BRIDGE_CLASS
|
static String |
BRIDGE_SERVICE_CLASSPATH
|
Constructor Summary | |
---|---|
GenericFacesPortlet()
|
Method Summary | |
---|---|
void |
destroy()
Release resources |
void |
doDispatch(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
If mode is VIEW, EDIT, or HELP -- defer to the doView, doEdit, doHelp so subclasses can override. |
protected void |
doEdit(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
protected void |
doHelp(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
protected void |
doView(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
String |
getBridgeClassName()
Returns the className of the bridge implementation this portlet uses. |
String |
getDefaultViewId(javax.portlet.PortletRequest request,
javax.portlet.PortletMode mode)
Returns the defaultViewId to be used for this request. |
List<String> |
getExcludedRequestAttributes()
Returns the set of RequestAttribute names that the portlet wants the bridge to exclude from its managed request scope. |
Boolean |
getPreserveActionParameters()
Returns a boolean indicating whether or not the bridge should preserve all the action parameters in the subsequent renders that occur in the same scope. |
void |
init(javax.portlet.PortletConfig portletConfig)
Initialize generic faces portlet from portlet.xml |
void |
processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
|
Methods inherited from class javax.portlet.GenericPortlet |
---|
getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init, render |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BRIDGE_CLASS
public static final String BRIDGE_SERVICE_CLASSPATH
Constructor Detail |
---|
public GenericFacesPortlet()
Method Detail |
---|
public void init(javax.portlet.PortletConfig portletConfig) throws javax.portlet.PortletException
init
in interface javax.portlet.Portlet
init
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
public void destroy()
destroy
in interface javax.portlet.Portlet
destroy
in class javax.portlet.GenericPortlet
public void doDispatch(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
doDispatch
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
protected void doEdit(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
doEdit
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
protected void doHelp(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
doHelp
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
protected void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
doView
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
public void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws javax.portlet.PortletException, IOException
processAction
in interface javax.portlet.Portlet
processAction
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
public List<String> getExcludedRequestAttributes()
public Boolean getPreserveActionParameters()
public String getBridgeClassName()
public String getDefaultViewId(javax.portlet.PortletRequest request, javax.portlet.PortletMode mode)
request
- the request object.mode
- the mode which to return the defaultViewId for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |