cwvreg.py
changeset 2476 1294a6bdf3bf
parent 2389 c399bd6a9c38
child 2613 5e19c2bb370e
equal deleted inserted replaced
2475:b6753521129d 2476:1294a6bdf3bf
    38             raise
    38             raise
    39         return ()
    39         return ()
    40 
    40 
    41 
    41 
    42 class CubicWebRegistry(VRegistry):
    42 class CubicWebRegistry(VRegistry):
    43     """Central registry for the cubicweb application, extending the generic
    43     """Central registry for the cubicweb instance, extending the generic
    44     VRegistry with some cubicweb specific stuff.
    44     VRegistry with some cubicweb specific stuff.
    45 
    45 
    46     This is one of the central object in cubicweb application, coupling
    46     This is one of the central object in cubicweb instance, coupling
    47     dynamically loaded objects with the schema and the configuration objects.
    47     dynamically loaded objects with the schema and the configuration objects.
    48 
    48 
    49     It specializes the VRegistry by adding some convenience methods to access to
    49     It specializes the VRegistry by adding some convenience methods to access to
    50     stored objects. Currently we have the following registries of objects known
    50     stored objects. Currently we have the following registries of objects known
    51     by the web application (library may use some others additional registries):
    51     by the web instance (library may use some others additional registries):
    52 
    52 
    53     * etypes
    53     * etypes
    54     * views
    54     * views
    55     * components
    55     * components
    56     * actions
    56     * actions
    89         self._registries['propertyvalues'] = self.eprop_values = {}
    89         self._registries['propertyvalues'] = self.eprop_values = {}
    90         for key, propdef in self.config.eproperty_definitions():
    90         for key, propdef in self.config.eproperty_definitions():
    91             self.register_property(key, **propdef)
    91             self.register_property(key, **propdef)
    92 
    92 
    93     def set_schema(self, schema):
    93     def set_schema(self, schema):
    94         """set application'schema and load application objects"""
    94         """set instance'schema and load application objects"""
    95         self.schema = schema
    95         self.schema = schema
    96         clear_cache(self, 'rqlhelper')
    96         clear_cache(self, 'rqlhelper')
    97         # now we can load application's web objects
    97         # now we can load application's web objects
    98         self.register_objects(self.config.vregistry_path())
    98         self.register_objects(self.config.vregistry_path())
    99         # map lowered entity type names to their actual name
    99         # map lowered entity type names to their actual name