com.esri.adf.web.data.tasks
Interface TaskParamDescriptorModel

All Superinterfaces:
Serializable
All Known Subinterfaces:
CompositeTaskParamDescriptorModel, GPParam
All Known Implementing Classes:
GPBooleanParam, GPDataFileParam, GPDateParam, GPDoubleParam, GPLinearUnitParam, GPLongParam, GPMultiStringParam, GPMultiValueParam, GPRasterDataParam, GPRecordSetParam, GPStringParam, TaskParamDescriptor

public interface TaskParamDescriptorModel
extends Serializable

TaskParamDescriptorModel objects provide metadata for a task parameter.

You should implement this interface only if you want to provide a custom param descriptor. Otherwise you want to use TaskParamDescriptor - the out-of-the-box implementation of this interface.


Method Summary
 Element generateXML(Object task)
           Generates the XML content for this parameter.
 String getDisplayName()
          Returns the display text for the parameter.
 String getName()
           Returns the name of the parameter.
 Object getParamValue(Object task)
           Returns the current value of the parameter for the given task.
 String getRendererType()
           Returns the renderer type for the parameter.
 Object setParamValue(Object task, String strVal)
           Sets the parameter value on the task and returns the set value.
 

Method Detail

getName

String getName()

Returns the name of the parameter.

If your task class has a pair of setParam(paramValue) and getParam() (isParam() for booleans) methods, the name of your parameter is param.

Returns:
the name of the parameter

getDisplayName

String getDisplayName()
Returns the display text for the parameter. The value returned by this method is typically used to display the label for the parameter.

Returns:
the display text for the parameter

getRendererType

String getRendererType()

Returns the renderer type for the parameter. The renderers supported out of the box are text boxes, checkboxes, radio buttons and dropdowns.

Returns:
the renderer type for the parameter

setParamValue

Object setParamValue(Object task,
                     String strVal)

Sets the parameter value on the task and returns the set value. This method should convert the string input to the appropriate parameter type before setting the parameter.

Parameters:
task - the task object on which to set the parameter value
strVal - the string representation of the parameter value to be set
Returns:
the set parameter value

getParamValue

Object getParamValue(Object task)

Returns the current value of the parameter for the given task.

Parameters:
task - the task object
Returns:
the parameter value

generateXML

Element generateXML(Object task)

Generates the XML content for this parameter. This XML is then transformed by the XSL used by the task control to generate the appropriate markup.

Note that if you implement this method and generate custom XML, you'll also need to provide the XSL that transforms this XML into the appropriate markup. The XSL file that the task control should use can be specified by using the xslFile attribute of the task tag.

Parameters:
task - the task object
Returns:
the generated XML Element