| Table of Contents |
|---|
1. Information
All the configuration keys referred on this page are optional and therefore are not required to startup Sakai with NewsFeeds tool. These keys should go in sakai.properties.
Additionally, an optional provider can be specified for institutional subscriptions which allows more fine-grained control (per site and/or per user).
2. sakai.properties
2.1. Institutional feeds
| Configuration key | Description | Default value |
|---|---|---|
| feeds.institutional.count | Number of institutional feeds to specify | 0 |
| feeds.institutional.x | Institutional feed url number x | - |
2.2. Migration options
| Configuration key | Description | Default value |
|---|---|---|
| feeds.migrate (1) | Perform tool migration: sakai.news => sakai.feeds. | false |
| feeds.migrate.getOnlineFeedInfo (2) | Get feed information (title, icon, description) online | true |
| feeds.migrate.alwaysCreateTool | Always create a page with this tool when migrating. If set to false, a new page will only be created if there is no page with this tool yet. | false |
| feeds.migrate.defaultFeedUrl | This feed will be used for migration from old News tool instances configured with the default feed. | On trunk: 'news.feedURL' property. On 1.0 tag: sakaiproject.org feed |
(1) This will perform a migration from bundled News tool (sakai.news). All instances of the tool in a site will be replaced by a single instance of this tool with multiple subscriptions.
(2) If false, the host from the feed url will be used as feed title.
2.3. Default options
| Configuration key | Description | Default value |
|---|---|---|
| feeds.defaultViewFilter | Specify the default view filter:
|
view.last.week |
| feeds.defaultViewDetail | Specify the default view detail:
|
view.entry.title |
2.4. Other
| Configuration key | Description | Default value |
|---|---|---|
| feeds.timeoutMs | Read timeout for feeds (in milliseconds) | 30000 |
| feeds.maxCachedFeeds | Maximum feeds to be cached in memory (1) | 100 |
| feeds.cachingThreads | Number of threads for concurrent web requests | 10 |
| feeds.cacheTimeInMin | Maximum time to keep feeds cached in memory (in minutes) | 15 |
| feeds.feedLoadCancel.showAfter | Number seconds before showing a stop button to cancel the load of a feed | 10 (-1, disable) |
| feeds.feedLoadCancel.image | Image to be used as stop button to cancel the load of a feed | /library/image/silk/stop.png |
| feeds.ignoreCertificateErrors | Ignore invalid/self-signed certificate errors | true |
| feeds.secret.key | AES secret key for feed passwords encryption (2) | a24896181a2a6bfac91b7e1b9b23018e |
(1) Feed size is variable but, typically, it is ~50KB.
(2) Used for feeds requiring authentication, when user opts for saving authentication details.
3. Providers
3.1 InstitutionalFeedProvider
Implemeting a InstitutionalFeedProvider, instead of specifying the list in 'sakai.properties', allows for more fine-grained control of institutional feeds displayed. The list of institutional news feeds can be different accordingly to the current site and/or current user.
This provider (see Interface) has only one method to be implemented, which must return a Set of feed url strings:
public Set<String> getAdditionalInstitutionalFeeds(Site site, User user);
To use a provider, just inject its implementation in your project components.xml file like this:
<bean id="org.sakaiproject.feeds.api.provider.InstitutionalFeedProvider" class="my.package.MyInstitutionalFeedProviderImpl" singleton="true"> </bean>
Alternatively, you can include the above code block directly in the NewsFeeds components.xml.