Author: christian.bauer(a)jboss.com
Date: 2008-01-21 08:02:48 -0500 (Mon, 21 Jan 2008)
New Revision: 7167
Added:
trunk/examples/wiki/lib/ws-commons-util-1.0.2.jar
trunk/examples/wiki/lib/xmlrpc-client-3.1.jar
trunk/examples/wiki/lib/xmlrpc-common-3.1.jar
trunk/examples/wiki/src/etc/messages_jiraConnector_en.properties
trunk/examples/wiki/src/etc/messages_jiraIssueList_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
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/connectors/jira/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferencesSupport.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssue.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferencesSupport.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java
trunk/examples/wiki/view/plugins/jiraIssueList/
trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml
trunk/examples/wiki/view/themes/default/css/jiraIssueList.css
trunk/examples/wiki/view/themes/default/img/icon.priority.blocker.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.critical.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.major.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.minor.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.optional.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.trivial.gif
trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.blocker.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.critical.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.major.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.minor.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.optional.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.trivial.gif
Modified:
trunk/examples/wiki/Wiki.iml
trunk/examples/wiki/Wiki.iws
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/etc/messages_lastModifiedDocuments_en.properties
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
Log:
JBSEAM-2502 - JIRA issue list plugin and JIRA connector (plus re-usable remote connector
data cache)
Modified: trunk/examples/wiki/Wiki.iml
===================================================================
--- trunk/examples/wiki/Wiki.iml 2008-01-21 12:25:45 UTC (rev 7166)
+++ trunk/examples/wiki/Wiki.iml 2008-01-21 13:02:48 UTC (rev 7167)
@@ -363,6 +363,33 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/xmlrpc-client-3.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/ws-commons-util-1.0.2.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/xmlrpc-common-3.1.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 12:25:45 UTC (rev 7166)
+++ trunk/examples/wiki/Wiki.iws 2008-01-21 13:02:48 UTC (rev 7167)
@@ -5,7 +5,7 @@
<option name="ANALYSIS_IN_BACKGROUND" value="true" />
</component>
<component name="BookmarkManager">
- <editor_bookmark
url="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java"
line="95" />
+ <editor_bookmark
url="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java"
line="96" />
</component>
<component name="CCaseConfig">
<option name="implementation"
value="net.sourceforge.transparent.CommandLineClearCase" />
@@ -33,8 +33,51 @@
</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="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/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="MODIFICATION"
beforePath="$PROJECT_DIR$/Wiki.iws" afterPath="$PROJECT_DIR$/Wiki.iws"
/>
- <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$/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="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"
/>
</list>
<list name="Failed commit: Default" comment="Oops" />
<list name="Foo" comment="" />
@@ -156,7 +199,26 @@
</subPane>
</component>
<component name="FileEditorManager">
- <leaf />
+ <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">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
@@ -418,6 +480,148 @@
<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="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="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <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/themes" />
+ <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="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="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <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/themes" />
+ <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="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <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>
+ <PATH>
+ <PATH_ELEMENT>
+ <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/themes" />
+ <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="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <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/themes" />
+ <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="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="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <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>
@@ -444,7 +648,7 @@
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/view/plugins/faqBrowser" />
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/view/plugins/feedTeasers" />
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -514,6 +718,66 @@
<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_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>
+ <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$/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_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>
+ <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$/src" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
@@ -535,7 +799,97 @@
<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/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>
+ <PATH>
+ <PATH_ELEMENT>
+ <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$/src" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <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>
+ <PATH>
+ <PATH_ELEMENT>
+ <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$/src" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <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/jiraIssueList"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <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$/src" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
</subPane>
</component>
<component name="ProjectReloadState">
@@ -649,11 +1003,11 @@
<recent name="org.jboss.seam.wiki.core.preferences2.editor" />
</key>
<key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+ <recent name="org.jboss.seam.wiki.connectors.cache" />
+ <recent name="org.jboss.seam.wiki.connectors.jira" />
<recent name="org.jboss.seam.wiki.preferences" />
<recent name="org.jboss.seam.wiki.core.preferences" />
<recent name="org.jboss.seam.wiki.preferences2.metamodel" />
- <recent name="org.jboss.seam.wiki.preferences2" />
- <recent name="org.jboss.seam.wiki.preferences2.annotations" />
</key>
</component>
<component name="RunManager" selected="TestNG.AllTests">
@@ -773,7 +1127,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.core.importers.blosxom.KwikiParser" />
+ <option name="MAIN_CLASS_NAME"
value="org.jboss.seam.wiki.plugin.jiraIssueList.JiraDAO" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS"
value=""oldblog/Christian Bauer/"" />
<option name="WORKING_DIRECTORY"
value="file://$PROJECT_DIR$" />
@@ -880,8 +1234,8 @@
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="SUITE_NAME" value="" />
- <option name="PACKAGE_NAME"
value="org.jboss.seam.wiki.test.plugin" />
- <option name="MAIN_CLASS_NAME"
value="org.jboss.seam.wiki.test.plugin.FaqBrowserDAOTests" />
+ <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="METHOD_NAME" value="linkToDocumentFragments"
/>
<option name="GROUP_NAME" value="" />
<option name="TEST_OBJECT" value="CLASS" />
@@ -1070,25 +1424,25 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="0" y="22" width="2560"
height="1536" extended-state="6" />
+ <frame x="0" y="22" width="1440"
height="836" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="SQL" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.46458924"
order="16" x="11" y="253" width="1391"
height="477" />
<window_info id="TODO" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.64235127"
order="7" />
- <window_info id="Project" active="true"
anchor="left" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="true" weight="0.18630573"
order="0" />
+ <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.16162421"
order="8" />
- <window_info id="Messages" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.2868272"
order="12" x="24" y="688" width="925"
height="442" />
+ <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="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="7" />
+ <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" />
- <window_info id="Palette" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="5" />
- <window_info id="Ant Build" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="true" weight="0.125"
order="2" />
- <window_info id="Maven projects" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.32945424"
order="4" />
- <window_info id="Changes" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.3293201"
order="14" />
- <window_info id="Run" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.46600565"
order="2" x="-1442" y="805" width="1440"
height="900" />
+ <window_info id="Palette" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="4" />
+ <window_info id="Ant Build" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.16462976"
order="2" />
+ <window_info id="Maven projects" active="false"
anchor="left" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.32902297"
order="3" />
+ <window_info id="Changes" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.32928476"
order="14" />
+ <window_info id="Run" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.46558705"
order="2" x="-1442" y="805" width="1440"
height="900" />
<window_info id="Hierarchy" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.24930307"
order="1" />
- <window_info id="Debug" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.6363636"
order="3" />
+ <window_info id="Debug" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.67881244"
order="3" />
<window_info id="Version Control" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.2109646"
order="11" />
<window_info id="Duplicates" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.3296322"
order="9" />
<window_info id="SVN Repositories" active="true"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="true" weight="0.32928476"
order="8" />
@@ -1100,7 +1454,7 @@
<window_info id="Web" active="false" anchor="left"
auto_hide="false" internal_type="DOCKED" type="DOCKED"
visible="false" weight="0.25" order="1" />
<window_info id="EJB" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.25"
order="6" />
<window_info id="Cvs" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.25"
order="8" />
- <window_info id="File View" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="6" />
+ <window_info id="File View" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="5" />
<window_info id="Commander" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.39968154"
order="0" />
<window_info id="IDEtalk Messages" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="15" />
</layout>
@@ -1120,7 +1474,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="Update IntelliJ, better
headline rendering, minor fixes to FAQ plugin" />
+ <option name="LAST_COMMIT_MESSAGE" value="JBSEAM-2502 - JIRA issue
list plugin and JIRA connector (plus re-usable remote connector data cache)" />
<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"
/>
@@ -1131,8 +1485,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="Disable tests that fail on HSQL DB" />
- <MESSAGE value="Dev profile now requires MySQL, disabled tests conditionally
that don't run on HSQL" />
<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" />
@@ -1156,6 +1508,8 @@
<MESSAGE value="Updated IntelliJ project to subversion" />
<MESSAGE value="Stupid bug" />
<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)" />
</component>
<component name="VssConfiguration">
<option name="CLIENT_PATH" value="" />
@@ -1242,114 +1596,114 @@
<option name="myLastEditedConfigurable" value="Default" />
</component>
<component name="editorHistoryManager">
- <entry
file="file://$PROJECT_DIR$/view/includes/wikiTextPreview.xhtml">
+ <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedTeasers/FeedTeasersPreferences.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="10" column="28"
selection-start="458" selection-end="458"
vertical-scroll-proportion="0.09461427">
+ <state line="48" column="0"
selection-start="1790" selection-end="1790"
vertical-scroll-proportion="0.5264271">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/seam.properties">
+ <entry file="file://$PROJECT_DIR$/view/docDisplay_d.xhtml">
<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="189" column="0"
selection-start="10464" selection-end="10658"
vertical-scroll-proportion="0.5011338">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java">
+ <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="34" column="7"
selection-start="817" selection-end="817"
vertical-scroll-proportion="0.32452276">
+ <state line="240" column="52"
selection-start="9888" selection-end="9888"
vertical-scroll-proportion="0.7178003">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/view/plugins/faqBrowser/faqQuestionForm.xhtml">
+ <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DocumentNodeRemover.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="27" column="0"
selection-start="1011" selection-end="1011"
vertical-scroll-proportion="0.26096654">
+ <state line="31" column="0"
selection-start="814" selection-end="814"
vertical-scroll-proportion="0.3227207">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/view/plugins/faqBrowser/faqControls.xhtml">
+ <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="55" column="62"
selection-start="3475" selection-end="3475"
vertical-scroll-proportion="0.4267658">
+ <state line="186" column="16"
selection-start="6653" selection-end="6653"
vertical-scroll-proportion="0.48480463">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/FAQData.dbunit.xml">
+ <entry file="file://$PROJECT_DIR$/migration.sql">
<provider selected="true" editor-type-id="text-editor">
- <state line="57" column="46"
selection-start="2917" selection-end="2974"
vertical-scroll-proportion="0.55714285">
+ <state line="162" column="52"
selection-start="10631" selection-end="10631"
vertical-scroll-proportion="0.34615386">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java">
+ <entry
file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="201" column="17"
selection-start="9757" selection-end="9757"
vertical-scroll-proportion="0.37958884">
+ <state line="28" column="0"
selection-start="824" selection-end="824"
vertical-scroll-proportion="0.37047756">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java">
+ <entry
file="file://$PROJECT_DIR$/src/etc/messages_jiraConnector_en.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="35"
selection-start="1117" selection-end="1117"
vertical-scroll-proportion="0.2863436">
+ <state line="5" column="0" selection-start="424"
selection-end="424" vertical-scroll-proportion="0.13742071">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiTextRenderer.java">
+ <entry file="file://$PROJECT_DIR$/src/etc/WEB-INF/components.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="115" column="0"
selection-start="3399" selection-end="3399"
vertical-scroll-proportion="0.9236417">
+ <state line="116" column="44"
selection-start="6165" selection-end="6165"
vertical-scroll-proportion="0.7664399">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/engine/WikiLink.java">
+ <entry
file="file://$PROJECT_DIR$/src/etc/messages_lastModifiedDocuments_en.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="40" column="91"
selection-start="1142" selection-end="1214"
vertical-scroll-proportion="0.38179147">
+ <state line="2" column="49"
selection-start="198" selection-end="198"
vertical-scroll-proportion="0.054968286">
<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/etc/messages_jiraIssueList_en.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="6" column="139"
selection-start="565" selection-end="565"
vertical-scroll-proportion="0.08496732">
+ <state line="0" column="44" selection-start="44"
selection-end="44" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/HelpDocuments.dbunit.xml">
+ <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="34" column="0"
selection-start="1679" selection-end="1679"
vertical-scroll-proportion="0.3386973">
+ <state line="41" column="24"
selection-start="1300" selection-end="1300"
vertical-scroll-proportion="0.4164905">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css">
+ <entry
file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="72" column="17"
selection-start="1083" selection-end="1083"
vertical-scroll-proportion="0.49588633">
+ <state line="20" column="26"
selection-start="563" selection-end="563"
vertical-scroll-proportion="0.37626627">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/view/themes/default/css/template.css">
+ <entry
file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/jiraIssueList.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="360" column="24"
selection-start="5641" selection-end="5641"
vertical-scroll-proportion="0.2303665">
+ <state line="0" column="0" selection-start="0"
selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/docEdit_d.xhtml">
+ <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="307" column="9"
selection-start="19645" selection-end="19645"
vertical-scroll-proportion="0.03322615">
+ <state line="272" column="0"
selection-start="22780" selection-end="22780"
vertical-scroll-proportion="0.49659863">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/docDisplay_d.xhtml">
+ <entry file="file://$PROJECT_DIR$/src/test/log4j.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="99" column="0"
selection-start="4397" selection-end="4771"
vertical-scroll-proportion="0.013933548">
+ <state line="12" column="0"
selection-start="609" selection-end="609"
vertical-scroll-proportion="0.34210527">
<folding />
</state>
</provider>
Added: trunk/examples/wiki/lib/ws-commons-util-1.0.2.jar
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/lib/ws-commons-util-1.0.2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/lib/xmlrpc-client-3.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/lib/xmlrpc-client-3.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/lib/xmlrpc-common-3.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/lib/xmlrpc-common-3.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-01-21 12:25:45 UTC (rev 7166)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-01-21 13:02:48 UTC (rev 7167)
@@ -116,6 +116,8 @@
<value>messages_flash</value>
<value>messages_docPager</value>
<value>messages_faqBrowser</value>
+ <value>messages_jiraIssueList</value>
+ <value>messages_jiraConnector</value>
</core:bundle-names>
</core:resource-loader>
Added: trunk/examples/wiki/src/etc/messages_jiraConnector_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_jiraConnector_en.properties
(rev 0)
+++ trunk/examples/wiki/src/etc/messages_jiraConnector_en.properties 2008-01-21 13:02:48
UTC (rev 7167)
@@ -0,0 +1,5 @@
+jiraConnector.preferences.Name=Remote Connector: JIRA
+jiraConnector.preferences.ConnectionTimeoutSeconds=Remote connection timeout in seconds
+jiraConnector.preferences.ReplyTimeoutSeconds=Remote reply timeout in seconds
+jiraConnector.preferences.IssueListCacheUpdateTimeoutSeconds=Issue list cache update
timeout in seconds
+jiraConnector.preferences.IssueListCacheIdleTimeoutSeconds=Issue list cache idle timeout
in seconds
Added: trunk/examples/wiki/src/etc/messages_jiraIssueList_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_jiraIssueList_en.properties
(rev 0)
+++ trunk/examples/wiki/src/etc/messages_jiraIssueList_en.properties 2008-01-21 13:02:48
UTC (rev 7167)
@@ -0,0 +1,10 @@
+jiraIssueList.preferences.Name=Plugin: JIRA Issue List
+jiraIssueList.preferences.Title=Title of isse list box
+jiraIssueList.preferences.Url=URL of JIRA website
+jiraIssueList.preferences.Username=JIRA XML-RPC remote username
+jiraIssueList.preferences.Password=JIRA XML-RPC remote password
+jiraIssueList.preferences.FilterId=ID of JIRA filter for remote request
+jiraIssueList.preferences.NumberOfIssues=Number of issues shown in list
+jiraIssueList.preferences.TruncateSummary=Truncate summary after characters
+
+jiraIssueList.label.NoIssuesFound=No issues found.
Modified: trunk/examples/wiki/src/etc/messages_lastModifiedDocuments_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_lastModifiedDocuments_en.properties 2008-01-21
12:25:45 UTC (rev 7166)
+++ trunk/examples/wiki/src/etc/messages_lastModifiedDocuments_en.properties 2008-01-21
13:02:48 UTC (rev 7167)
@@ -1,4 +1,4 @@
-lastModifiedDocuments.preferences.Name=PLugin: Last Modified Documents
+lastModifiedDocuments.preferences.Name=Plugin: Last Modified Documents
lastModifiedDocuments.preferences.NumberOfItems=Number of items shown in list
lastModifiedDocuments.preferences.ShowUsernames=Show user names
lastModifiedDocuments.preferences.DocumentTitleLength=Truncate document titles after
characters
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.cache;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.Component;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Synchronized;
+import org.jboss.seam.log.Log;
+
+import java.util.*;
+
+/**
+ * Caches lists of stuff and can asynchronously call a connector, upon configurable cache
timeout, to
+ * refresh these lists.
+ *
+ * @author Christian Bauer
+ */
+(a)Scope(ScopeType.APPLICATION)
+@Synchronized
+public abstract class ConnectorCache<T, K> {
+
+ @Logger
+ protected Log log;
+
+ private Map<ConnectorCacheKey<K>, List<T>> cache = new
HashMap<ConnectorCacheKey<K>, List<T>>();
+
+ protected List<T> lookup(ConnectorCacheKey<K> key) {
+
+ long currentTime = System.currentTimeMillis();
+ ConnectorCacheKey<K> cacheKey = findKey(key);
+
+ List<T> result = Collections.EMPTY_LIST;
+
+ if (cacheKey == null) {
+ log.debug("cache miss, retrieving it from connector, asynchronously:
" + isCacheMissResolvedAsynchronously());
+
+ // The following operations modify the structure of the cache map, which is
ok because this
+ // method is synchronized by Seam. The write triggered (later) by the
AysncUpdater is not
+ // synchronized, but we never modify the structure of the cache map then,
only now.
+ if (isCacheMissResolvedAsynchronously()) {
+
+ // Write an empty list into the cache
+ write(key, Collections.EMPTY_LIST, currentTime);
+
+ // Now start the asynchronous update
+ getAsyncUpdater().updateCacheAsynchronously(this, key);
+
+ } else {
+
+ // If we don't have it cached, the (probably first) caller needs to
wait (not asynchronous) until we are done
+ result = udpateCacheSynchronously(this, key);
+ write(key, result, currentTime);
+ }
+
+ } else {
+ log.debug("cache hit, checking age of cached entry");
+
+ // Check updateTimestamp of cached entry
+ if (currentTime - cacheKey.getUpdateTimestamp() >
(getUpdateTimeoutSeconds()*1000) ) {
+ log.debug("cached entry is older than maximum cache time,
refreshing...");
+
+ // Start asynchronous updating, might take a while - but should never
take longer than cache timeout!
+ getAsyncUpdater().updateCacheAsynchronously(this, cacheKey);
+
+ // Meanwhile, update the timestamp so that the next caller doesn't
also start asynchronous updating
+ // .. we expect to be finished with that before the next caller runs into
a cache timeout again!
+ cacheKey.setUpdateTimestamp(currentTime);
+
+ } else {
+ log.debug("cached entry is still inside maximum cache time");
+ }
+
+ // Read the value from the cache
+ result = read(cacheKey, currentTime);
+
+ }
+
+ // Remove anything with too old accessTimestamp
+ purge(currentTime);
+
+ return result;
+ }
+
+ protected void write(ConnectorCacheKey<K> key, List<T> list, long
currentTime) {
+ key.setUpdateTimestamp(currentTime);
+ key.setAccessTimestamp(currentTime);
+ cache.put(key, list);
+ }
+
+ protected List<T> read(ConnectorCacheKey<K> key, long currentTime) {
+ key.setAccessTimestamp(currentTime);
+ return cache.get(key);
+ }
+
+ protected void purge(long currentTime) {
+ Set<ConnectorCacheKey<K>> outdatedConnectorCacheKeys = new
HashSet<ConnectorCacheKey<K>>();
+ Set<ConnectorCacheKey<K>> keyset = cache.keySet();
+ for (ConnectorCacheKey key : keyset) {
+ if (currentTime - key.getAccessTimestamp() >
(getIdleTimeoutSeconds()*1000)) {
+ log.debug("removing old cache entry, last accessed: " +
key.getAccessTimestamp());
+ outdatedConnectorCacheKeys.add(key);
+ }
+ }
+ for (ConnectorCacheKey outdatedConnectorCacheKey : outdatedConnectorCacheKeys)
+ cache.remove(outdatedConnectorCacheKey);
+ }
+
+ protected ConnectorCacheAsyncUpdater<T, K> getAsyncUpdater() {
+ return (ConnectorCacheAsyncUpdater<T, K>)
Component.getInstance(getAsyncUpdaterClass());
+ };
+
+ private ConnectorCacheKey<K> findKey(ConnectorCacheKey<K> key) {
+ for (ConnectorCacheKey keyOfMap : cache.keySet()) {
+ if (keyOfMap.equals(key)) return keyOfMap;
+ }
+ return null;
+ }
+
+ protected abstract long getUpdateTimeoutSeconds();
+ protected abstract long getIdleTimeoutSeconds();
+ protected abstract Class<? extends ConnectorCacheAsyncUpdater<T, K>>
getAsyncUpdaterClass();
+ protected boolean isCacheMissResolvedAsynchronously() { return true; }
+ protected List<T> udpateCacheSynchronously(ConnectorCache<T, K> cache,
ConnectorCacheKey<K> key) {
+ return Collections.EMPTY_LIST;
+ };
+
+}
\ No newline at end of file
Added:
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
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.cache;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+import java.util.List;
+
+/**
+ * @author Christian Bauer
+ */
+(a)Scope(ScopeType.EVENT)
+public abstract class ConnectorCacheAsyncUpdater<T, K> {
+
+ @Logger
+ Log log;
+
+ protected void writeIntoCache(ConnectorCache<T, K> cache,
ConnectorCacheKey<K> key, List<T> result) {
+ log.debug("writing data into cache: " + 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
+ // modify the structure of the map.
+ cache.write(key, result, System.currentTimeMillis());
+ }
+
+ protected abstract void updateCacheAsynchronously(ConnectorCache<T, K> cache,
ConnectorCacheKey<K> key);
+
+}
+
Added:
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
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.cache;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+public class ConnectorCacheKey<K> implements Serializable {
+
+ private long accessTimestamp;
+ private long updateTimestamp;
+ private K keyValue;
+
+ public ConnectorCacheKey(K keyValue) {
+ this.keyValue = keyValue;
+ }
+
+ public long getAccessTimestamp() {
+ return accessTimestamp;
+ }
+
+ public void setAccessTimestamp(long accessTimestamp) {
+ this.accessTimestamp = accessTimestamp;
+ }
+
+ public long getUpdateTimestamp() {
+ return updateTimestamp;
+ }
+
+ public void setUpdateTimestamp(long updateTimestamp) {
+ this.updateTimestamp = updateTimestamp;
+ }
+
+ public K getKeyValue() {
+ return keyValue;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ ConnectorCacheKey that = (ConnectorCacheKey) o;
+
+ if (!keyValue.equals(that.keyValue)) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ return keyValue.hashCode();
+ }
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.jira;
+
+import org.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.log.Log;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Single-threaded component used for accessing a remote JIRA webservice.
+ * <p>
+ * Do NOT access this component without synchronizing multi-thread access!
+ * </p>
+ *
http://confluence.atlassian.com/pages/viewpage.action?pageId=1035
+ *
http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/c...
+ *
http://ws.apache.org/xmlrpc/apidocs/index.html?index-all.html
+ *
+ * @author Christian Bauer
+ */
+@Name("jiraConnector")
+@Roles(
+ @Role(name = "jiraIssueListConnector")
+)
+(a)Scope(ScopeType.APPLICATION)
+@AutoCreate
+public class JiraConnector implements JiraIssueListConnector {
+
+ private static final String RPC_PATH = "/rpc/xmlrpc";
+
+ @Logger
+ Log log;
+
+ @In("#{preferences.get('JiraConnector')}")
+ JiraConnectorPreferences prefs;
+
+ XmlRpcClient client = new XmlRpcClient();
+
+ private String connectAndLogin(String url, String username, String password) {
+ if (url.endsWith("/")) url = url.substring(0, url.length()-1);
+
+ try {
+ XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
+ config.setServerURL(new URL(url + RPC_PATH));
+ config.setConnectionTimeout(prefs.getConnectionTimeoutSeconds().intValue());
+ config.setReplyTimeout(prefs.getReplyTimeoutSeconds().intValue());
+
+ client = new XmlRpcClient();
+ client.setConfig(config);
+
+ List loginParams = new ArrayList(2);
+ loginParams.add(username);
+ loginParams.add(password);
+ return (String) client.execute("jira1.login", loginParams);
+
+ } catch (MalformedURLException urlEx) {
+ log.warn("URL is not valid: " + url);
+ return null;
+ } catch (Exception ex) {
+ log.error("couldn't connect to remote JIRA webservice: " + url
+ RPC_PATH, ex);
+ return null;
+ }
+ }
+
+ private boolean disconnectAndLogout(String loginToken) {
+ try {
+ return (Boolean) client.execute("jira1.logout",
wrapLoginToken(loginToken));
+ } catch (XmlRpcException rpcEx) {
+ log.error("could not logout from JIRA webservice", rpcEx);
+ }
+ return false;
+ }
+
+ private List wrapLoginToken(String loginToken) {
+ List loginTokenParam = new ArrayList(1);
+ loginTokenParam.add(loginToken);
+ return loginTokenParam;
+ }
+
+ public List<JiraIssue> getIssues(String url, String username, String password,
String filterId) {
+ try {
+ log.debug("getting issue list from remote JIRA webservice: " + url
+ " using filter: " + filterId);
+ String loginToken = connectAndLogin(url, username, password);
+ if (loginToken != null) {
+ log.debug("remote login successful, retrieving list");
+ List<String> params = new ArrayList<String>(2);
+ params.add(loginToken);
+ params.add(filterId);
+ Object[] result = (Object[])
client.execute("jira1.getIssuesFromFilter", params);
+
+ List<JiraIssue> issues = new ArrayList<JiraIssue>();
+ for (Object r : result) {
+ JiraIssue issue = JiraIssue.fromMap((Map)r);
+ log.trace("retrieved remote object: " + issue);
+ issues.add(issue);
+ }
+
+ disconnectAndLogout(loginToken);
+
+ return issues;
+ }
+ } catch (Exception ex) {
+ log.warn("exception while executing remote JIRA webservice
operation", ex);
+ return Collections.emptyList();
+ }
+ return Collections.EMPTY_LIST;
+ }
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.jira;
+
+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;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+
+@Preferences(name = "JiraConnector", description =
"#{messages['jiraConnector.preferences.Name']}")
+public class JiraConnectorPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraConnector.preferences.ConnectionTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM,
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 120l)
+ @NotNull
+ private Long connectionTimeoutSeconds;
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraConnector.preferences.ReplyTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM,
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 120l)
+ @NotNull
+ private Long replyTimeoutSeconds;
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraConnector.preferences.IssueListCacheUpdateTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM
+ )
+ @Range(min = 1l, max = 864000)
+ @NotNull
+ private Long issueListCacheUpdateTimeoutSeconds;
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraConnector.preferences.IssueListCacheIdleTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM
+ )
+ @Range(min = 1l, max = 864000)
+ @NotNull
+ private Long issueListCacheIdleTimeoutSeconds;
+
+ public Long getConnectionTimeoutSeconds() {
+ return connectionTimeoutSeconds;
+ }
+
+ public Long getReplyTimeoutSeconds() {
+ return replyTimeoutSeconds;
+ }
+
+ public Long getIssueListCacheUpdateTimeoutSeconds() {
+ return issueListCacheUpdateTimeoutSeconds;
+ }
+
+ public Long getIssueListCacheIdleTimeoutSeconds() {
+ return issueListCacheIdleTimeoutSeconds;
+ }
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferencesSupport.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferencesSupport.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferencesSupport.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -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.jira;
+
+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
+ */
+@Name("jiraConnectorPreferencesSupport")
+public class JiraConnectorPreferencesSupport extends PreferencesSupport {
+
+ public Set<PreferenceEntity> getPreferenceEntities() {
+ return new HashSet<PreferenceEntity>() {{
+ add( createPreferenceEntity(JiraConnectorPreferences.class) );
+ }};
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraDAO.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraDAO.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.jira;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.Component;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.annotations.*;
+
+import java.util.Collections;
+import java.util.List;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("jiraDAO")
+(a)Scope(ScopeType.CONVERSATION)
+@AutoCreate
+public class JiraDAO implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In("jiraIssueListCache")
+ JiraIssueListConnector jiraIssueListConnector;
+
+ public List<JiraIssue> getJiraIssues(String url, String username, String
password, String filterId, int numberOfIssues) {
+
+ try {
+ List<JiraIssue> issues = jiraIssueListConnector.getIssues(url,
username, password, filterId);
+ if (issues != null && issues.size() > numberOfIssues) {
+ return issues.subList(0, numberOfIssues);
+ } else if (issues != null) {
+ return issues;
+ }
+ } catch (IllegalStateException ex) {
+ log.warn("jiraIssueListCache was locked by another thread, returning
empty list");
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssue.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssue.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssue.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,203 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.jira;
+
+import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+import java.lang.reflect.Field;
+
+/**
+ * @author Christian Bauer
+ */
+public class JiraIssue {
+
+ private static Field[] fields = JiraIssue.class.getDeclaredFields();
+
+ private String id;
+ private String key;
+ private String project;
+ private String summary;
+ private String description;
+ private String created;
+ private String updated;
+ private String type;
+ private Object[] affectsVersions;
+ private Object[] fixVersions;
+ private String status;
+ private Object[] components;
+ private Object[] customFieldValues;
+ private String votes;
+ private String priority;
+
+ public static Field[] getFields() {
+ return fields;
+ }
+
+ public static void setFields(Field[] fields) {
+ JiraIssue.fields = fields;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getProject() {
+ return project;
+ }
+
+ public void setProject(String project) {
+ this.project = project;
+ }
+
+ public String getSummary() {
+ return summary;
+ }
+
+ public void setSummary(String summary) {
+ this.summary = summary;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getCreated() {
+ return created;
+ }
+
+ public void setCreated(String created) {
+ this.created = created;
+ }
+
+ public String getUpdated() {
+ return updated;
+ }
+
+ public void setUpdated(String updated) {
+ this.updated = updated;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public Object[] getAffectsVersions() {
+ return affectsVersions;
+ }
+
+ public void setAffectsVersions(Object[] affectsVersions) {
+ this.affectsVersions = affectsVersions;
+ }
+
+ public Object[] getFixVersions() {
+ return fixVersions;
+ }
+
+ public void setFixVersions(Object[] fixVersions) {
+ this.fixVersions = fixVersions;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public Object[] getComponents() {
+ return components;
+ }
+
+ public List<String> getComponentNames() {
+ List<String> componentNames = new ArrayList<String>();
+ for (Object o : getComponents()) {
+ String componentName = (String) ((Map)o).get("name");
+ componentNames.add(componentName);
+ }
+ return componentNames;
+ }
+
+ public void setComponents(Object[] components) {
+ this.components = components;
+ }
+
+ public Object[] getCustomFieldValues() {
+ return customFieldValues;
+ }
+
+ public void setCustomFieldValues(Object[] customFieldValues) {
+ this.customFieldValues = customFieldValues;
+ }
+
+ public String getVotes() {
+ return votes;
+ }
+
+ public void setVotes(String votes) {
+ this.votes = votes;
+ }
+
+ public String getPriority() {
+ return priority;
+ }
+
+ public void setPriority(String priority) {
+ this.priority = priority;
+ }
+
+ public String getPriorityIcon() {
+ int p = new Integer(getPriority());
+ switch (p) {
+ case 1: return "blocker";
+ case 2: return "critical";
+ case 3: return "major";
+ case 4: return "minor";
+ case 5: return "optional";
+ default: return "trivial";
+ }
+ }
+
+ public static JiraIssue fromMap(Map map) {
+ try {
+ JiraIssue issue = new JiraIssue();
+ for (Field field : fields) {
+ if (map.containsKey(field.getName())) {
+ field.set(issue, map.get(field.getName()));
+ }
+ }
+ return issue;
+ } catch (Exception ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ public String toString() {
+ return "JiraIssue (" + getKey() + "): " + getSummary();
+ }
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.jira;
+
+import org.jboss.seam.wiki.connectors.cache.ConnectorCache;
+import org.jboss.seam.wiki.connectors.cache.ConnectorCacheKey;
+import org.jboss.seam.wiki.connectors.cache.ConnectorCacheAsyncUpdater;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.async.Asynchronous;
+
+import java.util.List;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("jiraIssueListCache")
+@AutoCreate
+public class JiraIssueListCache
+ extends ConnectorCache<JiraIssue,
JiraIssueListCache.JiraIssueListCacheKey>
+ implements JiraIssueListConnector {
+
+ @In("#{preferences.get('JiraConnector')}")
+ JiraConnectorPreferences prefs;
+
+ public List<JiraIssue> getIssues(String url, String username, String password,
String filterId) {
+ JiraIssueListCacheKey newKey = new JiraIssueListCacheKey(url, username, password,
filterId);
+ return lookup( new ConnectorCacheKey<JiraIssueListCacheKey>(newKey));
+ }
+
+ protected long getUpdateTimeoutSeconds() {
+ return prefs.getIssueListCacheUpdateTimeoutSeconds();
+ }
+
+ protected long getIdleTimeoutSeconds() {
+ return prefs.getIssueListCacheIdleTimeoutSeconds();
+ }
+
+ protected Class<? extends ConnectorCacheAsyncUpdater<JiraIssue,
JiraIssueListCacheKey>> getAsyncUpdaterClass() {
+ return JiraIssueListCacheAsyncUpdater.class;
+ }
+
+ @Name("jiraIssueListCacheAsyncUpdater")
+ @AutoCreate
+ public static class JiraIssueListCacheAsyncUpdater
+ extends ConnectorCacheAsyncUpdater<JiraIssue, JiraIssueListCacheKey> {
+
+ @In
+ JiraIssueListConnector jiraIssueListConnector;
+
+ @Asynchronous
+ public void updateCacheAsynchronously(ConnectorCache<JiraIssue,
JiraIssueListCacheKey> cache,
+
ConnectorCacheKey<JiraIssueListCacheKey> key) {
+ List<JiraIssue> result =
+ jiraIssueListConnector.getIssues(
+ key.getKeyValue().getUrl(),
+ key.getKeyValue().getUsername(),
+ key.getKeyValue().getPassword(),
+ key.getKeyValue().getFilterId()
+ );
+ super.writeIntoCache(cache, key, result);
+ }
+
+ }
+
+ public static class JiraIssueListCacheKey implements Serializable {
+ private String url;
+ private String username;
+ private String password;
+ private String filterId;
+
+ public JiraIssueListCacheKey(String url, String username, String password, String
filterId) {
+ this.url = url;
+ this.username = username;
+ this.password = password;
+ this.filterId = filterId;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public String getFilterId() {
+ return filterId;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ JiraIssueListCacheKey that = (JiraIssueListCacheKey ) o;
+
+ if (!filterId.equals(that.filterId)) return false;
+ if (!password.equals(that.password)) return false;
+ if (!url.equals(that.url)) return false;
+ if (!username.equals(that.username)) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result;
+ result = url.hashCode();
+ result = 31 * result + username.hashCode();
+ result = 31 * result + password.hashCode();
+ result = 31 * result + filterId.hashCode();
+ return result;
+ }
+ }
+
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListConnector.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListConnector.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListConnector.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,18 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.jira;
+
+import java.util.List;
+
+/**
+ * @author Christian Bauer
+ */
+public interface JiraIssueListConnector {
+
+ public List<JiraIssue> getIssues(String url, String username, String password,
String filterId);
+
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.jiraIssueList;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.connectors.jira.JiraIssue;
+import org.jboss.seam.wiki.connectors.jira.JiraDAO;
+
+import java.util.List;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("jiraIssueList")
+(a)Scope(ScopeType.PAGE)
+public class JiraIssueList implements Serializable {
+
+ @In("#{preferences.get('JiraIssueList', currentMacro)}")
+ JiraIssueListPreferences prefs;
+
+ @In
+ JiraDAO jiraDAO;
+
+ private List<JiraIssue> issues;
+
+ public List<JiraIssue> getIssues() {
+ if (issues == null) loadIssues();
+ return issues;
+ }
+
+ @Observer(value = "Macro.render.jiraIssueList", create = false)
+ public void loadIssues() {
+
+ if (prefs.getUrl() != null && prefs.getUrl().length() > 0
+ && prefs.getFilterId() != null &&
prefs.getFilterId().length() > 0) {
+
+ Integer maxResults = Integer.MAX_VALUE;
+ if (prefs.getNumberOfIssues() != null) {
+ maxResults = prefs.getNumberOfIssues().intValue();
+ }
+
+ issues = jiraDAO.getJiraIssues(prefs.getUrl(), prefs.getUsername(),
prefs.getPassword(), prefs.getFilterId(), maxResults);
+ }
+
+ }
+}
Added:
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
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -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.plugin.jiraIssueList;
+
+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.NotNull;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Range;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(name = "JiraIssueList", description =
"#{messages['jiraIssueList.preferences.Name']}")
+public class JiraIssueListPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraIssueList.preferences.Title']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ @NotNull
+ private String title;
+
+ @PreferenceProperty(
+ description = "#{messages['jiraIssueList.preferences.Url']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String url;
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraIssueList.preferences.Username']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String username;
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraIssueList.preferences.FilterId']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String password;
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraIssueList.preferences.Password']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 50)
+ private String filterId;
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraIssueList.preferences.NumberOfIssues']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 3l, max = 99l)
+ @NotNull
+ private Long numberOfIssues;
+
+ @PreferenceProperty(
+ description =
"#{messages['jiraIssueList.preferences.TruncateSummary']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 10l, max = 5000l)
+ @NotNull
+ private Long truncateSummary;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public String getFilterId() {
+ return filterId;
+ }
+
+ public Long getNumberOfIssues() {
+ return numberOfIssues;
+ }
+
+ public Long getTruncateSummary() {
+ return truncateSummary;
+ }
+}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferencesSupport.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferencesSupport.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferencesSupport.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -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.jiraIssueList;
+
+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
+ */
+@Name("jiraIssueListPreferencesSupport")
+public class JiraIssueListPreferencesSupport extends PreferencesSupport {
+
+ public Set<PreferenceEntity> getPreferenceEntities() {
+ return new HashSet<PreferenceEntity>() {{
+ add( createPreferenceEntity(JiraIssueListPreferences.class) );
+ }};
+ }
+}
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
12:25:45 UTC (rev 7166)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-01-21
13:02:48 UTC (rev 7167)
@@ -65,7 +65,16 @@
<PREFERENCE PREF_ID = "180" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Forum" PROPERTY_NAME =
"topicsPerPage" STRING_VALUE = "[NULL]" LONG_VALUE = "20"
BOOLEAN_VALUE = "[NULL]"/>
+ <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]"/>
+ <!-- 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]"/>
+ <PREFERENCE PREF_ID = "301" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "JiraConnector" PROPERTY_NAME =
"replyTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE =
"10" BOOLEAN_VALUE = "[NULL]"/>
+ <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]"/>
+
<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"/>
@@ -261,9 +270,9 @@
<WIKI_FILE
NODE_ID="9" FILE_REVISION="0"/>
<WIKI_DOCUMENT
- NODE_ID="9" CONTENT="Testdocument Four"
+ NODE_ID="9" CONTENT="Testdocument
Four

[<=jiraIssueList[url=http://jira.jboss.com/j...
HEADER="[NULL]" FOOTER="[NULL]"
- HEADER_MACROS="[NULL]" CONTENT_MACROS="[NULL]"
FOOTER_MACROS="[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/JiraConnector.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java
(rev 0)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java 2008-01-21
13:02:48 UTC (rev 7167)
@@ -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 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;
+ }
+ }
+
+}
Added: trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml
(rev 0)
+++ trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml 2008-01-21 13:02:48 UTC
(rev 7167)
@@ -0,0 +1,60 @@
+<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="jiraIssueList box">
+
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{preferences.get('JiraIssueList',
currentMacro).title}"/>
+ </s:div>
+
+ <div class="boxContent">
+
+ <h:dataTable value="#{jiraIssueList.issues}" var="i"
+ rendered="#{not empty jiraIssueList.issues and
jiraIssueList.issues.size() > 0}"
+ styleClass="datatable jiraIssueListTable"
+ columnClasses="onePercentColumn alignCenter
priorityColumn,
+ defaultColumn alignLeft summaryColumn,
+ tenPercentColumn alignLeft rightBorder
componentsColumn"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0"
border="0">
+
+ <h:column>
+ <h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/icon.priority.#{i.priorityIcon}.gif"
width="18" height="18"/>
+ </h:column>
+
+ <h:column>
+ <h:outputLink
value="#{preferences.get('JiraIssueList',
currentMacro).url}/browse/#{i.key}">
+ <h:outputText
+ value="#{wiki:truncateString(i.summary,
preferences.get('JiraIssueList', currentMacro).truncateSummary,
'...')}"/>
+ </h:outputLink>
+ </h:column>
+
+ <h:column>
+ <ui:repeat var="comp"
value="#{i.componentNames}">
+ <h:outputText value="#{comp}"/>
+ <h:outputText rendered="#{i.componentNames.indexOf(comp)
< i.componentNames.size()-1}"
+ value=",  "/>
+ </ui:repeat>
+ </h:column>
+
+
+ </h:dataTable>
+
+ </div>
+
+ <s:div styleClass="jiraIssueListEmpty"
+ rendered="#{empty jiraIssueList.issues or jiraIssueList.issues.size()
== 0}">
+ <h:outputText
value="#{messages['jiraIssueList.label.NoIssuesFound']}"/>
+ </s:div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+</wiki:plugin>
\ No newline at end of file
Added: trunk/examples/wiki/view/themes/default/css/jiraIssueList.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/jiraIssueList.css
(rev 0)
+++ trunk/examples/wiki/view/themes/default/css/jiraIssueList.css 2008-01-21 13:02:48 UTC
(rev 7167)
@@ -0,0 +1,15 @@
+.jiraIssueList {}
+
+.jiraIssueListTable {}
+
+.jiraIssueListTable .priorityColumn {}
+
+.jiraIssueListTable .summaryColumn {}
+
+.jiraIssueListTable .componentsColumn {}
+
+.jiraIssueListEmpty {
+ padding: 5px;
+}
+
+
Added: trunk/examples/wiki/view/themes/default/img/icon.priority.blocker.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/examples/wiki/view/themes/default/img/icon.priority.blocker.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/default/img/icon.priority.critical.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/examples/wiki/view/themes/default/img/icon.priority.critical.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/default/img/icon.priority.major.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/default/img/icon.priority.major.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/default/img/icon.priority.minor.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/default/img/icon.priority.minor.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/default/img/icon.priority.optional.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/examples/wiki/view/themes/default/img/icon.priority.optional.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/default/img/icon.priority.trivial.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/examples/wiki/view/themes/default/img/icon.priority.trivial.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css
(rev 0)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css 2008-01-21 13:02:48 UTC
(rev 7167)
@@ -0,0 +1,17 @@
+.jiraIssueList {}
+
+.jiraIssueListTable {}
+
+.jiraIssueListTable .priorityColumn {}
+
+.jiraIssueListTable .summaryColumn {}
+
+.jiraIssueListTable .componentsColumn {}
+
+.jiraIssueListEmpty {
+ border-left: 1px solid #d3d2d1;
+ border-right: 1px solid #d3d2d1;
+ padding: 5px;
+}
+
+
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.blocker.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.blocker.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.critical.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.critical.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.major.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.major.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.minor.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.minor.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.optional.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.optional.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.trivial.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.trivial.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream