Examples of IFolderChild


Examples of org.rssowl.core.persist.IFolderChild

  /**
   * @throws Exception
   */
  @Test
  public void testGenerateNameForSearch() throws Exception {
    IFolderChild root = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    ISearchField field1 = fFactory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
    ISearchField field2 = fFactory.createSearchField(INews.LOCATION, INews.class.getName());
    ISearchField field3 = fFactory.createSearchField(INews.IS_FLAGGED, INews.class.getName());
    ISearchField field4 = fFactory.createSearchField(INews.PUBLISH_DATE, INews.class.getName());
View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

  /**
   * @throws Exception
   */
  @Test
  public void testSplitScope() throws Exception {
    IFolderChild root = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    List<ISearchCondition> conditions = new ArrayList<ISearchCondition>();

    conditions.add(fFactory.createSearchCondition(fFactory.createSearchField(INews.TITLE, INews.class.getName()), SearchSpecifier.CONTAINS, "foo"));
    conditions.add(fFactory.createSearchCondition(fFactory.createSearchField(INews.LOCATION, INews.class.getName()), SearchSpecifier.IS, ModelUtils.toPrimitive(Collections.singletonList(root))));
View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

  /**
   * @throws Exception
   */
  @Test
  public void testIsLocationConflict() throws Exception {
    IFolderChild root = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    List<ISearchCondition> conditions = new ArrayList<ISearchCondition>();

    conditions.add(fFactory.createSearchCondition(fFactory.createSearchField(INews.TITLE, INews.class.getName()), SearchSpecifier.CONTAINS, "foo"));
    conditions.add(fFactory.createSearchCondition(fFactory.createSearchField(INews.LOCATION, INews.class.getName()), SearchSpecifier.IS, ModelUtils.toPrimitive(Collections.singletonList(root))));
View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

   */
  @SuppressWarnings("unchecked")
  @Test
  public void testRemoveFiltersByScope() throws Exception {
    IFolder root = fFactory.createFolder(null, null, "Root");
    IFolderChild folder = fFactory.createFolder(null, root, "Folder");

    IFeed feed1 = fFactory.createFeed(null, new URI("rssowl1.org"));
    IFeed feed2 = fFactory.createFeed(null, new URI("rssowl2.org"));

    IFolderChild bm1 = fFactory.createBookMark(null, root, new FeedLinkReference(feed1.getLink()), "BM 1");
    IFolderChild bm2 = fFactory.createBookMark(null, (IFolder) folder, new FeedLinkReference(feed2.getLink()), "BM 2");

    DynamicDAO.save(feed1);
    DynamicDAO.save(feed2);
    DynamicDAO.save(root);

View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

  /**
   * @throws Exception
   */
  @Test
  public void testOrphanedNewsFilters() throws Exception {
    IFolderChild root = fFactory.createFolder(null, null, "Root");

    IFeed feed = fFactory.createFeed(null, new URI("http://www.rssowl.org"));
    DynamicDAO.save(feed);

    IFolderChild bm1 = fFactory.createBookMark(null, (IFolder) root, new FeedLinkReference(feed.getLink()), "Bookmark 1");

    IFolderChild bin1 = fFactory.createNewsBin(null, (IFolder) root, "Bin 1");

    DynamicDAO.save(root);

    ISearchField locationField = fFactory.createSearchField(INews.LOCATION, INews.class.getName());
    ISearchCondition condition = fFactory.createSearchCondition(locationField, SearchSpecifier.SCOPE, ModelUtils.toPrimitive(Arrays.asList(bin1)));
View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

  /**
   * @throws Exception
   */
  @Test
  public void testOrphanedSearchMarks() throws Exception {
    IFolderChild root = fFactory.createFolder(null, null, "Root");
    IFolderChild subfolder = fFactory.createFolder(null, (IFolder) root, "Sub Folder");

    IFeed feed = fFactory.createFeed(null, new URI("http://www.rssowl.org"));
    DynamicDAO.save(feed);

    IFolderChild bm1 = fFactory.createBookMark(null, (IFolder) root, new FeedLinkReference(feed.getLink()), "Bookmark 1");

    IFolderChild bin1 = fFactory.createNewsBin(null, (IFolder) root, "Bin 1");

    DynamicDAO.save(root);

    ISearchField locationField = fFactory.createSearchField(INews.LOCATION, INews.class.getName());
    ISearchField allField = fFactory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

   */
  public static void reparentWithProperties(List<ReparentInfo<IFolderChild, IFolder>> reparenting) {

    /* Copy over Properties from new Parent that are unset in folder child */
    for (ReparentInfo<IFolderChild, IFolder> info : reparenting) {
      IFolderChild objToReparent = info.getObject();
      IFolder newParent = info.getNewParent();
      Set<Entry<String, Serializable>> set = newParent.getProperties().entrySet();
      for (Entry<String, Serializable> entry : set) {
        if (objToReparent.getProperty(entry.getKey()) == null)
          objToReparent.setProperty(entry.getKey(), entry.getValue());
      }
    }

    /* Perform Reparenting */
    Owl.getPersistenceService().getDAOService().getFolderDAO().reparent(reparenting);
View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

    List<ReparentInfo<IFolderChild, IFolder>> reparenting = new ArrayList<ReparentInfo<IFolderChild, IFolder>>(draggedObjects.size());

    /* For each dragged Object */
    for (Object object : draggedObjects) {
      if (object instanceof IFolder || object instanceof IMark) {
        IFolderChild draggedFolderChild = (IFolderChild) object;
        reparenting.add(ReparentInfo.create(draggedFolderChild, dropFolder, null, null));
      }
    }

    /* Perform reparenting */
 
View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

              List<Long> newBinLocations = new ArrayList<Long>(oldBinLocations.length);

              for (int i = 0; i < oldBinLocations.length; i++) {
                Long oldLocation = oldBinLocations[i];
                if (mapOldIdToFolderChild.containsKey(oldLocation)) {
                  IFolderChild location = mapOldIdToFolderChild.get(oldLocation);
                  newBinLocations.add(location.getId());
                }
              }

              action.setData(newBinLocations.toArray(new Long[newBinLocations.size()]));
            }
View Full Code Here

Examples of org.rssowl.core.persist.IFolderChild

  }

  private void onSelect(SelectionEvent e) {
    if (e.detail == SWT.CHECK) {
      TreeItem item = (TreeItem) e.item;
      IFolderChild child = (IFolderChild) item.getData();

      /* Update Childs according to Checked State */
      setChildsChecked(child, item.getChecked());

      /* Set Parents un-checked */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.