|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.tasks.SearchAttributesTask
public class SearchAttributesTask
Constructor Summary | |
---|---|
SearchAttributesTask()
|
Method Summary | |
---|---|
void |
clearGraphics()
|
void |
destroy()
The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in
this method. |
String |
getButtonText()
Returns the search button text |
String |
getDisplayFieldName()
Deprecated. As of ArcGIS Java Server 9.3, instead use getLayerDefinitions() |
String |
getDisplayName()
Returns the task window title name. |
String |
getHelpURL()
Returns the task help URL. |
String |
getLabelText()
Returns the label text for the search field. |
List<? extends LayerDefinition> |
getLayerDefinitions()
Returns the list of LayerDefinition . |
int |
getLayerId()
Deprecated. As of ArcGIS Java Server 9.3, instead use getSearchableLayers() |
int |
getLayerIndex()
Returns the layer index. |
Map<Integer,String> |
getLayers()
Returns the key value pair with layer index and layer name of all the resource(s). |
int |
getMaxRecordCount()
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getMaxRecordCount() |
GISResource |
getResource()
Deprecated. As of ArcGIS Java Server 9.3, instead get the resource from WebContext.getResourceById(String)
based on the resource id. |
List<String> |
getReturnFields()
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getReturnFields() |
Map<String,String> |
getSearchableLayers()
Returns the map entry of searchable layers. |
List<String> |
getSearchFields()
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getSearchFields() |
String |
getSearchText()
Returns the default search text value. |
SearchAttributesTaskConfig |
getTaskConfig()
Deprecated. As of ArcGIS Java Server 9.3, instead use this class to get all properties |
TaskInfo |
getTaskInfo()
|
String |
getToolTip()
Returns the tool tip of search button. |
WebContext |
getWebContext()
|
void |
init(WebContext webContext)
The initialization chores of attributes of a WebContext should be performed in this method. |
boolean |
isShowInfoWindow()
Returns true if the task result(s) to be shown in the info window. |
void |
search(TaskEvent event)
|
List<QueryResult> |
search(WebContext webContext)
Search features on the map based on the specified context and text value set using setSearchText(String) . |
void |
searchByExtent(MapEvent event)
|
List<QueryResult> |
searchByExtent(WebContext webContext,
WebGeometry webGeometry)
Search features by extent on the map based on the specified context and geometry. |
List<QueryResult> |
searchByExtent(WebGeometry webGeometry)
Search features by extent on the map based on the specified geometry. |
void |
setButtonText(String text)
Sets the search button text |
void |
setDisplayFieldName(String displayFieldName)
Deprecated. As of ArcGIS Java Server 9.3, instead use setLayerDefinitions(java.util.List extends com.esri.adf.web.data.query.LayerDefinition>) |
void |
setDisplayName(String displayName)
Sets the task window title name. |
void |
setHelpURL(String helpURL)
Sets the task help URL. |
void |
setLabelText(String labelText)
Sets the label text for the search field. |
void |
setLayerDefinitions(List<? extends LayerDefinition> layerDefinitions)
Sets the list of LayerDefinition objects. |
void |
setLayerId(int layerId)
Deprecated. As of ArcGIS Java Server 9.3, instead use setSearchableLayers(java.util.Map |
void |
setLayerIndex(int layerIndex)
Sets the layer index. |
void |
setMaxRecordCount(int count)
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getMaxRecordCount() |
void |
setResource(GISResource resource)
Deprecated. As of ArcGIS Java Server 9.3, instead use setSearchableLayers(java.util.Map |
void |
setReturnFields(List<String> returnFields)
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.setReturnFields(List) |
void |
setSearchableLayers(Map<String,String> searchableLayers)
Sets the map entry of searchable layers. |
void |
setSearchFields(List<String> searchFields)
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.setSearchFields(List) |
void |
setSearchText(String defaultSearchTextValue)
Sets the default search text value. |
void |
setShowInfoWindow(boolean showInfoWindow)
Sets whether the task result(s) to be shown in the info window or not. |
void |
setTaskConfig(SearchAttributesTaskConfig searchConfig)
Deprecated. As of ArcGIS Java Server 9.3, instead use this class to set all properties |
void |
setTaskInfo(TaskInfo taskInfo)
|
void |
setToolTip(String toolTip)
Sets the tool tip of search button. |
void |
setWebContext(WebContext webContext)
Deprecated. As of ArcGIS Java Server 9.3, no replacement |
void |
update(WebContext webContext,
Object arg)
This method is called by the WebContext on its registered WebContextObserver s when users call the
refresh() methods on the context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchAttributesTask()
Method Detail |
---|
public void init(WebContext webContext)
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.
init
in interface WebContextInitialize
webContext
- WebContext
- the WebContextWebContext.init(WebContext)
,
WebContext.addResource(String, GISResource, int)
,
WebContext.removeResource(GISResource)
public void destroy()
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.
destroy
in interface WebContextInitialize
WebContext.destroy()
public void update(WebContext webContext, Object arg)
WebContextObserver
This method is called by the WebContext
on its registered WebContextObserver
s when users call the
refresh()
methods on the context.
To setup an object to be updated by the context, one needs to use the
WebContext.addObserver(WebContextObserver)
to register itself with the context. All
context attributes are wired up to the WebContext
. When users change state on any of
the attributes and need to intimate other attributes of the context to react to the change they call either the
WebContext.refresh()
or WebContext.refresh(Object)
methods. The context in turns calls the WebContextObserver.update(WebContext, Object)
methods on all its registered
observers.
update
in interface WebContextObserver
webContext
- the WebContext
that has been refreshedarg
- the argument passed to the WebContext
's refresh(arg)
methodWebContext.refresh(Object)
,
WebContext.addObserver(WebContextObserver)
,
WebContext.removeObserver(WebContextObserver)
public WebContext getWebContext()
public void setTaskInfo(TaskInfo taskInfo)
setTaskInfo
in interface TaskInfoBean
public TaskInfo getTaskInfo()
getTaskInfo
in interface TaskInfoBean
public void searchByExtent(MapEvent event)
public List<QueryResult> searchByExtent(WebGeometry webGeometry)
webGeometry
- the geometry in map coordinatespublic List<QueryResult> searchByExtent(WebContext webContext, WebGeometry webGeometry)
webContext
- the context object, passing null will use the context from this objectwebGeometry
- the geometry in map coordinates
public void search(TaskEvent event)
public List<QueryResult> search(WebContext webContext)
setSearchText(String)
.
webContext
- the context object, passing null will use the context from this object
public void clearGraphics()
public void setLayerIndex(int layerIndex)
layerIndex
- the layer indexpublic int getLayerIndex()
public Map<Integer,String> getLayers()
Map
the key value pair with layer index and layer name of all the resource(s).public void setDisplayName(String displayName)
displayName
- the task window title namepublic String getDisplayName()
public void setHelpURL(String helpURL)
helpURL
- the task help URLpublic String getHelpURL()
public void setLabelText(String labelText)
labelText
- the label text for the search fieldpublic String getLabelText()
public void setSearchText(String defaultSearchTextValue)
defaultSearchTextValue
- the default search textpublic String getSearchText()
public void setButtonText(String text)
text
- a Stringpublic String getButtonText()
public void setToolTip(String toolTip)
toolTip
- the tool tip of search buttonpublic String getToolTip()
public void setLayerDefinitions(List<? extends LayerDefinition> layerDefinitions)
LayerDefinition
objects.
layerDefinitions
- the list of layer definition objectspublic List<? extends LayerDefinition> getLayerDefinitions()
LayerDefinition
.
public void setShowInfoWindow(boolean showInfoWindow)
showInfoWindow
- if true, info window is shownpublic boolean isShowInfoWindow()
public void setSearchableLayers(Map<String,String> searchableLayers)
For Example, java.util.Map<String, Integer> searchableLayers = new java.util.LinkedHashMap<String, Integer>(1); searchableLayers.put("ags1", "2,3"); searchableLayers.put("aws1", "0"); searchableLayers.put("aims1", "0,5");
searchableLayers
- the map entry of searchable layerspublic Map<String,String> getSearchableLayers()
@Deprecated public void setTaskConfig(SearchAttributesTaskConfig searchConfig)
searchConfig
- the search attributes task config object@Deprecated public SearchAttributesTaskConfig getTaskConfig()
@Deprecated public void setWebContext(WebContext webContext)
@Deprecated public void setDisplayFieldName(String displayFieldName)
setLayerDefinitions(java.util.List extends com.esri.adf.web.data.query.LayerDefinition>)
displayFieldName
- a String@Deprecated public String getDisplayFieldName()
getLayerDefinitions()
@Deprecated public void setLayerId(int layerId)
setSearchableLayers(java.util.Map)
layerId
- the layer id@Deprecated public int getLayerId()
getSearchableLayers()
@Deprecated public void setMaxRecordCount(int count)
LayerDefinition.getMaxRecordCount()
count
- the number of features to be returned@Deprecated public int getMaxRecordCount()
LayerDefinition.getMaxRecordCount()
@Deprecated public void setResource(GISResource resource)
setSearchableLayers(java.util.Map)
resource
- the GISResource
object@Deprecated public GISResource getResource()
WebContext.getResourceById(String)
based on the resource id.
GISResource
object.
GISResource
object@Deprecated public List<String> getReturnFields()
LayerDefinition.getReturnFields()
@Deprecated public void setReturnFields(List<String> returnFields)
LayerDefinition.setReturnFields(List)
returnFields
- the list of return field name@Deprecated public List<String> getSearchFields()
LayerDefinition.getSearchFields()
@Deprecated public void setSearchFields(List<String> searchFields)
LayerDefinition.setSearchFields(List)
searchFields
- tthe list of search fields
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |