com.esri.adf.web.data.tasks
Class TaskUtils

java.lang.Object
  extended by com.esri.adf.web.data.tasks.TaskUtils

public class TaskUtils
extends Object

The TaskUtils class provides simple utility methods for accessing metadata for a task.

The methods including accessing task param descriptors, action descriptors and tool descriptors.


Method Summary
static TaskActionDescriptorModel getActionDescriptor(String actionName, TaskInfo taskInfo)
          Returns the task action descriptor for a given actionName in taskInfo.
static TaskParamValidator getDefaultValidator(Class<?> paramType)
          Returns a TaskParamValidator object.
static TaskParamDescriptorModel getParamDescriptor(String paramName, TaskInfo taskInfo)
          Returns the task param descriptor for a given paramName in taskInfo.
static TaskToolDescriptorModel getToolDescriptor(String toolActionName, TaskInfo taskInfo)
          Returns the task tool descriptor for a given toolActionName in taskInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParamDescriptor

public static TaskParamDescriptorModel getParamDescriptor(String paramName,
                                                          TaskInfo taskInfo)
Returns the task param descriptor for a given paramName in taskInfo. If the parameter is not found, it returns null.

Parameters:
paramName - the name of the parameter to be found
taskInfo - the TaskInfo object which contains the param descriptor
Returns:
the task param descriptor for the given paramName in taskInfo. null if the parameter is not found.

getActionDescriptor

public static TaskActionDescriptorModel getActionDescriptor(String actionName,
                                                            TaskInfo taskInfo)
Returns the task action descriptor for a given actionName in taskInfo. If the action is not found, it returns null.

Parameters:
actionName - the name of the action to be found
taskInfo - the TaskInfo object which contains the action descriptor
Returns:
the task action descriptor for the given actionName in taskInfo. null if the action is not found.

getToolDescriptor

public static TaskToolDescriptorModel getToolDescriptor(String toolActionName,
                                                        TaskInfo taskInfo)
Returns the task tool descriptor for a given toolActionName in taskInfo. If the tool is not found, it returns null.

Parameters:
toolActionName - the name of the tool to be found
taskInfo - the TaskInfo object which contains the action descriptor
Returns:
the task tool descriptor for the given toolActionName in taskInfo. null if the tool is not found.

getDefaultValidator

public static TaskParamValidator getDefaultValidator(Class<?> paramType)
Returns a TaskParamValidator object.

Parameters:
paramType - default object
Returns:
a TaskParamValidator object