Revision 24846 branches/v2_0_0_prep/libraries/libTools/src/org/gvsig/tools/ToolsLocator.java
ToolsLocator.java | ||
---|---|---|
1 | 1 |
package org.gvsig.tools; |
2 | 2 |
|
3 |
import org.gvsig.tools.dynobject.DynObjectManager; |
|
3 | 4 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
4 | 5 |
import org.gvsig.tools.extensionpoint.impl.DefaultExtensionPointManager; |
5 | 6 |
import org.gvsig.tools.locator.AbstractLocator; |
... | ... | |
20 | 21 |
|
21 | 22 |
private static final String OPERATION_MANAGER_DESCRIPTION = "OperationManager of gvSIG"; |
22 | 23 |
|
24 |
public static final String DYNOBJECT_MANAGER_NAME = "toolslocator.manager.dynobject"; |
|
25 |
|
|
26 |
private static final String DYNOBJECT_MANAGER_DESCRIPTION = "DynObjectManager of gvSIG"; |
|
27 |
|
|
23 | 28 |
/** |
24 | 29 |
* Unique instance. |
25 | 30 |
*/ |
... | ... | |
102 | 107 |
public static ExtensionPointManager getExtensionPointManager() { |
103 | 108 |
return DefaultExtensionPointManager.getManager(); |
104 | 109 |
} |
105 |
} |
|
110 |
|
|
111 |
/** |
|
112 |
* Return a reference to DynObjectManager. |
|
113 |
* |
|
114 |
* @return a reference to DynObjectManager |
|
115 |
* @throws LocatorException |
|
116 |
* if there is no access to the class or the class cannot be |
|
117 |
* instantiated |
|
118 |
* @see Locator#get(String) |
|
119 |
*/ |
|
120 |
public static DynObjectManager getDynObjectManager() |
|
121 |
throws LocatorException { |
|
122 |
return (DynObjectManager) getInstance().get(DYNOBJECT_MANAGER_NAME); |
|
123 |
} |
|
124 |
|
|
125 |
/** |
|
126 |
* Registers the Class implementing the DynObjectManager interface. |
|
127 |
* |
|
128 |
* @param clazz |
|
129 |
* implementing the DynObjectManager interface |
|
130 |
*/ |
|
131 |
public static void registerDynObjectManager(Class clazz) { |
|
132 |
getInstance().register(DYNOBJECT_MANAGER_NAME, |
|
133 |
DYNOBJECT_MANAGER_DESCRIPTION, clazz); |
|
134 |
} |
|
135 |
} |
Also available in: Unified diff