Package org.rssowl.core.model.events

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


   */
  @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 */
 
View Full Code Here


   * @throws Exception
   */
  @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

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

      /* Check News Added */
 
View Full Code Here

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

      /* Check News Added */
 
View Full Code Here

   */
  @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 {

View Full Code Here

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

      /* Store a Feed */
 
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void testFlatAttachmentEvents() throws Exception {
    AttachmentListener attachmentListener = null;
    try {
      /* Add */
      FeedReference feedRef = new FeedReference(fDao.saveFeed(fFactory.createFeed(null, new URL("http://www.feed1.com"))).getId());
      NewsReference newsRef = new NewsReference(fDao.saveNews(fFactory.createNews(null, feedRef.resolve(), new Date())).getId());
      IAttachment attachment = fFactory.createAttachment(null, newsRef.resolve());
View Full Code Here

  }

  @Test
  @SuppressWarnings("all")
  public void testAttachmentAddedUpdatedEvent() throws Exception {
    AttachmentListener attachmentListener = null;
    try {
      IFeed feed = new Feed(new URL("inmemory://rss_2_0.xml")); //$NON-NLS-1$
      feed = NewsModel.getDefault().getPersistenceLayer().getModelDAO().saveFeed(feed);

      FeedReference feedRef = new FeedReference(feed.getId());

      IBookMark bookmark = createBookMark(feed);

      final int addedCounter[] = new int[] { 0 };
      final int updatedCounter[] = new int[] { 0 };
      attachmentListener = new AttachmentListener() {
        public void attachmentAdded(Set<AttachmentEvent> events) {
          addedCounter[0]++;
        }

        public void attachmentDeleted(Set<AttachmentEvent> events) {}
View Full Code Here

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

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

TOP

Related Classes of org.rssowl.core.model.events.AttachmentListener

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.