From da731d2bb81666b9c697d9099da632e7dfcdc0f7 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Tue, 9 Sep 2014 12:13:21 +0200 Subject: Replaced int sysKey Item identifier with UUID, which is now portable. ItemPath objects are now used to identify Items throughout the kernel, replacing ints and Integers. --- .../java/com/c2kernel/process/module/ModuleManager.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/com/c2kernel/process/module/ModuleManager.java') diff --git a/src/main/java/com/c2kernel/process/module/ModuleManager.java b/src/main/java/com/c2kernel/process/module/ModuleManager.java index 6a69ff8..4fde044 100644 --- a/src/main/java/com/c2kernel/process/module/ModuleManager.java +++ b/src/main/java/com/c2kernel/process/module/ModuleManager.java @@ -49,13 +49,13 @@ public class ModuleManager { if (errors.length() > 0) throw new ModuleException("Module XML found at "+newModuleURL+" was not valid: "+errors); Module newModule = (Module)Gateway.getMarshaller().unmarshall(moduleXML); - if (newModule.resURL != null && newModule.resURL.length()>0) Gateway.getResource().addModuleBaseURL(newModule.ns, newModule.resURL); + if (newModule.getResURL() != null && newModule.getResURL().length()>0) Gateway.getResource().addModuleBaseURL(newModule.getNamespace(), newModule.getResURL()); modules.add(newModule); - modulesXML.put(newModule.ns, moduleXML); + modulesXML.put(newModule.getNamespace(), moduleXML); if (loadedModules.contains(newModule.getName())) throw new ModuleException("Module name clash: "+newModule.getName()); - if (moduleNs.contains(newModule.getNs())) throw new ModuleException("Module namespace clash: "+newModule.getNs()); - Logger.debug(4, "Module found: "+newModule.getNs()+" - "+newModule.getName()); - loadedModules.add(newModule.getName()); moduleNs.add(newModule.getNs()); + if (moduleNs.contains(newModule.getNamespace())) throw new ModuleException("Module namespace clash: "+newModule.getNamespace()); + Logger.debug(4, "Module found: "+newModule.getNamespace()+" - "+newModule.getName()); + loadedModules.add(newModule.getName()); moduleNs.add(newModule.getNamespace()); } catch (ModuleException e) { Logger.error("Could not load module description from "+newModuleURL); throw e; @@ -156,9 +156,9 @@ public class ModuleManager { Logger.msg("Registering module "+thisMod.getName()); try { - String nsReset = Gateway.getProperties().getProperty("Module."+thisMod.ns+".reset"); + String nsReset = Gateway.getProperties().getProperty("Module."+thisMod.getNamespace()+".reset"); boolean thisReset = nsReset == null?reset:nsReset.equals("true"); - thisMod.importAll(serverEntity, user, modulesXML.get(thisMod.ns), thisReset); + thisMod.importAll(serverEntity, user, modulesXML.get(thisMod.getNamespace()), thisReset); } catch (Exception e) { Logger.error(e); throw new ModuleException("Error importing items for module "+thisMod.getName()); -- cgit v1.2.3