Package org.rssowl.core.persist.event

Examples of org.rssowl.core.persist.event.SearchConditionListener


      }
    };
    DynamicDAO.addEntityListener(ISearchMark.class, fSearchMarkListener);

    /* Refresh on Condition Changes if SearchMark showing */
    fSearchConditionListener = new SearchConditionListener() {
      public void entitiesAdded(Set<SearchConditionEvent> events) {
        refreshIfRequired(events);
      }

      public void entitiesDeleted(Set<SearchConditionEvent> events) {
View Full Code Here


   *
   * @throws Exception
   */
  @Test
  public void testFlatSearchConditionEvents() throws Exception {
    SearchConditionListener searchConditionListener = null;
    try {
      /* Add */
      FolderReference folderRef = new FolderReference(DynamicDAO.save(fFactory.createFolder(null, null, "Folder")).getId());
      ISearchMark searchMark = DynamicDAO.save(fFactory.createSearchMark(null, folderRef.resolve(), "SearchMark"));
      ISearchField field = fFactory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
      ISearchCondition searchCondition = fFactory.createSearchCondition(null, searchMark, field, SearchSpecifier.CONTAINS, "Foo");
      final boolean searchConditionEvents[] = new boolean[3];
      final SearchConditionReference searchConditionReference[] = new SearchConditionReference[1];
      searchConditionListener = new SearchConditionListener() {
        public void entitiesAdded(Set<SearchConditionEvent> events) {
          for (SearchConditionEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            searchConditionEvents[0] = true;
          }
View Full Code Here

  public void testDeepFolderAddedEvents() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    FeedListener feedListener = null;
    SearchMarkListener searchMarkListener = null;
    SearchConditionListener searchConditionListener = null;
    try {

      /* Check Folder Added */
      IFolder root = fFactory.createFolder(null, null, "Root");
      IFolder rootChild = fFactory.createFolder(null, root, "Root Child");
View Full Code Here

  public void testDeepFolderDeletedEvents() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    FeedListener feedListener = null;
    SearchMarkListener searchMarkListener = null;
    SearchConditionListener searchConditionListener = null;
    try {
      /* Check Folder Deleted */
      IFolder root = fFactory.createFolder(null, null, "Root");
      root = DynamicDAO.save(root);
      final FolderReference rootRef = new FolderReference(root.getId());
View Full Code Here

  public void testDeepFolderAddedEvents() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    FeedListener feedListener = null;
    SearchMarkListener searchMarkListener = null;
    SearchConditionListener searchConditionListener = null;
    try {

      /* Check Folder Added */
      IFolder root = fFactory.createFolder(null, null, "Root");
      IFolder rootChild = fFactory.createFolder(null, root, "Root Child");
View Full Code Here

  public void testDeepFolderDeletedEvents() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    FeedListener feedListener = null;
    SearchMarkListener searchMarkListener = null;
    SearchConditionListener searchConditionListener = null;
    try {
      /* Check Folder Deleted */
      IFolder root = fFactory.createFolder(null, null, "Root");
      root = DynamicDAO.save(root);
      final FolderReference rootRef = new FolderReference(root.getId());
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void testFlatSearchConditionEvents() throws Exception {
    SearchConditionListener searchConditionListener = null;
    try {
      /* Add */
      FolderReference folderRef = new FolderReference(DynamicDAO.save(fFactory.createFolder(null, null, "Folder")).getId());
      ISearchMark searchMark = DynamicDAO.save(fFactory.createSearchMark(null, folderRef.resolve(), "SearchMark"));
      ISearchField field = fFactory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
      ISearchCondition searchCondition = fFactory.createSearchCondition(null, searchMark, field, SearchSpecifier.CONTAINS, "Foo");
      final boolean searchConditionEvents[] = new boolean[3];
      final SearchConditionReference searchConditionReference[] = new SearchConditionReference[1];
      searchConditionListener = new SearchConditionListener() {
        public void entitiesAdded(Set<SearchConditionEvent> events) {
          for (SearchConditionEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            searchConditionEvents[0] = true;
          }
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void testVisited() throws Exception {
    SearchConditionListener listener = new SearchConditionListener() {
      public void entitiesAdded(Set<SearchConditionEvent> events) {
        fail("Unexpected event");
      }

      public void entitiesDeleted(Set<SearchConditionEvent> events) {
View Full Code Here

   * @throws Exception
   */
  @Test
  @Ignore
  public void testSaveBinCausesNoUnwantedEvents() throws Exception {
    SearchConditionListener listener = null;
    try {
      IFolder root = fFactory.createFolder(null, null, "Root");

      IFolder childFolder = fFactory.createFolder(null, root, "Child");

      IFeed feed = fFactory.createFeed(null, new URI("feed"));
      DynamicDAO.save(feed);

      IBookMark bookmark = fFactory.createBookMark(null, root, new FeedLinkReference(feed.getLink()), "Bookmark");

      INewsBin bin = fFactory.createNewsBin(null, root, "Bin");

      ISearchMark searchMark = fFactory.createSearchMark(null, root, "Search");
      ISearchField field = fFactory.createSearchField(INews.TITLE, INews.class.getName());
      searchMark.addSearchCondition(fFactory.createSearchCondition(field, SearchSpecifier.CONTAINS, "Foo"));

      DynamicDAO.save(root);

      listener = new SearchConditionListener() {

        public void entitiesUpdated(Set<SearchConditionEvent> events) {
          fail("Unexpected Event");
        }

View Full Code Here

      }
    };
    DynamicDAO.addEntityListener(ISearchMark.class, fSearchMarkListener);

    /* Refresh on Condition Changes if SearchMark showing */
    fSearchConditionListener = new SearchConditionListener() {
      public void entitiesAdded(Set<SearchConditionEvent> events) {
        refreshIfRequired(events);
      }

      public void entitiesDeleted(Set<SearchConditionEvent> events) {
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.event.SearchConditionListener

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.