Package com.salas.bb.domain

Examples of com.salas.bb.domain.IFeed


            String newGuideTitle = (String)newValue;

            IFeed[] feeds = guide.getFeeds();
            for (int i = 0; i < feeds.length; i++)
            {
                IFeed feed = feeds[i];

                String feedKey = feed.getMatchKey();
                addDeletedObjectRecord(oldGuideTitle, feedKey);
                removeDeletedObjectRecord(newGuideTitle, feedKey);
            }

            if (guide instanceof StandardGuide)
View Full Code Here


    protected static void setSelectedFeedsRating(int rating)
    {
        IFeed[] selectedFeeds = GlobalController.SINGLETON.getSelectedFeeds();
        for (int i = 0; i < selectedFeeds.length; i++)
        {
            IFeed feed = selectedFeeds[i];
            if (feed instanceof DirectFeed)
            {
                ((DirectFeed)feed).setRating(rating);
            }
        }
View Full Code Here

        GlobalController controller = GlobalController.SINGLETON;

        // Check the clippoard for URL if it's not specified
        String url = takeURLFromClipboardIfPresent();

        IFeed feed = controller.createDirectFeed(url, true);
        if (feed != null)
        {
            IGuide selectedGuide = controller.getModel().getSelectedGuide();
            if (!feed.belongsTo(selectedGuide))
            {
                IGuide[] guides = feed.getParentGuides();
                IGuide guide = guides.length > 0 ? guides[0] : null;
                if (guide != null) controller.selectGuide(guide, false);
            }
            controller.selectFeed(feed, true);
        }
View Full Code Here

     */
    private String applyPatterns(String line, IArticle article)
    {
        if (StringUtils.isEmpty(line)) return line + "\n";

        IFeed feed = article.getFeed();
        if (feed != null)
        {
            line = line.replace(PATTERN_FEED_TITLE, feed.getTitle());
            if (feed instanceof DirectFeed)
            {
                DirectFeed dFeed = (DirectFeed)feed;
                line = line.replace(PATTERN_FEED_URL, toString(dFeed.getXmlURL()));
            }
View Full Code Here

     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        final IFeed feed = GlobalModel.SINGLETON.getSelectedFeed();
        final IGuide guide = GlobalModel.SINGLETON.getSelectedGuide();

        // Reorderings are allowed only for standard guides
        if (!(guide instanceof StandardGuide)) return;
        StandardGuide sGuide = (StandardGuide)guide;

        final GuideModel model = GlobalModel.SINGLETON.getGuideModel();

        // Move channel down if this one isn't already bottom-most.
        final int index = model.indexOf(feed) + 1;
        if (feed != null && index < model.getSize())
        {
            // Get real index
            IFeed entry = (IFeed)model.getElementAt(index);
            int realIndex = guide.indexOf(entry);

            GlobalController.SINGLETON.moveFeed(feed, sGuide, sGuide, realIndex);

            // Select it back and ensure that it's visible.
View Full Code Here

     * @throws IllegalArgumentException if operation is not supported.
     */
    public boolean match(Object target, IComparisonOperation operation, String value)
    {
        IArticle article = (IArticle)target;
        IFeed feed = article.getFeed();

        int rating = -1;

        if (feed != null || !(feed instanceof DataFeed))
        {
View Full Code Here

    {
        boolean match = false;
        value = value.toUpperCase();

        IArticle article = (IArticle)target;
        IFeed feed = article.getFeed();

        if (feed != null)
        {
            IGuide[] parentGuides = feed.getParentGuides();
            for (int i = 0; !match && i < parentGuides.length; i++)
            {
                IGuide guide = parentGuides[i];
                String guideTitle = guide.getTitle();
                match = operation.match(guideTitle.toUpperCase(), value);
View Full Code Here

     * @throws IllegalArgumentException if operation is not supported.
     */
    public boolean match(Object target, IComparisonOperation operation, String value)
    {
        IArticle article = (IArticle)target;
        IFeed feed = article.getFeed();
        String feedTitle = feed == null ? null : feed.getTitle().toUpperCase();

        return operation.match(feedTitle, value.toUpperCase());
    }
View Full Code Here

     *
     * @see java.util.List#remove(int)
     */
    public IFeed remove(int index)
    {
        final IFeed object = filteredSourceList.remove(index);
        sourceList.remove(object);
       
        return object;
    }
View Full Code Here

     */
    public void add(int index, IFeed element)
    {
        if (filter.accept(element))
        {
            final IFeed objectAtIndex = filteredSourceList.get(index);
           
            filteredSourceList.add(index, element);
            sourceList.add(sourceList.indexOf(objectAtIndex), element);
        } else
        {
View Full Code Here

TOP

Related Classes of com.salas.bb.domain.IFeed

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.