Revision 44505 trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/PluginsLocator.java
PluginsLocator.java | ||
---|---|---|
48 | 48 |
/** |
49 | 49 |
* Unique instance. |
50 | 50 |
*/ |
51 |
private static final PluginsLocator instance = new PluginsLocator();
|
|
51 |
private static final PluginsLocator INSTANCE = new PluginsLocator();
|
|
52 | 52 |
|
53 | 53 |
/** |
54 | 54 |
* Return the singleton instance. |
... | ... | |
56 | 56 |
* @return the singleton instance |
57 | 57 |
*/ |
58 | 58 |
public static PluginsLocator getInstance() { |
59 |
return instance;
|
|
59 |
return INSTANCE;
|
|
60 | 60 |
} |
61 | 61 |
|
62 | 62 |
/** |
... | ... | |
64 | 64 |
* |
65 | 65 |
* @return String containing the locator name. |
66 | 66 |
*/ |
67 |
@Override |
|
67 | 68 |
public String getLocatorName() { |
68 | 69 |
return LOCATOR_NAME; |
69 | 70 |
} |
70 | 71 |
|
71 | 72 |
/** |
72 |
* Return a reference to DataManager.
|
|
73 |
* Return a reference to PluginsManager.
|
|
73 | 74 |
* |
74 |
* @return a reference to DataManager
|
|
75 |
* @return a reference to PluginsManager
|
|
75 | 76 |
* @throws LocatorException |
76 | 77 |
* if there is no access to the class or the class cannot be |
77 | 78 |
* instantiated |
... | ... | |
81 | 82 |
return (PluginsManager) getInstance().get(PLUGINS_MANAGER_NAME); |
82 | 83 |
} |
83 | 84 |
|
85 |
public static PluginsManager getPluginsManager() throws LocatorException { |
|
86 |
return (PluginsManager) getInstance().get(PLUGINS_MANAGER_NAME); |
|
87 |
} |
|
88 |
|
|
84 | 89 |
/** |
85 |
* Registers the Class implementing the DataManager interface.
|
|
90 |
* Registers the Class implementing the PluginsManager interface.
|
|
86 | 91 |
* |
87 | 92 |
* @param clazz |
88 |
* implementing the DataManager interface
|
|
93 |
* implementing the PluginsManager interface
|
|
89 | 94 |
*/ |
90 | 95 |
public static void registerManager(Class clazz) { |
91 | 96 |
getInstance().register(PLUGINS_MANAGER_NAME, PLUGINS_MANAGER_DESCRIPTION, |
... | ... | |
93 | 98 |
} |
94 | 99 |
|
95 | 100 |
/** |
96 |
* Registers a class as the default DataManager.
|
|
101 |
* Registers a class as the default PluginsManager.
|
|
97 | 102 |
* |
98 | 103 |
* @param clazz |
99 | 104 |
* implementing the DataManager interface |
Also available in: Unified diff