com.esri.adf.web.tasks
Class GeocodeTask

java.lang.Object
  extended by com.esri.adf.web.data.tasks.SimpleTaskInfo
      extended by com.esri.adf.web.tasks.GeocodeTask
All Implemented Interfaces:
TaskInfo, WebContextInitialize, Serializable

public class GeocodeTask
extends SimpleTaskInfo
implements WebContextInitialize

See Also:
Serialized Form

Field Summary
static String DEFAULT_DISPLAY_NAME
           
static String DEFAULT_FIND_BUTTON_TEXT
           
static String DEFAULT_FIND_BUTTON_TOOL_TIP
           
 
Constructor Summary
GeocodeTask()
           
 
Method Summary
 void clearLocations(TaskEvent event)
           
 void clearLocations(WebContext webContext)
           
 void destroy()
           The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in this method.
 void find(TaskEvent event)
           
 List<AddressCandidate> find(WebContext webContext)
           
 TaskActionDescriptorModel[] getActionDescriptors()
          Claims there are no custom task action descriptors provided.
 String getCalloutTemplate()
          Returns the callout template.
 String getFindButtonText()
           
 String getFindButtonToolTip()
           
 GeocodeFunctionality getGeocodeFunctionality()
           
 GISResource getGeocodeResource()
           
 String getHelpURL()
           
 WebRenderer getHighlightRenderer()
          Returns the highlight renderer for callout.
 TaskParamDescriptorModel[] getParamDescriptors()
          Claims there are no custom task param descriptors provided.
 WebRenderer getRenderer()
          Returns the default renderer for callout.
 String getResourceId()
           
 TaskDescriptor getTaskDescriptor()
          Claims there is no custom TaskDescriptor provided.
 String getTaskName()
           
 void init(WebContext context)
           The initialization chores of attributes of a WebContext should be performed in this method.
 boolean isFetchResultDetails()
           
 boolean isShowInfoWindow()
          Returns true if the geocode task result(s) to be shown in the info window.
 void locate(TaskEvent event)
           
 AddressCandidate locate(WebContext webContext)
           
 void setCalloutTemplate(String calloutTemplate)
          Sets the template used for displaying the callout.
 void setFetchResultDetails(boolean fetchResultDetails)
           
 void setFindButtonText(String findButtonText)
           
 void setFindButtonToolTip(String findButtonToolTip)
           
 void setGeocodeResource(GISResource resource)
          Deprecated. As of ArcGIS Java Server 9.3, instead use setResourceId(java.lang.String)
 void setHelpURL(String helpURL)
           
 void setHighlightRenderer(WebRenderer highlightRenderer)
          Sets the highligh renderer for callout.
 void setRenderer(WebRenderer renderer)
          Sets the default renderer for callout.
 void setResourceId(String geocodeResourceId)
           
 void setShowInfoWindow(boolean showInfoWindow)
          Sets whether the geocode task result(s) to be shown in the info window or not.
 void setTaskName(String taskName)
           
 
Methods inherited from class com.esri.adf.web.data.tasks.SimpleTaskInfo
getTaskLayout, getToolDescriptors, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_DISPLAY_NAME

public static final String DEFAULT_DISPLAY_NAME

DEFAULT_FIND_BUTTON_TEXT

public static final String DEFAULT_FIND_BUTTON_TEXT

DEFAULT_FIND_BUTTON_TOOL_TIP

public static final String DEFAULT_FIND_BUTTON_TOOL_TIP
Constructor Detail

GeocodeTask

public GeocodeTask()
Method Detail

init

public void init(WebContext context)
Description copied from interface: WebContextInitialize

The initialization chores of attributes of a WebContext should be performed in this method.

Typically this method is called by the WebContext when the context itself is initialized. It is important to note that this method is again called by the context when a GISResource is dynamically added to or removed from the context. Classes that implement this method should keep this in mind and adapt the method to react to the callbacks in these circumstances as well.

A WebContext attribute is usable only after this method has been called.

Specified by:
init in interface WebContextInitialize
Parameters:
context - WebContext- the WebContext
See Also:
WebContext.init(WebContext), WebContext.addResource(String, GISResource, int), WebContext.removeResource(GISResource)

destroy

public void destroy()
Description copied from interface: WebContextInitialize

The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in this method.

Typically this method is called by the WebContext when the context itself is destroyed.

The WebContext attribute is unusable after this method has been called.

Specified by:
destroy in interface WebContextInitialize
See Also:
WebContext.destroy()

find

public void find(TaskEvent event)

find

public List<AddressCandidate> find(WebContext webContext)

locate

public void locate(TaskEvent event)

locate

public AddressCandidate locate(WebContext webContext)

clearLocations

public void clearLocations(TaskEvent event)

clearLocations

public void clearLocations(WebContext webContext)

getGeocodeResource

public GISResource getGeocodeResource()

getGeocodeFunctionality

public GeocodeFunctionality getGeocodeFunctionality()

getResourceId

public String getResourceId()

setResourceId

public void setResourceId(String geocodeResourceId)

getTaskName

public String getTaskName()

setTaskName

public void setTaskName(String taskName)

getHelpURL

public String getHelpURL()

setHelpURL

public void setHelpURL(String helpURL)

getFindButtonToolTip

public String getFindButtonToolTip()

setFindButtonToolTip

public void setFindButtonToolTip(String findButtonToolTip)

getFindButtonText

public String getFindButtonText()

setFindButtonText

public void setFindButtonText(String findButtonText)

setShowInfoWindow

public void setShowInfoWindow(boolean showInfoWindow)
Sets whether the geocode task result(s) to be shown in the info window or not. By default the value is true

Parameters:
showInfoWindow - if true, info window is shown

isShowInfoWindow

public boolean isShowInfoWindow()
Returns true if the geocode task result(s) to be shown in the info window.

Returns:
true if info window to be shown

setRenderer

public void setRenderer(WebRenderer renderer)
Sets the default renderer for callout.

Parameters:
renderer - the default renderer for callout

getRenderer

public WebRenderer getRenderer()
Returns the default renderer for callout.

Returns:
the default renderer for callout.

setHighlightRenderer

public void setHighlightRenderer(WebRenderer highlightRenderer)
Sets the highligh renderer for callout.

Parameters:
highlightRenderer - the highlight renderer for callout

getHighlightRenderer

public WebRenderer getHighlightRenderer()
Returns the highlight renderer for callout.

Returns:
the highlight renderer for callout.

setCalloutTemplate

public void setCalloutTemplate(String calloutTemplate)
Sets the template used for displaying the callout. Setting null does not show the callout. Use LayerDefinition.DEFAULT_TEMPLATE for default formatting.
 By default the callout template is <header>${ADDRESS}</header><body>${ADDRESS}</body>
 

Parameters:
calloutTemplate - the template used for displaying callout

getCalloutTemplate

public String getCalloutTemplate()
Returns the callout template.

Returns:
the callout template

getTaskDescriptor

public TaskDescriptor getTaskDescriptor()
Description copied from class: SimpleTaskInfo
Claims there is no custom TaskDescriptor provided. You can override this if you wish to provide an explicit descriptor.

Specified by:
getTaskDescriptor in interface TaskInfo
Overrides:
getTaskDescriptor in class SimpleTaskInfo
Returns:
null

getParamDescriptors

public TaskParamDescriptorModel[] getParamDescriptors()
Description copied from class: SimpleTaskInfo
Claims there are no custom task param descriptors provided. You can override this if you wish to provide explicit descriptors.

Specified by:
getParamDescriptors in interface TaskInfo
Overrides:
getParamDescriptors in class SimpleTaskInfo
Returns:
null

getActionDescriptors

public TaskActionDescriptorModel[] getActionDescriptors()
Description copied from class: SimpleTaskInfo
Claims there are no custom task action descriptors provided. You can override this if you wish to provide explicit descriptors.

Specified by:
getActionDescriptors in interface TaskInfo
Overrides:
getActionDescriptors in class SimpleTaskInfo
Returns:
null

setFetchResultDetails

public void setFetchResultDetails(boolean fetchResultDetails)
Parameters:
fetchResultDetails - the fetchResultDetails to set

isFetchResultDetails

public boolean isFetchResultDetails()
Returns:
the fetchResultDetails

setGeocodeResource

@Deprecated
public void setGeocodeResource(GISResource resource)
Deprecated. As of ArcGIS Java Server 9.3, instead use setResourceId(java.lang.String)

Sets the resource to perform geocode.

Parameters:
resource - the GISResource object.