|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MVCResourceCommand
Provides an interface to allow the portlet to serve a resource. This
interface can only be used when the portlet is based on MVCPortlet.
The resource command to be invoked is determined by two factors:
ResourceID of the resource request.
Implementations of this interface must be OSGi components that are registered in the OSGi Registry with the following properties:
javax.portlet.name: The portlet name associated to this resource
command.
mvc.command.name: the command name that matches the
ResourceID of the resource request. This name cannot contain any
comma (,).
The method MVCPortlet.serveResource(ResourceRequest,
ResourceResponse) searches the OSGi Registry for the resource command that
matches both the resource request's portlet name with the property
javax.portlet.name and the resource request's
ResourceID with the property mvc.command.name.
In general, only one resource command is executed per portlet resource URL.
If the ResourceID of the resource request is, however, a comma separated list
of multiple names, MVCPortlet finds the resource commands and invokes
them sequentially in the order they're specified in the list.
When there are multiple resource commands registered for the same portlet name and with the same command name, only the resource command with the highest service ranking is invoked.
BaseMVCResourceCommand is an abstract class that implements this
interface and can be extended to simplify using resource commands.
| Field Summary | |
|---|---|
static MVCResourceCommand |
EMPTY
|
| Method Summary | |
|---|---|
boolean |
serveResource(ResourceRequest resourceRequest,
ResourceResponse resourceResponse)
Invoked by MVCPortlet to allow the portlet to serve a resource. |
| Field Detail |
|---|
static final MVCResourceCommand EMPTY
| Method Detail |
|---|
boolean serveResource(ResourceRequest resourceRequest,
ResourceResponse resourceResponse)
throws PortletException
MVCPortlet to allow the portlet to serve a resource.
resourceRequest - the resource requestresourceResponse - the resource response
true if an error occurs in serving the resource;
false otherwise
PortletException
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||