com.esri.adf.web.data.results
Class ResultDefinition

java.lang.Object
  extended by com.esri.adf.web.data.results.ResultDefinition
All Implemented Interfaces:
Serializable

public class ResultDefinition
extends Object
implements Serializable

ResultDefinition defines how to render query results in the result view of a map application. It specifies the actions and their corresponding handler (method name). A sample code snippet on how to define a ResultDefinition for geocoding result


      WebResults results = wContext.getWebResults();
      ResultDefinition definition = new ResultDefinition();
      definition.setHeader(this.taskName);
      definition.setDisplayNameMethodName("getAddress");
      definition.setDetailsMethodName("getDetails");
      definition.setActionMethodNames(actions);
      definition.setShowInfoWindow(this.isShowInfoWindow());
      definition.setGraphicsResource(wContext.getDefaultGraphicsResource());
      definition.setLayerDefinitions(lyrDefs);
      definition.setRemoveMethodName("clearGraphics");
      
      results.addAddressCandidates(candidates, definition);

See Also:
WebResults, Serialized Form

Constructor Summary
ResultDefinition()
           
 
Method Summary
 Map<String,String> getActionMethodNames()
          Gets all the action item and method name pairs defined in this object.
 String getDetailsMethodName()
          Gets the method to handle action "detail"
 String getDisplayNameMethodName()
          Gets the method handling action "display"
 GraphicsResource getGraphicsResource()
          Gets the GraphicsResource instance associated with the result.
 String getHeader()
          Gets the header name of the root result node.
 List<? extends LayerDefinition> getLayerDefinitions()
          Returns the list of LayerDefinition associated with the result.
 String getRemoveMethodName()
          Gets the method handling action "remove".
 boolean isShowInfoWindow()
          Returns true map tips window is enabled.
 void setActionMethodNames(Map<String,String> actionMethodNames)
          Sets the menu titles and their corresponding action names.
 void setDetailsMethodName(String detailsMethodName)
          Sets the method to handle action "detail"
 void setDisplayNameMethodName(String displayNameMethodName)
          Sets the method to handle the action "display" when right click on result.
 void setGraphicsResource(GraphicsResource graphicsResource)
          Sets the GraphicsResource instance associated with the result.
 void setHeader(String header)
          Sets the header name of the root result node.
 void setLayerDefinitions(List<? extends LayerDefinition> layerDefinitions)
          Sets the list of LayerDefinition objects associated with the result.
 void setRemoveMethodName(String removeMethodName)
          Sets the method handling action "remove".
 void setShowInfoWindow(boolean showInfoWindow)
          Sets to true to show map tips window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultDefinition

public ResultDefinition()
Method Detail

getActionMethodNames

public Map<String,String> getActionMethodNames()
Gets all the action item and method name pairs defined in this object.


setActionMethodNames

public void setActionMethodNames(Map<String,String> actionMethodNames)
Sets the menu titles and their corresponding action names.

Parameters:
actionMethodNames - action name and method name pairs.

getRemoveMethodName

public String getRemoveMethodName()
Gets the method handling action "remove".


setRemoveMethodName

public void setRemoveMethodName(String removeMethodName)
Sets the method handling action "remove".

Parameters:
removeMethodName - the method name.

getHeader

public String getHeader()
Gets the header name of the root result node.


setHeader

public void setHeader(String header)
Sets the header name of the root result node.


getDisplayNameMethodName

public String getDisplayNameMethodName()
Gets the method handling action "display"


setDisplayNameMethodName

public void setDisplayNameMethodName(String displayNameMethodName)
Sets the method to handle the action "display" when right click on result.

Parameters:
displayNameMethodName - the method name.

getDetailsMethodName

public String getDetailsMethodName()
Gets the method to handle action "detail"


setDetailsMethodName

public void setDetailsMethodName(String detailsMethodName)
Sets the method to handle action "detail"


getLayerDefinitions

public List<? extends LayerDefinition> getLayerDefinitions()
Returns the list of LayerDefinition associated with the result.

Returns:
the list of layer definition objects

setLayerDefinitions

public void setLayerDefinitions(List<? extends LayerDefinition> layerDefinitions)
Sets the list of LayerDefinition objects associated with the result.

Parameters:
layerDefinitions - the list of layer definition objects

isShowInfoWindow

public boolean isShowInfoWindow()
Returns true map tips window is enabled.


setShowInfoWindow

public void setShowInfoWindow(boolean showInfoWindow)
Sets to true to show map tips window.


getGraphicsResource

public GraphicsResource getGraphicsResource()
Gets the GraphicsResource instance associated with the result.


setGraphicsResource

public void setGraphicsResource(GraphicsResource graphicsResource)
Sets the GraphicsResource instance associated with the result.