com.esri.arcgis.geoprocessing
Class IGPToolProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geoprocessing.IGPToolProxy
All Implemented Interfaces:
IGPTool, Externalizable, Serializable

public class IGPToolProxy
extends com.esri.arcgis.interop.Dispatch
implements IGPTool, Serializable

Provides access to methods on a geoprocessing tool object.

Remarks

There are three types of geoprocessing tools: a GPModelTool, a GPScriptTool, and a GPFunctionTool. Geoprocessing tools will take a set of inputs and generate one or more outputs. A generic GPTool object is obtained from a toolbox, with OpenTool method of IGPToolbox interface.

When To Use

The GPTool object contains properties that provide access to a tool's name, its help file, and license status. The arguments to the tool are made up of an array of parameter (IGPParameter) or value (IGPValue) objects . The array of parameter objects is created by using the parameterInfo property.

The GPTool object also contains methods for validating the parameters and executing the tool.

Product Availability

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

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IGPToolProxy()
           
  IGPToolProxy(Object obj)
           
protected IGPToolProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 boolean canAlter()
          Returns whether or not the properties of the tool can be modified.
 boolean canEditSource()
          Returns whether or not the source (i.e., definition) of the tool can be modified.
 boolean editProperties(int hParent, IGPEnvironmentManager gPEnvMgr)
          Presents a modal dialog to edit the tool's properties.
 void execute(IArray paramvalues, ITrackCancel trackCancel, IGPEnvironmentManager pEnvMgr, IGPMessages messages)
          Executes the tool with the given set of values.
 String getDescription()
          The description of the tool.
 IUID getDialogCLSID()
          The class identifier of the custom dialog to use for this tool.
 String getDisplayName()
          The display name of the tool.
 int getHelpContext()
          The context identifier of the topic within the help file for this tool.
 String getHelpFile()
          Name of the (CHM) file containing help information for this tool.
 String getName()
          The name of the tool.
 IArray getParameterInfo()
          The set of parameters required to execute the tool.
 String getPathName()
          The path of the tool object.
 Object getRenderer(IGPParameter pParam)
          Returns the renderer associated with the specified parameter.
 IGPToolbox getToolbox()
          The toolbox of the tool.
 String getToolCategory()
          The tool category.
 int getToolType()
          The type of tool.
 boolean isDeleted()
          Indicates if the tool has been deleted.
 boolean isLicensed()
          Returns whether the tool is licensed to be executed.
 boolean isLicensedForProduct()
          Returns whether the tool is part of the current product.
 boolean isRelativePaths()
          Indicates if path names are stored relative to the tool/toolbox.
 boolean isValid()
          Returns whether the tool is capable of being executed/edited.
 void removeListener(String iidStr, Object theListener)
           
 void setDescription(String description)
          The description of the tool.
 void setDisplayName(String displayName)
          The display name of the tool.
 void setHelpContext(int context)
          The context identifier of the topic within the help file for this tool.
 void setHelpFile(String file)
          Name of the (CHM) file containing help information for this tool.
 void setName(String displayName)
          The name of the tool.
 void setRelativePaths(boolean relPaths)
          Indicates if path names are stored relative to the tool/toolbox.
 void setToolCategory(String category)
          The tool category.
 void store()
          Stores the current state of the tool to the toolbox.
 IGPMessages validate(IArray paramvalues, boolean updateValues, IGPEnvironmentManager pEnvMgr)
          Validates the given set of values.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IGPToolProxy

public IGPToolProxy()

IGPToolProxy

public IGPToolProxy(Object obj)
             throws IOException
Throws:
IOException

IGPToolProxy

protected IGPToolProxy(Object obj,
                       String iid)
                throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the tool.

Product Availability

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

Supported Platforms

Windows

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

setName

public void setName(String displayName)
             throws IOException,
                    AutomationException
The name of the tool.

Product Availability

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

Supported Platforms

Windows

Specified by:
setName in interface IGPTool
Parameters:
displayName - The displayName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDisplayName

public String getDisplayName()
                      throws IOException,
                             AutomationException
The display name of the tool.

Product Availability

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

Supported Platforms

Windows

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

setDisplayName

public void setDisplayName(String displayName)
                    throws IOException,
                           AutomationException
The display name of the tool.

Product Availability

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

Supported Platforms

Windows

Specified by:
setDisplayName in interface IGPTool
Parameters:
displayName - The displayName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

public String getDescription()
                      throws IOException,
                             AutomationException
The description of the tool.

Product Availability

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

Supported Platforms

Windows

Specified by:
getDescription in interface IGPTool
Returns:
The description
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDescription

public void setDescription(String description)
                    throws IOException,
                           AutomationException
The description of the tool.

Product Availability

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

Supported Platforms

Windows

Specified by:
setDescription in interface IGPTool
Parameters:
description - The description (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToolCategory

public String getToolCategory()
                       throws IOException,
                              AutomationException
The tool category.

Product Availability

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

Supported Platforms

Windows

Specified by:
getToolCategory in interface IGPTool
Returns:
The category
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setToolCategory

public void setToolCategory(String category)
                     throws IOException,
                            AutomationException
The tool category.

Product Availability

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

Supported Platforms

Windows

Specified by:
setToolCategory in interface IGPTool
Parameters:
category - The category (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToolbox

public IGPToolbox getToolbox()
                      throws IOException,
                             AutomationException
The toolbox of the tool.

Product Availability

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

Supported Platforms

Windows

Specified by:
getToolbox in interface IGPTool
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPToolbox
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToolType

public int getToolType()
                throws IOException,
                       AutomationException
The type of tool.

Product Availability

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

Supported Platforms

Windows

Specified by:
getToolType in interface IGPTool
Returns:
A com.esri.arcgis.geoprocessing.esriGPToolType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isValid

public boolean isValid()
                throws IOException,
                       AutomationException
Returns whether the tool is capable of being executed/edited.

Product Availability

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

Supported Platforms

Windows

Specified by:
isValid in interface IGPTool
Returns:
The valid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLicensedForProduct

public boolean isLicensedForProduct()
                             throws IOException,
                                    AutomationException
Returns whether the tool is part of the current product.

Product Availability

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

Supported Platforms

Windows

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

isLicensed

public boolean isLicensed()
                   throws IOException,
                          AutomationException
Returns whether the tool is licensed to be executed.

Product Availability

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

Supported Platforms

Windows

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

isDeleted

public boolean isDeleted()
                  throws IOException,
                         AutomationException
Indicates if the tool has been deleted.

Product Availability

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

Supported Platforms

Windows

Specified by:
isDeleted in interface IGPTool
Returns:
The deleted
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canAlter

public boolean canAlter()
                 throws IOException,
                        AutomationException
Returns whether or not the properties of the tool can be modified.

Product Availability

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

Supported Platforms

Windows

Specified by:
canAlter in interface IGPTool
Returns:
The canAlter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canEditSource

public boolean canEditSource()
                      throws IOException,
                             AutomationException
Returns whether or not the source (i.e., definition) of the tool can be modified.

Product Availability

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

Supported Platforms

Windows

Specified by:
canEditSource in interface IGPTool
Returns:
The canEdit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParameterInfo

public IArray getParameterInfo()
                        throws IOException,
                               AutomationException
The set of parameters required to execute the tool.

Product Availability

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

Supported Platforms

Windows

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

getDialogCLSID

public IUID getDialogCLSID()
                    throws IOException,
                           AutomationException
The class identifier of the custom dialog to use for this tool.

Product Availability

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

Supported Platforms

Windows

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

store

public void store()
           throws IOException,
                  AutomationException
Stores the current state of the tool to the toolbox.

Product Availability

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

Supported Platforms

Windows

Specified by:
store in interface IGPTool
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validate

public IGPMessages validate(IArray paramvalues,
                            boolean updateValues,
                            IGPEnvironmentManager pEnvMgr)
                     throws IOException,
                            AutomationException
Validates the given set of values.

Product Availability

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

Supported Platforms

Windows

Specified by:
validate in interface IGPTool
Parameters:
paramvalues - A reference to a com.esri.arcgis.system.IArray (in)
updateValues - The updateValues (in)
pEnvMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IGPMessages
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

public void execute(IArray paramvalues,
                    ITrackCancel trackCancel,
                    IGPEnvironmentManager pEnvMgr,
                    IGPMessages messages)
             throws IOException,
                    AutomationException
Executes the tool with the given set of values.

Product Availability

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

Supported Platforms

Windows

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

editProperties

public boolean editProperties(int hParent,
                              IGPEnvironmentManager gPEnvMgr)
                       throws IOException,
                              AutomationException
Presents a modal dialog to edit the tool's properties.

Product Availability

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

Supported Platforms

Windows

Specified by:
editProperties in interface IGPTool
Parameters:
hParent - The hParent (A COM typedef) (in)
gPEnvMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
Returns:
The ok
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRenderer

public Object getRenderer(IGPParameter pParam)
                   throws IOException,
                          AutomationException
Returns the renderer associated with the specified parameter.

Product Availability

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

Supported Platforms

Windows

Specified by:
getRenderer in interface IGPTool
Parameters:
pParam - A reference to a com.esri.arcgis.geoprocessing.IGPParameter (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPathName

public String getPathName()
                   throws IOException,
                          AutomationException
The path of the tool object.

Product Availability

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

Supported Platforms

Windows

Specified by:
getPathName in interface IGPTool
Returns:
The pathName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isRelativePaths

public boolean isRelativePaths()
                        throws IOException,
                               AutomationException
Indicates if path names are stored relative to the tool/toolbox.

Product Availability

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

Supported Platforms

Windows

Specified by:
isRelativePaths in interface IGPTool
Returns:
The relPaths
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRelativePaths

public void setRelativePaths(boolean relPaths)
                      throws IOException,
                             AutomationException
Indicates if path names are stored relative to the tool/toolbox.

Product Availability

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

Supported Platforms

Windows

Specified by:
setRelativePaths in interface IGPTool
Parameters:
relPaths - The relPaths (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHelpFile

public String getHelpFile()
                   throws IOException,
                          AutomationException
Name of the (CHM) file containing help information for this tool.

Product Availability

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

Supported Platforms

Windows

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

setHelpFile

public void setHelpFile(String file)
                 throws IOException,
                        AutomationException
Name of the (CHM) file containing help information for this tool.

Product Availability

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

Supported Platforms

Windows

Specified by:
setHelpFile in interface IGPTool
Parameters:
file - The file (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHelpContext

public int getHelpContext()
                   throws IOException,
                          AutomationException
The context identifier of the topic within the help file for this tool.

Product Availability

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

Supported Platforms

Windows

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

setHelpContext

public void setHelpContext(int context)
                    throws IOException,
                           AutomationException
The context identifier of the topic within the help file for this tool.

Product Availability

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

Supported Platforms

Windows

Specified by:
setHelpContext in interface IGPTool
Parameters:
context - The context (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.