com.esri.arcgis.version
Class VersionManager

java.lang.Object
  extended by com.esri.arcgis.version.VersionManager
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IArcGISVersion, IEnumVersions, IVersionHost, Serializable

public class VersionManager
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IArcGISVersion, IVersionHost, IEnumVersions

VersionManager Class

See Also:
Serialized Form

Constructor Summary
VersionManager()
          Constructs a VersionManager using ArcGIS Engine.
VersionManager(Object obj)
          Construct a VersionManager using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 Object createObject(GUID clsid)
          Used to create objects within a remote host process such as dllhost.
 boolean equals(Object o)
          Compare this object with another
 void getActiveVersion(int[] pCode, String[] pVer, String[] pPath)
          Returns the runtime that the calling application is currently bound to.
static String getClsid()
          getClsid.
 void getVersions(IEnumVersions[] ppVersions)
          Returns an enumerator over the currently installed runtimes.
 int hashCode()
          the hashcode for this object
 boolean loadVersion(int productCode, String engineVersion)
          Binds the client engine application against the specified ArcGIS runtime.
 void next(int[] pCode, String[] pVer, String[] path)
          Returns the next version in the sequence of installed versions.
 String productNameFromCode(int __MIDL__IArcGISVersion0000)
          Returns a product name given a product code.
 void reset()
          Resets the enumerator to the beggining of the sequence.
 
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

VersionManager

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

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

VersionManager

public VersionManager(Object obj)
               throws IOException
Construct a VersionManager using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to VersionManager.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems VersionManager theVersionManager = (VersionManager) obj;
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

loadVersion

public boolean loadVersion(int productCode,
                           String engineVersion)
                    throws IOException,
                           AutomationException
Binds the client engine application against the specified ArcGIS runtime.

Specified by:
loadVersion in interface IArcGISVersion
Parameters:
productCode - A com.esri.arcgis.version.esriProductCode constant (in)
engineVersion - The engineVersion (in)
Returns:
The succeeded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getActiveVersion

public void getActiveVersion(int[] pCode,
                             String[] pVer,
                             String[] pPath)
                      throws IOException,
                             AutomationException
Returns the runtime that the calling application is currently bound to.

Specified by:
getActiveVersion in interface IArcGISVersion
Parameters:
pCode - A com.esri.arcgis.version.esriProductCode constant (out: use single element array)
pVer - The pVer (out: use single element array)
pPath - The pPath (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getVersions

public void getVersions(IEnumVersions[] ppVersions)
                 throws IOException,
                        AutomationException
Returns an enumerator over the currently installed runtimes.

Specified by:
getVersions in interface IArcGISVersion
Parameters:
ppVersions - A reference to a com.esri.arcgis.version.IEnumVersions (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

productNameFromCode

public String productNameFromCode(int __MIDL__IArcGISVersion0000)
                           throws IOException,
                                  AutomationException
Returns a product name given a product code.

Specified by:
productNameFromCode in interface IArcGISVersion
Parameters:
__MIDL__IArcGISVersion0000 - A com.esri.arcgis.version.esriProductCode constant (in)
Returns:
The pProductName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createObject

public Object createObject(GUID clsid)
                    throws IOException,
                           AutomationException
Used to create objects within a remote host process such as dllhost.

Specified by:
createObject in interface IVersionHost
Parameters:
clsid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws IOException,
                  AutomationException
Resets the enumerator to the beggining of the sequence.

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

next

public void next(int[] pCode,
                 String[] pVer,
                 String[] path)
          throws IOException,
                 AutomationException
Returns the next version in the sequence of installed versions.

Specified by:
next in interface IEnumVersions
Parameters:
pCode - A com.esri.arcgis.version.esriProductCode constant (out: use single element array)
pVer - The pVer (out: use single element array)
path - The path (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.