Examples of Notification


Examples of org.apache.syncope.core.persistence.beans.Notification

    }

    @Test
    public void notifyByMail() {
        // 1. create suitable notification for subsequent tests
        Notification notification = new Notification();
        notification.addEvent("create");

        MembershipCond membCond = new MembershipCond();
        membCond.setRoleId(7L);
        notification.setAbout(NodeCond.getLeafCond(membCond));

        membCond = new MembershipCond();
        membCond.setRoleId(8L);
        notification.setRecipients(NodeCond.getLeafCond(membCond));
        notification.setSelfAsRecipient(true);

        notification.setRecipientAttrName("email");
        notification.setRecipientAttrType(IntMappingType.UserSchema);

        Random random = new Random(System.currentTimeMillis());
        String sender = "syncopetest-" + random.nextLong() + "@syncope.apache.org";
        notification.setSender(sender);
        String subject = "Test notification " + random.nextLong();
        notification.setSubject(subject);
        notification.setTemplate("optin");

        Notification actual = notificationDAO.save(notification);
        assertNotNull(actual);

        notificationDAO.flush();

        // 2. use test SMTP server
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.FastLeaderElection.Notification

         * Check that it generates an internal notification correctly
         */
        MockFLEMessengerBackward fle = new MockFLEMessengerBackward(peer, mng);
        ByteBuffer buffer = FastLeaderElection.buildMsg(ServerState.LOOKING.ordinal(), 2, 0x1, 1, 1);
        fle.manager.recvQueue.add(new Message(buffer, 2));
        Notification n = fle.recvqueue.take();
        Assert.assertTrue("Wrong state", n.state == ServerState.LOOKING);
        Assert.assertTrue("Wrong leader", n.leader == 2);
        Assert.assertTrue("Wrong zxid", n.zxid == 0x1);
        Assert.assertTrue("Wrong epoch", n.electionEpoch == 1);
        Assert.assertTrue("Wrong epoch", n.peerEpoch == 1);
View Full Code Here

Examples of org.as.jtrello.notifications.Notification

  public void testGet() {
    try {
      List<Notification> notifications = client.getNotifications().getByUser(props.getProperty("TRELLO_MEMBER"));
      if (notifications.size() > 0){
        //Notification notification = client.getNotifications().get(props.getProperty("TRELLO_NOTIFICATION1"));
        Notification notification = client.getNotifications().get(notifications.get(0).getId());
        System.out.println("DEBUG notification=" + notification.toString());
      } else {
        fail("Need notifications to test this method.");
      }
    } catch (TrelloApiBaseException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.collectd.api.Notification

            }
            else if (type == Network.TYPE_TYPE_INSTANCE) {
                obj.pd.setTypeInstance (readString (is, len));
            }
            else if (type == Network.TYPE_MESSAGE) {
                Notification notif = obj.getNotification();
                notif.setMessage (readString(is, len));
                if (_dispatcher != null) {
                    _dispatcher.dispatch(notif);
                }
            }
            else if (type == Network.TYPE_SEVERITY) {
View Full Code Here

Examples of org.drools.task.Notification

   
    public static List<Notification> readNotificationList(ObjectInput in) throws IOException, ClassNotFoundException  {
        int size = in.readInt();
        List<Notification> list = new ArrayList<Notification>(size);
        for ( int i = 0; i < size; i++ ) {
            Notification item = null;
            switch( NotificationType.valueOfin.readUTF() ) ) {
                case Default : {
                    item = new Notification();
                    break;
                }
                case Email : {
                    item = new EmailNotification();
                    break;
                }
            }
            
            item.readExternal( in );
            list.add( item );
        }
        return list;
    }    
View Full Code Here

Examples of org.eclipse.ecf.provider.zookeeper.core.internal.Notification

    if (serviceInfo instanceof AdvertisedService) {
      watchManager.publish((AdvertisedService) serviceInfo);
    } else {
      watchManager.publish(new AdvertisedService(serviceInfo));
    }
    Localizer.getSingleton().localize(new Notification(serviceInfo, Notification.AVAILABLE));

  }
View Full Code Here

Examples of org.eclipse.emf.common.notify.Notification

  {
    URI oldURI = this.uri;
    this.uri = uri;
    if (eNotificationRequired())
    {
      Notification notification =
        new NotificationImpl(Notification.SET, oldURI, uri)
        {
          @Override
          public Object getNotifier()
          {
View Full Code Here

Examples of org.encuestame.persistence.domain.notifications.Notification

    @RequestMapping(value = "/api/notifications/readed.json", method = RequestMethod.GET)
    public @ResponseBody ModelMap changeStatus(
            @RequestParam(value = "id", required = true) Long id,
            HttpServletRequest request,
            HttpServletResponse response) throws JsonGenerationException, JsonMappingException, IOException {
            final Notification notification = getNotificationDao().retrieveNotificationById(id);
            if (notification == null) {
                setError("nothing to do", response);
            } else {
                notification.setReaded(notification.getReaded() == null ? true : !notification.getReaded());
                getNotificationDao().saveOrUpdate(notification);
                setSuccesResponse();
            }
        return returnData();
    }
View Full Code Here

Examples of org.eurekastreams.web.client.ui.common.notifier.Notification

                            // show a notification
                            Session.getInstance()
                                    .getEventBus()
                                    .notifyObservers(
                                            new ShowNotificationEvent(new Notification(
                                                    "Your request for access has been sent")));
                        }
                    }
                    else
                    {
View Full Code Here

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
TOP
Copyright © 2018 www.massapi.com. 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.