Пример #1
0
 def _delete(self):
     if MailTools.needToSendEmails('RecordingRequest'):
         try:
             notification = RequestDeletedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return RecordingRequestError('remove', e)
Пример #2
0
 def _delete(self):
     if MailTools.needToSendEmails('RecordingRequest'):
         try:
             notification = RequestDeletedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return RecordingRequestError('remove', e)
Пример #3
0
 def _sendResultEmail(cls, maxDate, previousTotal, newTotal, error, attainedDate):
     """ Sends a mail detailing how the operation went
     """
     if MailTools.needToSendEmails('Vidyo'):
         try:
             notification = VidyoCleaningDoneNotification(maxDate, previousTotal, newTotal, error, attainedDate)
             GenericMailer.send(notification)
         except Exception, e:
             Logger.get('Vidyo').error(
                 """Could not send VidyoCleaningDoneNotification, exception: %s""" % str(e))
Пример #4
0
 def notifyLocationChange(self):
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRelocatedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                  "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                  self.getConference().getCreator())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRelocatedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Пример #5
0
 def notifyEventDateChanges(self, oldStartDate, newStartDate, oldEndDate, newEndDate):
     manager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId())
     manager._changeConfStartDateInIndex(self, oldStartDate, newStartDate)
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRescheduledNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRescheduledNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Пример #6
0
 def notifyLocationChange(self):
     self.unindex_instances()
     self.index_instances()
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRelocatedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRelocatedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Пример #7
0
 def notifyLocationChange(self):
     self.unindex_instances()
     self.index_instances()
     if MailTools.needToSendEmails('RecordingRequest'):
         try:
             notification = RequestRelocatedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRelocatedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return RecordingRequestError('edit', e)
Пример #8
0
 def notifyEventDateChanges(self, oldStartDate, newStartDate, oldEndDate, newEndDate):
     manager = self._conf.getCSBookingManager()
     manager._changeConfStartDateInIndex(self, oldStartDate, newStartDate)
     if MailTools.needToSendEmails('RecordingRequest'):
         try:
             notification = RequestRescheduledNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRescheduledNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return RecordingRequestError('edit', e)
