Package org.fluxtream.core.domain

Examples of org.fluxtream.core.domain.Notification


    DataUpdateService dataUpdateService;

    @Override
    @Transactional(readOnly = false)
    public void addNamedNotification(final long guestId, final Type type, final String name, String message) {
        final Notification previousNotification = JPAUtils.findUnique(em,
                                                                      Notification.class,
                                                                      "notifications.withName",
                                                                      guestId, name);
        if (previousNotification==null) {
            Notification notification = new Notification();
            notification.guestId = guestId;
            notification.type = type;
            notification.message = message;
            notification.name = name;
            em.persist(notification);
View Full Code Here


    }

    @Override
  @Transactional(readOnly = false)
  public void addNotification(long guestId, Type type, String message) {
        final Notification sameNotification = JPAUtils.findUnique(em,
              Notification.class,
              "notifications.withTypeAndMessage",
              guestId, type, message);
        if (sameNotification==null) {
            Notification notification = new Notification();
            notification.guestId = guestId;
            notification.type = type;
            notification.message = message;
            em.persist(notification);
        } else {
View Full Code Here

        dataUpdateService.logNotificationUpdate(guestId);
  }

    @Override
    public void addExceptionNotification(final long guestId, final Type type, final String message, final String stackTrace) {
        final Notification sameNotification = JPAUtils.findUnique(em,
                                                                  Notification.class,
                                                                  "notifications.withTypeAndMessage",
                                                                  guestId, type, message);
        if (sameNotification==null) {
            Notification notification = new Notification();
            notification.guestId = guestId;
            notification.type = type;
            notification.message = message;
            notification.stackTrace = stackTrace;
            notification.ts = System.currentTimeMillis();
View Full Code Here

    }

    @Override
  @Transactional(readOnly = false)
  public void deleteNotification(long guestId, long notificationId) {
    Notification notification = em.find(Notification.class, notificationId);
    if (notification.guestId!=guestId) {
      throw new RuntimeException("attempt to delete a notification from the wrong guest");
    }
    notification.deleted = true;
    em.merge(notification);
View Full Code Here

    return notifications;
  }

    @Override
    public Notification getNamedNotification(final long guestId, final String name) {
        final Notification notification = JPAUtils.findUnique(em,
                                                                      Notification.class,
                                                                      "notifications.withName",
                                                                      guestId, name);
        return notification;
    }
View Full Code Here

            }
            if (smsLabel == null)
                throw new FolderNotFoundException();

            //if we get to this point then we were able to access the folder and should delete our error notification
            Notification errorNotification = notificationsService.getNamedNotification(updateInfo.getGuestId(), connector().getName() + ".smsFolderError");
            if (errorNotification != null && !errorNotification.deleted){
                notificationsService.deleteNotification(updateInfo.getGuestId(),errorNotification.getId());
            }

            Properties props = new Properties();
            Session session = Session.getDefaultInstance(props, null);
View Full Code Here

            }
            if (callLogLabel == null)
                throw new FolderNotFoundException();

            //if we get to this point then we were able to access the folder and should delete our error notification
            Notification errorNotification = notificationsService.getNamedNotification(updateInfo.getGuestId(), connector().getName() + ".callLogFolderError");
            if (errorNotification != null && !errorNotification.deleted){
                notificationsService.deleteNotification(updateInfo.getGuestId(),errorNotification.getId());
            }

            Properties props = new Properties();
            Session session = Session.getDefaultInstance(props, null);
View Full Code Here

TOP

Related Classes of org.fluxtream.core.domain.Notification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.