com.esri.arcgis.geoprocessing
Class BaseGeoprocessingTool

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.BaseGeoprocessingTool
All Implemented Interfaces:
IGPFunction, IGPFunction2, java.io.Serializable

public abstract class BaseGeoprocessingTool
extends java.lang.Object
implements IGPFunction2

See Also:
Serialized Form

Field Summary
 GPUtilities gpUtilities
           
 
Constructor Summary
BaseGeoprocessingTool()
           
 
Method Summary
abstract  void execute(IArray paramvalues, ITrackCancel trackcancel, IGPEnvironmentManager envMgr, IGPMessages messages)
          Executes the tool
 IUID getDialogCLSID()
          Returns Dialog Class ID
abstract  java.lang.String getDisplayName()
          This is the display name of the function tool.
abstract  IName getFullName()
          This is the function name object for the geoprocessing function tool.
 int getHelpContext()
          Returns the Help Context - unique context identifier in a [MAP] file (.h).
 java.lang.String getHelpFile()
          Returns path to a compiled help file (a .chm file), which is used to describe and explain the function and its operations
abstract  java.lang.String getMetadataFile()
          This is the name of the .xml file containing the default metadata for this function object.
abstract  java.lang.String getName()
          This is the name of the function tool.
abstract  IArray getParameterInfo()
          Returns an array of paramInfo This is the location where the parameters to the Function Tool are defined.
 java.lang.Object getRenderer(IGPParameter arg0)
          This is used to set a custom renderer for the output of the function tool.
abstract  boolean isLicensed()
          This is used to return whether the function tool is licensed to execute.
abstract  void updateMessages(IArray paramvalues, IGPEnvironmentManager envMgr, IGPMessages gpMessages)
          Post validates the given set of values.
abstract  void updateParameters(IArray paramvalues, IGPEnvironmentManager envMgr)
          Pre validates the given set of values.
 IGPMessages validate(IArray paramvalues, boolean updateValues, IGPEnvironmentManager envMgr)
          Validates the tool This will validate each parameter and return messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gpUtilities

public GPUtilities gpUtilities
Constructor Detail

BaseGeoprocessingTool

public BaseGeoprocessingTool()
Method Detail

getParameterInfo

public abstract IArray getParameterInfo()
                                 throws java.io.IOException,
                                        AutomationException
Returns an array of paramInfo This is the location where the parameters to the Function Tool are defined. This property returns an IArray of parameter objects (IGPParameter). These objects define the characteristics of the input and output parameters.

Specified by:
getParameterInfo in interface IGPFunction
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

updateParameters

public abstract void updateParameters(IArray paramvalues,
                                      IGPEnvironmentManager envMgr)
Pre validates the given set of values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
updateParameters in interface IGPFunction2
Parameters:
paramvalues - A reference to a com.esri.arcgis.system.IArray (in)
pEnvMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

updateMessages

public abstract void updateMessages(IArray paramvalues,
                                    IGPEnvironmentManager envMgr,
                                    IGPMessages gpMessages)
Post validates the given set of values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
updateMessages in interface IGPFunction2
Parameters:
paramvalues - A reference to a com.esri.arcgis.system.IArray (in)
pEnvMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
messages - A reference to a com.esri.arcgis.geodatabase.IGPMessages (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

public abstract void execute(IArray paramvalues,
                             ITrackCancel trackcancel,
                             IGPEnvironmentManager envMgr,
                             IGPMessages messages)
                      throws java.io.IOException,
                             AutomationException
Executes the tool

Specified by:
execute in interface IGPFunction
Parameters:
paramvalues - A reference to a com.esri.arcgis.system.IArray (in)
trackcancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
envMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
messages - A reference to a com.esri.arcgis.geodatabase.IGPMessages (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLicensed

public abstract boolean isLicensed()
                            throws java.io.IOException,
                                   AutomationException
This is used to return whether the function tool is licensed to execute.

Specified by:
isLicensed in interface IGPFunction
Returns:
The isLicensed
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public abstract java.lang.String getName()
                                  throws java.io.IOException,
                                         AutomationException
This is the name of the function tool. It appears when executing the tool at the command line or in scripting. It should be unique to each toolbox and must not contain spaces.

Specified by:
getName in interface IGPFunction
Returns:
The name
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDisplayName

public abstract java.lang.String getDisplayName()
                                         throws java.io.IOException,
                                                AutomationException
This is the display name of the function tool. The user interface (UI) utilizes this property to display the name of the tool in ArcToolbox. This name is a user-friendly description of the function tool. This display name can be internationalized.

Specified by:
getDisplayName in interface IGPFunction
Returns:
The name
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFullName

public abstract IName getFullName()
                           throws java.io.IOException,
                                  AutomationException
This is the function name object for the geoprocessing function tool. This name object is created and returned by a function factory. A function factory must be created before implementing this property

Specified by:
getFullName in interface IGPFunction
Returns:
A reference to a com.esri.arcgis.system.IName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMetadataFile

public abstract java.lang.String getMetadataFile()
                                          throws java.io.IOException,
                                                 AutomationException
This is the name of the .xml file containing the default metadata for this function object. The metadata file is used to supply the parameter descriptions in the help panel on the dialog box. If no .chm file is provided, the help is based on the metadata file.

Specified by:
getMetadataFile in interface IGPFunction
Returns:
The file
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHelpFile

public final java.lang.String getHelpFile()
                                   throws java.io.IOException,
                                          AutomationException
Returns path to a compiled help file (a .chm file), which is used to describe and explain the function and its operations

Specified by:
getHelpFile in interface IGPFunction
Returns:
The file
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHelpContext

public final int getHelpContext()
                         throws java.io.IOException,
                                AutomationException
Returns the Help Context - unique context identifier in a [MAP] file (.h). returns a number

Specified by:
getHelpContext in interface IGPFunction
Returns:
The context
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validate

public final IGPMessages validate(IArray paramvalues,
                                  boolean updateValues,
                                  IGPEnvironmentManager envMgr)
Validates the tool This will validate each parameter and return messages. This method will check that a given set of parameter values are of the appropriate number, DataType, and Value.

Specified by:
validate in interface IGPFunction
Parameters:
paramvalues - A reference to a com.esri.arcgis.system.IArray (in)
updateValues - The updateValues (in)
envMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IGPMessages

getDialogCLSID

public final IUID getDialogCLSID()
                          throws java.io.IOException,
                                 AutomationException
Returns Dialog Class ID

Specified by:
getDialogCLSID in interface IGPFunction
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRenderer

public final java.lang.Object getRenderer(IGPParameter arg0)
                                   throws java.io.IOException,
                                          AutomationException
This is used to set a custom renderer for the output of the function tool.

Specified by:
getRenderer in interface IGPFunction
Parameters:
arg0 - A reference to a com.esri.arcgis.geoprocessing.IGPParameter (in)
Returns:
A Variant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.