this.hostName = hostName;
this.chromatticLifeCycle = lifeCycle;
}
public GadgetRegistry getRegistry() {
Chromattic chromattic = chromatticLifeCycle.getChromattic();
ChromatticSession session = chromattic.openSession();
GadgetRegistry registry = session.findByPath(GadgetRegistry.class, "app:gadgets");
if (registry == null) {
registry = session.insert(GadgetRegistry.class, "app:gadgets");
}
return registry;