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

java.lang.Object
  extended by com.esri.adf.web.data.results.ResultsUtil

public class ResultsUtil
extends Object

The ResultsUtil has utility methods useful while working with WebResults.


Method Summary
static ResultNode generateGroupTaskResultNodes(String groupHeader, List<?> results, String displayNameMethodName, String detailsMethodName, Map<String,String> actionMethodNames)
           Generates a ResultNode for the group of results with the actual List of results as its children nodes.
static ResultNode generateGroupTaskResultNodes(String groupHeader, List<?> results, String displayNameMethodName, String detailsMethodName, Map<String,String> actionMethodNames, String onRemoveMethodName)
           Generates a ResultNode for the group of results with the actual List of results as its children nodes.
static List<ResultNode> generateTaskResultNodesWithActionArray(List<?> results, String displayNameMethodName, String detailsMethodName, String[] actionMethodNames)
           Returns a List of ResultNodes for all the results included in the results argument.
static List<ResultNode> generateTaskResultNodesWithActionArray(List<?> results, String displayNameMethodName, String detailsMethodName, String[] actionMethodNames, String onRemoveMethodName)
           Returns a List of ResultNodes for all the results included in the results argument.
static List<ResultNode> generateTaskResultNodesWithActionMap(List<?> results, String displayNameMethodName, String detailsMethodName, Map<String,String> actionMethodNames)
           Returns a List of ResultNodes for all the results included in the results argument.
static List<ResultNode> generateTaskResultNodesWithActionMap(List<?> results, String displayNameMethodName, String detailsMethodName, Map<String,String> actionMethodNames, String onRemoveMethodName)
           Returns a List of ResultNodes for all the results included in the results argument.
static void updateResultNode(ResultNode nodeToUpdate, List<?> results)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

generateGroupTaskResultNodes

public static ResultNode generateGroupTaskResultNodes(String groupHeader,
                                                      List<?> results,
                                                      String displayNameMethodName,
                                                      String detailsMethodName,
                                                      Map<String,String> actionMethodNames,
                                                      String onRemoveMethodName)

Generates a ResultNode for the group of results with the actual List of results as its children nodes.

Parameters:
groupHeader - the header for this List of results
results - the List of results for which the ResultNodes are to be generated
displayNameMethodName - the name of the method which returns the display text for the result
detailsMethodName - the name of the method which returns the result details as a java.util.Map of name-value pairs
actionMethodNames - a java.util.Map of <action display name>-<action method name> pairs
onRemoveMethodName - the name of the method to be called when the result is removed
Returns:
the ResultNode for the node representing this set of results

generateGroupTaskResultNodes

public static ResultNode generateGroupTaskResultNodes(String groupHeader,
                                                      List<?> results,
                                                      String displayNameMethodName,
                                                      String detailsMethodName,
                                                      Map<String,String> actionMethodNames)

Generates a ResultNode for the group of results with the actual List of results as its children nodes.

Parameters:
groupHeader - the header for this List of results
results - the List of results for which the ResultNodes are to be generated
displayNameMethodName - the name of the method which returns the display text for the result
detailsMethodName - the name of the method which returns the result details as a java.util.Map of name-value pairs
actionMethodNames - a java.util.Map of <action display name>-<action method name> pairs
Returns:
the ResultNode for the node representing this set of results

generateTaskResultNodesWithActionArray

public static List<ResultNode> generateTaskResultNodesWithActionArray(List<?> results,
                                                                      String displayNameMethodName,
                                                                      String detailsMethodName,
                                                                      String[] actionMethodNames)

Returns a List of ResultNodes for all the results included in the results argument.

Parameters:
results - the List of results for which the ResultNodes are to be generated
displayNameMethodName - the name of the method which returns the display text for the result
detailsMethodName - the name of the method which returns the result details as a java.util.Map of name-value pairs
actionMethodNames - an array of names of methods for performing actions on the result
Returns:
a List of ResultNodes for all the results included in the results argument

generateTaskResultNodesWithActionArray

public static List<ResultNode> generateTaskResultNodesWithActionArray(List<?> results,
                                                                      String displayNameMethodName,
                                                                      String detailsMethodName,
                                                                      String[] actionMethodNames,
                                                                      String onRemoveMethodName)

Returns a List of ResultNodes for all the results included in the results argument.

Parameters:
results - the List of results for which the ResultNodes are to be generated
displayNameMethodName - the name of the method which returns the display text for the result
detailsMethodName - the name of the method which returns the result details as a java.util.Map of name-value pairs
actionMethodNames - an array of names of methods for performing actions on the result
onRemoveMethodName - the name of the method to be called when the result is removed
Returns:
a List of ResultNodes for all the results included in the results argument

generateTaskResultNodesWithActionMap

public static List<ResultNode> generateTaskResultNodesWithActionMap(List<?> results,
                                                                    String displayNameMethodName,
                                                                    String detailsMethodName,
                                                                    Map<String,String> actionMethodNames)

Returns a List of ResultNodes for all the results included in the results argument.

Parameters:
results - the List of results for which the ResultNodes are to be generated
displayNameMethodName - the name of the method which returns the display text for the result
detailsMethodName - the name of the method which returns the result details as a java.util.Map of name-value pairs
actionMethodNames - a java.util.Map of <action display name>-<action method name> pairs
Returns:
a List of ResultNodes for all the results included in the results argument

generateTaskResultNodesWithActionMap

public static List<ResultNode> generateTaskResultNodesWithActionMap(List<?> results,
                                                                    String displayNameMethodName,
                                                                    String detailsMethodName,
                                                                    Map<String,String> actionMethodNames,
                                                                    String onRemoveMethodName)

Returns a List of ResultNodes for all the results included in the results argument.

Parameters:
results - the List of results for which the ResultNodes are to be generated
displayNameMethodName - the name of the method which returns the display text for the result
detailsMethodName - the name of the method which returns the result details as a java.util.Map of name-value pairs
actionMethodNames - a java.util.Map of <action display name>-<action method name> pairs
onRemoveMethodName - the name of the method to be called when the result is removed
Returns:
a List of ResultNodes for all the results included in the results argument

updateResultNode

public static void updateResultNode(ResultNode nodeToUpdate,
                                    List<?> results)