Package org.eurekastreams.web.client.ui.common.notifier

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


                                    SystemSettingsModel.getInstance().clearCache();

                                    Session.getInstance()
                                            .getEventBus()
                                            .notifyObservers(
                                                    new ShowNotificationEvent(new Notification("Access List Saved")));
                                    History.newItem(History.getToken());

                                    MembershipCriteriaDTO result = event.getMembershipCriteria();
                                    result.setId(persistedItemId);
                                    Session.getInstance().getEventBus()
                                            .notifyObservers(new MembershipCriteriaPersistedEvent(result));
                                }
                            });
                }
            }
        });

        eventBus.addObserver(MembershipCriteriaRemovedEvent.class, new Observer<MembershipCriteriaRemovedEvent>()
        {
            public void update(final MembershipCriteriaRemovedEvent event)
            {
                processor.makeRequest("removeMembershipCriteria", event.getMembershipCriteria().getId(),
                        new AsyncCallback<SystemSettings>()
                        {
                            public void onFailure(final Throwable caught)
                            {
                            }

                            public void onSuccess(final SystemSettings systemSettings)
                            {
                                // TODO: Refactor to use new client models
                                SystemSettingsModel.getInstance().clearCache();

                                Session.getInstance().getEventBus()
                                        .notifyObservers(new ShowNotificationEvent(new Notification("Item Deleted")));
                                History.newItem(History.getToken());
                            }
                        });
            }
        });
View Full Code Here


                            public void update(final UpdatedSystemSettingsResponseEvent arg1)
                            {
                                form.onSuccess();
                                Session.getInstance()
                                        .getEventBus()
                                        .notifyObservers(new ShowNotificationEvent(new Notification("Settings saved")));

                                clearRetainedValues();
                            }

                        });
View Full Code Here

                    public void onFailure(final Throwable caught)
                    {
                        Session.getInstance()
                                .getEventBus()
                                .notifyObservers(
                                        new ShowNotificationEvent(new Notification(
                                                "An error occurred refreshing Access List")));
                        History.newItem(History.getToken());
                    }

                    public void onSuccess(final String value)
                    {
                    }
                });

                Session.getInstance()
                        .getEventBus()
                        .notifyObservers(
                                new ShowNotificationEvent(new Notification("Access List Refresh is now processing")));
                History.newItem(History.getToken());
            }
        });
        return button;
    }
View Full Code Here

        super.callWriteAction("disableCurrentUserNotificationCategory", category, new OnSuccessCommand<Serializable>()
        {
            public void onSuccess(final Serializable response)
            {
                Session.getInstance().getEventBus()
                        .notifyObservers(new ShowNotificationEvent(new Notification("Notification type stopped")));
            }
        });
    }
View Full Code Here

                            eventBus.removeObserver(ev, this);
                            String msg =
                                    ev.getResponse().getApproved() ? "The " + group.getName()
                                            + " group has been approved" : "The request to create the "
                                            + group.getName() + " group has been denied";
                            eventBus.notifyObservers(new ShowNotificationEvent(new Notification(msg)));
                        }
                    }
                });

        return groupPanel;
View Full Code Here

                {
                    public void update(final CustomStreamCreatedEvent arg1)
                    {
                        listPanel.addFilter(arg1.getStream());
                        EventBus.getInstance().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your stream has been successfully saved")));
                    }
                });

        EventBus.getInstance().addObserver(CustomStreamDeletedEvent.getEvent(),
                new Observer<CustomStreamDeletedEvent>()
                {
                    public void update(final CustomStreamDeletedEvent arg1)
                    {
                        listPanel.removeFilter(arg1.getStream());
                        EventBus.getInstance().notifyObservers(
                                new ShowNotificationEvent(new Notification("The stream has been deleted")));
                    }
                });

        EventBus.getInstance().addObserver(CustomStreamUpdatedEvent.getEvent(),
                new Observer<CustomStreamUpdatedEvent>()
                {
                    public void update(final CustomStreamUpdatedEvent arg1)
                    {
                        listPanel.updateFilter(arg1.getStream());
                        EventBus.getInstance().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your stream has been successfully saved")));
                    }
                });

    }
