def __init__(self, environment, **kwargs): ''' Do not forget to invoke this in your derived class using "super(self.__class__, self).__init__(environment, **kwargs)" We want to use the env, service and storage methods outside class. If not called, you must implement your own methods service and storage are "convenient" methods to access _env.service() and _env.storage() Invoking this from derived classes is a MUST, again, do not forget it or your module will probable never work. Args: environment: Environment assigned to this publication kwargs: List of arguments that will receive: service: Parent service (derived from Service) of this deployment (this is an instance, not database object) publication: Parent publication (derived from Publication) of this deployment (optional)(this is an instance, not database object) osmanager: Parent osmanager (derived from :py:class:`uds.core.osmanagersOSManager`) of this deployment (optional)(this is an instance, not database object) dbservice: Database object for this service ''' Environmentable.__init__(self, environment) Serializable.__init__(self) self._service = kwargs['service'] # Raises an exception if service is not included. Parent self._publication = kwargs.get('publication', None) self._osmanager = kwargs.get('osmanager', None) self._dbService = kwargs.get('dbservice', None) self.initialize()
def __init__(self, environment, **kwargs): """ Do not forget to invoke this in your derived class using "super(self.__class__, self).__init__(environment, **kwargs)" We want to use the env, service and storage methods outside class. If not called, you must implement your own methods service and storage are "convenient" methods to access _env.service() and _env.storage Invoking this from derived classes is a MUST, again, do not forget it or your module will probable never work. Args: environment: Environment assigned to this publication kwargs: List of arguments that will receive: service: Parent service (derived from Service) of this deployment (this is an instance, not database object) publication: Parent publication (derived from Publication) of this deployment (optional)(this is an instance, not database object) osmanager: Parent osmanager (derived from :py:class:`uds.core.osmanagersOSManager`) of this deployment (optional)(this is an instance, not database object) dbservice: Database object for this service """ Environmentable.__init__(self, environment) Serializable.__init__(self) self._service = kwargs[ 'service'] # Raises an exception if service is not included. Parent self._publication = kwargs.get('publication', None) self._osmanager = kwargs.get('osmanager', None) self._dbService = kwargs.get('dbservice', None) self._uuid = kwargs.get('uuid', '') # If it has dbService if self._dbService: self._uuid = self._dbService.uuid self.initialize()
def __init__(self, environment, values=None, uuid=None): """ Do not forget to invoke this in your derived class using "super(self.__class__, self).__init__(environment, values)". We want to use the env, cache and storage methods outside class. If not called, you must implement your own methods. cache and storage are "convenient" methods to access _env.cache and _env.storage The values param is passed directly to UserInterface base. The environment param is passed directly to environment. Values are passed to __initialize__ method. It this is not None, the values contains a dictionary of values received from administration gui, that contains the form data requested from user. If you override marshal, unmarshal and inherited UserInterface method valuesDict, you must also take account of values (dict) provided at the __init__ method of your class. """ # UserInterface.__init__(self, values) Environmentable.__init__(self, environment) Serializable.__init__(self) self._uuid = uuid if uuid is not None else ''
def __init__(self, environment, values=None): ''' Do not forget to invoke this in your derived class using "super(self.__class__, self).__init__(environment, values)". We want to use the env, cache and storage methods outside class. If not called, you must implement your own methods. cache and storage are "convenient" methods to access _env.cache and _env.storage The values param is passed directly to UserInterface base. The environment param is passed directly to environment. Values are passed to __initialize__ method. It this is not None, the values contains a dictionary of values received from administration gui, that contains the form data requested from user. If you override marshal, unmarshal and inherited UserInterface method valuesDict, you must also take account of values (dict) provided at the __init__ method of your class. ''' # UserInterface.__init__(self, values) Environmentable.__init__(self, environment) Serializable.__init__(self)
def __init__(self, environment, **kwargs): """ Do not forget to invoke this in your derived class using "super(self.__class__, self).__init__(environment, values)" We want to use the env, cache and storage methods outside class. If not called, you must implement your own methods cache and storage are "convenient" methods to access _env.cache() and _env.storage() @param environment: Environment assigned to this publication """ Environmentable.__init__(self, environment) Serializable.__init__(self) self._osManager = kwargs.get("osManager", None) self._service = kwargs["service"] # Raises an exception if service is not included self._revision = kwargs.get("revision", -1) self._dsName = kwargs.get("dsName", "Unknown") self.initialize()
def __init__(self, environment, **kwargs): ''' Do not forget to invoke this in your derived class using "super(self.__class__, self).__init__(environment, values)" We want to use the env, cache and storage methods outside class. If not called, you must implement your own methods cache and storage are "convenient" methods to access _env.cache and _env.storage @param environment: Environment assigned to this publication ''' Environmentable.__init__(self, environment) Serializable.__init__(self) self._osManager = kwargs.get('osManager', None) self._service = kwargs[ 'service'] # Raises an exception if service is not included self._revision = kwargs.get('revision', -1) self._dsName = kwargs.get('dsName', 'Unknown') self.initialize()