Пример #9
0
 def _delete(self):
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestDeletedNotification(self)
             GenericMailer.sendAndLog(
                 notification, self.getConference(),
                 "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                 self.getConference().getCreator())
         except Exception, e:
             Logger.get('RecReq').exception(
                 """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s"""
                 % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('remove', e)
Пример #10
0
 def _sendResultEmail(cls, maxDate, previousTotal, newTotal, error,
                      attainedDate):
     """ Sends a mail detailing how the operation went
     """
     if MailTools.needToSendEmails('Vidyo'):
         try:
             notification = VidyoCleaningDoneNotification(
                 maxDate, previousTotal, newTotal, error, attainedDate)
             GenericMailer.send(notification)
         except Exception, e:
             Logger.get('Vidyo').error(
                 """Could not send VidyoCleaningDoneNotification, exception: %s"""
                 % str(e))
Пример #11
0
    def _create(self):
        self._statusMessage = "Request successfully sent"
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('RecordingRequest'):
            try:
                notification = NewRequestNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send NewRequestNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return RecordingRequestError('create', e)
Пример #12
0
    def _modify(self, oldBookingParams):
        self._statusMessage = "Request successfully sent"
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('RecordingRequest'):
            try:
                notification = RequestModifiedNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestModifiedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return RecordingRequestError('edit', e)
Пример #13
0
 def notifyLocationChange(self):
     self.unindex_instances()
     self.index_instances()
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRelocatedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                  "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                  self.getConference().getCreator())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRelocatedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Пример #14
0
    def _modify(self, oldBookingParams):
        self._statusMessage = "Request successfully sent"
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = RequestModifiedNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestModifiedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('edit', e)
Пример #15
0
 def notifyEventDateChanges(self, oldStartDate, newStartDate, oldEndDate, newEndDate):
     manager = self._conf.getCSBookingManager()
     manager._changeConfStartDateInIndex(self, oldStartDate, newStartDate)
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRescheduledNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                  "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                  self.getConference().getCreator())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRescheduledNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Пример #16
0
    def _delete(self):
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance().delForthcomingWebcast(self._conf)

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = RequestDeletedNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('remove', e)
Пример #17
0
    def _create(self):
        self._statusMessage = "Request successfully sent"
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = NewRequestNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                     "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                     self.getConference().getCreator())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send NewRequestNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('create', e)
Пример #18
0
 def _modify(self):
     self._statusMessage = _("Request successfully sent")
     self._statusClass = "statusMessageOther"
     
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestModifiedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                  "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                  self.getConference().getCreator())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestModifiedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Пример #19
0
    def _delete(self):
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance(
        ).delForthcomingWebcast(self._conf)

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = RequestDeletedNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception, e:
                Logger.get('RecReq').exception(
                    """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s"""
                    % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('remove', e)
Пример #20
0
    def _modify(self):
        self._statusMessage = _("Request successfully sent")
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('RecordingRequest'):
            try:
                notification = RequestModifiedNotification(self)
                GenericMailer.sendAndLog(
                    notification, self.getConference(),
                    "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py",
                    self.getConference().getCreator())
            except Exception, e:
                Logger.get('RecReq').exception(
                    """Could not send RequestModifiedNotification for request with id %s of event %s, exception: %s"""
                    % (self._id, self.getConference().getId(), str(e)))
                return RecordingRequestError('edit', e)
Пример #21
0
    def _accept(self, user = None):
        self._statusMessage = "Request accepted"
        self._statusClass = "statusMessageOK"

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                 "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py",
                                 None)
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return RecordingRequestError('accept', e)

        if MailTools.needToSendEmails('RecordingRequest'):
            try:
                notificationAdmin = RequestAcceptedNotificationAdmin(self, user)
                GenericMailer.sendAndLog(notificationAdmin, self.getConference(),
                                     "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py",
                                     None)
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestAcceptedNotificationAdmin for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return RecordingRequestError('accept', e)

        manager = self._conf.getCSBookingManager()
        manager.notifyInfoChange()

    def _reject(self):
        self._statusMessage = "Request rejected by responsible"
Пример #22
0
        self._statusMessage = "Request accepted"
        self._statusClass = "statusMessageOK"
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance().addForthcomingWebcast(self._conf, self._bookingParams.get("audience", ""))

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                 "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                 None)
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return WebcastRequestError('accept', e)

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = RequestAcceptedNotificationAdmin(self, user)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                     "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                     None)
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestAcceptedNotificationAdmin for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('accept', e)

        manager = self._conf.getCSBookingManager()
        manager.notifyInfoChange()

    def _reject(self):
        self._statusMessage = "Request rejected by responsible"
Пример #23
0
    def _accept(self, user=None):
        self._statusMessage = "Request accepted"
        self._statusClass = "statusMessageOK"

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                     self.getPlugin().getName())
        except Exception, e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s"""
                % (self._id, self.getConference().getId(), str(e)))
            return RecordingRequestError('accept', e)

        if MailTools.needToSendEmails('RecordingRequest'):
            try:
                notificationAdmin = RequestAcceptedNotificationAdmin(
                    self, user)
                GenericMailer.sendAndLog(notificationAdmin,
                                         self.getConference(),
                                         self.getPlugin().getName())
            except Exception, e:
                Logger.get('RecReq').exception(
                    """Could not send RequestAcceptedNotificationAdmin for request with id %s of event %s, exception: %s"""
                    % (self._id, self.getConference().getId(), str(e)))
                return RecordingRequestError('accept', e)

        manager = Catalog.getIdx("cs_bookingmanager_conference").get(
            self._conf.getId())
        manager.notifyInfoChange()
Пример #24
0
    def _accept(self, user = None):
        self._statusMessage = "Request accepted"
        self._statusClass = "statusMessageOK"
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance().addForthcomingWebcast(self._conf, self._bookingParams.get("audience", ""))

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                     self.getPlugin().getName())
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return WebcastRequestError('accept', e)

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = RequestAcceptedNotificationAdmin(self, user)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestAcceptedNotificationAdmin for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('accept', e)

        manager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId())
        manager.notifyInfoChange()

    def _reject(self):
        self._statusMessage = "Request rejected by responsible"
        self._statusClass = "statusMessageError"