com.esri.arcgis.carto
Interface IEditTemplate

All Superinterfaces:
Serializable
All Known Implementing Classes:
EditTemplate

public interface IEditTemplate
extends Serializable

IEditTemplate Interface

Description

This interface contains the properties of the template including the associated layer and the default values for fields.

When To Use

Templates are created using the IEditTemplate and IEditTemplateFactory interfaces and managed through the IEditor3 interface.

The current or selected template can be obtained from the IEditor3::Currenttemplate method returning IEditTemplate.

The symbology for the template is determined by the value of the field used to render the layer in the map and is handled internally.


Templates are stored within the map document and within a layer file if the layer is exported as such.

Product Availability

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


Method Summary
 void clearDefaultValues()
          Removes all the default values currently set.
 int getCreateCount()
          Returns the number of times this template has created a feature.
 Object getDefaultValue(String field)
          Gets the default value for the given field.
 String getDescription()
          Gets the description of the template.
 ILayer getLayer()
          Gets the layer of the template.
 String getName()
          Gets the name of the template.
 String getTags()
          The tags of the item.
 GUID getTool()
          Gets the tool for the template.
 void setDefaultValue(String field, Object value, boolean initDefaultValues)
          Sets the default value for the given field.
 void setDefaultValues(IFeature feature)
          Sets the default values on the given feature.
 void setDescription(String description)
          Gets the description of the template.
 void setLayerByRef(ILayer layer)
          Gets the layer of the template.
 void setName(String name)
          Gets the name of the template.
 void setTags(String tags)
          The tags of the item.
 void setTool(GUID tool)
          Gets the tool for the template.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
Gets the name of the template.

Description

Set or return the name of the template.

Product Availability

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

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

setName

void setName(String name)
             throws IOException,
                    AutomationException
Gets the name of the template.

Product Availability

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

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

getDescription

String getDescription()
                      throws IOException,
                             AutomationException
Gets the description of the template.

Description

Set or return the description of the template.

Product Availability

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

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

setDescription

void setDescription(String description)
                    throws IOException,
                           AutomationException
Gets the description of the template.

Product Availability

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

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

getLayer

ILayer getLayer()
                throws IOException,
                       AutomationException
Gets the layer of the template.

Description

Set or return the layer associated with the template.

Product Availability

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

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

setLayerByRef

void setLayerByRef(ILayer layer)
                   throws IOException,
                          AutomationException
Gets the layer of the template.

Product Availability

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

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

getTool

GUID getTool()
             throws IOException,
                    AutomationException
Gets the tool for the template.

Remarks

Set or return the default tool for the template. The value is the GUID of the tool.

Product Availability

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

Returns:
A Structure: com.esri.arcgis.support.ms.stdole.GUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTool

void setTool(GUID tool)
             throws IOException,
                    AutomationException
Gets the tool for the template.

Product Availability

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

Parameters:
tool - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearDefaultValues

void clearDefaultValues()
                        throws IOException,
                               AutomationException
Removes all the default values currently set.

Remarks

Sets the value of each field to the default value for that field type. The field value will be set to null if null values are allowed.

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.

getDefaultValue

Object getDefaultValue(String field)
                       throws IOException,
                              AutomationException
Gets the default value for the given field.

Product Availability

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

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

setDefaultValue

void setDefaultValue(String field,
                     Object value,
                     boolean initDefaultValues)
                     throws IOException,
                            AutomationException
Sets the default value for the given field. If the field is a subtype field it will use initDefaultValues.

Remarks

Sets the value of a given field to the supplied value.


An exception will be raised if the supplied value is not valid for the given field type e.g. If you try to set a text value for an integer field.

For subtype fields, the supplied value can either be the integer code or the text description. When initdefaultvalues is true the default values for that subtype are used to set the default values for other fields. Initdefaultvalues has no effect on non-subtype fields.

Product Availability

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

Parameters:
field - The field (in)
value - A Variant (in)
initDefaultValues - The initDefaultValues (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultValues

void setDefaultValues(IFeature feature)
                      throws IOException,
                             AutomationException
Sets the default values on the given feature.

Remarks

This method populates the fields of an IFeature with the default values of the current template. It is used to populate the fields of a feature that may have been created programmatically.

Product Availability

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

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

getCreateCount

int getCreateCount()
                   throws IOException,
                          AutomationException
Returns the number of times this template has created a feature.

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.

getTags

String getTags()
               throws IOException,
                      AutomationException
The tags of the item.

Description

Set or return the tags for the template. Multiple tags are comma delimited.

Product Availability

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

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

setTags

void setTags(String tags)
             throws IOException,
                    AutomationException
The tags of the item.

Product Availability

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

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