public interface CommandProcessor
A command processor is defined as a class capable of executing a set of related Command objects. It performs the bulk of the work for the command servlet. The processor impl is responsible for validating that the command can be processed (given the supplied remaining URL arguments from the servlet) and processing the command. It is also responsible for supply an output status page on successfuly execution of the command.
The arguments passed to a Command Processor are the remaining URL elements from the command servlet URL after removing the web-app name, servlet name and command processor name.
Modifier and Type | Method and Description |
---|---|
void |
outputStatus(PrintWriter out)
Output a simple status message to the supplied PrintWriter.
|
void |
process(ServiceRegistry serviceRegistry,
HttpServletRequest request,
String command)
Process the supplied command name.
|
boolean |
validateArguments(ServletContext sc,
String command,
Map<String,String> args,
String[] urlElements)
Pass and validate URL arguments for the command processor.
|
boolean validateArguments(ServletContext sc, String command, Map<String,String> args, String[] urlElements)
sc
- ServletContext, can be used to retrieve ServiceRegistry instance
from the Repository bean.command
- Name of the command the arguments are forargs
- Map of URL args passed to the command servleturlElements
- String[] of the remaining URL arguments to the command servletvoid process(ServiceRegistry serviceRegistry, HttpServletRequest request, String command)
serviceRegistry
- ServiceRegistryrequest
- HttpServletRequestcommand
- Name of the command to construct and executevoid outputStatus(PrintWriter out)
out
- PrintWriterCopyright © 2005–2017 Alfresco Software. All rights reserved.