Architecture and Extension Points

From RSSOwl

Jump to: navigation, search

Contents

Plugins

  • org.rssowl.build - Used to build RSSOwl via Pluginbuilder
  • org.rssowl.core - Core functionality (see description below)
  • org.rssowl.core.tests - A suite of JUnit 4 tests
  • org.rssowl.docs - Outdated
  • org.rssowl.lib.db4o - The db4o database used for storing the application model
  • org.rssowl.lib.httpclient - Apache HTTPClient for connections to the internet
  • org.rssowl.lib.jdom - JDom for transforming XML into the model
  • org.rssowl.lib.lucene - Lucene used for search capabilities
  • org.rssowl.ui - User Interface functionality
  • org.rssowl.feature.* - Forming packages of plugins for update purposes

org.rssowl.core

  • org.rssowl.core.connection
    • Knows how to connect to the internet and retrieve data
    • Manages credentials for Authentication and Proxy Connections
  • org.rssowl.core.interpreter
    • Knows how to parse a XML file using Xerces and JDom
    • Interprets the JDom model as newsfeed and converts it to the RSSOwl Model
    • Support for Atom, RSS and RDF
  • org.rssowl.core.persist
    • Provides a class for each model type being used in RSSOwl 2
    • Implements persistence using db4o
    • Implements search functionality using Lucene

Interesting Extension Points provided by RSSOwl

  • ElementHandler
    • Override the Interpreter for a specific Element in the XML document
  • FormatInterpreter
    • Teach the Interpreter a new format
    • Example: The result of a web-service should be displayed as feed in RSSOwl 2
  • NamespaceHandler
    • Teach the Interpreter a certain namespace that is used widely
    • Example: Implement the iTunes namespace being used for podcast feeds
  • ProtocolHandler
    • Add a whole new protocol to the list
    • Example: Let RSSOwl 2 show Mails or Newsgroups like newsfeeds
  • entityPropertyPage
    • Add property pages to Bookmarks, Saved Searches or Folders
    • Example: A page to save notes
  • newsAction
    • Add actions to the news filters that can be invokved on certain conditions
    • Example: Marking a news as unread on a specific condition
  • PreferencesInitializer
    • Override RSSOwl default preferences
    • Example: Customize RSSOwl installations to suit your needs
  • KeywordFeed
    • Add an entry to the list of keyword feeds from the bookmark wizard
    • Example: Supporting a feed service from your organization
  • ShareProvider
    • Add an entry to the list of providers for the share menu for news and feeds
    • Example: Allowint to post a news or feed to a service you own

Extension Points provided by Eclipse

  • org.eclipse.ui.actionSets
    • Add new items to the Menu or Toolbar in RSSOwl 2
  • org.eclipse.ui.preferencesPages
    • Add new preferences pages to RSSOwl 2
  • org.eclipse.ui.views
    • Add new Views to RSSOwl 2
    • Example: Add a view that allows to manage podcasts in a comfortable way

Understanding the Core Persistence Model

  • the IPersistenceService is the root of all persistence related tasks and can be replaced
  • it provides the DAOService
    • works with IEntity
      • ID is a simple long
      • provides Map of properties for extensibility
      • can use ModelReference as pointer
    • entities are persisted via IEntityDAO
      • fast access via DynamicDAO facade
      • methods exist(), load(), save()
      • entity listeners (added, removed, updated) used with ModelEvent
      • specific extra methods for certain entities (e.g. INewsDAO)
  • it provides the IDGenerator
    • used when saving new entities by providing a new ID
  • it provides IModelSearch
    • implemented by default using Apache Lucene
  • IApplicationService used to handle reloading of feeds
  • IModelFactory to create new entities

Access to APIs

You can use the org.rssowl.core.Owl facade to access all services provivded

  • Owl.getModelFactory to create new model elements (save them via DynamicDAO.save())
  • Owl.getInterpreter to access the interpreter for XML
  • Owl.getConnectionService to connect through HTTP to remote services
  • Owl.getPersistenceService to access the database and search facilities
  • Owl.getPreferencesService to retrieve and change preferences

In addition, the org.rssowl.core.persist.dao.DynamicDAO facade provides methods to access and modify the database as well as to register listeners for all entities.

Working with Eclipse Plugins

The following links provide good help on Eclipse and SWT related topics

Personal tools