Package com.salas.bb.dialogs

Examples of com.salas.bb.dialogs.AddSmartFeedDialog


    {
        if (GlobalController.SINGLETON.checkForNewSubscription()) return;

        GlobalController controller = GlobalController.SINGLETON;
        MainFrame mainFrame = controller.getMainFrame();
        AddSmartFeedDialog dialog = new AddSmartFeedDialog(mainFrame);

        dialog.open(DataFeed.getGlobalPurgeLimit());

        if (!dialog.hasBeenCanceled())
        {
            IFeed feed;
            String title = dialog.getFeedTitle();
            int purgeLimit = dialog.getFeedArticlesLimit();

            int from = dialog.getDedupFrom();
            int to = dialog.getDedupTo();
            boolean isDedup = dialog.isDedupEnabled();

            if (dialog.isQueryFeed())
            {
                int queryType = dialog.getFeedQueryType();
                String parameter = dialog.getFeedParameter();

                QueryFeed qfeed = controller.createQueryFeed(null, title, queryType, parameter, purgeLimit);
                if (qfeed != null) qfeed.setDedupProperties(isDedup, from, to);
                feed = qfeed;
            } else
            {
                Query searchQuery = dialog.getFeedSearchQuery();
                SearchFeed sfeed = controller.createSearchFeed(null, title, searchQuery, purgeLimit);
                if (sfeed != null) sfeed.setDedupProperties(isDedup, from, to, false);
                controller.updateSearchFeed(sfeed);
               
                feed = sfeed;
            }

            if (feed != null)
            {
                feed.setType(dialog.getFeedType());
                feed.setCustomViewModeEnabled(dialog.isCustomViewModeEnabled());
                feed.setCustomViewMode(dialog.getViewMode());

                dialog.commitAutoSaveProperties(feed);
               
                controller.selectFeed(feed, true);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.salas.bb.dialogs.AddSmartFeedDialog

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.