View Full Code Here

                CreateUrlRequest urlRqst = !group.isPending() ? new CreateUrlRequest(Page.GROUPS, group.getShortName())
                        : new CreateUrlRequest(Page.DISCOVER, "");
                eventBus.notifyObservers(new UpdateHistoryEvent(urlRqst));

                // tell the user what just happened
                eventBus.notifyObservers(new ShowNotificationEvent(new Notification(group.isPending() ? // \n
                "Your group has been submitted to an organization coordinator for approval"
                        : "Your group has been successfully created")));
            }
        });
View Full Code Here

                                      {
                                          if (ev.getResponse() == msg.getId())
                                          {
                                              EventBus.getInstance().removeObserver(ev, this);
                                              EventBus.getInstance().notifyObservers(
                                                      new ShowNotificationEvent(new Notification(
                                                              "Activity has been flagged")));
                                          }
                                      }
                                  });
                              FlaggedActivityModel.getInstance().update(
View Full Code Here

                        eventBus.addObserver(UpdatedPersonalInformationResponseEvent.class,
                                new Observer<UpdatedPersonalInformationResponseEvent>()
                                {
                                    public void update(final UpdatedPersonalInformationResponseEvent arg1)
                                    {
                                        eventBus.notifyObservers(new ShowNotificationEvent(new Notification(
                                                "Your profile has been updated.")));
                                        form.onSuccess();
                                    }
                                });
View Full Code Here

                {
                    Session.getInstance().getEventBus().notifyObservers(
                            new UpdateHistoryEvent(new CreateUrlRequest(Page.START)));

                    Session.getInstance().getEventBus().notifyObservers(
                            new ShowNotificationEvent(new Notification(text)));
                }
            }
        });

        setupGalleryTabTemplateEvents();

        Session.getInstance().getEventBus().addObserver(UserLoggedInEvent.class, new Observer<UserLoggedInEvent>()
        {
            public void update(final UserLoggedInEvent event)
            {
                Session.getInstance().getEventBus().notifyObservers(GalleryPageLoadedEvent.getEvent());
            }
        });

        final HashMap<String, String> gadgetParams = new HashMap<String, String>();
        gadgetParams.put("tab", Session.getInstance().getParameterValue("tab"));
        gadgetParams.put("galleryTab", "Apps");

        final HashMap<String, String> themeParams = new HashMap<String, String>();
        themeParams.put("tab", Session.getInstance().getParameterValue("tab"));
        themeParams.put("galleryTab", "Themes");

        Session.getInstance().getEventBus().addObserver(InsertedGadgetDefinitionResponseEvent.class,
                new Observer<InsertedGadgetDefinitionResponseEvent>()
                {
                    public void update(final InsertedGadgetDefinitionResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, gadgetParams)));
                        gadgetTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your app has been successfully added")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(UpdatedGadgetDefinitionResponseEvent.class,
                new Observer<UpdatedGadgetDefinitionResponseEvent>()
                {
                    public void update(final UpdatedGadgetDefinitionResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, gadgetParams)));
                        gadgetTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your app has been successfully saved")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(InsertedThemeResponseEvent.class,
                new Observer<InsertedThemeResponseEvent>()
                {
                    public void update(final InsertedThemeResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, themeParams)));
                        themeTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your theme has been successfully added")));
                    }

                });
        Session.getInstance().getEventBus().addObserver(UpdatedThemeResponseEvent.class,
                new Observer<UpdatedThemeResponseEvent>()
                {
                    public void update(final UpdatedThemeResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, themeParams)));
                        themeTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your theme has been successfully saved")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(GotStartPageTabsResponseEvent.class,
                new Observer<GotStartPageTabsResponseEvent>()
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.ui.common.notifier.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.