Package org.eurekastreams.web.client.history

Examples of org.eurekastreams.web.client.history.CreateUrlRequest


     * Update the history.
     */
    public void updateHistory()
    {
        Session.getInstance().getEventBus().notifyObservers(
                new UpdateHistoryEvent(new CreateUrlRequest(renderer.getFilterHistoryToken(), String.valueOf(group
                        .getId()), true)));
    }
View Full Code Here


     */
    @Override
    public CreateUrlRequest buildActivityPermalinkUrlRequest(final long inActivityId, final EntityType inStreamType,
            final String inStreamUniqueId, final Map<String, String> inExtraParameters)
    {
        return new CreateUrlRequest(Page.ACTIVITY, Long.toString(inActivityId));
    }
View Full Code Here

            String url;

            switch (type)
            {
            case PERSON:
                url = Session.getInstance().generateUrl(new CreateUrlRequest(Page.PEOPLE, id));
                break;
            case GROUP:
                url = Session.getInstance().generateUrl(new CreateUrlRequest(Page.GROUPS, id));
                break;
            case PLUGIN:
            case APPLICATION:
                // TODO: Is this correct for the new URL scheme?
                url = id;
View Full Code Here

     */
    @Override
    public CreateUrlRequest buildActivityPermalinkUrlRequest(final long inActivityId, final EntityType inStreamType,
            final String inStreamUniqueId, final Map<String, String> inExtraParameters)
    {
        return new CreateUrlRequest(Page.ACTIVITY, Long.toString(inActivityId));
    }
View Full Code Here

            {
                close();
            }
        });

        form.setOnCancelHistoryToken(Session.getInstance().generateUrl(new CreateUrlRequest()));

        if (view != null)
        {
            JSONObject json = JSONParser.parse(view.getRequest()).isObject();
            JSONObject query = json.get("query").isObject();
View Full Code Here

    public void setEntity()
    {
        final EventBus eventBus = Session.getInstance().getEventBus();

        this.clearContentPanel();
        this.setPreviousPage(new CreateUrlRequest(Page.DISCOVER, ""), "< Return to Profile");

        final FormBuilder form = new FormBuilder("", GroupModel.getInstance(), Method.INSERT);

        eventBus.addObserver(InsertedGroupResponseEvent.class, new Observer<InsertedGroupResponseEvent>()
        {
            public void update(final InsertedGroupResponseEvent ev)
            {
                DomainGroupModelView group = ev.getResponse();

                // destination depends on whether org allows immediate creation of groups
                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"
View Full Code Here

                {
                    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)));
                }
            }
        });

        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")));
                    }
                });
View Full Code Here

                new Observer<InsertedGalleryTabTempalateResponseEvent>()
                {
                    public void update(final InsertedGalleryTabTempalateResponseEvent 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 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

                        else
                        {
                            galleryAddOrEditContainer.setVisible(false);
                            galleryPortalContainer.setVisible(true);

                            setPreviousPage(new CreateUrlRequest(Page.START, "tab", Session.getInstance()
                                    .getParameterValue("tab")), "< Return to Start Page");
                            Session.getInstance().getEventBus().notifyObservers(new HideNotificationEvent());
                            setPageTitle("Configure");

                            if (Session.getInstance().getCurrentPersonRoles().contains(Role.SYSTEM_ADMIN))
View Full Code Here

        Map<String, String> urlParams = new HashMap<String, String>();
        urlParams.put("tab", Session.getInstance().getParameterValue("tab"));
        urlParams.put("galleryTab", "Tabs");

        this.setPreviousPage(new CreateUrlRequest(Page.GALLERY, urlParams), "< Return to Configure Page");

        String title = "Add Tab";
        FormBuilder.Method method = Method.INSERT;
        String tabDropDownInstructions = "";

        if (Session.getInstance().getParameterValue("action").equals("editTab"))
        {
            title = "Edit Tab";
            method = Method.UPDATE;

            defaultCategory = Session.getInstance().getParameterValue("category");
            id = Session.getInstance().getParameterValue("id");
            defaultDescription = Session.getInstance().getParameterValue("description");
            tabDropDownInstructions = "If no tab is selected, original tab will be maintained.";
        }

        this.setPageTitle(title);
        FormBuilder form = new FormBuilder("", GalleryTabTemplateModel.getInstance(), method);

        if (method.equals(Method.UPDATE))
        {
            form.setSubmitButtonClass(StaticResourceBundle.INSTANCE.coreCss().formUpdateButton());
        }

        form.setOnCancelHistoryToken(Session.getInstance().generateUrl(new CreateUrlRequest(Page.GALLERY, urlParams)));
        form.addFormElement(new ValueOnlyFormElement("id", id));
        form.addWidget(new HTML("<em class='gallery-upload-note'><strong>Please Note:</strong><br />"
                + "When users add your tab from the gallery they will be making a copy of the tab. "
                + "Updates you make to the tab will not be reflected for users who have previously add it."));
        form.addFormDivider();
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.history.CreateUrlRequest

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.