| java.lang.Object javax.portlet.GenericPortlet
All known Subclasses: com.sun.portal.app.wiki.JspPortlet, test.InputStreamPortlet, com.sun.portal.sapportlet.SAPSalesOrderPortlet, com.sun.portal.oracleportlet.approval.ReqApprovalPortlet, com.sun.portal.portlet.ipc2.SearchPortlet, com.sun.portal.portlet.samples.jspportlet.JSPPortlet, com.sun.portal.portlet.ipc1.ConsiderationPortlet, com.sun.portal.oracleportlet.receipts.ReceiptsPortlet, com.sun.portal.portlet.ipc2.DecisionPortlet, com.sun.portal.psftportlet.holidaysportlet.PSFTHolidaysPortlet, com.sun.portal.sapportlet.SAPTimePortlet, com.sun.portal.psftportlet.timeentryportlet.PSFTTimeEntryPortlet, __PACKAGE__.__NAME__, com.sun.portal.oracleportlet.requisitions.RequisitionInfoPortlet, com.sun.portal.jspportlet.JspPortlet, com.sun.portal.sapportlet.SAPEmpDetailsPortlet, com.sun.portal.portlet.ipc2.PricePortlet, test.RequestDispatcherGetAttributePortlet, com.sun.portal.portlet.ipc1.ListPortlet, com.sun.portal.sapportlet.SAPCustSearchPortlet, com.sun.portal.rssportlet.RssPortlet, com.sun.portal.portlet.samples.invoice.InvoicePortlet, com.sun.im.portal.portlet.IMPortlet, com.sun.portal.siebelportlet.portlet.SiebelCustomerAccountsPortlet, com.sun.faces.portlet.FacesPortlet, test.PrefPortlet, com.sun.portal.oracleportlet.quotations.QuotationsPortlet, com.sun.portal.psftportlet.epiportlet.PSFTEPIPortlet, test.HelloWorldPortlet, com.sun.portal.sapportlet.SAPNamefinderPortlet, test.NavStatePortlet, test.NamedDispatcherGetAttributePortlet, com.sun.portal.sapportlet.SAPManagerViewPortlet, test.TestPortlet, com.sun.portal.sapportlet.SAPUserConfigPortlet,
GenericPortlet | abstract public class GenericPortlet implements Portlet,PortletConfig(Code) | | The GenericPortlet class provides a default implementation
for the Portlet interface.
It provides an abstract class to be subclassed to create portlets. A
subclass of GenericPortlet should override at least
one method, usually one of the following:
- processAction, to handle action requests
- doView, to handle render requests when in VIEW mode
- doEdit, to handle render requests when in EDIT mode
- doHelp, to handle render request when in HELP mode
- init and destroy, to manage resources that are held for the life of
the servlet
Normally there is no need to override the render or the doDispatch
methods. Render handles render requests setting the title of the
portlet in the response and invoking doDispatch. doDispatch dispatches
the request to one of the doView, doEdit or doHelp method depending on
the portlet mode indicated in the request.
Portlets typically run on multithreaded servers, so please note that a
portlet must handle concurrent requests and be careful to synchronize
access to shared resources. Shared resources include in-memory data
such as instance or class variables and external objects such as
files, database connections, and network connections.
|
GenericPortlet | public GenericPortlet()(Code) | | Does nothing.
|
destroy | public void destroy()(Code) | | Called by the portlet container to indicate to a portlet that the portlet
is being taken out of service.
The default implementation does nothing.
|
getInitParameter | public String getInitParameter(java.lang.String name)(Code) | | Returns a String containing the value of the named initialization parameter,
or null if the parameter does not exist.
Parameters: name - a String specifying the nameof the initialization parameter a String containing the value of the initialization parameter exception: java.lang.IllegalArgumentException - if name is null . |
getInitParameterNames | public java.util.Enumeration getInitParameterNames()(Code) | | Returns the names of the portlet initialization parameters as an
Enumeration of String objects, or an empty Enumeration if the
portlet has no initialization parameters.
an Enumeration of String objects containing the names of the portlet initialization parameters, or an empty Enumeration if the portlet has no initialization parameters. |
getPortletConfig | public PortletConfig getPortletConfig()(Code) | | Returns the PortletConfig object of this portlet.
the PortletConfig object of this portlet |
getPortletContext | public PortletContext getPortletContext()(Code) | | Returns the PortletContext of the portlet application
the portlet is in.
the portlet application context |
getResourceBundle | public java.util.ResourceBundle getResourceBundle(java.util.Locale locale)(Code) | | Gets the resource bundle for the given locale based on the
resource bundle defined in the deployment descriptor
with resource-bundle tag or the inlined resources
defined in the deployment descriptor.
the resource bundle for the given locale |
getTitle | protected java.lang.String getTitle(RenderRequest request)(Code) | | Used by the render method to get the title.
The default implementation gets the title from the ResourceBundle
of the PortletConfig of the portlet. The title is retrieved
using the 'javax.portlet.title' resource name.
Portlets can overwrite this method to provide dynamic
titles (e.g. based on locale, client, and session information).
Examples are:
- language-dependant titles for multi-lingual portals
- shorter titles for WAP phones
- the number of messages in a mailbox portlet
the portlet title for this window |
init | public void init(PortletConfig config) throws PortletException(Code) | | Called by the portlet container to indicate to a portlet that the
portlet is being placed into service.
The default implementation just stores the PortletConfig
object.
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 does one of the following:
- it throws a
PortletException
- it does not return within a time period defined by the Web server
Parameters: config - a PortletConfig object containing the portletconfiguration and initialization parameters exception: PortletException - if an exception has occurred thatinterferes with the portlet normaloperation. exception: UnavailableException - if the portlet cannot perform the initialization at this time. |
processAction | public void processAction(ActionRequest request, ActionResponse response) throws PortletException, java.io.IOException(Code) | | Called by the portlet container to allow the portlet to process
an action request. This method is called if the client request was
originated by a URL created (by the portlet) with the
RenderResponse.createActionURL() method.
The default implementation throws an exception.
Parameters: request - the action request Parameters: response - the action response exception: PortletException - if the portlet cannot fulfilling the request exception: UnavailableException - if the portlet is unavailable to process the action at this time exception: PortletSecurityException - if the portlet cannot fullfill this request because of security reasons exception: java.io.IOException - if the streaming causes an I/O problem |
|
|