String rootPath = rootDirectory.getAbsolutePath();
UserRegistry registry = DashboardPopulatorContext.getRegistry(tenantId);
// Creating the default gadget collection resource
Collection defaultGadgetCollection = registry.newCollection();
try {
registry.beginTransaction();
registry.put(gadgetsPath, defaultGadgetCollection);
transferDirectoryContentToRegistry(rootDirectory, registry, rootPath, tenantId);