com.esri.arcgis.system
Interface IComponentCategoryManager

All Superinterfaces:
Serializable
All Known Implementing Classes:
ComponentCategoryManager

public interface IComponentCategoryManager
extends Serializable

Provides access to members that work with the component category manager.

Description

The IComponentCategoryManager interface has methods that allow you to create a new component category, add or remove a particular object to or from a category, and add or remove all objects of a certain type to or from a category.

See the Component Categories topic for more details on the ComponentCatgeoryManager.

Remarks

To get access to the IComponentCategoryManager interface create a new instance of a ComponentCategoryManager object.

When To Use

Use the IComponentCategoryManager interface to programmatically add or remove components to or from a particular category. This interface has methods for creating a new component category, adding or removing a particular object to or from a category, and adding or removing all objects of a certain type to or from a category.

Example:

IComponentCategoryManager componentCategoryManager = new ComponentCategoryManager();

Product Availability

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


Method Summary
 void create(String name, IUID category)
          Creates a component category.
 void setup(String pathname, IUID objectType, IUID category, boolean install)
          Installs or uninstalls the objects that match the object type into the given category.
 void setupObject(String pathname, IUID obj, IUID category, boolean install)
          Installs or uninstalls the given object into the given category.
 

Method Detail

create

void create(String name,
            IUID category)
            throws IOException,
                   AutomationException
Creates a component category.

Description

Name is a string representing the name of the new category you are creating.

Category is an IUID object representing a new unique identifier for the category you are creating.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
category - A reference to a com.esri.arcgis.system.IUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setup

void setup(String pathname,
           IUID objectType,
           IUID category,
           boolean install)
           throws IOException,
                  AutomationException
Installs or uninstalls the objects that match the object type into the given category.

Description

PathName is a string representing the full path and filename of the DLL containing the objects you want to register/unregister in a category.

ObjectType is an IUID object representing the unique identifier of the type of object you want to register/unregister in a category. This UID would be the ID of an interface.

Category is an IUID object representing the unique identifier of the category in which you are registering/unregistering the objects.

install specifies whether you are registering (True) or unregistering (False) the objects.

Remarks

The Setup method provides a means of registering more than one object stored in a DLL. Setup will QueryInterface (QI) each object in the DLL for the interface specified by ObjectType. If the QI succeeds, it will add that object to the component category specified by Category.

For example, you can have a single DLL that contains many commands (objects that implement ICommand). To register all the commands in this DLL with the commands category for ArcMap, you can set ObjectType to be the UID of the ICommand interface and set Category to be the UID of the ESRI Mx Commands category. You don't need to know the UID for each command. By calling Setup once, all the command objects in the DLL will be registered in this category.

If you use the SetupObject method instead, you would have to call SetupObject many times; once for each command in the DLL.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pathname - The pathname (in)
objectType - A reference to a com.esri.arcgis.system.IUID (in)
category - A reference to a com.esri.arcgis.system.IUID (in)
install - The install (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setupObject

void setupObject(String pathname,
                 IUID obj,
                 IUID category,
                 boolean install)
                 throws IOException,
                        AutomationException
Installs or uninstalls the given object into the given category.

Description

PathName is a string representing the full path and filename of the DLL containing the objects you want to register/unregister in a category.

obj is an IUID object representing the unique identifier of the object you want to register/unregister in a category. This UID would be the ID of a class.

Category is an IUID object representing the unique identifier of the category in which you are registering/unregistering the objects.

install specifies whether you are registering (True) or unregistering (False) the objects.

Remarks

The SetupObject method provides a means of registering a specific object stored in a DLL.

For example, you can have a single DLL that contains many commands (objects that implement ICommand). If you want to register only one of the commands in this DLL with the commands category for ArcMap, you can set obj to be the UID of your command and set Category to be the UID of the ESRI Mx Commands category. By calling SetObject with these settings, only that specific command will be registered. If you want to register all the commands in the DLL you can either call SetupObject a number of times (once for each command) or use the Setup method instead. Setup allows you to register many objects at the same time with a single call.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pathname - The pathname (in)
obj - A reference to a com.esri.arcgis.system.IUID (in)
category - A reference to a com.esri.arcgis.system.IUID (in)
install - The install (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.