|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.beans.FeatureDescriptor
com.esri.adf.web.data.results.ResultDescriptor
public class ResultDescriptor
The ResultDescriptor contains the metadata for the result object wrapped by the ResultNode
object. The metadata includes methods on the result object for the display name, details, actions and on-remove.
The ResultNode
uses this metadata to invoke the appropriate methods on the wrapped result object.
When one calls the addXXX()
methods on the WebResults
, the ResultDescriptor
objects are internally created for the caller. However, you can always create the ResultDescriptor
object yourself and set it on the associated ResultNode
.
Field Summary | |
---|---|
static ResultDescriptor |
STRING_RESULT_DESCRIPTOR
A convenience ResultDescriptor for string results. |
Constructor Summary | |
---|---|
ResultDescriptor(Class resultClass,
String displayNameMethodName,
String detailsMethodName,
Map<String,String> actionMethodNames,
String onRemoveMethodName)
Creates a new ResultDescriptor object for the given resultClass and the designated
method names. |
Method Summary | |
---|---|
Method |
getActionMethod(String actionName)
Returns the Method corresponding to the given actionName . |
Map<String,Method> |
getActionMethods()
Returns the java.util.Map of <action name>-<action method> pairs associated with this
result. |
List<String> |
getActionNames()
Returns the List of action names associated with this result. |
Map<String,Object> |
getDetails(Object result)
Returns the details for the given result . |
Method |
getDetailsMethod()
Returns the details Method associated with this result. |
String |
getDisplayName(Object result)
Returns the display name for the given result . |
Method |
getDisplayNameMethod()
Returns the display name Method associated with this result. |
Method |
getOnRemoveMethod()
Returns the on-remove Method associated with this result. |
Object |
onRemove(Object result)
Invokes the designated on-remove method on the given result . |
Object |
processAction(Object result,
String actionName)
Invokes the action on the given result corresponding to the given actionName . |
String |
toString()
|
Methods inherited from class java.beans.FeatureDescriptor |
---|
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static ResultDescriptor STRING_RESULT_DESCRIPTOR
A convenience ResultDescriptor
for string results.
Constructor Detail |
---|
public ResultDescriptor(Class resultClass, String displayNameMethodName, String detailsMethodName, Map<String,String> actionMethodNames, String onRemoveMethodName)
Creates a new ResultDescriptor
object for the given resultClass
and the designated
method names.
resultClass
- the Class
of the result objectdisplayNameMethodName
- the name of the method which returns the display text for the resultdetailsMethodName
- the name of the method which returns the result details as a java.util.Map
of name-value pairsactionMethodNames
- an array of names of methods for performing actions on the resultonRemoveMethodName
- the name of the method to be called when the result is removed
ADFException
- if the given method names do not conform with the set rules for the designated methodsMethod Detail |
---|
public String getDisplayName(Object result)
Returns the display name for the given result
.
The display name is retrieved by invoking the desginated method name on the result.
result
- the result for which the display name is to be returned
result
ADFException
- if an exception occurred while getting the display namepublic Map<String,Object> getDetails(Object result)
Returns the details for the given result
. The details are represented as a
java.util.Map
of name-value pairs.
The details are retrieved by invoking the desginated method name on the result.
result
- the result for which the details are to be returned
java.util.Map
of name-value pairs
ADFException
- if an exception occurred while getting the detailspublic Object processAction(Object result, String actionName)
Invokes the action on the given result
corresponding to the given actionName
.
result
- the result on which the action is to be invokedactionName
- the name corresponding to which the action is to be invoked
public Object onRemove(Object result)
Invokes the designated on-remove method on the given result
.
result
- the result on which the on-remove method is to be invoked
public Method getActionMethod(String actionName)
Returns the Method
corresponding to the given actionName
.
actionName
- the name for which the associated Method
is to be returned
Method
corresponding to the given actionName
public List<String> getActionNames()
Returns the List
of action names associated with this result.
List
of action names associated with this resultpublic Map<String,Method> getActionMethods()
Returns the java.util.Map
of <action name>-<action method> pairs associated with this
result.
java.util.Map
of <action name>-<action method> pairspublic Method getDetailsMethod()
Returns the details Method
associated with this result.
Method
associated with this resultpublic Method getDisplayNameMethod()
Returns the display name Method
associated with this result.
Method
associated with this resultpublic Method getOnRemoveMethod()
Returns the on-remove Method
associated with this result.
Method
associated with this resultpublic String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |