com.esri.arcgis.geodatabase
Interface IGPMessages

All Superinterfaces:
Serializable
All Known Implementing Classes:
GPMessages

public interface IGPMessages
extends Serializable

Provides access to Geoprocessor messages.

Remarks

The GPMessages object manages an array of GPMessage objects. This object contains methods to generate and replace message objects. The Validate() method returns a GPMessages object that contains one message for each parameter.

See also IGPMessage

When To Use

The IGPMessages returns the messages that are generated during validation and execution of a geoprocessing tool. The GPMessages object is a container of a collection of GPMessage objects.

For the Validate method, the messages are returned as an array of GPMessage objects. The layout of the returned array is the same as the input array of values, which is the same as the array of tool parameter descriptions.

Also refer to Building Geoprocessing Function Tools .

Product Availability

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


Method Summary
 void add(IGPMessage msg)
          Adds a message object to the messages.
 void addAbort(String message)
          Adds an abort message to the messages.
 void addError(int errorCode, String message)
          Adds an error message to the messages.
 void addMessage(String message)
          Adds an informative message to the messages.
 void addMessages(IGPMessages messages)
          Adds all messages from an existing messages object to this messages object.
 void addWarning(String message)
          Adds a warning message to the messages.
 void clear()
          Clears the message objects from messages object.
 IGPMessagesCallback getCallback()
          The callback object associated with the GPMessages object.
 int getCount()
          The message count.
 int getMaxSeverity()
          The maximum message severity.
 IGPMessage getMessage(int index)
          Provides a message object from the specified location.
 IArray getMessages()
          The array of message objects.
 void initializeMessages(int nMessages)
          Creates a number of empty messages and adds them to this messages object.
 void replace(int index, IGPMessage msg)
          Replace an existing message in a specified location with a new message object.
 void replaceAbort(int index, String message)
          Creates message of type esriGPMessageTypeAbort and replaces it into a specified position.
 void replaceError(int index, int errorCode, String message)
          Creates message of type esriGPMessageTypeError and replaces it into a specified position.
 void replaceMessage(int index, String message)
          Creates message and replaces it into a specified position.
 void replaceWarning(int index, String message)
          Creates message of type esriGPMessageTypeWarning and replaces it into a specified position.
 void setCallbackByRef(IGPMessagesCallback messagesCallback)
          The callback object associated with the GPMessages object.
 

Method Detail

setCallbackByRef

void setCallbackByRef(IGPMessagesCallback messagesCallback)
                      throws IOException,
                             AutomationException
The callback object associated with the GPMessages object.

Product Availability

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

