def scatter_notification(self, notif, contacts, notifways, timeperiods, macromodulations,
                             escalations, host_ref):
        # pylint: disable=too-many-locals, too-many-boolean-expressions
        """In create_notifications we created a notification master (eg. a template).
        When it's time to hand it over to the reactionner, this master notification needs
        to be split in several child notifications, one for each contact

        To be more exact, one for each contact who is willing to accept
        notifications of this type and at this time

        :param notif: Notification to scatter
        :type notif: alignak.objects.notification.Notification
        :param contacts: Contacts objects, used to retreive contact for this object
        :type contacts: alignak.objects.contact.Contacts
        :param notifways: Notificationway objects, used to get notific commands
        :type notifways: alignak.object.notificationway.Notificationways
        :param timeperiods: Timeperiods objects, used to check if notif are allowed at this time
        :type timeperiods: alignak.objects.timeperiod.Timeperiods
        :param macromodulations: Macro modulations objects, used in the notification command
        :type macromodulations: alignak.objects.macromodulation.Macromodulations
        :param escalations: Esclations objects, used to get escalated contacts
        :type escalations: alignak.objects.escalation.Escalations
        :param host_ref: reference host (used for a service)
        :type host_ref: alignak.object.host.Host

        :return: child notifications
        :rtype: list[alignak.objects.notification.Notification]
        """
        if notif.contact:
            # only master notifications can be split up
            return []

        cls = self.__class__
        childnotifications = []
        escalated = False
        notification_contacts = []
        if notif.type == u'RECOVERY':
            if self.first_notification_delay != 0 and not self.notified_contacts_ids:
                # Recovered during first_notification_delay. No notifications
                # have been sent yet, so we keep quiet
                notification_contacts = []
            else:
                # The old way. Only send recover notifications to those contacts
                # who also got problem notifications
                notification_contacts = [c_id for c_id in self.notified_contacts_ids]
            self.notified_contacts.clear()
            self.notified_contacts_ids.clear()
        else:
            # Check is an escalation match. If yes, get all contacts from escalations
            if self.is_escalable(notif, escalations, timeperiods):
                notification_contacts = self.get_escalable_contacts(notif, escalations, timeperiods)
                escalated = True
            # else take normal contacts
            else:
                # notif_contacts = [contacts[c_id] for c_id in self.contacts]
                notification_contacts = self.contacts

        recipients = []
        recipients_names = set()
        for contact_uuid in notification_contacts:
            # We do not want to notify again a contact with notification interval == 0
            # if has been already notified except if the item hard state changed!
            # This can happen when a service exits a downtime and it is still in
            # critical/warning (and not acknowledge)
            if notif.type == u'PROBLEM' and self.notification_interval == 0 \
                    and self.state_type == 'HARD' and self.last_state_type == self.state_type \
                    and self.state == self.last_state \
                    and contact_uuid in self.notified_contacts_ids:
                # Do not send notification
                continue
            recipients.append(contact_uuid)
            recipients_names.add(contacts[contact_uuid].contact_name)

        for contact_uuid in recipients:
            contact = contacts[contact_uuid]

            # Get the property name for notification commands, like
            # service_notification_commands for service
            notif_commands = contact.get_notification_commands(notifways, cls.my_type)

            for cmd in notif_commands:
                data = {
                    'type': notif.type,
                    'command': u'VOID',
                    'command_call': cmd,
                    'ref': self.uuid,
                    'contact': contact.uuid,
                    'contact_name': contact.contact_name,
                    'recipients': ','.join(recipients_names),
                    't_to_go': notif.t_to_go,
                    'escalated': escalated,
                    'timeout': cls.notification_timeout,
                    'notif_nb': notif.notif_nb,
                    'reactionner_tag': cmd.reactionner_tag,
                    'enable_environment_macros': cmd.enable_environment_macros,
                    'host_name': getattr(self, 'host_name', ''),
                    'service_description': getattr(self, 'service_description', ''),
                    'author': notif.author,
                    'author_name': notif.author_name,
                    'author_alias': notif.author_alias,
                    'author_comment': notif.author_comment
                }
                child_n = Notification(data)
                if not self.notification_is_blocked_by_contact(notifways, timeperiods, child_n,
                                                               contact):
                    # Update the notification with fresh status information
                    # of the item. Example: during the notification_delay
                    # the status of a service may have changed from WARNING to CRITICAL
                    self.update_notification_command(child_n, contact, macromodulations,
                                                     timeperiods, host_ref)
                    self.raise_notification_log_entry(child_n, contact, host_ref)
                    self.notifications_in_progress[child_n.uuid] = child_n
                    childnotifications.append(child_n)

                    if notif.type == u'PROBLEM':
                        # Remember the contacts. We might need them later in the
                        # recovery code some lines above
                        self.notified_contacts_ids.add(contact.uuid)
                        self.notified_contacts.add(contact.get_name())

        return childnotifications