public interface MVCResourceCommand extends MVCCommand
The resource command to be invoked is determined by two factors:
ResourceIDof 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
ResourceIDof the resource request. This name cannot contain any comma (
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
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.
static final MVCResourceCommand EMPTY
boolean serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws PortletException
MVCPortletto allow the portlet to serve a resource.
resourceRequest- the resource request
resourceResponse- the resource response
trueif an error occurs in serving the resource;