Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.INewsBin


    IFeed feed = factory.createFeed(null, new URI("http://www.rssowl.org/rssowl2dg/tests/manager/rss_2_0.xml"));

    DynamicDAO.save(feed);

    IBookMark mark = factory.createBookMark(null, childFolder, new FeedLinkReference(feed.getLink()), "Bookmark");
    INewsBin bin = factory.createNewsBin(null, folder, "Bin");

    DynamicDAO.save(root);

    Controller.getDefault().reload(mark, null, new NullProgressMonitor());
View Full Code Here


        name = bookMark.getName();
      else
        name = feedRef;

      if (news.getParentId() != 0) {
        INewsBin bin = DynamicDAO.load(INewsBin.class, news.getParentId());
        if (bin != null) {
          name = NLS.bind(Messages.NewsTableLabelProvider_BIN_NAME, bin.getName(), name);
        }
      }

      return StringUtils.replaceAll(name, "&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

          /* Location: Bin */
          if (news.getParentId() > 0) {
            String location = fMapBinIdToLocation.get(news.getParentId());
            if (location == null) {
              NewsBinReference ref = new NewsBinReference(news.getParentId());
              INewsBin bin = ref.resolve();
              location = bin.getName();
              fMapBinIdToLocation.put(news.getParentId(), location);
            }

            text = location;
          }
View Full Code Here

      if (MoveNewsAction.ID.equals(action.getActionId()) || CopyNewsAction.ID.equals(action.getActionId())) {
        Object value = action.getData();
        if (value instanceof Long[]) {
          Long[] binIds = (Long[]) value;
          for (Long binId : binIds) {
            INewsBin bin = new NewsBinReference(binId).resolve();
            if (bin != null && !selectedElements.contains(bin))
              selectedElements.add(bin);
          }
        }
      }
View Full Code Here

      }
    }

    /* Update NewsBin */
    else if (entity instanceof INewsBin) {
      INewsBin newsbin = (INewsBin) entity;

      /* Check for changed Name */
      if (!newsbin.getName().equals(fNameInput.getText())) {
        newsbin.setName(fNameInput.getText());
        entitiesToSave.add(newsbin);
      }
    }

    return true;
View Full Code Here

        return select;
      }

      /* Bin (exclude if another Bin with same name Exists at same Location) */
      else if (element instanceof INewsBin) {
        INewsBin bin = (INewsBin) element;
        Boolean select = cache.get(bin);
        if (select == null) {
          select = !CoreUtils.existsNewsBin(bin);
          cache.put(bin, select);
        }
View Full Code Here

          iterator.remove();
      }

      /* Bin (exclude if another Bin with same name Exists at same Location) */
      else if (child instanceof INewsBin) {
        INewsBin bin = (INewsBin) child;
        if (CoreUtils.existsNewsBin(bin))
          iterator.remove();
      }

      /* Search (exclude if another Search with same name Exists at same Location and same Conditions) */
 
View Full Code Here

          folder.removeChild(bm);
      }

      /* Bin (exclude if another Bin with same name Exists at same Location) */
      else if (child instanceof INewsBin) {
        INewsBin bin = (INewsBin) child;
        if (CoreUtils.existsNewsBin(bin))
          folder.removeChild(bin);
      }

      /* Search (exclude if another Search with same name Exists at same Location and same Conditions) */
 
View Full Code Here

          result = fSearch.searchNews(searchMark.getSearchConditions(), filterCondition, searchMark.matchAllConditions());
        }

        /* Location search for News Bin */
        else {
          INewsBin newsBin = (INewsBin) input;
          ISearchField locationField = fFactory.createSearchField(INews.LOCATION, INews.class.getName());
          ISearchCondition locationCondition = fFactory.createSearchCondition(locationField, SearchSpecifier.IS, ModelUtils.toPrimitive(Collections.singleton((IFolderChild) newsBin)));
          result = fSearch.searchNews(Arrays.asList(locationCondition, filterCondition), true);
        }

View Full Code Here

        name = bookMark.getName();
      else
        name = feedRef;

      if (news.getParentId() != 0) {
        INewsBin bin = DynamicDAO.load(INewsBin.class, news.getParentId());
        if (bin != null) {
          name = NLS.bind(Messages.SearchNewsDialog_BIN_NAME, bin.getName(), name);
        }
      }

      return StringUtils.replaceAll(name, "&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.INewsBin

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.