com.esri.arcgis.carto
Class EditTemplate

java.lang.Object
  extended by com.esri.arcgis.carto.EditTemplate
All Implemented Interfaces:
IEditTemplate, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, Externalizable, Serializable

public class EditTemplate
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IEditTemplate, IPersist, IPersistStream, Externalizable

EditTemplate Class

Product Availability

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

See Also:
Serialized Form

Constructor Summary
EditTemplate()
          Constructs a EditTemplate using ArcGIS Engine.
EditTemplate(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
EditTemplate theEditTemplate = (EditTemplate) obj;
 
Method Summary
 void clearDefaultValues()
          Removes all the default values currently set.
 boolean equals(Object o)
          Compare this object with another
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 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.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 String getTags()
          The tags of the item.
 GUID getTool()
          Gets the tool for the template.
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 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.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

EditTemplate

public EditTemplate()
             throws IOException,
                    UnknownHostException
Constructs a EditTemplate using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

EditTemplate

public EditTemplate(Object obj)
             throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
EditTemplate theEditTemplate = (EditTemplate) obj;

Construct a EditTemplate using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to EditTemplate.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getName

public 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.

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

setName

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

Product Availability

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

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

getDescription

public 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.

Specified by:
getDescription in interface IEditTemplate
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
Gets the description of the template.

Product Availability

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

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

getLayer

public 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.

Specified by:
getLayer in interface IEditTemplate
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

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

Product Availability

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

Specified by:
setLayerByRef in interface IEditTemplate
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

public 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.

Specified by:
getTool in interface IEditTemplate
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

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

Product Availability

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

Specified by:
setTool in interface IEditTemplate
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

public 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.

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

getDefaultValue

public 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.

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

setDefaultValue

public 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.

Specified by:
setDefaultValue in interface IEditTemplate
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

public 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.

Specified by:
setDefaultValues in interface IEditTemplate
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

public 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.

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

getTags

public 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.

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

setTags

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

Product Availability

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

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

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException