Examples of PersonListener


Examples of org.rssowl.core.model.events.PersonListener

    IFeed feed = createFeed();
    final Person initialJohn = (Person) createPersonJohn(feed);
    final Person[] updatedJohn = new Person[1];
    final boolean[] personAddedCalled = new boolean[] { false };
    final boolean[] personUpdatedCalled = new boolean[] { false };
    PersonListener personListener = null;
    try {
      personListener = new PersonAdapter() {
        @Override
        public void personAdded(Set<PersonEvent> events) {
          for (PersonEvent event : events) {
View Full Code Here

Examples of org.rssowl.core.model.events.PersonListener

  @Test
  public void testDeepFeedAddedEvents() throws Exception {
    FeedListener feedListener = null;
    NewsListener newsListener = null;
    AttachmentListener attachmentListener = null;
    PersonListener personListener = null;
    CategoryListener categoryListener = null;
    try {

      /* Check Feed Added and News received */
      final IFeed feed = fFactory.createFeed(null, new URL("http://www.foobar.com"));
View Full Code Here

Examples of org.rssowl.core.model.events.PersonListener

   */
  @Test
  public void testDeepNewsAddedEvents() throws Exception {
    NewsListener newsListener = null;
    AttachmentListener attachmentListener = null;
    PersonListener personListener = null;
    CategoryListener categoryListener = null;
    try {
      IFeed feed = fFactory.createFeed(null, new URL("http://www.foobar.com"));
      FeedReference feedReference = new FeedReference(fDao.saveFeed(feed).getId());

View Full Code Here

Examples of org.rssowl.core.model.events.PersonListener

  @Test
  public void testDeepFeedDeletedEvents() throws Exception {
    FeedListener feedListener = null;
    NewsListener newsListener = null;
    AttachmentListener attachmentListener = null;
    PersonListener personListener = null;
    CategoryListener categoryListener = null;
    NewsAdapter newsAdapter = null;
    try {

      /* Check Feed Deleted and News Deleted */
 
View Full Code Here

Examples of org.rssowl.core.model.events.PersonListener

   */
  @Test
  public void testDeepNewsDeletedEvents() throws Exception {
    NewsListener newsListener = null;
    AttachmentListener attachmentListener = null;
    PersonListener personListener = null;
    CategoryListener categoryListener = null;
    try {

      /* Store a Feed */
      IFeed feed = fFactory.createFeed(null, new URL("http://www.foobar.com"));
View Full Code Here

Examples of org.rssowl.core.model.events.PersonListener

   *
   * @throws Exception
   */
  @Test
  public void testFlatPersonEvents() throws Exception {
    PersonListener personListener = null;
    try {
      /* Add */
      FeedReference feedRef = new FeedReference(fDao.saveFeed(fFactory.createFeed(null, new URL("http://www.feed4.com"))).getId());
      NewsReference newsRef = new NewsReference(fDao.saveNews(fFactory.createNews(null, feedRef.resolve(), new Date())).getId());
      IPerson person1 = fFactory.createPerson(null, feedRef.resolve());
      person1.setName("Person1");
      IPerson person2 = fFactory.createPerson(null, newsRef.resolve());
      person2.setName("Person2");
      final boolean personEvents[] = new boolean[6];
      final PersonReference personReference[] = new PersonReference[2];
      personListener = new PersonListener() {
        public void personAdded(Set<PersonEvent> events) {
          for (PersonEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            if (personEvents[0])
              personEvents[1] = true;
View Full Code Here

Examples of org.rssowl.core.model.events.PersonListener

   * @param events The <code>ModelEvent</code> for the affected type.
   */
  public void notifyPersonAdded(final Set<PersonEvent> events) {
    Object listeners[] = fPersonListeners.getListeners();
    for (Object element : listeners) {
      final PersonListener listener = (PersonListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.personAdded(events);
        }
      });
    }
  }
View Full Code Here

Examples of org.rssowl.core.model.events.PersonListener

   * @param events The <code>ModelEvent</code> for the affected type.
   */
  public void notifyPersonDeleted(final Set<PersonEvent> events) {
    Object listeners[] = fPersonListeners.getListeners();
    for (Object element : listeners) {
      final PersonListener listener = (PersonListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.personDeleted(events);
        }
      });
    }
  }
View Full Code Here

Examples of org.rssowl.core.model.events.PersonListener

   * @param events The <code>ModelEvent</code> for the affected type.
   */
  public void notifyPersonUpdated(final Set<PersonEvent> events) {
    Object listeners[] = fPersonListeners.getListeners();
    for (Object element : listeners) {
      final PersonListener listener = (PersonListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.personUpdated(events);
        }
      });
    }
  }
View Full Code Here

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

   *
   * @throws Exception
   */
  @Test
  public void testFlatPersonEvents() throws Exception {
    PersonListener personListener = null;
    try {
      /* Add */
      FeedReference feedRef = new FeedReference(DynamicDAO.save(fFactory.createFeed(null, new URI("http://www.feed4.com"))).getId());
      NewsReference newsRef = new NewsReference(DynamicDAO.save(fFactory.createNews(null, feedRef.resolve(), new Date())).getId());
      IPerson person1 = fFactory.createPerson(null, feedRef.resolve());
      person1.setName("Person1");
      IPerson person2 = fFactory.createPerson(null, newsRef.resolve());
      person2.setName("Person2");
      final boolean personEvents[] = new boolean[6];
      final PersonReference personReference[] = new PersonReference[2];
      personListener = new PersonListener() {
        public void entitiesAdded(Set<PersonEvent> events) {
          for (PersonEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            if (personEvents[0])
              personEvents[1] = true;
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.