|
|||||||||
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 String |
CHECKBOX_RENDERER_TYPE
The checkbox renderer type. |
static String |
LABEL_RENDERER_TYPE
The label renderer type. |
static String |
MULTIPLESELECT_RENDERER_TYPE
The multiple select (listbox) renderer type. |
static String |
MULTIPLESELECT_SEPARATOR
Token used to split the multiple selection string. |
static String |
RADIO_RENDERER_TYPE
The radio button renderer type. |
static String |
SELECT_RENDERER_TYPE
The select (dropdown) renderer type. |
static String |
TEXT_RENDERER_TYPE
The textbox renderer type. |
Constructor Summary | |
---|---|
TaskParamDescriptor(Class taskClass,
String paramName,
String displayName)
Creates a TaskParamDescriptor with a textbox renderer. |
|
TaskParamDescriptor(Class taskClass,
String paramName,
String displayName,
String selectMethodName)
Creates a TaskParamDescriptor with a dropdown renderer. |
|
TaskParamDescriptor(Class taskClass,
String paramName,
String displayName,
String selectMethodName,
boolean radioRendererType)
Creates a TaskParamDescriptor with a radio button or a drop down renderer. |
|
TaskParamDescriptor(Class taskClass,
String paramName,
String displayName,
String readMethodName,
String writeMethodName)
Creates a TaskParamDescriptor with a text box renderer. |
|
TaskParamDescriptor(Class taskClass,
String paramName,
String displayName,
String readMethodName,
String writeMethodName,
String selectMethodName)
Creates a TaskParamDescriptor with a dropdown renderer. |
|
TaskParamDescriptor(Class taskClass,
String paramName,
String displayName,
String readMethodName,
String writeMethodName,
String selectMethodName,
boolean radioRendererType)
Creates a TaskParamDescriptor with a radio button or a dropdown renderer. |
|
TaskParamDescriptor(Class taskClass,
String paramName,
String displayName,
String readMethodName,
String writeMethodName,
String selectMethodName,
int selectSize)
Creates a TaskParamDescriptor to render a list box with multiple selection |
|
TaskParamDescriptor(String paramName,
Class paramClass,
Method readMethod,
Method writeMethod,
Method selectMethod)
Creates a TaskParamDescriptor with a dropdown renderer. |
Method Summary | |
---|---|
Element |
generateXML(Object task)
Generates the XML content for this parameter. |
Class |
getParamClass()
Returns the parameter Class . |
Object |
getParamValue(Object task)
Returns the current value of the parameter for the given task. |
Method |
getReadMethod()
Returns the read (getter) method of the parameter |
String |
getRendererType()
Returns the renderer type of this parameter. |
Method |
getSelectMethod()
Returns the select options method of the parameter |
TaskParamValidator |
getValidator()
Returns the TaskParamValidator object which is used for validating this Task parameter's value. |
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. |
Object |
setParamValue(Object task,
String strValue)
Sets the parameter value on the task and returns the set value. |
void |
setRendererType(String rendererType)
Sets the renderer type of this parameter. |
void |
setValidator(TaskParamValidator taskParamValidator)
Sets the TaskParamValidator object to use for validating this Task parameter's value. |
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 String MULTIPLESELECT_SEPARATOR
public static final String LABEL_RENDERER_TYPE
public static final String TEXT_RENDERER_TYPE
public static final String SELECT_RENDERER_TYPE
public static final String MULTIPLESELECT_RENDERER_TYPE
public static final String CHECKBOX_RENDERER_TYPE
public static final String RADIO_RENDERER_TYPE
Constructor Detail |
---|
public TaskParamDescriptor(Class taskClass, String paramName, String displayName, String readMethodName, String writeMethodName)
TaskParamDescriptor
with a text box renderer.
taskClass
- the task Class
paramName
- 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 parameterpublic TaskParamDescriptor(Class taskClass, String paramName, String displayName, String readMethodName, String writeMethodName, String selectMethodName, boolean radioRendererType)
TaskParamDescriptor
with a radio button or a dropdown renderer.
taskClass
- the task Class
paramName
- 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 dropdownpublic TaskParamDescriptor(Class taskClass, String paramName, String displayName, String readMethodName, String writeMethodName, String selectMethodName, int selectSize)
TaskParamDescriptor
to render a list box with multiple selection
taskClass
- the task Class
paramName
- 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 parameterselectSize
- define the height of the list box, it must be greater than onepublic TaskParamDescriptor(Class taskClass, String paramName, String displayName, String readMethodName, String writeMethodName, String selectMethodName)
TaskParamDescriptor
with a dropdown renderer.
taskClass
- the task Class
paramName
- 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 parameterpublic TaskParamDescriptor(Class taskClass, String paramName, 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 Class
paramName
- the name of the parameterdisplayName
- the display text of the parameterpublic TaskParamDescriptor(Class taskClass, String paramName, String displayName, String selectMethodName, boolean radioRendererType)
TaskParamDescriptor
with a radio button or a drop down 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 Class
paramName
- 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 drop downpublic TaskParamDescriptor(Class taskClass, String paramName, String displayName, 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 Class
paramName
- the name of the parameterdisplayName
- the display text of the parameterselectMethodName
- the select method name for this parameterpublic TaskParamDescriptor(String paramName, Class paramClass, Method readMethod, Method writeMethod, Method selectMethod)
TaskParamDescriptor
with a dropdown renderer.
paramName
- the name of the parameterparamClass
- the parameter Class
readMethod
- the read (getter) method of the parameterwriteMethod
- the write (setter) method of the parameterselectMethod
- the select options method of the parameterMethod Detail |
---|
public Class getParamClass()
Class
. For ex., if the parameter is of type int
, this method
returns the Integer
class.
Class
public Method getReadMethod()
public Method getWriteMethod()
public Method getSelectMethod()
public String getRendererType()
TEXT_RENDERER_TYPE
, SELECT_RENDERER_TYPE
,
etc.)
getRendererType
in interface TaskParamDescriptorModel
public void setRendererType(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 UIpublic void setValidator(TaskParamValidator taskParamValidator)
TaskParamValidator
object to use for validating this Task parameter's value.
Default value is null, indicating that the value will not be validated.
setValidator
in interface TaskParamValidatorModel
taskParamValidator
- a public TaskParamValidator getValidator()
TaskParamValidator
object which is used for validating this Task parameter's value.
Default value is null, indicating that the value will not be validated.
public Object setParamValue(Object task, String strValue)
TaskParamDescriptorModel
Sets 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 TaskParamDescriptorModel
task
- the task object on which to set the parameter valuestrValue
- the string representation of the parameter value to be set
public Object getParamValue(Object task)
TaskParamDescriptorModel
Returns the current value of the parameter for the given task.
getParamValue
in interface TaskParamDescriptorModel
task
- the task object
public Element generateXML(Object task)
TaskParamDescriptorModel
Generates 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 TaskParamDescriptorModel
task
- the task object
Element
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |