[seam-commits] Seam SVN: r7168 - in trunk/examples/wiki: src/etc and 19 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jan 21 18:38:47 EST 2008
Author: christian.bauer at jboss.com
Date: 2008-01-21 18:38:47 -0500 (Mon, 21 Jan 2008)
New Revision: 7168
Added:
trunk/examples/wiki/src/etc/messages_feedAggregator_en.properties
trunk/examples/wiki/src/etc/messages_feedConnector_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java
trunk/examples/wiki/view/plugins/feedAggregator/
trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
trunk/examples/wiki/view/themes/default/css/feedAggregator.css
trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css
Removed:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java
Modified:
trunk/examples/wiki/Wiki.iml
trunk/examples/wiki/Wiki.iws
trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml
trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css
trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
Log:
JBSEAM-2451 - Feed aggregator connector and plugin
Modified: trunk/examples/wiki/Wiki.iml
===================================================================
--- trunk/examples/wiki/Wiki.iml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/Wiki.iml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -390,6 +390,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: trunk/examples/wiki/Wiki.iws
===================================================================
--- trunk/examples/wiki/Wiki.iws 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/Wiki.iws 2008-01-21 23:38:47 UTC (rev 7168)
@@ -33,56 +33,47 @@
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.critical.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.critical.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.minor.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferencesSupport.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/plugins/jiraIssueList/plugin.xhtml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.optional.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/etc/messages_feedAggregator_en.properties" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css" />
+ <change type="MOVED" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Wiki.iml" afterPath="$PROJECT_DIR$/Wiki.iml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/ws-commons-util-1.0.2.jar" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.trivial.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.blocker.gif" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraDAO.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/plugins/jiraIssueList" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/messages_lastModifiedDocuments_en.properties" afterPath="$PROJECT_DIR$/src/etc/messages_lastModifiedDocuments_en.properties" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/xmlrpc-client-3.1.jar" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/META-INF/wiki.taglib.xml" afterPath="$PROJECT_DIR$/src/etc/META-INF/wiki.taglib.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/util/WikiUtil.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/util/WikiUtil.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/css/feedAggregator.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Wiki.iws" afterPath="$PROJECT_DIR$/Wiki.iws" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.blocker.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.major.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssue.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.trivial.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.major.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/css/jiraIssueList.css" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListConnector.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/etc/messages_jiraIssueList_en.properties" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/etc/messages_jiraConnector_en.properties" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/plugins/feedAggregator" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/feedAggregator.css" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/plugins/feedAggregator/plugin.xhtml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/themes/sfwkorg/css/faqBrowser.css" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/faqBrowser.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/WEB-INF/components.xml" afterPath="$PROJECT_DIR$/src/etc/WEB-INF/components.xml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.optional.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/xmlrpc-common-3.1.jar" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferencesSupport.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/jiraIssueList.css" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.minor.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/themes/sfwkorg/css/blogArchive.css" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/blogArchive.css" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/etc/messages_feedConnector_en.properties" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/plugins/feedTeasers/plugin.xhtml" afterPath="$PROJECT_DIR$/view/plugins/feedTeasers/plugin.xhtml" />
</list>
<list name="Failed commit: Default" comment="Oops" />
<list name="Foo" comment="" />
</component>
- <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="ChangesViewManager" flattened_view="false" show_ignored="false" />
<component name="Commander">
<leftPanel />
<rightPanel />
@@ -200,19 +191,10 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="WikiBaseData.dbunit.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="272" column="0" selection-start="22780" selection-end="22780" vertical-scroll-proportion="0.49659863">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
<file leaf-file-name="log4j.xml" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/test/log4j.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="0" selection-start="609" selection-end="609" vertical-scroll-proportion="0.34210527">
+ <state line="15" column="29" selection-start="742" selection-end="742" vertical-scroll-proportion="0.28931752">
<folding />
</state>
</provider>
@@ -514,7 +496,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg/img" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg/css" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -540,13 +522,31 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/default" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ </PATH>
+ <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg/css" />
+ <option name="myItemId" value="Wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -566,11 +566,11 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/default" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins/feedAggregator" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -588,21 +588,39 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ </PATH>
+ <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/default" />
+ <option name="myItemId" value="Wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/default/img" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -618,13 +636,21 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/dao" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -640,17 +666,21 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins/feedTeasers" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -670,7 +700,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -692,11 +722,11 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -718,15 +748,15 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/dao" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -748,17 +778,21 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedTeasers" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -781,6 +815,18 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -807,6 +853,14 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -834,9 +888,13 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -864,11 +922,11 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -889,6 +947,10 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/etc" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
</subPane>
</component>
@@ -1127,7 +1189,7 @@
</method>
</configuration>
<configuration default="false" name="Test" type="Application" factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.plugin.jiraIssueList.JiraDAO" />
+ <option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.connectors.feed.FeedReader" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value=""oldblog/Christian Bauer/"" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
@@ -1235,7 +1297,7 @@
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="SUITE_NAME" value="" />
<option name="PACKAGE_NAME" value="org.jboss.seam.wiki.test.connector" />
- <option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.test.connector.JiraConnector" />
+ <option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.test.connector.FeedConnectorTest" />
<option name="METHOD_NAME" value="linkToDocumentFragments" />
<option name="GROUP_NAME" value="" />
<option name="TEST_OBJECT" value="CLASS" />
@@ -1432,7 +1494,7 @@
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23220704" order="0" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.6175637" order="1" />
<window_info id="Structure" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.16103522" order="7" />
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.28475034" order="12" x="24" y="688" width="925" height="442" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.28475034" order="12" x="24" y="688" width="925" height="442" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="5" />
<window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32961783" order="6" />
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39486468" order="13" />
@@ -1474,7 +1536,7 @@
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
- <option name="LAST_COMMIT_MESSAGE" value="JBSEAM-2502 - JIRA issue list plugin and JIRA connector (plus re-usable remote connector data cache)" />
+ <option name="LAST_COMMIT_MESSAGE" value="JBSEAM-2451 - Feed aggregator connector and plugin" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
@@ -1485,7 +1547,6 @@
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
- <MESSAGE value="Minor improvements to forum browsing and doc pager" />
<MESSAGE value="Avoid NPE" />
<MESSAGE value="Configurable forum reply e-mail notification and Safari3 fixes" />
<MESSAGE value="Use new SeamTest superclass" />
@@ -1510,6 +1571,7 @@
<MESSAGE value="Update IntelliJ, better headline rendering, minor fixes to FAQ plugin" />
<MESSAGE value="Various bugfixes" />
<MESSAGE value="JBSEAM-2502 - JIRA issue list plugin and JIRA connector (plus re-usable remote connector data cache)" />
+ <MESSAGE value="JBSEAM-2451 - Feed aggregator connector and plugin" />
</component>
<component name="VssConfiguration">
<option name="CLIENT_PATH" value="" />
@@ -1596,114 +1658,114 @@
<option name="myLastEditedConfigurable" value="Default" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedTeasers/FeedTeasersPreferences.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="48" column="0" selection-start="1790" selection-end="1790" vertical-scroll-proportion="0.5264271">
+ <state line="33" column="0" selection-start="694" selection-end="694" vertical-scroll-proportion="0.90697676">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/docDisplay_d.xhtml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="189" column="0" selection-start="10464" selection-end="10658" vertical-scroll-proportion="0.5011338">
+ <state line="103" column="0" selection-start="3178" selection-end="3178" vertical-scroll-proportion="0.77378434">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java">
+ <entry file="file://$PROJECT_DIR$/src/etc/messages_feedAggregator_en.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="240" column="52" selection-start="9888" selection-end="9888" vertical-scroll-proportion="0.7178003">
+ <state line="8" column="63" selection-start="582" selection-end="582" vertical-scroll-proportion="0.21987315">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DocumentNodeRemover.java">
+ <entry file="file://$PROJECT_DIR$/view/themes/default/css/feedAggregator.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="0" selection-start="814" selection-end="814" vertical-scroll-proportion="0.3227207">
+ <state line="9" column="1" selection-start="112" selection-end="112" vertical-scroll-proportion="0.2473573">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/feedAggregator.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="186" column="16" selection-start="6653" selection-end="6653" vertical-scroll-proportion="0.48480463">
+ <state line="11" column="0" selection-start="149" selection-end="149" vertical-scroll-proportion="0.30232558">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/migration.sql">
+ <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="162" column="52" selection-start="10631" selection-end="10631" vertical-scroll-proportion="0.34615386">
+ <state line="263" column="70" selection-start="23108" selection-end="23108" vertical-scroll-proportion="0.629742">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="0" selection-start="824" selection-end="824" vertical-scroll-proportion="0.37047756">
+ <state line="998" column="28" selection-start="15950" selection-end="15950" vertical-scroll-proportion="0.6637555">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/messages_jiraConnector_en.properties">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/faqBrowser.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="5" column="0" selection-start="424" selection-end="424" vertical-scroll-proportion="0.13742071">
+ <state line="6" column="55" selection-start="157" selection-end="157" vertical-scroll-proportion="0.15856236">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/WEB-INF/components.xml">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/blogArchive.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="116" column="44" selection-start="6165" selection-end="6165" vertical-scroll-proportion="0.7664399">
+ <state line="10" column="23" selection-start="173" selection-end="173" vertical-scroll-proportion="0.27484143">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/messages_lastModifiedDocuments_en.properties">
+ <entry file="file://$PROJECT_DIR$/view/plugins/feedAggregator/plugin.xhtml">
<provider selected="true" editor-type-id="text-editor">
- <state line="2" column="49" selection-start="198" selection-end="198" vertical-scroll-proportion="0.054968286">
+ <state line="66" column="27" selection-start="3900" selection-end="3900" vertical-scroll-proportion="0.81632656">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/messages_jiraIssueList_en.properties">
+ <entry file="file://$PROJECT_DIR$/migration.sql">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="44" selection-start="44" selection-end="44" vertical-scroll-proportion="0.0">
+ <state line="193" column="0" selection-start="12248" selection-end="12248" vertical-scroll-proportion="0.709607">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/mainMenu.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="41" column="24" selection-start="1300" selection-end="1300" vertical-scroll-proportion="0.4164905">
+ <state line="22" column="1" selection-start="395" selection-end="395" vertical-scroll-proportion="0.60465115">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/lastmodified/LastModifiedDocumentsPreferences.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="20" column="26" selection-start="563" selection-end="563" vertical-scroll-proportion="0.37626627">
+ <state line="20" column="13" selection-start="846" selection-end="846" vertical-scroll-proportion="0.47145876">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/jiraIssueList.css">
+ <entry file="file://$PROJECT_DIR$/src/etc/messages_en.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="23" column="29" selection-start="831" selection-end="831" vertical-scroll-proportion="0.1612426">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="272" column="0" selection-start="22780" selection-end="22780" vertical-scroll-proportion="0.49659863">
+ <state line="27" column="22" selection-start="882" selection-end="882" vertical-scroll-proportion="0.5079595">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/log4j.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="0" selection-start="609" selection-end="609" vertical-scroll-proportion="0.34210527">
+ <state line="15" column="29" selection-start="742" selection-end="742" vertical-scroll-proportion="0.28931752">
<folding />
</state>
</provider>
Modified: trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -55,6 +55,12 @@
</function>
<function>
+ <function-name>truncateStringOnWordBoundary</function-name>
+ <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
+ <function-signature>java.lang.String truncateStringOnWordBoundary(java.lang.String,int)</function-signature>
+ </function>
+
+ <function>
<function-name>concat</function-name>
<function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
<function-signature>java.lang.String concat(java.lang.String,java.lang.String)</function-signature>
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -118,6 +118,8 @@
<value>messages_faqBrowser</value>
<value>messages_jiraIssueList</value>
<value>messages_jiraConnector</value>
+ <value>messages_feedAggregator</value>
+ <value>messages_feedConnector</value>
</core:bundle-names>
</core:resource-loader>
Added: trunk/examples/wiki/src/etc/messages_feedAggregator_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_feedAggregator_en.properties (rev 0)
+++ trunk/examples/wiki/src/etc/messages_feedAggregator_en.properties 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,14 @@
+feedAggregator.preferences.Name=Plugin: Feed Aggregator
+feedAggregator.preferences.Title=Title of aggregator box
+feedAggregator.preferences.Urls=URLs of feeds to aggregate, space separated
+feedAggregator.preferences.NumberOfFeedEntries=Number of feed entries
+feedAggregator.preferences.TruncateDescription=Truncate description text after characters
+feedAggregator.preferences.HideDate=Hide date display
+feedAggregator.preferences.HideAuthor=Hide author display
+feedAggregator.preferences.HideFeedInfo=Hide link to feed
+feedAggregator.preferences.HideDescription=Hide feed entry text
+feedAggregator.preferences.HideTitle=Hide feed entry title
+
+feedAggregator.label.More=more...
+feedAggregator.label.By=by
+feedAggregator.label.NoEntriesFound=No feed entries found.
\ No newline at end of file
Added: trunk/examples/wiki/src/etc/messages_feedConnector_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_feedConnector_en.properties (rev 0)
+++ trunk/examples/wiki/src/etc/messages_feedConnector_en.properties 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,4 @@
+feedConnector.preferences.Name=Remote Connector: Feeds
+feedConnector.preferences.ConnectionTimeoutSeconds=Remote connection timeout in seconds (TODO:currently not used!)
+feedConnector.preferences.FeedCacheUpdateTimeoutSeconds=Feed cache update timeout in seconds
+feedConnector.preferences.FeedCacheIdleTimeoutSeconds=Feed cache idle timeout in seconds
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -22,8 +22,8 @@
@Logger
Log log;
- protected void writeIntoCache(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key, List<T> result) {
- log.debug("writing data into cache: " + result.size());
+ public void writeIntoCache(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key, List<T> result) {
+ log.debug("writing data into cache for key: " + key + " size: " + result.size());
// Note that this write is not synchronized on the APPLICATION-scoped cache component!
// However, that is ok because the write only updates a value of the map, it does not
@@ -31,7 +31,7 @@
cache.write(key, result, System.currentTimeMillis());
}
- protected abstract void updateCacheAsynchronously(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key);
+ public abstract void updateCacheAsynchronously(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key);
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -55,4 +55,8 @@
public int hashCode() {
return keyValue.hashCode();
}
+
+ public String toString() {
+ return keyValue.toString();
+ }
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.log.Log;
+
+import java.util.*;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+ at Name("feedAggregatorDAO")
+ at Scope(ScopeType.CONVERSATION)
+ at AutoCreate
+public class FeedAggregatorDAO implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In("feedConnectorCache")
+ FeedConnector feedConnector;
+
+ public List<FeedEntryDTO> getLatestFeedEntries(int numberOfFeedEntries, String[] feedURLs) {
+ if (feedURLs == null) return Collections.EMPTY_LIST;
+
+ List<FeedEntryDTO> feedEntries = new ArrayList<FeedEntryDTO>();
+
+ for (String feedURL : feedURLs) {
+ // For each feed, get the feed entries and put them in a sorted collection,
+ // so we get overall sorting
+ log.debug("retrieving feed entries from connector for feed URL: " + feedURL);
+ List<FeedEntryDTO> result = feedConnector.getFeedEntries(feedURL);
+ log.debug("retrieved feed entries: " + result.size());
+ feedEntries.addAll(result);
+ log.debug("number of aggregated feed entries so far: " + feedEntries.size());
+ }
+
+ Collections.sort(
+ feedEntries,
+ // Sort by date of feed entry ascending
+ new Comparator<FeedEntryDTO>() {
+ public int compare(FeedEntryDTO a, FeedEntryDTO b) {
+ if (a.getFeedEntry().getPublishedDate().getTime() >
+ b.getFeedEntry().getPublishedDate().getTime()) return -1;
+
+ return (a.getFeedEntry().getPublishedDate().getTime() ==
+ b.getFeedEntry().getPublishedDate().getTime() ? 0 : 1);
+ }
+ }
+ );
+
+ return feedEntries.size() > numberOfFeedEntries
+ ? new ArrayList<FeedEntryDTO>(feedEntries).subList(0, numberOfFeedEntries)
+ : new ArrayList<FeedEntryDTO>(feedEntries);
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.core.model.FeedEntry;
+
+import java.util.List;
+
+/**
+ * @author Christian Bauer
+ */
+public interface FeedConnector {
+
+ public List<FeedEntryDTO> getFeedEntries(String feedURL);
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.connectors.cache.ConnectorCache;
+import org.jboss.seam.wiki.connectors.cache.ConnectorCacheAsyncUpdater;
+import org.jboss.seam.wiki.connectors.cache.ConnectorCacheKey;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.async.Asynchronous;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author Christian Bauer
+ */
+ at Name("feedConnectorCache")
+ at AutoCreate
+public class FeedConnectorCache
+ extends ConnectorCache<FeedEntryDTO, FeedConnectorCache.FeedConnectorCacheKey>
+ implements FeedConnector {
+
+ @In("#{preferences.get('FeedConnector')}")
+ FeedConnectorPreferences prefs;
+
+ public List<FeedEntryDTO> getFeedEntries(String feedURL) {
+ FeedConnectorCacheKey newKey = new FeedConnectorCacheKey(feedURL);
+ return lookup( new ConnectorCacheKey<FeedConnectorCacheKey>(newKey));
+ }
+
+ protected long getUpdateTimeoutSeconds() {
+ return prefs.getFeedCacheUpdateTimeoutSeconds();
+ }
+
+ protected long getIdleTimeoutSeconds() {
+ return prefs.getFeedCacheIdleTimeoutSeconds();
+ }
+
+ protected Class<? extends ConnectorCacheAsyncUpdater<FeedEntryDTO, FeedConnectorCacheKey>> getAsyncUpdaterClass() {
+ return FeedConnectorCacheAsyncUpdater.class;
+ }
+
+ @Name("feedConnectorCacheAsyncUpdater")
+ @AutoCreate
+ public static class FeedConnectorCacheAsyncUpdater
+ extends ConnectorCacheAsyncUpdater<FeedEntryDTO, FeedConnectorCacheKey> {
+
+ @In
+ FeedConnector feedConnector;
+
+ @Asynchronous
+ public void updateCacheAsynchronously(ConnectorCache<FeedEntryDTO, FeedConnectorCacheKey> cache,
+ ConnectorCacheKey<FeedConnectorCacheKey> key) {
+
+ List<FeedEntryDTO> result = feedConnector.getFeedEntries(key.getKeyValue().getUrl());
+ super.writeIntoCache(cache, key, result);
+ }
+ }
+
+ public static class FeedConnectorCacheKey implements Serializable {
+ private String url;
+
+ public FeedConnectorCacheKey(String url) {
+ this.url = url;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ FeedConnectorCacheKey that = (FeedConnectorCacheKey) o;
+
+ if (!url.equals(that.url)) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ return url.hashCode();
+ }
+
+ public String toString() {
+ return getUrl();
+ }
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.hibernate.validator.Range;
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author Christian Bauer
+ */
+ at Preferences(name = "FeedConnector", description = "#{messages['feedConnector.preferences.Name']}")
+public class FeedConnectorPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['feedConnector.preferences.ConnectionTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM,
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 120l)
+ @NotNull
+ private Long connectionTimeoutSeconds;
+
+ @PreferenceProperty(
+ description = "#{messages['feedConnector.preferences.FeedCacheUpdateTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM
+ )
+ @Range(min = 1l, max = 864000)
+ @NotNull
+ private Long feedCacheUpdateTimeoutSeconds;
+
+ @PreferenceProperty(
+ description = "#{messages['feedConnector.preferences.FeedCacheIdleTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM
+ )
+ @Range(min = 1l, max = 864000)
+ @NotNull
+ private Long feedCacheIdleTimeoutSeconds;
+
+ public Long getConnectionTimeoutSeconds() {
+ return connectionTimeoutSeconds;
+ }
+
+ public Long getFeedCacheUpdateTimeoutSeconds() {
+ return feedCacheUpdateTimeoutSeconds;
+ }
+
+ public Long getFeedCacheIdleTimeoutSeconds() {
+ return feedCacheIdleTimeoutSeconds;
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
+import org.jboss.seam.wiki.preferences.metamodel.PreferencesSupport;
+import org.jboss.seam.annotations.Name;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Christian Bauer
+ */
+ at Name("feedConnectorPreferencesSupport")
+public class FeedConnectorPreferencesSupport extends PreferencesSupport {
+
+ public Set<PreferenceEntity> getPreferenceEntities() {
+ return new HashSet<PreferenceEntity>() {{
+ add( createPreferenceEntity(FeedConnectorPreferences.class) );
+ }};
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.core.model.Feed;
+import org.jboss.seam.wiki.core.model.FeedEntry;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+public class FeedEntryDTO implements Serializable {
+
+ private Feed feed;
+ private FeedEntry feedEntry;
+
+ public FeedEntryDTO(Feed feed, FeedEntry feedEntry) {
+ this.feed = feed;
+ this.feedEntry = feedEntry;
+ }
+
+ public Feed getFeed() {
+ return feed;
+ }
+
+ public FeedEntry getFeedEntry() {
+ return feedEntry;
+ }
+
+ public String toString() {
+ return "FeedEntryDTO - TITLE: '" + getFeedEntry().getTitle() + "' FEED: '" + getFeed().getTitle() + "'";
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import com.sun.syndication.feed.synd.SyndContent;
+import com.sun.syndication.feed.synd.SyndEntry;
+import com.sun.syndication.feed.synd.SyndFeed;
+import com.sun.syndication.io.FeedException;
+import com.sun.syndication.io.SyndFeedInput;
+import com.sun.syndication.io.XmlReader;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.core.model.Feed;
+import org.jboss.seam.wiki.core.model.FeedEntry;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.SocketTimeoutException;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import sun.net.www.protocol.http.HttpURLConnection;
+
+/**
+ *
+ * TODO: This requires a system property for timeout: sun.net.client.defaultConnectTimeout=30000
+ *
+ * @author Christian Bauer
+ */
+ at Name("feedConnector")
+ at Scope(ScopeType.APPLICATION)
+ at AutoCreate
+public class RomeFeedConnector implements FeedConnector {
+
+ @Logger
+ Log log;
+
+ @In("#{preferences.get('FeedConnector')}")
+ FeedConnectorPreferences prefs;
+
+ public List<FeedEntryDTO> getFeedEntries(String feedURL) {
+
+ try {
+
+ List<FeedEntryDTO> feedEntryDTOs = new ArrayList<FeedEntryDTO>();
+
+ log.debug("connecting to feed URL: " + feedURL);
+
+ URL feedSource = new URL(feedURL);
+
+ /** TODO: This breaks multi-threading somehow, two threads start calling this connector and one never returns...
+ URLConnection connection = feedSource.openConnection();
+ connection.setConnectTimeout(prefs.getConnectionTimeoutSeconds().intValue()*1000);
+ SyndFeedInput input = new SyndFeedInput();
+ SyndFeed syndFeed = input.build(new XmlReader(connection));
+ */
+ SyndFeedInput input = new SyndFeedInput();
+ SyndFeed syndFeed = input.build(new XmlReader(feedSource));
+
+ log.debug("starting conversion from feed URL: " + feedURL);
+
+ Feed feed = convertSyndFeed(syndFeed);
+
+ for (Object o : syndFeed.getEntries()) {
+ SyndEntry syndEntry = (SyndEntry)o;
+ FeedEntry fe = convertSyndEntry(syndEntry);
+
+ // Linking it in our model makes it persistable
+ feed.getFeedEntries().add(fe);
+
+ // Now project them so the client has a unified view without iterating collections of Feeds
+ FeedEntryDTO dto = new FeedEntryDTO(feed, fe);
+ feedEntryDTOs.add(dto);
+ }
+
+ log.debug("retrieved feed entries: " + feedEntryDTOs.size());
+ return feedEntryDTOs;
+
+ } catch (SocketTimeoutException timeoutEx) {
+ log.warn("timeout connecting to feed: " + feedURL, timeoutEx);
+ } catch (IllegalArgumentException iaEx) {
+ log.warn("could not connect to feed: " + feedURL, iaEx);
+ } catch (MalformedURLException urlEx) {
+ log.warn("URL is not valid: " + feedURL, urlEx);
+ } catch (IOException ioEx) {
+ log.warn("could not connect to feed: " + feedURL, ioEx);
+ } catch (FeedException fex) {
+ log.warn("could not marshall feed data: " + feedURL, fex);
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ private Feed convertSyndFeed(SyndFeed syndFeed) {
+ log.debug("converting SyndFeed: " + syndFeed.getTitle());
+ Feed feed = new Feed();
+ feed.setLink(syndFeed.getLink());
+ feed.setTitle(syndFeed.getTitle());
+ feed.setPublishedDate(syndFeed.getPublishedDate());
+ feed.setDescription(syndFeed.getDescription());
+ feed.setAuthor(syndFeed.getAuthor());
+ return feed;
+ }
+
+ private FeedEntry convertSyndEntry(SyndEntry syndEntry) {
+ log.debug("converting SyndEntry: " + syndEntry.getTitle());
+ FeedEntry feedEntry = new FeedEntry();
+ feedEntry.setLink(syndEntry.getLink());
+ feedEntry.setTitle(syndEntry.getTitle());
+ feedEntry.setPublishedDate(syndEntry.getPublishedDate());
+ feedEntry.setUpdatedDate(syndEntry.getUpdatedDate());
+ feedEntry.setAuthor(syndEntry.getAuthor());
+
+ if (syndEntry.getDescription() != null) {
+ SyndContent description = syndEntry.getDescription();
+
+ feedEntry.setDescriptionType(description.getType());
+ feedEntry.setDescriptionValue(description.getValue());
+ }
+
+ return feedEntry;
+ }
+
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -17,6 +17,9 @@
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "FEEDENTRY_TYPE", length = 255)
@DiscriminatorValue("EXTERNAL")
+/*
+TODO: This implementation of Comparable is not consistent with equals()!
+ */
public class FeedEntry implements Serializable, Comparable {
public static final String END_TEASER_MACRO = "endTeaser";
@@ -78,6 +81,10 @@
return title;
}
+ public String getTitleStripped() {
+ return stripHTMLTags(title);
+ }
+
public void setTitle(String title) {
this.title = title;
}
@@ -126,6 +133,10 @@
return stripHTMLTags(getDescriptionValue());
}
+ public String getDescriptionValueStrippedNoNewlines() {
+ return stripHTMLTags(getDescriptionValue()).replaceAll("(\n|\r)", " ");
+ }
+
public boolean isTeaserMarkerPresent() {
return getDescriptionValueStripped().contains(END_TEASER_MARKER);
}
@@ -169,6 +180,7 @@
}
private String stripHTMLTags(String original) {
+ // Hm, that should be enough to make stuff XSS-safe?
return original.replaceAll("\\<([a-zA-Z]|/){1}?.*?\\>","");
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -22,6 +22,9 @@
})
@Entity
@Table(name = "PREFERENCE")
+/*
+TODO: This implementation of Comparable MIGHT not be consistent with equals()!
+ */
public class WikiPreferenceValue implements PreferenceValue, Serializable, Comparable {
@Id
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feedAggregator;
+
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.connectors.feed.FeedAggregatorDAO;
+import org.jboss.seam.wiki.connectors.feed.FeedEntryDTO;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+ at Name("feedAggregator")
+ at Scope(ScopeType.PAGE)
+public class FeedAggregator implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In
+ FeedAggregatorDAO feedAggregatorDAO;
+
+ @In("#{preferences.get('FeedAggregator', currentMacro)}")
+ FeedAggregatorPreferences prefs;
+
+ private List<FeedEntryDTO> feedEntries;
+
+ public List<FeedEntryDTO> getFeedEntries() {
+ if (feedEntries == null) loadFeedEntries();
+ return feedEntries;
+ }
+
+ @Observer(value = "Macro.render.feedAggregator", create = false)
+ public void loadFeedEntries() {
+
+ if (prefs.getUrls() == null || prefs.getUrls().length() < 8) return;
+
+ // Split the URLs by space
+ String[] urls = prefs.getUrls().split(" ");
+
+ // First check if the URLs are valid, if not we might as well just skip it...
+ List<String> validUrls = new ArrayList<String>();
+ for (String url : urls) {
+ try {
+ URL testUrl = new URL(url);
+ if (!testUrl.getProtocol().equals("http")) {
+ log.debug("skipping URL with unsupported protocol: " + url);
+ continue;
+ }
+ } catch (MalformedURLException e) {
+ log.debug("skipping invalid URL: " + url);
+ continue;
+ }
+ validUrls.add(url);
+ }
+
+ log.debug("aggregating feeds: " + validUrls.size());
+ feedEntries =
+ feedAggregatorDAO.getLatestFeedEntries(
+ prefs.getNumberOfFeedEntries().intValue(),
+ validUrls.toArray(new String[validUrls.size()])
+ );
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feedAggregator;
+
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Range;
+
+/**
+ * @author Christian Bauer
+ */
+ at Preferences(name = "FeedAggregator", description = "#{messages['feedAggregator.preferences.Name']}")
+public class FeedAggregatorPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.Title']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ @NotNull
+ private String title;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.Urls']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 4000)
+ private String urls;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.NumberOfFeedEntries']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 3l, max = 99l)
+ @NotNull
+ private Long numberOfFeedEntries;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.TruncateDescription']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 10l, max = 1000l)
+ @NotNull
+ private Long truncateDescription;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideDate']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideDate;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideAuthor']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideAuthor;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideFeedInfo']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideFeedInfo;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideDescription']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideDescription;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideTitle']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideTitle;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getUrls() {
+ return urls;
+ }
+
+ public Long getNumberOfFeedEntries() {
+ return numberOfFeedEntries;
+ }
+
+ public Long getTruncateDescription() {
+ return truncateDescription;
+ }
+
+ public Boolean getHideDate() {
+ return hideDate;
+ }
+
+ public Boolean getHideAuthor() {
+ return hideAuthor;
+ }
+
+ public Boolean getHideFeedInfo() {
+ return hideFeedInfo;
+ }
+
+ public Boolean getHideDescription() {
+ return hideDescription;
+ }
+
+ public Boolean getHideTitle() {
+ return hideTitle;
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feedAggregator;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
+import org.jboss.seam.wiki.preferences.metamodel.PreferencesSupport;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Christian Bauer
+ */
+ at Name("feedAggregatorPreferencesSupport")
+public class FeedAggregatorPreferencesSupport extends PreferencesSupport {
+
+ public Set<PreferenceEntity> getPreferenceEntities() {
+ return new HashSet<PreferenceEntity>() {{
+ add( createPreferenceEntity(FeedAggregatorPreferences.class) );
+ }};
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -76,7 +76,7 @@
visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
editorIncludeName = "NumberRange"
)
- @Range(min = 10l, max = 5000l)
+ @Range(min = 10l, max = 100l)
@NotNull
private Long truncateSummary;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -17,6 +17,9 @@
import java.lang.reflect.Field;
import java.util.*;
+/*
+TODO: This implementation of Comparable is not consistent with equals()!
+ */
public class PreferenceEntity implements Comparable, Serializable {
Log log = Logging.getLog(PreferenceEntity.class);
@@ -180,6 +183,9 @@
return "PreferenceEntity: " + getClazz().getName() + " properties: " + getProperties().size();
}
+ /*
+ TODO: This implementation of Comparable is not consistent with equals()!
+ */
public class Property implements Comparable, Serializable {
private Field field;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -66,6 +66,25 @@
return string.substring(0, length-1) + appendString;
}
+ public static String truncateStringOnWordBoundary(String string, int length) {
+ if (string.length() <= length) return string;
+
+ char [] chars = string.toCharArray();
+ StringBuffer buffer = new StringBuffer();
+ String result = "";
+ int lastWhitespace = 0;
+ for (int i = 0; i < chars.length; i++) {
+ if (chars[i] == ' ') lastWhitespace = i;
+ buffer.append(chars[i]);
+
+ if (i >= length) {
+ result = buffer.substring(0, lastWhitespace);
+ break;
+ }
+ }
+ return result;
+ }
+
public static String concat(String a, String b) {
return a + b;
}
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -68,6 +68,9 @@
<PREFERENCE PREF_ID = "190" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraIssueList" PROPERTY_NAME = "title" STRING_VALUE = "JIRA Issues" LONG_VALUE = "[NULL]" BOOLEAN_VALUE = "[NULL]"/>
<PREFERENCE PREF_ID = "191" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraIssueList" PROPERTY_NAME = "truncateSummary" STRING_VALUE = "[NULL]" LONG_VALUE = "35" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "200" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedAggregator" PROPERTY_NAME = "title" STRING_VALUE = "Aggregated Feeds" LONG_VALUE = "[NULL]" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "201" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedAggregator" PROPERTY_NAME = "truncateDescription" STRING_VALUE = "[NULL]" LONG_VALUE = "100" BOOLEAN_VALUE = "[NULL]"/>
+
<!-- CONNECTORS -->
<PREFERENCE PREF_ID = "300" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraConnector" PROPERTY_NAME = "connectionTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "15" BOOLEAN_VALUE = "[NULL]"/>
@@ -75,6 +78,10 @@
<PREFERENCE PREF_ID = "302" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraConnector" PROPERTY_NAME = "issueListCacheUpdateTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "600" BOOLEAN_VALUE = "[NULL]"/>
<PREFERENCE PREF_ID = "303" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraConnector" PROPERTY_NAME = "issueListCacheIdleTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "36000" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "310" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedConnector" PROPERTY_NAME = "connectionTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "30" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "311" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedConnector" PROPERTY_NAME = "feedCacheUpdateTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "600" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "312" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedConnector" PROPERTY_NAME = "feedCacheIdleTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "36000" BOOLEAN_VALUE = "[NULL]"/>
+
<ROLES ROLE_ID = "1" OBJ_VERSION = "0" DISPLAY_NAME = "Administrator" NAME = "admin" ACCESS_LEVEL = "1000" CREATED_ON = "2006-06-27 13:45:00"/>
<ROLES ROLE_ID = "2" OBJ_VERSION = "0" DISPLAY_NAME = "Guest" NAME = "guest" ACCESS_LEVEL = "0" CREATED_ON = "2006-06-27 13:45:00"/>
<ROLES ROLE_ID = "3" OBJ_VERSION = "0" DISPLAY_NAME = "Member" NAME = "member" ACCESS_LEVEL = "1" CREATED_ON = "2006-06-27 13:45:00"/>
@@ -254,9 +261,9 @@
<WIKI_FILE
NODE_ID="8" FILE_REVISION="0"/>
<WIKI_DOCUMENT
- NODE_ID="8" CONTENT="Testdocument Three"
+ NODE_ID="8" CONTENT="Testdocument Three

<div class="homepageNews">
[<=feedAggregator[truncateDescription=250][numberOfFeedEntries=10][urls=http://rss.slashdot.org/Slashdot/slashdot http://feeds.engadget.com/weblogsinc/engadget]]
</div>
"
HEADER="[NULL]" FOOTER="[NULL]"
- HEADER_MACROS="[NULL]" CONTENT_MACROS="[NULL]" FOOTER_MACROS="[NULL]"
+ HEADER_MACROS="[NULL]" CONTENT_MACROS="feedAggregator" FOOTER_MACROS="[NULL]"
NAME_AS_TITLE="true" ENABLE_COMMENTS="true" ENABLE_COMMENT_FORM="true" ENABLE_COMMENTS_ON_FEEDS="true"/>
<WIKI_TAG FILE_ID="8" TAG="Tag One"/>
<WIKI_TAG FILE_ID="8" TAG="Tag Two"/>
@@ -270,7 +277,7 @@
<WIKI_FILE
NODE_ID="9" FILE_REVISION="0"/>
<WIKI_DOCUMENT
- NODE_ID="9" CONTENT="Testdocument Four

[<=jiraIssueList[url=http://jira.jboss.com/jira][username=myusername][password=mypassword][filterId=12311591][numberOfIssues=10]]"
+ NODE_ID="9" CONTENT="Testdocument Four

[<=jiraIssueList[url=http://jira.jboss.com/jira][username=myusername][password=mypassword][filterId=12311591][numberOfIssues=10]]
"
HEADER="[NULL]" FOOTER="[NULL]"
HEADER_MACROS="[NULL]" CONTENT_MACROS="jiraIssueList" FOOTER_MACROS="[NULL]"
NAME_AS_TITLE="true" ENABLE_COMMENTS="true" ENABLE_COMMENT_FORM="true" ENABLE_COMMENTS_ON_FEEDS="true"/>
Added: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java (rev 0)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.test.connector;
+
+import org.dbunit.operation.DatabaseOperation;
+import org.jboss.seam.wiki.connectors.feed.FeedAggregatorDAO;
+import org.jboss.seam.wiki.connectors.feed.FeedEntryDTO;
+import org.jboss.seam.wiki.connectors.feed.FeedConnector;
+import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
+import org.jboss.seam.wiki.core.model.FeedEntry;
+import org.jboss.seam.wiki.core.model.Feed;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.ScopeType;
+import org.testng.annotations.Test;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Date;
+
+/**
+ * @author Christian Bauer
+ */
+public class FeedConnectorTest extends DBUnitSeamTest {
+
+ protected void prepareDBUnitOperations() {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml", DatabaseOperation.CLEAN_INSERT)
+ );
+ }
+
+ @Test
+ public void getFeedDTOs() throws Exception {
+
+ new NonFacesRequest() {
+ protected void renderResponse() throws Exception {
+ FeedAggregatorDAO dao = (FeedAggregatorDAO)getInstance(FeedAggregatorDAO.class);
+
+ String[] feedURLs = {
+ "http://foo", "http://bar", "http:WrongURL"
+ };
+
+ List<FeedEntryDTO> dtos = dao.getLatestFeedEntries(30, feedURLs);
+ assert dtos.size() == 0; // Asynchronous cache needs to do its job first
+
+ Thread.sleep(4000);
+
+ dtos = dao.getLatestFeedEntries(30, feedURLs);
+ assert dtos.size() == 3;
+
+ }
+ }.run();
+ }
+
+ @Name("feedConnector")
+ @Scope(ScopeType.APPLICATION)
+ @Install(precedence = Install.MOCK)
+ @AutoCreate
+ public static class MockFeedConnector implements FeedConnector {
+ public List<FeedEntryDTO> getFeedEntries(String feedURL) {
+
+ try {
+ Thread.sleep(3000); // Wait 3 seconds...
+ } catch (InterruptedException e) {}
+
+ List<FeedEntryDTO> entries = new ArrayList<FeedEntryDTO>();
+
+ if (feedURL.equals("http://foo")) {
+
+ FeedEntry feOne = new FeedEntry();
+ feOne.setTitle("One");
+ feOne.setPublishedDate(new Date());
+
+ FeedEntry feTwo = new FeedEntry();
+ feTwo.setTitle("Two");
+ feTwo.setPublishedDate(new Date());
+
+ Feed feed = new Feed();
+ feed.setTitle("Foo");
+ feed.getFeedEntries().add(feOne);
+ feed.getFeedEntries().add(feTwo);
+
+ entries.add(new FeedEntryDTO(feed, feOne));
+ entries.add(new FeedEntryDTO(feed, feTwo));
+
+ } else if (feedURL.equals("http://bar")) {
+
+ FeedEntry feOne = new FeedEntry();
+ feOne.setTitle("One");
+ feOne.setPublishedDate(new Date());
+
+ Feed feed = new Feed();
+ feed.setTitle("Bar");
+ feed.getFeedEntries().add(feOne);
+
+ entries.add(new FeedEntryDTO(feed, feOne));
+ }
+
+ return entries;
+
+ }
+ }
+
+}
Deleted: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.wiki.test.connector;
-
-import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
-import org.jboss.seam.wiki.connectors.jira.JiraDAO;
-import org.jboss.seam.wiki.connectors.jira.JiraIssueListConnector;
-import org.jboss.seam.wiki.connectors.jira.JiraIssue;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.ScopeType;
-import org.dbunit.operation.DatabaseOperation;
-import org.testng.annotations.Test;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author Christian Bauer
- */
-public class JiraConnector extends DBUnitSeamTest {
-
- protected void prepareDBUnitOperations() {
- beforeTestOperations.add(
- new DataSetOperation("org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml", DatabaseOperation.CLEAN_INSERT)
- );
- }
-
- @Test
- public void cacheIssueList() throws Exception {
-
- new NonFacesRequest() {
- protected void renderResponse() throws Exception {
- JiraDAO dao = (JiraDAO)getInstance(JiraDAO.class);
-
- List<JiraIssue> issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
- assert issues.size() == 0; // Asynchronous cache needs to do its job first
-
- Thread.sleep(1000);
-
- issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
- assert issues.size() == 0; // Still nothing
-
- Thread.sleep(3000);
-
- issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
- assert issues.size() == 3; // Now we have it
- }
- }.run();
- }
-
- @Name("jiraIssueListConnector")
- @Scope(ScopeType.APPLICATION)
- @Install(precedence = Install.MOCK)
- @AutoCreate
- public static class MockJiraIssueListConnector implements JiraIssueListConnector {
- public List<JiraIssue> getIssues(String url, String username, String password, String filterId) {
-
- try {
- Thread.sleep(3000); // Wait 3 seconds...
- } catch (InterruptedException e) {}
-
- List<JiraIssue> issues = new ArrayList<JiraIssue>();
-
- JiraIssue i1 = new JiraIssue();
- i1.setKey("one");
- issues.add(i1);
-
- JiraIssue i2 = new JiraIssue();
- i1.setKey("two");
- issues.add(i2);
-
- JiraIssue i3 = new JiraIssue();
- i1.setKey("three");
- issues.add(i3);
-
- JiraIssue i4 = new JiraIssue();
- i1.setKey("four");
- issues.add(i4);
-
- return issues;
- }
- }
-
-}
Copied: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java (from rev 7167, trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java)
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java (rev 0)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.test.connector;
+
+import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
+import org.jboss.seam.wiki.connectors.jira.JiraDAO;
+import org.jboss.seam.wiki.connectors.jira.JiraIssueListConnector;
+import org.jboss.seam.wiki.connectors.jira.JiraIssue;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.ScopeType;
+import org.dbunit.operation.DatabaseOperation;
+import org.testng.annotations.Test;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Christian Bauer
+ */
+public class JiraConnectorTest extends DBUnitSeamTest {
+
+ protected void prepareDBUnitOperations() {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml", DatabaseOperation.CLEAN_INSERT)
+ );
+ }
+
+ @Test
+ public void cacheIssueList() throws Exception {
+
+ new NonFacesRequest() {
+ protected void renderResponse() throws Exception {
+ JiraDAO dao = (JiraDAO)getInstance(JiraDAO.class);
+
+ List<JiraIssue> issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
+ assert issues.size() == 0; // Asynchronous cache needs to do its job first
+
+ Thread.sleep(1000);
+
+ issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
+ assert issues.size() == 0; // Still nothing
+
+ Thread.sleep(3000);
+
+ issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
+ assert issues.size() == 3; // Now we have it
+ }
+ }.run();
+ }
+
+ @Name("jiraIssueListConnector")
+ @Scope(ScopeType.APPLICATION)
+ @Install(precedence = Install.MOCK)
+ @AutoCreate
+ public static class MockJiraIssueListConnector implements JiraIssueListConnector {
+ public List<JiraIssue> getIssues(String url, String username, String password, String filterId) {
+
+ try {
+ Thread.sleep(3000); // Wait 3 seconds...
+ } catch (InterruptedException e) {}
+
+ List<JiraIssue> issues = new ArrayList<JiraIssue>();
+
+ JiraIssue i1 = new JiraIssue();
+ i1.setKey("one");
+ issues.add(i1);
+
+ JiraIssue i2 = new JiraIssue();
+ i1.setKey("two");
+ issues.add(i2);
+
+ JiraIssue i3 = new JiraIssue();
+ i1.setKey("three");
+ issues.add(i3);
+
+ JiraIssue i4 = new JiraIssue();
+ i1.setKey("four");
+ issues.add(i4);
+
+ return issues;
+ }
+ }
+
+}
Added: trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml (rev 0)
+++ trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,84 @@
+<wiki:plugin
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:div styleClass="feedAggregator box">
+
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{preferences.get('FeedAggregator', currentMacro).title}"/>
+ </s:div>
+
+ <div class="boxContent">
+ <h:dataTable value="#{feedAggregator.feedEntries}" var="feDTO"
+ rendered="#{not empty feedAggregator.feedEntries and feedAggregator.feedEntries.size() > 0}"
+ styleClass="datatable feedAggregatorTable"
+ columnClasses="feedEntryColumn"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <s:div styleClass="feedEntryInfo smallFont">
+
+ <s:span rendered="#{not preferences.get('FeedAggregator', currentMacro).hideDate}">
+ <h:outputText value="#{feDTO.feedEntry.publishedDate}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ </s:span>
+
+ <s:span styleClass="undecoratedLink"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideAuthor}">
+ <h:outputText value=", #{messages['feedAggregator.label.By']} "/>
+ <h:outputText styleClass="feedEntryAuthor" value="#{feDTO.feedEntry.author}"/>
+ </s:span>
+
+ <s:span styleClass="undecoratedLink"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideFeedInfo}">
+ (<h:outputLink value="#{feDTO.feed.link}">
+ <h:outputText value="#{feDTO.feed.title}"/>
+ </h:outputLink>)
+ </s:span>
+
+ </s:div>
+
+ <s:div styleClass="feedEntryTitle undecoratedLink"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideTitle}">
+ <h:outputLink target="_top" value="#{feDTO.feedEntry.link}">
+ <h:outputText escape="false" value="#{feDTO.feedEntry.titleStripped}"/>
+ </h:outputLink>
+ </s:div>
+
+ <s:div styleClass="feedEntryBody" rendered="#{not preferences.get('FeedAggregator', currentMacro).hideDescription}">
+ <h:outputText escape="false"
+ value="#{wiki:truncateStringOnWordBoundary(feDTO.feedEntry.descriptionValueStrippedNoNewlines,
+ preferences.get('FeedAggregator', currentMacro).truncateDescription)}"/>
+
+ <h:outputLink target="_top" styleClass="feedEntryBodyMoreLink"
+ value="#{feDTO.feedEntry.link}"
+ rendered="#{wiki:length(feDTO.feedEntry.descriptionValueStrippedNoNewlines)
+ > preferences.get('FeedAggregator', currentMacro).truncateDescription}">
+  #{messages['feedAggregator.label.More']}
+ </h:outputLink>
+ </s:div>
+
+ </h:column>
+
+ </h:dataTable>
+
+ </div>
+
+ <s:div styleClass="feedAggregatorEmpty"
+ rendered="#{empty feedAggregator.feedEntries or feedAggregator.feedEntries.size() == 0}">
+ <h:outputText value="#{messages['feedAggregator.label.NoEntriesFound']}"/>
+ </s:div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+</wiki:plugin>
\ No newline at end of file
Modified: trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -47,7 +47,9 @@
</div>
<div class="teaserTitle undecoratedLink">
- <h:outputLink target="_top" value="#{fe.link}">#{fe.title}</h:outputLink>
+ <h:outputLink target="_top" value="#{fe.link}">
+ <h:outputText escape="false" value="#{fe.titleStripped}"/>
+ </h:outputLink>
</div>
<s:fragment rendered="#{fe.teaserMarkerPresent}">
@@ -59,7 +61,7 @@
<s:fragment rendered="#{not fe.teaserMarkerPresent}">
<h:outputText styleClass="teaserBody"
- value="#{wiki:truncateString(fe.descriptionValueStripped, preferences.get('FeedTeasers', currentMacro).truncateDescription, '')}"/>
+ value="#{wiki:truncateStringOnWordBoundary(fe.descriptionValueStripped, preferences.get('FeedTeasers', currentMacro).truncateDescription)}"/>
<h:outputLink target="_top" styleClass="teaserBody"
value="#{fe.link}"
Added: trunk/examples/wiki/view/themes/default/css/feedAggregator.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/feedAggregator.css (rev 0)
+++ trunk/examples/wiki/view/themes/default/css/feedAggregator.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,17 @@
+.feedEntryColumn {
+ padding: 10px;
+}
+
+.feedEntryTitle {
+ padding-top: 15px;
+ padding-bottom: 15px;
+}
+
+.feedEntryInfo {
+ text-align: right;
+}
+
+.feedEntryBody {
+ line-height: 150%;
+ text-align:justify;
+}
\ No newline at end of file
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -8,7 +8,7 @@
}
.blogArchiveFooter {
- background: white url(#{themePath}/img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(#{themePath}/img/th.bg.gif) 0 0 repeat-x;
padding-top: 5px;
padding-bottom: 10px;
padding-left: 15px;
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -4,10 +4,10 @@
.faqBrowserPanel {
border: 1px solid #d3d2d1;
- background: white url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
- padding: 2px;
+ background: #ede8db url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
padding-left: 5px;
padding-right: 5px;
+ padding-top: 5px;
line-height: 250%;
}
Added: trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css (rev 0)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,16 @@
+.feedEntryColumn {
+ padding: 10px;
+}
+
+.feedEntryTitle {
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+.feedEntryInfo {
+ text-align: right;
+}
+
+.feedEntryBody {
+ line-height: 130%;
+}
\ No newline at end of file
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -268,6 +268,55 @@
border: 1px solid #C3BBB6;
}
+/* ----- Homepage styles ------ */
+
+.homepageNews {
+ font-size: 90%;
+}
+
+.homepageNews .boxHeader {
+ background: none;
+ border: none;
+ border-bottom: 1px solid #b6b6b6;
+ padding-left: 0;
+ padding-bottom: 5px;
+}
+
+.homepageNews .boxContent {
+ background: none;
+ border: none;
+ padding-left: 0;
+}
+
+.homepageNews .boxFooter {
+ background: none;
+ border: none;
+ padding-left: 0;
+}
+
+.homepageNews .feedEntryColumn {
+ padding: 0;
+}
+
+.homepageNews .feedEntryTitle {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+
+.homepageNews .feedEntryBody {
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+.homepageNews .teaserColumn {
+ border-bottom: 1px solid #b6b6b6;
+}
+
+.homepageNews .rowOdd td, .homepageNews .rowEven td {
+ padding: 2px;
+ border-bottom: 1px solid #b6b6b6;
+}
+
/* ----- Footer styles ------ */
#footer {
@@ -531,17 +580,15 @@
.datatable .rowOdd {
background-color: #fff;
- line-height: 160%;
}
.datatable .rowEven {
background-color: #f5f5f5;
- line-height: 160%;
}
.datatable .sortableHeader {
white-space: nowrap;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
padding: 2px;
padding-left: 5px;
padding-right: 5px;
@@ -550,7 +597,7 @@
.datatable .regularHeader {
white-space: nowrap;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
padding: 2px;
padding-left: 5px;
padding-right: 5px;
@@ -612,7 +659,7 @@
border-top: 1px solid #d3d2d1;
border-left: 1px solid #d3d2d1;
border-right: 1px solid #d3d2d1;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
text-align: center;
}
.pager .pagerIconColumn {
@@ -754,7 +801,7 @@
}
.formListItem {
- background: #fff url(../img/th.bg.gif ) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif ) 0 0 repeat-x;
padding: 3px;
}
@@ -769,7 +816,7 @@
.formHead {
text-align: left;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
font-weight: bold;
color: #000;
padding-left: 13px;
@@ -931,7 +978,7 @@
}
.boxFooter {
- background: white url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
padding-top: 10px;
padding-bottom: 5px;
padding-left: 15px;
@@ -961,7 +1008,7 @@
.popupDialogHead {
text-align: left;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
font-weight: bold;
color: #000;
padding-left: 13px;
@@ -1031,7 +1078,7 @@
.directoryPathTable {
width: 100%;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
border-top: 1px solid #d3d2d1;
border-left: 1px solid #d3d2d1;
border-right: 1px solid #d3d2d1;
@@ -1107,7 +1154,7 @@
float: left;
margin: 0;
text-align: left;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
font-weight: bold;
padding-left: 13px;
padding-right: 10px;
More information about the seam-commits
mailing list