Lines Matching refs:id

208      * @param id The service that needs to be activated.
209 * @return Instance of a service for the given service id.
211 public synchronized ToolService activateService(final String id) {
212 if (isServiceActive(id)) {
213 return getServiceFromPool(id);
215 if(!registry.isRegistered(id)) {
218 ToolService s = loadService(id);
220 addServiceToPool(id, s);
223 return getServiceFromPool(id);
232 private ToolService getServiceFromPool(String id) {
233 if (isServiceActive(id)) {
234 return (ToolService)activeServices.get(id);
242 * @param id the id of the service that is to be added to the pool.
245 private void addServiceToPool(String id, ToolService sClass) {
246 activeServices.put(id, sClass);
253 * @param id the id of the service that is to be loaded.
256 private ToolService loadService(final String id) {
257 String className = registry.getServiceClassName(id);
261 ToolServiceClassLoader cl = getServiceClassLoader(id);
262 List<String> libs = registry.getLibraries(id);
265 URL path = resolvePath(library, id);
278 loadResources(id);
298 private void loadResources(final String id) {
299 ToolServiceClassLoader cl = getServiceClassLoader(id);
301 List<String> resBundles = registry.getResourceBundles(id);
302 String path = registry.getServiceHome(id).getFile();
329 * @id id of the service
331 private URL resolvePath(String library, String id)
342 String path = registry.getServiceHome(id).getFile() + library;
354 * @param id id of the service
356 public boolean isServiceActive(final String id) {
357 if (activeServices.containsKey(id)) {
366 * @param id id of the service
370 public ToolService getService(final String id) {
371 return activateService(id);
377 * @param id id of the service for which the class loader is needed.
380 private ToolServiceClassLoader getServiceClassLoader(String id) {
381 if (classLoaders.containsKey(id)){
382 return (ToolServiceClassLoader) classLoaders.get(id);
386 if (!classLoaders.containsKey(id)){
387 cl = new ToolServiceClassLoader(id, this,
389 classLoaders.put(id, cl);