com.esri.arcgis.geodatabase
Interface IVersion

All Superinterfaces:
Serializable
All Known Subinterfaces:
IVersion2
All Known Implementing Classes:
IVersion2Proxy, IVersionProxy, VersionedWorkspace

public interface IVersion
extends Serializable

Provides access to members for managing a version.

Superseded By

IVersion2

Description

The IVersion interface is used to manage the properties of a version, such as the name, description, access and the ability to create new versions.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 IVersion createVersion(String newName)
          Creates a new version equivalent to this version.
 void delete()
          Permanently deletes the version from the database.
 int getAccess()
          The version's access permission.
 String getDescription()
          The version's description.
 IVersionInfo getVersionInfo()
          This version's information.
 IEnumLockInfo getVersionLocks()
          This version's locks.
 String getVersionName()
          The name of the version.
 boolean hasParent()
          True if this version have a parent version.
 void refreshVersion()
          Refreshes the version with the corresponding database state.
 void setAccess(int access)
          The version's access permission.
 void setDescription(String description)
          The version's description.
 void setVersionName(String name)
          The name of the version.
 

Method Detail

getVersionLocks

IEnumLockInfo getVersionLocks()
                              throws IOException,
                                     AutomationException
This version's locks.

Remarks

The VersionLocks method returns the enumeration IEnumLockInfo. Using the enumeration you can detect what users are currently editing the version or currently reconciling the version. This information can be used to determine if the version is available for editing, to be reconciled or to be reconciled against.

See ILockInfo and esriLockType constants for additional information regarding locking descriptions.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getVersionInfo

IVersionInfo getVersionInfo()
                            throws IOException,
                                   AutomationException
This version's information.

Remarks

The VersionInfo method provides a reference to the IVersionInfo interface. The IVersionInfo interface contains methods which describe the properties of the version. The interface is beneficial for obtaining a version's ancestory, for example its parent version.

VersionInfo will only return versions in which the connected user has the appropriate privileges.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getVersionName

String getVersionName()
                      throws IOException,
                             AutomationException
The name of the version.

Remarks

The VersionName method is used to retrieve or set a version's name. Version names are case sensitive and limited to 64 characters. Only the owner of a version can change its properties, such as the name.

The DEFAULT version cannot be renamed and if attempted an error will be returned, [Error executing stored procedure sde.verson_util.rename_version::ORA-20025::The default version may not be deleted or renamed!][SDE.DEFAULT].

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setVersionName

void setVersionName(String name)
                    throws IOException,
                           AutomationException
The name of the version.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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
The version's description.

Remarks

The Description method is used to retreive or set a version's description. Version descriptions are not required and are limited to 64 characters. Only the owner of a version can change its properties, such as the description.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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
The version's description.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getAccess

int getAccess()
              throws IOException,
                     AutomationException
The version's access permission.

Remarks

The Access property is used to retrieve or set a version's access property. Version access can be private, public or protected. Private versions are only accessible by the version's owner, public versions can be viewed and edited by any user, and protected versions can be viewed by any user but only edited by the owner. Only the owner of a version can change its properties, such as the access.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setAccess

void setAccess(int access)
               throws IOException,
                      AutomationException
The version's access permission.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
access - A com.esri.arcgis.geodatabase.esriVersionAccess constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hasParent

boolean hasParent()
                  throws IOException,
                         AutomationException
True if this version have a parent version.

Remarks

All versions, except the SDE.DEFAULT version have parent versions.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

delete

void delete()
            throws IOException,
                   AutomationException
Permanently deletes the version from the database.

Remarks

The Delete method is used to permanently delete a version. Only the owner of the version or the ArcSDE administrator can delete the version.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

refreshVersion

void refreshVersion()
                    throws IOException,
                           AutomationException
Refreshes the version with the corresponding database state.

Remarks

The RefreshVersion method refreshes the version to correspond with the database state the version references. For example, if a second application is editing the verison and saves their changes, you need to call the RefreshVersion method to see the latest representation of the version.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createVersion

IVersion createVersion(String newName)
                       throws IOException,
                              AutomationException
Creates a new version equivalent to this version.

Remarks

The CreateVersion method allows you to create new version from the existing IVersion. The new version is a child of the current version and is owned by the connected user. The version name is limited to 64 characters and is private by default.

Creating a new version requires an existing version to be the parent of the new version. When the new version is created, the parent and child versions are identical.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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