Package org.eurekastreams.web.client.events

Examples of org.eurekastreams.web.client.events.ShowNotificationEvent


                    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


                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.SETTINGS, "tab", "Plugins")));
                        pluginTab.reload();
                        Session.getInstance().getEventBus()
                                .notifyObservers(
                                        new ShowNotificationEvent(new Notification(
                                                "Stream Plugin has been successfully added")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(DeletedPluginDefinitionResponseEvent.class,
                new Observer<DeletedPluginDefinitionResponseEvent>()
                {
                    public void update(final DeletedPluginDefinitionResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification(
                                        "Stream Plugin has been successfully deleted")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(UpdatedHistoryParametersEvent.class,
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

                    public void update(final UpdatedHistoryParametersEvent event)
                    {
                        if (event.getParameters().containsKey(NOTIFICATION_PARAM))
                        {
                            // shows the notification text passed in as a url parameter
                            Session.getInstance().getEventBus().notifyObservers(new ShowNotificationEvent(
                                    new Notification(event.getParameters().get(NOTIFICATION_PARAM))));
                           
                            // hides the notification param in the address bar
                            Session.getInstance().getEventBus().notifyObservers(
                                    new UpdateHistoryEvent(new CreateUrlRequest(NOTIFICATION_PARAM, null, false)));
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

                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

                {
                    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

                                      {
                                          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

                {
                    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

                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.GALLERY, tabParams)));
                        tabTemplateTab.reload();
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("Your tab has been successfully added")));
                    }
                });

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

        Session.getInstance().getEventBus().addObserver(AddTabFromGalleryTabTemplateResponseEvent.class,
                new Observer<AddTabFromGalleryTabTemplateResponseEvent>()
                {
                    public void update(final AddTabFromGalleryTabTemplateResponseEvent arg1)
                    {
                        String text = "Tab has been applied";

                        // since a refresh happens in IE7 when navigating to the start page, show the notification
                        // by passing in a notification url parameter
                        if (MasterComposite.getUserAgent().contains("msie 7"))
                        {
                            Map<String, String> parameters = new HashMap<String, String>();
                            parameters.put(UINotifier.NOTIFICATION_PARAM, text);

                            Session.getInstance().getEventBus().notifyObservers(
                                    new UpdateHistoryEvent(new CreateUrlRequest(Page.START, "", parameters)));
                        }
                        // otherwise, throw the notification event as normal
                        else
                        {
                            Session.getInstance().getEventBus().notifyObservers(
                                    new UpdateHistoryEvent(new CreateUrlRequest(Page.START)));

                            Session.getInstance().getEventBus().notifyObservers(
                                    new ShowNotificationEvent(new Notification(text)));
                        }
                    }
                });
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.events.ShowNotificationEvent

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.