// Restore the appropriate root resource:
Hashtable defs = new Hashtable(11) ;
defs.put("url", "/");
defs.put("directory", space_dir) ;
ResourceContext context = null;
if ((editRootName != null) && (! name.equals(editRootName))) {
if (editroot == null) {
Hashtable edefs = new Hashtable(11) ;
edefs.put("url", "/");
edefs.put("directory", space_dir) ;
ResourceContext econtext =
new ResourceContext(getDefaultContext());
edefs.put("context", econtext) ;
editroot = manager.loadRootResource(editRootName, edefs);
if (editroot != null)
econtext.setResourceReference(editroot);
}
context = new ResourceContext(editroot);
} else {
context = new ResourceContext(getDefaultContext());
}
defs.put("context", context) ;
ResourceReference rr = manager.loadRootResource(name, defs);
if (rr != null)
context.setResourceReference(rr);