|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.ComponentCategoryManager
public class ComponentCategoryManager
Component Category Manager Object.
The ComponentCategoryManager object provides a mechanism to programmatically add or remove new components to or from a particular category and create new component categories.
See the Component Categories topic for more details on the ComponentCatgeoryManager.
Component categories are used by client applications to efficiently find all components of a particular type that are installed on the system. For example, ArcMap only supports commands that implement the ICommand interface. A component category, ESRI Mx Commands, is used to find all the command components that can be used inside ArcMap.
If component categories were not used, the application would have to instantiate each COM component and interrogate it to see if it supported the required functionality, which is not a practical approach. Component categories support the extensibility of COM by allowing the developer of the client application to create and work with classes that belong to a particular category. If, at a later date, a new class is added to the category, the client application need not be changed to take advantage of the new class; it will automatically pick up the new class the next time the category is read.
Constructor Summary | |
---|---|
ComponentCategoryManager()
Constructs a ComponentCategoryManager using ArcGIS Engine. |
|
ComponentCategoryManager(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. ComponentCategoryManager theComponentCategoryManager = (ComponentCategoryManager) obj; |
Method Summary | |
---|---|
void |
create(String name,
IUID category)
Creates a component category. |
boolean |
equals(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
IEnumUID |
getComponentsInCategory(IUID pCategoryID)
Obtains a collection of component IDs matching the specified component category ID. |
int |
hashCode()
the hashcode for this object |
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. |
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 |
---|
public ComponentCategoryManager() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic ComponentCategoryManager(Object obj) throws IOException
ComponentCategoryManager theComponentCategoryManager = (ComponentCategoryManager) obj;
obj
to ComponentCategoryManager
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void create(String name, IUID category) throws IOException, AutomationException
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.
create
in interface IComponentCategoryManager
name
- The name (in)category
- A reference to a com.esri.arcgis.system.IUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setup(String pathname, IUID objectType, IUID category, boolean install) throws IOException, AutomationException
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.
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.
setup
in interface IComponentCategoryManager
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setupObject(String pathname, IUID obj, IUID category, boolean install) throws IOException, AutomationException
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.
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.
setupObject
in interface IComponentCategoryManager
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumUID getComponentsInCategory(IUID pCategoryID) throws IOException, AutomationException
getComponentsInCategory
in interface IComponentCategoryInfo
pCategoryID
- A reference to a com.esri.arcgis.system.IUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |