org.alfresco.web.app.servlet.command
Class TaskCommandProcessor

java.lang.Object
  extended by org.alfresco.web.app.servlet.command.TaskCommandProcessor
All Implemented Interfaces:
CommandProcessor

public final class TaskCommandProcessor
extends java.lang.Object
implements CommandProcessor

Task specific command processor implementation.

Responsible for executing workflow task operations.


Constructor Summary
TaskCommandProcessor()
           
 
Method Summary
 void outputStatus(java.io.PrintWriter out)
          Output a simple status message to the supplied PrintWriter.
 void process(org.alfresco.service.ServiceRegistry serviceRegistry, javax.servlet.http.HttpServletRequest request, java.lang.String commandName)
          Process the supplied command name.
 boolean validateArguments(javax.servlet.ServletContext sc, java.lang.String cmd, java.util.Map args, java.lang.String[] urlElements)
          Pass and validate URL arguments for the command processor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskCommandProcessor

public TaskCommandProcessor()
Method Detail

validateArguments

public boolean validateArguments(javax.servlet.ServletContext sc,
                                 java.lang.String cmd,
                                 java.util.Map args,
                                 java.lang.String[] urlElements)
Description copied from interface: CommandProcessor
Pass and validate URL arguments for the command processor. Validate if the command can be executed given the arguments supplied. Generally at this post a Command Processor will convert the supplied arguments to the objects it expects, and also check any permissions that are required by the current user to execute the command.

Specified by:
validateArguments in interface CommandProcessor
Parameters:
sc - ServletContext, can be used to retrieve ServiceRegistry instance from the Repository bean.
cmd - Name of the command the arguments are for
args - Map of URL args passed to the command servlet
urlElements - String[] of the remaining URL arguments to the command servlet
Returns:
true if the command can be executed by the current user given the supplied args.

process

public void process(org.alfresco.service.ServiceRegistry serviceRegistry,
                    javax.servlet.http.HttpServletRequest request,
                    java.lang.String commandName)
Description copied from interface: CommandProcessor
Process the supplied command name. It is the responsibility of the Command Processor to lookup the specified command name using the CommandFactory registry. For that reason it also has the responsiblity to initially register commands it is responsible for so they can be constructed later. If the supplied command is unknown to it then an exception should be thrown to indicate this.

Specified by:
process in interface CommandProcessor
Parameters:
serviceRegistry - ServiceRegistry
request - HttpServletRequest
commandName - Name of the command to construct and execute
See Also:
CommandProcessor.process(org.alfresco.service.ServiceRegistry, javax.servlet.http.HttpServletRequest, java.lang.String)

outputStatus

public void outputStatus(java.io.PrintWriter out)
Description copied from interface: CommandProcessor
Output a simple status message to the supplied PrintWriter. It can be assumed that the process() method was successful if this method is called.

Specified by:
outputStatus in interface CommandProcessor
Parameters:
out - PrintWriter
See Also:
CommandProcessor.outputStatus(java.io.PrintWriter)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.