The news tool should be updated to allow for basic keyword searching in all stories from all news sources. A simple search field should be added to the main page of the news tool similar to the one in Academics Browse Classes, People tool, or Map tool. The search form should submit to a new web service that will perform the search and retrieve the results. The results should be sorted in chronological order with the newest first. The search terms and results should be cached in session storage on the device so that navigation away from the results and back again can display the search and results without any new network traffic. The people tool currently does this and can be used as a template for both the UI work and the web service structure.
The manner in which we store news data on the server should be modified for this task. The cached news stories should also be persisted to the database in a dedicated table, NEWS_ARTICLE_T. This does not need to replace the current in memory caching mechanism at this time, so the NewsCacheImpl will need to be modified to save the articles to the database in addition to storing them in memory. The NewsArticleImpl.java will need to be properly JPA annotated. The JPA and JAXB annotations can coexist in a single file so there is no need to create a separate entity bean for the database storage. The description field needs to be a CLOB sql type in order to contain the entirety of the article descriptions.
The table should hold stories for a configurable number of days. A new spring task should be created that will run at a configurable interval to purge articles from the database. The default number of days to store articles in the database is 7 days. The default interval to purge articles is 4 hours. A new java object should be added to manage this task in the news-impl project. It should implement org.kuali.mobility.shared.InitBean but need not have InitBean in the name since names should be descriptive of the purpose of the class.
The search should be a simple phrase search for the first iteration. The search should be performed against both the title and description of an article.