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

All Superinterfaces:
Serializable
All Known Implementing Classes:
TaskToolDescriptor

public interface TaskToolDescriptorModel
extends Serializable

TaskToolDescriptorModel objects provide metadata for a task tool.

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


Field Summary
static String TOOL_NAME
          This is an internal property used by the task control to create a ToolItem.
 
Method Summary
 ToolItem createToolItem(String taskControlId)
           Creates a ToolItem object for this tool.
 Element generateXML(Object task)
           Generates the XML content for this tool.
 String getDisplayName()
          Returns the display text for the tool.
 String getName()
           Returns the name of the tool method.
 String getRendererType()
           Returns the renderer type for the tool.
 boolean isHidden()
          If true, the tool button will not be displayed on the task UI
 Object processToolAction(Object task, MapEvent event)
          Calls the tool method on the specified task by passing it the MapEvent object.
 

Field Detail

TOOL_NAME

static final String TOOL_NAME
This is an internal property used by the task control to create a ToolItem. The ToolItem is eventually used to generate the markup / UI for the tool.

See Also:
Constant Field Values
Method Detail

getName

String getName()

Returns the name of the tool method.

Note that action methods take MapEvent as its argument.

Returns:
the name of the tool method

getDisplayName

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

Returns:
the display text for the tool

getRendererType

String getRendererType()

Returns the renderer type for the tool. The renderers supported out of the box are text-only buttons, image-only buttons and image-and-text buttons.

Returns:
the renderer type for the tool

isHidden

boolean isHidden()
If true, the tool button will not be displayed on the task UI

Returns:
if true, the tool button will not be displayed on the task UI

createToolItem

ToolItem createToolItem(String taskControlId)

Creates a ToolItem object for this tool.

This method is called by the task control and the ToolItem created by this method is eventually used to generate the markup / UI for the tool.

Parameters:
taskControlId - the ID of the task control which contains this tool
Returns:
a ToolItem object for this tool

processToolAction

Object processToolAction(Object task,
                         MapEvent event)
Calls the tool method on the specified task by passing it the MapEvent object.

Parameters:
task - the task object on which the tool method will be invoked
event - the MapEvent method which will be passed as an argument to the tool method
Returns:
the value returned by the tool method

generateXML

Element generateXML(Object task)

Generates the XML content for this tool. 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