com.esri.adf.web.data.tasks
Class TaskDescriptor

java.lang.Object
  extended by java.beans.FeatureDescriptor
      extended by com.esri.adf.web.data.tasks.TaskDescriptor
All Implemented Interfaces:
Serializable

public class TaskDescriptor
extends FeatureDescriptor
implements Serializable

The TaskDescriptor class provides metadata for the task class.

The metadata supported includes title text, enabled / disabled and help URLs.

See Also:
Serialized Form

Constructor Summary
TaskDescriptor(Class taskClass)
          Creates a TaskDescriptor.
TaskDescriptor(Class taskClass, String name, String displayName)
          Creates a TaskDescriptor with the given displayName as the title text.
 
Method Summary
 Element generateXML(Object task)
           Generates the XML content for this task.
 String getHelpUrl()
          Returns the URL to a help document describing this task.
 Class getTaskClass()
          Returns the task Class
 boolean isDisabled()
          If true, the task will be disabled in the UI.
 void setDisabled(boolean disabled)
          If set to true, the task will be disabled in the UI.
 void setHelpUrl(String helpUrl)
          Sets the URL to a help document describing this task.
 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
 

Constructor Detail

TaskDescriptor

public TaskDescriptor(Class taskClass,
                      String name,
                      String displayName)
Creates a TaskDescriptor with the given displayName as the title text.

Parameters:
taskClass - the task Class
name - the name of this task
displayName - the title text to be displayed in the task UI

TaskDescriptor

public TaskDescriptor(Class taskClass)
Creates a TaskDescriptor. The title text is derived from the name of the taskClass.

Parameters:
taskClass - the task Class
Method Detail

getTaskClass

public Class getTaskClass()
Returns the task Class

Returns:
the task Class

isDisabled

public boolean isDisabled()
If true, the task will be disabled in the UI. Default is false.

Returns:
if true, the task will be disabled in the UI. Default is false.

setDisabled

public void setDisabled(boolean disabled)
If set to true, the task will be disabled in the UI. Default is false.

Parameters:
disabled - if set to true, the task will be disabled in the UI. Default is false.

getHelpUrl

public String getHelpUrl()
Returns the URL to a help document describing this task. If this value is provided, the task UI will display a link to this help document.

Returns:
the URL to a help document describing this task

setHelpUrl

public void setHelpUrl(String helpUrl)
Sets the URL to a help document describing this task. If this value is provided, the task UI will display a link to this help document.

Parameters:
helpUrl - the URL to a help document describing this task

generateXML

public Element generateXML(Object task)

Generates the XML content for this task. This XML is then transformed by the XSL used by the task control to generate the appropriate markup.

Parameters:
task - the task object
Returns:
the generated XML Element

toString

public String toString()
Overrides:
toString in class Object