GenericPortlet的API

如问题-->GenericPortlet的API

全部的API了。

http://www.bluesunrise.com/portlet-api/javax/portlet/GenericPortlet.html
这个就是

你要哪个具体的API 我给你贴上。

processAction
public void processAction(ActionRequest request,
ActionResponse response)
throws PortletException,
java.io.IOExceptionCalled 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 tries to dispatch to a method annotated with @ProcessAction that matches the action parameter value ActionRequest.ACTION_NAME or, if no such method is found throws a PortletException.
Note that the annotated methods needs to be public in order to be allowed to be called by GenericPortlet.

Specified by:
processAction in interface Portlet
Parameters:
request - the action request
response - the action response
Throws:
PortletException - if the portlet cannot fulfilling the request
UnavailableException - if the portlet is unavailable to process the action at this time
PortletSecurityException - if the portlet cannot fullfill this request because of security reasons
java.io.IOException - if the streaming causes an I/O problem

doView
protected void doView(RenderRequest request,
RenderResponse response)
throws PortletException,
java.io.IOExceptionHelper method to serve up the mandatory view mode.
The default implementation throws an exception.

Parameters:
request - the portlet request
response - the render response
Throws:
PortletException - if the portlet cannot fulfilling the request
UnavailableException - if the portlet is unavailable to perform render at this time
PortletSecurityException - if the portlet cannot fullfill this request because of security reasons
java.io.IOException - if the streaming causes an I/O problem

void destroy()
Called by the portlet container to indicate to a portlet that the portlet is being taken out of service.
protected void doDispatch(RenderRequest request, RenderResponse response)
The default implementation of this method routes the render request to: method annotated with @RenderMode and the name of the portlet mode a set of helper methods depending on the current portlet mode the portlet is currently in.
protected void doEdit(RenderRequest request, RenderResponse response)
Helper method to serve up the edit mode.
protected void doHeaders(RenderRequest request, RenderResponse response)
Used by the render method to set the response properties and headers.
protected void doHelp(RenderRequest request, RenderResponse response)
Helper method to serve up the help mode.
protected void doView(RenderRequest request, RenderResponse response)
Helper method to serve up the mandatory view mode.
java.util.Map getContainerRuntimeOptions()
Returns the container runtime options and values for this portlet.
java.lang.String getDefaultNamespace()
Returns the default namespace for events and public parameters.
java.lang.String getInitParameter(java.lang.String name)
Returns a String containing the value of the named initialization * parameter, or null if the parameter does not exist.
java.util.Enumeration getInitParameterNames()
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.
protected java.util.Collection getNextPossiblePortletModes(RenderRequest request)
Used by the render method to set the next possible portlet modes.
PortletConfig getPortletConfig()
Returns the PortletConfig object of this portlet.
PortletContext getPortletContext()
Returns the PortletContext of the portlet application the portlet is in.
java.lang.String getPortletName()
Returns the name of this portlet.
java.util.Enumeration getProcessingEventQNames()
Returns the QNames of the processing events supported by the portlet as an Enumeration of QName objects, or an empty Enumeration if the portlet has not defined any processing events.
java.util.Enumeration getPublicRenderParameterNames()
Returns the names of the public render parameters supported by the portlet as an Enumeration of String objects, or an empty Enumeration if the portlet has no public render parameters.
java.util.Enumeration getPublishingEventQNames()
Returns the QNames of the publishing events supported by the portlet as an Enumeration of QName objects, or an empty Enumeration if the portlet has not defined any publishing events.
java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
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.
java.util.Enumeration getSupportedLocales()
Returns the locales supported by the portlet as an Enumeration of Locale objects, or an empty Enumeration if the portlet has not defined any supported locales.
protected java.lang.String getTitle(RenderRequest request)
Used by the render method to get the title.
void init()
A convenience method which can be overridden so that there's no need to call super.init(config).
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.
void processEvent(EventRequest request, EventResponse response)
The default implementation tries to dispatch to a method annotated with @ProcessEvent that matches the event name or, if no such method is found just sets the current render parameters on the response.
Note that the annotated methods needs to be public in order to be allowed to be called by GenericPortlet.
void render(RenderRequest request, RenderResponse response)
The default implementation of this method sets the headers using the doHeaders method, sets the title using the getTitle method and invokes the doDispatch method.
void serveResource(ResourceRequest request, ResourceResponse response)
Default resource serving.
[quote][/quote]