public class

GPTaskInfo

extends Object
java.lang.Object
   ↳ com.esri.core.tasks.ags.geoprocessing.GPTaskInfo

Class Overview

This class provides information on a geoprocessing task at a given URL. Information includes:

  • Task name
  • Task display name
  • The task's category, if any
  • The help URL, if any
  • Whether the task is synchronous or asynchronous
  • A list of task parameters

Summary

Nested Classes
enum GPTaskInfo.ExecutionType Indicates whether a task is synchronous or asynchronous. 
class GPTaskInfo.GPParameterInfo This class provides information on a single parameter of a geoprocessing task. 
enum GPTaskInfo.ParamDirection Indicates whether a task parameter is input or output. 
enum GPTaskInfo.ParamType Indicates whether a task parameter is required, optional or derived. 
Public Constructors
GPTaskInfo()
Public Methods
static GPTaskInfo fromJson(JsonParser parser)
Create a GPTaskInfo instance from the json contained in the given JsonParser object.
static GPTaskInfo fromUrl(String url, UserCredentials credentials)
Create a GPTaskInfo instance for the task at the given URL.
static GPTaskInfo fromUrl(String url)
Creates a GPTaskInfo instance for the task at the given URL.
String getCategory()
Gets the category.
String getDisplayName()
Gets the display name.
GPTaskInfo.ExecutionType getExecutionType()
Gets the execution type.
String getHelpUrl()
Gets the help URL.
String getName()
Gets the name.
GPParameterInfo[] getParameters()
Gets the parameters.
Protected Methods
void setCategory(String category)
Sets the category.
void setDisplayName(String displayName)
Sets the display name.
void setExecutionType(GPTaskInfo.ExecutionType execType)
Sets the execution type.
void setHelpUrl(String helpUrl)
Sets the help URL.
void setName(String name)
Sets the name.
void setParameters(GPParameterInfo[] parameterInfo)
Sets the parameters.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GPTaskInfo ()

Public Methods

public static GPTaskInfo fromJson (JsonParser parser)

Create a GPTaskInfo instance from the json contained in the given JsonParser object.

Parameters
parser JsonParser: the parser
Returns
GPTaskInfo the GP task info
Throws
Exception when the Json cannot be parsed.

public static GPTaskInfo fromUrl (String url, UserCredentials credentials)

Create a GPTaskInfo instance for the task at the given URL. Login credentials are provided by the credentials parameter. This method will query the service and return the service information.

Parameters
url String: the URL of the task
credentials UserCredentials: the credentials required to access the service
Returns
GPTaskInfo the GP task info
Throws
Exception
Exception

public static GPTaskInfo fromUrl (String url)

Creates a GPTaskInfo instance for the task at the given URL. This method will query the service and return the task information.

Parameters
url String: the URL of the task
Returns
GPTaskInfo the GP task info
Throws
Exception when the Json cannot be parsed

public String getCategory ()

Gets the category.

Returns
String the category

public String getDisplayName ()

Gets the display name.

Returns
String the display name

public GPTaskInfo.ExecutionType getExecutionType ()

Gets the execution type.

Returns
GPTaskInfo.ExecutionType the execution type

public String getHelpUrl ()

Gets the help URL.

Returns
String the help URL

public String getName ()

Gets the name.

Returns
String the name

public GPParameterInfo[] getParameters ()

Gets the parameters.

Returns
GPParameterInfo[] an array of parameters

Protected Methods

protected void setCategory (String category)

Sets the category.

Parameters
category String: the new category

protected void setDisplayName (String displayName)

Sets the display name.

Parameters
displayName String: the new display name

protected void setExecutionType (GPTaskInfo.ExecutionType execType)

Sets the execution type.

Parameters
execType GPTaskInfo.ExecutionType: the new execution type

protected void setHelpUrl (String helpUrl)

Sets the help URL.

Parameters
helpUrl String: the new help URL

protected void setName (String name)

Sets the name.

Parameters
name String: the new name

protected void setParameters (GPParameterInfo[] parameterInfo)

Sets the parameters.

Parameters
parameterInfo GPParameterInfo: the new parameters