|
|||||||||
| 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.tasks.TaskParamDescriptor
public class TaskParamDescriptor
The TaskParamDescriptor class provides metadata for the task parameters.
This is the out of box implementation of the TaskParamDescriptorModel interface and
supports the rendering of parameters as labels, text boxes, checkboxes, radio buttons and dropdowns.
| Field Summary | |
|---|---|
static java.lang.String |
CHECKBOX_RENDERER_TYPE
The checkbox renderer type. |
static java.lang.String |
LABEL_RENDERER_TYPE
The label renderer type. |
static java.lang.String |
RADIO_RENDERER_TYPE
The radio button renderer type. |
static java.lang.String |
SELECT_RENDERER_TYPE
The select (dropdown) renderer type. |
static java.lang.String |
TEXT_RENDERER_TYPE
The textbox renderer type. |
| Constructor Summary | |
|---|---|
TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName)
Creates a TaskParamDescriptor with a textbox renderer. |
|
TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String selectMethodName)
Creates a TaskParamDescriptor with a dropdown renderer. |
|
TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String selectMethodName,
boolean radioRendererType)
Creates a TaskParamDescriptor with a radio button or a dropdown renderer. |
|
TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String readMethodName,
java.lang.String writeMethodName)
Creates a TaskParamDescriptor with a textbox renderer. |
|
TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String readMethodName,
java.lang.String writeMethodName,
java.lang.String selectMethodName)
Creates a TaskParamDescriptor with a dropdown renderer. |
|
TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String readMethodName,
java.lang.String writeMethodName,
java.lang.String selectMethodName,
boolean radioRendererType)
Creates a TaskParamDescriptor with a radio button or a dropdown renderer. |
|
TaskParamDescriptor(java.lang.String paramName,
java.lang.Class paramClass,
java.lang.reflect.Method readMethod,
java.lang.reflect.Method writeMethod,
java.lang.reflect.Method selectMethod)
Creates a TaskParamDescriptor with a dropdown renderer. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
generateXML(java.lang.Object task)
Generates the XML content for this parameter. |
java.lang.Class |
getParamClass()
Returns the parameter Class. |
java.lang.Object |
getParamValue(java.lang.Object task)
Returns the current value of the parameter for the given task. |
java.lang.reflect.Method |
getReadMethod()
Returns the read (getter) method of the parameter |
java.lang.String |
getRendererType()
Returns the renderer type of this parameter. |
java.lang.reflect.Method |
getSelectMethod()
Returns the select options method of the parameter |
java.lang.reflect.Method |
getWriteMethod()
Returns the write (setter) method of the parameter |
boolean |
isDisabled()
If true, this parameter will be disabled in the UI. |
void |
setDisabled(boolean disabled)
If set to true, this parameter will be disabled in the UI. |
java.lang.Object |
setParamValue(java.lang.Object task,
java.lang.String strVal)
Sets the parameter value on the task and returns the set value. |
void |
setRendererType(java.lang.String rendererType)
Sets the renderer type of this parameter. |
java.lang.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 |
| Methods inherited from interface com.esri.adf.web.data.tasks.TaskParamDescriptorModel |
|---|
getDisplayName, getName |
| Field Detail |
|---|
public static final java.lang.String LABEL_RENDERER_TYPE
public static final java.lang.String TEXT_RENDERER_TYPE
public static final java.lang.String SELECT_RENDERER_TYPE
public static final java.lang.String CHECKBOX_RENDERER_TYPE
public static final java.lang.String RADIO_RENDERER_TYPE
| Constructor Detail |
|---|
public TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String readMethodName,
java.lang.String writeMethodName)
TaskParamDescriptor with a textbox renderer.
taskClass - the task ClassparamName - the name of the parameterdisplayName - the display text of the parameterreadMethodName - the read (getter) method name of the parameterwriteMethodName - the write (setter) method name of the parameter
public TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String readMethodName,
java.lang.String writeMethodName,
java.lang.String selectMethodName,
boolean radioRendererType)
TaskParamDescriptor with a radio button or a dropdown renderer.
taskClass - the task ClassparamName - the name of the parameterdisplayName - the display text of the parameterreadMethodName - the read (getter) method name of the parameterwriteMethodName - the write (setter) method name of the parameterselectMethodName - the select method name for this parameterradioRendererType - if true, the parameter is displayed as radio buttons. Otherwise, it is displayed as a dropdown
public TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String readMethodName,
java.lang.String writeMethodName,
java.lang.String selectMethodName)
TaskParamDescriptor with a dropdown renderer.
taskClass - the task ClassparamName - the name of the parameterdisplayName - the display text of the parameterreadMethodName - the read (getter) method name of the parameterwriteMethodName - the write (setter) method name of the parameterselectMethodName - the select method name for this parameter
public TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName)
Creates a TaskParamDescriptor with a textbox renderer.
If the param name is param, the setter method is assumed to be setParam(paramValue) and
the getter method is assumed to be getParam() (or isParam() for booleans)
taskClass - the task ClassparamName - the name of the parameterdisplayName - the display text of the parameter
public TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String selectMethodName,
boolean radioRendererType)
TaskParamDescriptor with a radio button or a dropdown renderer.
If the param name is param, the setter method is assumed to be setParam(paramValue) and
the getter method is assumed to be getParam() (or isParam() for booleans)
taskClass - the task ClassparamName - the name of the parameterdisplayName - the display text of the parameterselectMethodName - the select method name for this parameterradioRendererType - if true, the parameter is displayed as radio buttons. Otherwise, it is displayed as a dropdown
public TaskParamDescriptor(java.lang.Class taskClass,
java.lang.String paramName,
java.lang.String displayName,
java.lang.String selectMethodName)
TaskParamDescriptor with a dropdown renderer.
If the param name is param, the setter method is assumed to be setParam(paramValue) and
the getter method is assumed to be getParam() (or isParam() for booleans)
taskClass - the task ClassparamName - the name of the parameterdisplayName - the display text of the parameterselectMethodName - the select method name for this parameter
public TaskParamDescriptor(java.lang.String paramName,
java.lang.Class paramClass,
java.lang.reflect.Method readMethod,
java.lang.reflect.Method writeMethod,
java.lang.reflect.Method selectMethod)
TaskParamDescriptor with a dropdown renderer.
paramName - the name of the parameterparamClass - the parameter ClassreadMethod - the read (getter) method of the parameterwriteMethod - the write (setter) method of the parameterselectMethod - the select options method of the parameter| Method Detail |
|---|
public java.lang.Class getParamClass()
Class.
For ex., if the parameter is of type int, this method returns the Integer class.
Classpublic java.lang.reflect.Method getReadMethod()
public java.lang.reflect.Method getWriteMethod()
public java.lang.reflect.Method getSelectMethod()
public java.lang.String getRendererType()
TEXT_RENDERER_TYPE, SELECT_RENDERER_TYPE, etc.)
getRendererType in interface TaskParamDescriptorModelpublic void setRendererType(java.lang.String rendererType)
TEXT_RENDERER_TYPE, SELECT_RENDERER_TYPE, etc.)
public boolean isDisabled()
true, this parameter will be disabled in the UI.
true, this parameter will be disabled in the UIpublic void setDisabled(boolean disabled)
true, this parameter will be disabled in the UI.
disabled - if set to true, this parameter will be disabled in the UI
public java.lang.Object setParamValue(java.lang.Object task,
java.lang.String strVal)
TaskParamDescriptorModelSets the parameter value on the task and returns the set value. This method should convert the string input to the appropriate parameter type before setting the parameter.
setParamValue in interface TaskParamDescriptorModeltask - the task object on which to set the parameter valuestrVal - the string representation of the parameter value to be set
public java.lang.Object getParamValue(java.lang.Object task)
TaskParamDescriptorModelReturns the current value of the parameter for the given task.
getParamValue in interface TaskParamDescriptorModeltask - the task object
public org.w3c.dom.Element generateXML(java.lang.Object task)
TaskParamDescriptorModelGenerates the XML content for this parameter. This XML is then transformed by the XSL used by the task control to generate the appropriate markup.
Note that if you implement this method and generate custom XML,
you'll also need to provide the XSL that transforms this XML into the appropriate markup.
The XSL file that the task control should use can be specified by using the xslFile attribute of the task tag.
generateXML in interface TaskParamDescriptorModeltask - the task object
Elementpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||