Parameters:
messagesCallback - A reference to a com.esri.arcgis.geodatabase.IGPMessagesCallback (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCallback

IGPMessagesCallback getCallback()
                                throws IOException,
                                       AutomationException
The callback object associated with the GPMessages object.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.geodatabase.IGPMessagesCallback
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clear

void clear()
           throws IOException,
                  AutomationException
Clears the message objects from messages object.

Remarks

The Clear method empties a collection of GPMessage objects.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

void add(IGPMessage msg)
         throws IOException,
                AutomationException
Adds a message object to the messages.

Remarks

The Add method adds a GPMessage object to the GPMessages collection.

Product Availability

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

Parameters:
msg - A reference to a com.esri.arcgis.geodatabase.IGPMessage (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addWarning

void addWarning(String message)
                throws IOException,
                       AutomationException
Adds a warning message to the messages.

Remarks

The AddWarning method creates a GPMessage of type esriGPMEssageTypeWarning and adds it to this collection.

Product Availability

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

Parameters:
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addAbort

void addAbort(String message)
              throws IOException,
                     AutomationException
Adds an abort message to the messages.

Remarks

The AddAbort method creates a GPMessage of type esriGPMEssageTypeAbort and adds it to this collection.

Product Availability

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

Parameters:
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addError

void addError(int errorCode,
              String message)
              throws IOException,
                     AutomationException
Adds an error message to the messages.

Remarks

The AddError method creates a GPMessage of type esriGPMEssageTypeError and adds it to this collection.

Product Availability

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

Parameters:
errorCode - The errorCode (in)
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addMessage

void addMessage(String message)
                throws IOException,
                       AutomationException
Adds an informative message to the messages.

Remarks

The AddMessage method creates a GPMessage of type esriGPMEssageTypeInformative and adds it to this collection.

Product Availability

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

Parameters:
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addMessages

void addMessages(IGPMessages messages)
                 throws IOException,
                        AutomationException
Adds all messages from an existing messages object to this messages object.

Remarks

The AddMessages method adds all messages from the input collection to this collection.

Product Availability

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

Parameters:
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.

initializeMessages

void initializeMessages(int nMessages)
                        throws IOException,
                               AutomationException
Creates a number of empty messages and adds them to this messages object.

Remarks

The InitializeMessages method creates a number of empty messages and adds them to this collection.

Product Availability

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

Parameters:
nMessages - The nMessages (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replace

void replace(int index,
             IGPMessage msg)
             throws IOException,
                    AutomationException
Replace an existing message in a specified location with a new message object.

Remarks

The Replace method replaces a message into a specified position in this GPMessages collection.

Product Availability

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

Parameters:
index - The index (in)
msg - A reference to a com.esri.arcgis.geodatabase.IGPMessage (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceError

void replaceError(int index,
                  int errorCode,
                  String message)
                  throws IOException,
                         AutomationException
Creates message of type esriGPMessageTypeError and replaces it into a specified position.

Remarks

The ReplaceError method creates a GPMessage of type esriGPMEssageTypeError and replaces it into a specified position in this GPMessages collection.

Product Availability

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

Parameters:
index - The index (in)
errorCode - The errorCode (in)
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceWarning

void replaceWarning(int index,
                    String message)
                    throws IOException,
                           AutomationException
Creates message of type esriGPMessageTypeWarning and replaces it into a specified position.

Remarks

The ReplaceWarning method creates a GPMessage of type esriGPMEssageTypeWarning and replaces it into a specified position in this GPMessages collection.

Product Availability

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

Parameters:
index - The index (in)
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceAbort

void replaceAbort(int index,
                  String message)
                  throws IOException,
                         AutomationException
Creates message of type esriGPMessageTypeAbort and replaces it into a specified position.

Remarks

The ReplaceAbort method creates a GPMessage of type esriGPMEssageTypeAbort and replaces it into a specified position in this GPMessages collection.

Product Availability

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

Parameters:
index - The index (in)
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceMessage

void replaceMessage(int index,
                    String message)
                    throws IOException,
                           AutomationException
Creates message and replaces it into a specified position.

Remarks

The ReplaceMessage method creates a GPMessage of type esriGPMEssageTypeInformative and replaces it into a specified position in this GPMessages collection.

Product Availability

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

Parameters:
index - The index (in)
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

int getCount()
             throws IOException,
                    AutomationException
The message count.

Remarks

The get_Count property returns the number of GPMessage objects in this collection.

Product Availability

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

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMessage

IGPMessage getMessage(int index)
                      throws IOException,
                             AutomationException
Provides a message object from the specified location.

Remarks

The GetMessage property returns the specified GPMessage object from this collection.

Product Availability

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

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IGPMessage
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMessages

IArray getMessages()
                   throws IOException,
                          AutomationException
The array of message objects.

Remarks

The get_Messages property returns all the GPMessage objects in this collection.

Product Availability

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

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.

getMaxSeverity

int getMaxSeverity()
                   throws IOException,
                          AutomationException
The maximum message severity.

Remarks

The get_MaxSeverity property returns the highest message type class in this collection. Valid values are defined and stored in the enumeration esriGPMessageSeverity ; they are: esriGPMessageSeverityInformative, esriGPMessageSeverityWarning, esriGPMessageSeverityError, and esriGPMessageSeverityAbort .

Product Availability

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

Returns:
A com.esri.arcgis.geodatabase.esriGPMessageSeverity constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.