com.esri.arcgis.geodatabase
Class WorkspaceExtension

java.lang.Object
  extended by com.esri.arcgis.geodatabase.WorkspaceExtension
All Implemented Interfaces:
IWorkspaceExtension, IWorkspaceExtensionControl, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class WorkspaceExtension
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IWorkspaceExtension, IWorkspaceExtensionControl

Workspace Extension Object.

Remarks

A workspace representing a geodatabase can have one or more workspace extensions. A workspace extension extends the functionality of a workspace in some way, for example, by managing a new type of custom dataset or by maintaining custom data dictionary information on datasets.

A workspace extension is usually used in conjunction with an application or editor extension that acts as the client of the workspace extension.

The Workspace instantiates all WorkspaceExtensions that are registered in the component category CATID_GeodatabaseWorkspaceExtensions at connect time. An application extension can find a workspace extension by its well-known GUID and invoke methods supported by the extension as appropriate. It will also instantiate all workspace extensions registered with a workspace using IWorkspaceExtensionManager.RegisterExtension.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
WorkspaceExtension(Object obj)
          Construct a WorkspaceExtension using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 IEnumBSTR getDataDictionaryTableNames()
          Any data dictionary tables that should not be exposed to browsers and should not participate in edit sessions.
 IUID getGUID()
          The GUID that identifies this Workspace Extension.
 String getName()
          The Name for this Workspace Extension.
 IEnumBSTR getPrivateDatasetNames(int dtype)
          The private datasets that should not be exposed to browsers.
 int hashCode()
          the hashcode for this object
 void init(IWorkspaceHelper pWorkspaceHelper)
          Initializes the extension, passing in a reference to its workspace helper.
 void shutdown()
          Informs the extension that its workspace helper (and workspace) are going away.
 
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

WorkspaceExtension

public WorkspaceExtension(Object obj)
                   throws IOException
Construct a WorkspaceExtension using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to WorkspaceExtension.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
WorkspaceExtension o = (WorkspaceExtension)obj; // will not work

WorkspaceExtension o = new WorkspaceExtension(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems WorkspaceExtension theWorkspaceExtension = (WorkspaceExtension) obj;
Method Detail

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
The Name for this Workspace Extension.

Remarks

The Name property is the name of the extension.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getGUID

public IUID getGUID()
             throws IOException,
                    AutomationException
The GUID that identifies this Workspace Extension.

Remarks

The GUID property returns the well-known GUID for the extension and is guaranteed to be unique.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getGUID in interface IWorkspaceExtension
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPrivateDatasetNames

public IEnumBSTR getPrivateDatasetNames(int dtype)
                                 throws IOException,
                                        AutomationException
The private datasets that should not be exposed to browsers.

Product Availability

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

Specified by:
getPrivateDatasetNames in interface IWorkspaceExtension
Parameters:
dtype - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataDictionaryTableNames

public IEnumBSTR getDataDictionaryTableNames()
                                      throws IOException,
                                             AutomationException
Any data dictionary tables that should not be exposed to browsers and should not participate in edit sessions.

Remarks

The PrivateDatasetNames and DataDictionaryNames properties return the names of tables and datasets that are private to the extension and will not be exposed by the workspace to browsing clients. Since they return an EnumBSTR object that is not cocreatable, you must create your own object that implements IEnumBSTR.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDataDictionaryTableNames in interface IWorkspaceExtension
Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

init

public void init(IWorkspaceHelper pWorkspaceHelper)
          throws IOException,
                 AutomationException
Initializes the extension, passing in a reference to its workspace helper.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
init in interface IWorkspaceExtensionControl
Parameters:
pWorkspaceHelper - A reference to a com.esri.arcgis.geodatabase.IWorkspaceHelper (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

shutdown

public void shutdown()
              throws IOException,
                     AutomationException
Informs the extension that its workspace helper (and workspace) are going away.

Remarks

The Shutdown method informs the workspace extension that the workspace has been released by all clients and is about to go away. In response, the workspace extension should release its reference on the workspace helper. Any subsequent calls by the application to the workspace extension should return an error.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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