def initialize(context): # Import Product Components from Tool import (CacheTool, MemcachedTool, SessionTool, TypesTool, WebServiceTool, PropertySheetTool, ComponentTool) import Document from Base import Base import XMLObject from ERP5Type import ERP5TypeInformation import CodingStyle # Define documents, classes, constructors and tools object_classes = () content_constructors = () content_classes = ( Base, XMLObject.XMLObject, ERP5TypeInformation, ) portal_tools = (CacheTool.CacheTool, MemcachedTool.MemcachedTool, SessionTool.SessionTool, TypesTool.TypesTool, WebServiceTool.WebServiceTool, PropertySheetTool.PropertySheetTool, ComponentTool.ComponentTool) # Do initialization step initializeProduct(context, this_module, globals(), document_module=Document, document_classes=document_classes, object_classes=object_classes, portal_tools=portal_tools, content_constructors=content_constructors, content_classes=content_classes) # Register our Workflow factories directly (if on CMF 2) Products.ERP5Type.Workflow.registerAllWorkflowFactories(context) # We should register local constraints at some point from Products.ERP5Type.Utils import initializeLocalConstraintRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalConstraintRegistry') initializeLocalConstraintRegistry() # We should register local property sheets at some point from Products.ERP5Type.Utils import initializeLocalPropertySheetRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalPropertySheetRegistry') initializeLocalPropertySheetRegistry() # We should register product classes at some point from Products.ERP5Type.InitGenerator import initializeProductDocumentRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeProductDocumentRegistry') initializeProductDocumentRegistry() # We should register local classes at some point from Products.ERP5Type.Utils import initializeLocalDocumentRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalDocumentRegistry') initializeLocalDocumentRegistry() # We can now setup global interactors from Products.ERP5Type.InitGenerator import initializeProductInteractorRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeProductInteractorRegistry') initializeProductInteractorRegistry() # And local interactors from Products.ERP5Type.Utils import initializeLocalInteractorRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalInteractorRegistry') initializeLocalInteractorRegistry() # We can now install all interactors from Products.ERP5Type.InitGenerator import installInteractorClassRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'installInteractorClassRegistry') installInteractorClassRegistry() from Products.ERP5Type import Timeout erp5_conf = getattr(getConfiguration(), 'product_config', {}).get('erp5') # Note: erp5_conf attributes are missing in unit tests, fallback to no timeout # in that case. Timeout.publisher_timeout = getattr(erp5_conf, 'publisher_timeout', None) Timeout.activity_timeout = getattr(erp5_conf, 'activity_timeout', None)
def initialize( context ): # Import Product Components from Tool import (CacheTool, MemcachedTool, SessionTool, TypesTool, WebServiceTool, PropertySheetTool, ComponentTool) import Document from Base import Base import XMLObject from ERP5Type import ERP5TypeInformation import CodingStyle # Define documents, classes, constructors and tools object_classes = () content_constructors = () content_classes = ( Base, XMLObject.XMLObject, ERP5TypeInformation ) portal_tools = ( CacheTool.CacheTool, MemcachedTool.MemcachedTool, SessionTool.SessionTool, TypesTool.TypesTool, WebServiceTool.WebServiceTool, PropertySheetTool.PropertySheetTool, ComponentTool.ComponentTool ) # Do initialization step initializeProduct(context, this_module, globals(), document_module = Document, document_classes = document_classes, object_classes = object_classes, portal_tools = portal_tools, content_constructors = content_constructors, content_classes = content_classes) # Register our Workflow factories directly (if on CMF 2) Products.ERP5Type.Workflow.registerAllWorkflowFactories(context) # We should register local constraints at some point from Products.ERP5Type.Utils import initializeLocalConstraintRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalConstraintRegistry') initializeLocalConstraintRegistry() # We should register local property sheets at some point from Products.ERP5Type.Utils import initializeLocalPropertySheetRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalPropertySheetRegistry') initializeLocalPropertySheetRegistry() # We should register product classes at some point from Products.ERP5Type.InitGenerator import initializeProductDocumentRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeProductDocumentRegistry') initializeProductDocumentRegistry() # We should register local classes at some point from Products.ERP5Type.Utils import initializeLocalDocumentRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalDocumentRegistry') initializeLocalDocumentRegistry() # We can now setup global interactors from Products.ERP5Type.InitGenerator import initializeProductInteractorRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeProductInteractorRegistry') initializeProductInteractorRegistry() # And local interactors from Products.ERP5Type.Utils import initializeLocalInteractorRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalInteractorRegistry') initializeLocalInteractorRegistry() # We can now install all interactors from Products.ERP5Type.InitGenerator import installInteractorClassRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'installInteractorClassRegistry') installInteractorClassRegistry()
def initialize(context): # Import Product Components from Tool import (CacheTool, MemcachedTool, SessionTool, TypesTool, WebServiceTool, PropertySheetTool, ComponentTool) import Document from Base import Base import XMLObject from ERP5Type import ERP5TypeInformation import CodingStyle # Define documents, classes, constructors and tools object_classes = () content_constructors = () content_classes = ( Base, XMLObject.XMLObject, ERP5TypeInformation, ) portal_tools = (CacheTool.CacheTool, MemcachedTool.MemcachedTool, SessionTool.SessionTool, TypesTool.TypesTool, WebServiceTool.WebServiceTool, PropertySheetTool.PropertySheetTool, ComponentTool.ComponentTool) # Do initialization step initializeProduct(context, this_module, globals(), document_module=Document, document_classes=document_classes, object_classes=object_classes, portal_tools=portal_tools, content_constructors=content_constructors, content_classes=content_classes) # Register our Workflow factories directly (if on CMF 2) Products.ERP5Type.Workflow.registerAllWorkflowFactories(context) # We should register local constraints at some point from Products.ERP5Type.Utils import initializeLocalConstraintRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalConstraintRegistry') initializeLocalConstraintRegistry() # We should register local property sheets at some point from Products.ERP5Type.Utils import initializeLocalPropertySheetRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalPropertySheetRegistry') initializeLocalPropertySheetRegistry() # We should register product classes at some point from Products.ERP5Type.InitGenerator import initializeProductDocumentRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeProductDocumentRegistry') initializeProductDocumentRegistry() # We should register local classes at some point from Products.ERP5Type.Utils import initializeLocalDocumentRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalDocumentRegistry') initializeLocalDocumentRegistry() # We can now setup global interactors from Products.ERP5Type.InitGenerator import initializeProductInteractorRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeProductInteractorRegistry') initializeProductInteractorRegistry() # And local interactors from Products.ERP5Type.Utils import initializeLocalInteractorRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'initializeLocalInteractorRegistry') initializeLocalInteractorRegistry() # We can now install all interactors from Products.ERP5Type.InitGenerator import installInteractorClassRegistry if DISPLAY_BOOT_PROCESS: LOG('ERP5Type.__init__', INFO, 'installInteractorClassRegistry') installInteractorClassRegistry()