cwvreg.py
changeset 9258 4e79f587c6ab
parent 9256 697a8181ba30
child 9367 c8a5f7f43c03
equal deleted inserted replaced
9257:ce338133c92c 9258:4e79f587c6ab
   651             path, self.config.extrapath)
   651             path, self.config.extrapath)
   652 
   652 
   653     def initialization_completed(self):
   653     def initialization_completed(self):
   654         """cw specific code once vreg initialization is completed:
   654         """cw specific code once vreg initialization is completed:
   655 
   655 
   656         * remove objects requiring a missing interface, unless
   656         * remove objects requiring a missing appobject, unless
   657           config.cleanup_interface_sobjects is false
   657           config.cleanup_unused_appobjects is false
   658         * init rtags
   658         * init rtags
   659         """
   659         """
   660         # we may want to keep interface dependent objects (e.g.for i18n
   660         # we may want to keep interface dependent objects (e.g.for i18n
   661         # catalog generation)
   661         # catalog generation)
   662         if self.config.cleanup_interface_sobjects:
   662         if self.config.cleanup_unused_appobjects:
   663             # remove appobjects which depend on other, unexistant appobjects
   663             # remove appobjects which depend on other, unexistant appobjects
   664             for obj, (regname, regids) in self._needs_appobject.items():
   664             for obj, (regname, regids) in self._needs_appobject.items():
   665                 try:
   665                 try:
   666                     registry = self[regname]
   666                     registry = self[regname]
   667                 except RegistryNotFound:
   667                 except RegistryNotFound:
   677                     self.unregister(obj)
   677                     self.unregister(obj)
   678         super(CWRegistryStore, self).initialization_completed()
   678         super(CWRegistryStore, self).initialization_completed()
   679         if 'uicfg' in self: # 'uicfg' is not loaded in a pure repository mode
   679         if 'uicfg' in self: # 'uicfg' is not loaded in a pure repository mode
   680             for rtags in self['uicfg'].itervalues():
   680             for rtags in self['uicfg'].itervalues():
   681                 for rtag in rtags:
   681                 for rtag in rtags:
   682                     # don't check rtags if we don't want to cleanup_interface_sobjects
   682                     # don't check rtags if we don't want to cleanup_unused_appobjects
   683                     rtag.init(self.schema, check=self.config.cleanup_interface_sobjects)
   683                     rtag.init(self.schema, check=self.config.cleanup_unused_appobjects)
   684 
   684 
   685     # rql parsing utilities ####################################################
   685     # rql parsing utilities ####################################################
   686 
   686 
   687     @property
   687     @property
   688     @cached
   688     @cached