Seam SVN: r7174 - in trunk/ui/src/main/java/org/jboss/seam/ui: renderkit and 1 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-01-22 00:19:57 -0500 (Tue, 22 Jan 2008)
New Revision: 7174
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/component/html/HtmlLoadStyle.java
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/CommandButtonParameterRendererBase.java
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/DecorateRendererBase.java
trunk/ui/src/main/java/org/jboss/seam/ui/util/UrlBuilder.java
Log:
compiler warnings, imports
Modified: trunk/ui/src/main/java/…
[View More]org/jboss/seam/ui/component/html/HtmlLoadStyle.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/component/html/HtmlLoadStyle.java 2008-01-22 05:19:02 UTC (rev 7173)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/component/html/HtmlLoadStyle.java 2008-01-22 05:19:57 UTC (rev 7174)
@@ -40,7 +40,7 @@
* If isolated, any references to html ids will be resolved only within
this naming container
* Setter for isolated
- * @param isolated - new value
+ * @param __isolated - new value
*/
public void setIsolated( boolean __isolated ){
this._isolated = __isolated;
@@ -73,6 +73,7 @@
// Component family.
public static final String COMPONENT_FAMILY = "org.ajax4jsf.LoadStyle";
+ @Override
public String getFamily() {
return COMPONENT_FAMILY;
}
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/CommandButtonParameterRendererBase.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/CommandButtonParameterRendererBase.java 2008-01-22 05:19:02 UTC (rev 7173)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/CommandButtonParameterRendererBase.java 2008-01-22 05:19:57 UTC (rev 7174)
@@ -16,7 +16,6 @@
import javax.faces.context.ResponseWriter;
import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.ui.component.UIConversationPropagation;
import org.jboss.seam.ui.util.cdk.RendererBase;
/**
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/DecorateRendererBase.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/DecorateRendererBase.java 2008-01-22 05:19:02 UTC (rev 7173)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/DecorateRendererBase.java 2008-01-22 05:19:57 UTC (rev 7174)
@@ -10,7 +10,6 @@
import org.jboss.seam.ui.component.UIDecorate;
import org.jboss.seam.ui.util.Decoration;
import org.jboss.seam.ui.util.HTML;
-import org.jboss.seam.ui.util.JSF;
import org.jboss.seam.ui.util.cdk.RendererBase;
public class DecorateRendererBase extends RendererBase
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/util/UrlBuilder.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/util/UrlBuilder.java 2008-01-22 05:19:02 UTC (rev 7173)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/util/UrlBuilder.java 2008-01-22 05:19:57 UTC (rev 7174)
@@ -9,6 +9,8 @@
public class UrlBuilder
{
+ private static final String URL_ENCODING = "UTF-8";
+
private String url;
private String fragment;
@@ -40,7 +42,7 @@
protected String urlEncode(String value) throws UnsupportedEncodingException
{
- return characterEncoding == null ? URLEncoder.encode(value) : URLEncoder.encode(value,
+ return characterEncoding == null ? URLEncoder.encode(value, URL_ENCODING) : URLEncoder.encode(value,
characterEncoding);
}
[View Less]
17 years, 1 month
Seam SVN: r7173 - in trunk/src: main/org/jboss/seam/core and 10 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-01-22 00:19:02 -0500 (Tue, 22 Jan 2008)
New Revision: 7173
Modified:
trunk/src/ioc/org/jboss/seam/ioc/spring/SpringTransaction.java
trunk/src/main/org/jboss/seam/core/Init.java
trunk/src/main/org/jboss/seam/framework/Query.java
trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
trunk/src/main/org/jboss/seam/mock/DBUnitSeamTest.java
trunk/src/main/org/jboss/seam/navigation/ConversationControl.java
trunk/src/main/org/jboss/…
[View More]seam/security/RuleBasedIdentity.java
trunk/src/main/org/jboss/seam/util/Base64.java
trunk/src/pdf/org/jboss/seam/pdf/DocumentStore.java
trunk/src/pdf/org/jboss/seam/pdf/ui/UIHtmlText.java
trunk/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java
trunk/src/test/unit/org/jboss/seam/test/unit/web/MultipartRequestTest.java
Log:
compiler warnings, imports
Modified: trunk/src/ioc/org/jboss/seam/ioc/spring/SpringTransaction.java
===================================================================
--- trunk/src/ioc/org/jboss/seam/ioc/spring/SpringTransaction.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/ioc/org/jboss/seam/ioc/spring/SpringTransaction.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -22,12 +22,8 @@
import org.jboss.seam.log.Logging;
import org.jboss.seam.transaction.AbstractUserTransaction;
import org.springframework.orm.jpa.JpaTransactionManager;
-import org.springframework.transaction.HeuristicCompletionException;
import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.TransactionException;
import org.springframework.transaction.TransactionStatus;
-import org.springframework.transaction.TransactionSystemException;
-import org.springframework.transaction.UnexpectedRollbackException;
import org.springframework.transaction.support.DefaultTransactionDefinition;
import org.springframework.transaction.support.TransactionSynchronizationAdapter;
import org.springframework.transaction.support.TransactionSynchronizationManager;
Modified: trunk/src/main/org/jboss/seam/core/Init.java
===================================================================
--- trunk/src/main/org/jboss/seam/core/Init.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/main/org/jboss/seam/core/Init.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -8,7 +8,6 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
Modified: trunk/src/main/org/jboss/seam/framework/Query.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/Query.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/main/org/jboss/seam/framework/Query.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -257,7 +257,7 @@
/**
* Return the ejbql to used in a count query (for calculating number of
* results)
- * @return
+ * @return String The ejbql query
*/
protected String getCountEjbql()
{
Modified: trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -26,9 +26,7 @@
import org.jboss.seam.contexts.Context;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.core.ConversationList;
import org.jboss.seam.core.ConversationPropagation;
-import org.jboss.seam.core.ConversationStack;
import org.jboss.seam.core.Events;
import org.jboss.seam.core.Init;
import org.jboss.seam.core.Manager;
Modified: trunk/src/main/org/jboss/seam/mock/DBUnitSeamTest.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/DBUnitSeamTest.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/main/org/jboss/seam/mock/DBUnitSeamTest.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -190,6 +190,7 @@
}
}
+ @Override
public String toString() {
// TODO: This is not pretty because DBUnit's DatabaseOperation doesn't implement toString() properly
return operation.getClass() + " with dataset: " + dataSetLocation;
@@ -268,6 +269,7 @@
// TODO: DBUnit/HSQL bugfix
// http://www.carbonfive.com/community/archives/2005/07/dbunit_hsql_and.html
config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new DefaultDataTypeFactory() {
+ @Override
public DataType createDataType(int sqlType, String sqlTypeName)
throws DataTypeException {
if (sqlType == Types.BOOLEAN) {
Modified: trunk/src/main/org/jboss/seam/navigation/ConversationControl.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/ConversationControl.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/main/org/jboss/seam/navigation/ConversationControl.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -3,7 +3,6 @@
import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.ConversationEntries;
import org.jboss.seam.core.ConversationEntry;
-import org.jboss.seam.core.Manager;
import org.jboss.seam.core.Expressions.ValueExpression;
import org.jboss.seam.pageflow.Pageflow;
/**
Modified: trunk/src/main/org/jboss/seam/security/RuleBasedIdentity.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/RuleBasedIdentity.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/main/org/jboss/seam/security/RuleBasedIdentity.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -11,8 +11,6 @@
import java.util.Iterator;
import java.util.List;
-import javax.security.auth.Subject;
-
import org.drools.FactHandle;
import org.drools.RuleBase;
import org.drools.StatefulSession;
@@ -240,7 +238,6 @@
Role r = iter.next();
if (r.getName().equals(role.getName()))
{
- FactHandle fh = getSecurityContext().getFactHandle(r);
found = true;
break;
}
Modified: trunk/src/main/org/jboss/seam/util/Base64.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Base64.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/main/org/jboss/seam/util/Base64.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -551,7 +551,7 @@
// Isolate options
int gzip = (options & GZIP);
- int dontBreakLines = (options & DONT_BREAK_LINES);
+ //int dontBreakLines = (options & DONT_BREAK_LINES);
try
{
@@ -975,7 +975,7 @@
if( bytes != null && bytes.length >= 4 )
{
- int head = ((int)bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
+ int head = (bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
if( java.util.zip.GZIPInputStream.GZIP_MAGIC == head )
{
java.io.ByteArrayInputStream bais = null;
@@ -1310,7 +1310,7 @@
private int lineLength;
private boolean breakLines; // Break lines at less than 80 characters
private int options; // Record options used to create the stream.
- private byte[] alphabet; // Local copies to avoid extra method calls
+ //private byte[] alphabet; // Local copies to avoid extra method calls
private byte[] decodabet; // Local copies to avoid extra method calls
@@ -1357,7 +1357,7 @@
this.position = -1;
this.lineLength = 0;
this.options = options; // Record for later, mostly to determine which alphabet to use
- this.alphabet = getAlphabet(options);
+ //this.alphabet = getAlphabet(options);
this.decodabet = getDecodabet(options);
} // end constructor
@@ -1368,6 +1368,7 @@
* @return next byte
* @since 1.3
*/
+ @Override
public int read() throws java.io.IOException
{
// Do we need to get data?
@@ -1496,6 +1497,7 @@
* @return bytes read into array or -1 if end of stream is encountered.
* @since 1.3
*/
+ @Override
public int read( byte[] dest, int off, int len ) throws java.io.IOException
{
int i;
@@ -1547,7 +1549,7 @@
private byte[] b4; // Scratch used in a few places
private boolean suspendEncoding;
private int options; // Record for later
- private byte[] alphabet; // Local copies to avoid extra method calls
+ //private byte[] alphabet; // Local copies to avoid extra method calls
private byte[] decodabet; // Local copies to avoid extra method calls
/**
@@ -1594,7 +1596,7 @@
this.suspendEncoding = false;
this.b4 = new byte[4];
this.options = options;
- this.alphabet = getAlphabet(options);
+ //this.alphabet = getAlphabet(options);
this.decodabet = getDecodabet(options);
} // end constructor
@@ -1611,6 +1613,7 @@
* @param theByte the byte to write
* @since 1.3
*/
+ @Override
public void write(int theByte) throws java.io.IOException
{
// Encoding suspended?
@@ -1672,6 +1675,7 @@
* @param len max number of bytes to read into array
* @since 1.3
*/
+ @Override
public void write( byte[] theBytes, int off, int len ) throws java.io.IOException
{
// Encoding suspended?
Modified: trunk/src/pdf/org/jboss/seam/pdf/DocumentStore.java
===================================================================
--- trunk/src/pdf/org/jboss/seam/pdf/DocumentStore.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/pdf/org/jboss/seam/pdf/DocumentStore.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -12,7 +12,6 @@
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.pdf.DocumentData.DocumentType;
import org.jboss.seam.ui.util.Faces;
@Name("org.jboss.seam.pdf.documentStore")
Modified: trunk/src/pdf/org/jboss/seam/pdf/ui/UIHtmlText.java
===================================================================
--- trunk/src/pdf/org/jboss/seam/pdf/ui/UIHtmlText.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/pdf/org/jboss/seam/pdf/ui/UIHtmlText.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -3,7 +3,6 @@
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
-import java.util.List;
import javax.faces.FacesException;
import javax.faces.component.ValueHolder;
@@ -13,7 +12,6 @@
import org.jboss.seam.ui.util.JSF;
-import com.lowagie.text.Element;
import com.lowagie.text.Paragraph;
import com.lowagie.text.html.simpleparser.HTMLWorker;
import com.lowagie.text.html.simpleparser.StyleSheet;
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/InterpolatorTest.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -1,7 +1,6 @@
package org.jboss.seam.test.unit;
import java.text.DateFormat;
-import java.text.SimpleDateFormat;
import java.util.Date;
import org.jboss.seam.core.Interpolator;
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/web/MultipartRequestTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/web/MultipartRequestTest.java 2008-01-22 01:53:26 UTC (rev 7172)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/web/MultipartRequestTest.java 2008-01-22 05:19:02 UTC (rev 7173)
@@ -2,7 +2,6 @@
import java.io.IOException;
import java.io.InputStream;
-import java.util.Enumeration;
import java.util.HashSet;
import javax.servlet.FilterChain;
[View Less]
17 years, 1 month
Seam SVN: r7172 - trunk/build.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-21 20:53:26 -0500 (Mon, 21 Jan 2008)
New Revision: 7172
Modified:
trunk/build/build.properties
Log:
minor
Modified: trunk/build/build.properties
===================================================================
--- trunk/build/build.properties 2008-01-22 01:52:52 UTC (rev 7171)
+++ trunk/build/build.properties 2008-01-22 01:53:26 UTC (rev 7172)
@@ -1,4 +1,6 @@
-offline.repository.jboss.org /Users/pmuir/workspace/maven2.repository.jboss.org
-…
[View More]embedded.poms.dir /Users/pmuir/workspace/jboss-seam/build/embedded
+offline.repository.jboss.org /Users/pmuir/workspace/repository.jboss.org/maven2
+embedded.poms.dir /Users/pmuir/workspace/seam/build/embedded
embedded.dir /Users/pmuir/workspace/jbossas/embedded
-embedded.version beta3-SNAPSHOT
\ No newline at end of file
+#embedded.jars.dir /Users/pmuir/tmp/embedded-jboss-beta3/lib
+#�embedded.dist.zip /Users/pmuir/Desktop/downloads/embedded-jboss-beta3.zip
+embedded.version beta3
\ No newline at end of file
[View Less]
17 years, 1 month
Seam SVN: r7171 - in trunk/build: embedded and 1 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-21 20:52:52 -0500 (Mon, 21 Jan 2008)
New Revision: 7171
Modified:
trunk/build/common.build.xml
trunk/build/embedded/build.xml
trunk/build/embedded/hibernate-all.pom.xml
trunk/build/embedded/jboss-embedded-all.pom.xml
trunk/build/embedded/jboss-embedded.pom.xml
trunk/build/embedded/shaded/hibernate-all.pom.xml
trunk/build/embedded/shaded/jboss-embedded-all.pom.xml
trunk/build/embedded/shaded/jboss-embedded.pom.xml
trunk/…
[View More]build/embedded/shaded/thirdparty-all.pom.xml
trunk/build/embedded/thirdparty-all.pom.xml
trunk/build/root.pom.xml
Log:
JBSEAM-2349 - upgrade to embedded beta3
Modified: trunk/build/common.build.xml
===================================================================
--- trunk/build/common.build.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/common.build.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -19,7 +19,7 @@
<property name="lib.dir" value="${seam.dir}/lib" />
<property name="endorsed.dir" value="${tmp.dir}/endorsed" />
- <property name="embedded.version" value="beta3-SNAPSHOT" />
+ <property name="embedded.version" value="beta3" />
<import file="${build.dir}/utilities.build.xml" />
Modified: trunk/build/embedded/build.xml
===================================================================
--- trunk/build/embedded/build.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/build.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -14,6 +14,7 @@
<property name="shaded.embedded.jars.dir" value="${tmp.dir}/embedded"/>
<property name="embedded.jars.dir" value="${embedded.dir}/output/lib/embedded-jboss/lib" />
+ <property name="embedded.dist.zip" value="${embedded.dir}/embedded-jboss-${embedded.version}.zip" />
<artifact:remoteRepository id="snapshots.jboss.org" url="dav:https://snapshots.jboss.org/maven2" />
<artifact:remoteRepository id="offline.repository.jboss.org" url="file:///${offline.repository.jboss.org}" />
@@ -78,5 +79,17 @@
<authentication username="${username}" password="${password}" />
</deploy>
</target>
+
+ <target name="deployEmbeddedRelease" depends="initdav, shadeEmbedded">
+ <echo>Using Jars from ${embedded.jars.dir}</echo>
+ <deploy pom="${embedded.poms.dir}/shaded/jboss-embedded.pom.xml" jar="${shaded.embedded.jars.dir}/jboss-embedded.jar" repositoryId="offline.repository.jboss.org" unique="false"/>
+ <deploy pom="${embedded.poms.dir}/shaded/jboss-embedded-all.pom.xml" jar="${shaded.embedded.jars.dir}/jboss-embedded-all.jar" repositoryId="offline.repository.jboss.org" unique="false"/>
+ <deploy pom="${embedded.poms.dir}/shaded/hibernate-all.pom.xml" jar="${shaded.embedded.jars.dir}/hibernate-all.jar" repositoryId="offline.repository.jboss.org" unique="false"/>
+ <deploy pom="${embedded.poms.dir}/shaded/thirdparty-all.pom.xml" jar="${shaded.embedded.jars.dir}/thirdparty-all.jar" repositoryId="offline.repository.jboss.org" unique="false"/>
+ <deployWithAttachment pom="${embedded.poms.dir}/jboss-embedded.pom.xml" jar="${embedded.jars.dir}/jboss-embedded.jar" repositoryId="offline.repository.jboss.org" attachment="${embedded.dist.zip}" unique="false"/>
+ <deploy pom="${embedded.poms.dir}/jboss-embedded-all.pom.xml" jar="${embedded.jars.dir}/jboss-embedded-all.jar" repositoryId="offline.repository.jboss.org" unique="false"/>
+ <deploy pom="${embedded.poms.dir}/hibernate-all.pom.xml" jar="${embedded.jars.dir}/hibernate-all.jar" repositoryId="offline.repository.jboss.org" unique="false"/>
+ <deploy pom="${embedded.poms.dir}/thirdparty-all.pom.xml" jar="${embedded.jars.dir}/thirdparty-all.jar" repositoryId="offline.repository.jboss.org" unique="false"/>
+ </target>
</project>
\ No newline at end of file
Modified: trunk/build/embedded/hibernate-all.pom.xml
===================================================================
--- trunk/build/embedded/hibernate-all.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/hibernate-all.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.embedded</groupId>
<artifactId>hibernate-all</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
<description>The hibernate-all.jar distributed with JBoss Embedded. This contains Hibernate
for running in an EJB3 enviroment (Hibernate, Hibernate Annotations, Hibernate EntityManager, Hibernate Validator, Hibernate Commons Annotations)</description>
</project>
Modified: trunk/build/embedded/jboss-embedded-all.pom.xml
===================================================================
--- trunk/build/embedded/jboss-embedded-all.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/jboss-embedded-all.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.embedded</groupId>
<artifactId>jboss-embedded-all</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
<description>The jboss-embedded-all.jar distributed with JBoss Embedded. This contains all depdencies
from JBoss AS that originate in JBoss. This jar has has the org.jboss.embedded packages split out.</description>
Modified: trunk/build/embedded/jboss-embedded.pom.xml
===================================================================
--- trunk/build/embedded/jboss-embedded.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/jboss-embedded.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.embedded</groupId>
<artifactId>jboss-embedded</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
<description>This jar has the org.jboss.embedded packages split out from jboss-embedded-all.</description>
<dependencies>
Modified: trunk/build/embedded/shaded/hibernate-all.pom.xml
===================================================================
--- trunk/build/embedded/shaded/hibernate-all.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/shaded/hibernate-all.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.seam.embedded</groupId>
<artifactId>hibernate-all</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
<description>The hibernate-all.jar distributed with JBoss Embedded. This contains Hibernate
for running in an EJB3 enviroment (Hibernate, Hibernate Annotations, Hibernate EntityManager, Hibernate Validator, Hibernate Commons Annotations) and Hibernate Search (specific to this seam version of hibernate-all)</description>
</project>
Modified: trunk/build/embedded/shaded/jboss-embedded-all.pom.xml
===================================================================
--- trunk/build/embedded/shaded/jboss-embedded-all.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/shaded/jboss-embedded-all.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.seam.embedded</groupId>
<artifactId>jboss-embedded-all</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
<description>The jboss-embedded-all.jar distributed with JBoss Embedded. This contains all depdencies
from JBoss AS that originate in JBoss. This jar has has the org.jboss.embedded packages split out.</description>
Modified: trunk/build/embedded/shaded/jboss-embedded.pom.xml
===================================================================
--- trunk/build/embedded/shaded/jboss-embedded.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/shaded/jboss-embedded.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.seam.embedded</groupId>
<artifactId>jboss-embedded-api</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
<description>This jar has the org.jboss.embedded packages split out from jboss-embedded-all. This Seam specific version simply keeps the old jboss-embedded-api name for tooling compatibility</description>
<dependencies>
Modified: trunk/build/embedded/shaded/thirdparty-all.pom.xml
===================================================================
--- trunk/build/embedded/shaded/thirdparty-all.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/shaded/thirdparty-all.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.seam.embedded</groupId>
<artifactId>thirdparty-all</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
<description>The thirdparty-all.jar distributed with JBoss Embedded. This contains thirdparty
dependencies distributed with JBoss AS. This Seam version also includes lucene, a dependency
of hibernate search</description>
Modified: trunk/build/embedded/thirdparty-all.pom.xml
===================================================================
--- trunk/build/embedded/thirdparty-all.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/embedded/thirdparty-all.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.embedded</groupId>
<artifactId>thirdparty-all</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
<description>The thirdparty-all.jar distributed with JBoss Embedded. This contains thirdparty
dependencies distributed with JBoss AS.</description>
</project>
Modified: trunk/build/root.pom.xml
===================================================================
--- trunk/build/root.pom.xml 2008-01-22 00:45:29 UTC (rev 7170)
+++ trunk/build/root.pom.xml 2008-01-22 01:52:52 UTC (rev 7171)
@@ -657,14 +657,8 @@
<dependency>
<groupId>org.jboss.seam.embedded</groupId>
<artifactId>jboss-embedded-api</artifactId>
- <version>beta3-SNAPSHOT</version>
+ <version>beta3</version>
</dependency>
-
- <dependency>
- <groupId>org.jboss.embedded</groupId>
- <artifactId>jboss-embedded-api</artifactId>
- <version>beta2</version>
- </dependency>
<dependency>
<groupId>quartz</groupId>
[View Less]
17 years, 1 month
Seam SVN: r7170 - in trunk/examples/seamspace: src/org/jboss/seam/example/seamspace and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-01-21 19:45:29 -0500 (Mon, 21 Jan 2008)
New Revision: 7170
Removed:
trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogLocal.java
Modified:
trunk/examples/seamspace/resources/WEB-INF/pages.xml
trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java
Log:
replaced request parameters with page parameters
Modified: trunk/examples/seamspace/resources/WEB-INF/pages.xml
==========================================…
[View More]=========================
--- trunk/examples/seamspace/resources/WEB-INF/pages.xml 2008-01-21 23:49:10 UTC (rev 7169)
+++ trunk/examples/seamspace/resources/WEB-INF/pages.xml 2008-01-22 00:45:29 UTC (rev 7170)
@@ -19,8 +19,8 @@
<page view-id="/comment.xhtml" login-required="true">
<restrict/>
- <param name="name" value="#{selectedMember.memberName}"/>
- <param name="blogId" value="#{selectedBlog.blogId}"/>
+ <param name="name" value="#{blog.name}"/>
+ <param name="blogId" value="#{blog.blogId}"/>
<navigation from-action="#{blog.saveComment}">
<redirect view-id="/blogentry.xhtml"/>
@@ -57,6 +57,8 @@
</page>
<page view-id="/blogentry.xhtml">
+ <param name="name" value="#{blog.name}"/>
+ <param name="blogId" value="#{blog.blogId}"/>
</page>
Modified: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java 2008-01-21 23:49:10 UTC (rev 7169)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java 2008-01-22 00:45:29 UTC (rev 7170)
@@ -5,37 +5,28 @@
import java.util.ArrayList;
import java.util.Date;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
-import org.jboss.seam.annotations.web.RequestParameter;
+import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.security.Restrict;
-@Stateful
+@Scope(CONVERSATION)
@Name("blog")
-public class BlogAction implements BlogLocal
+public class BlogAction
{
- @RequestParameter
private String name;
-
- @RequestParameter
private Integer blogId;
@In
private EntityManager entityManager;
- @In(required = false)
- Member selectedMember;
-
@In(required = false) @Out(required = false)
private MemberBlog selectedBlog;
@@ -102,6 +93,23 @@
entityManager.persist(selectedBlog);
}
- @Remove @Destroy
- public void destroy() { }
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Integer getBlogId()
+ {
+ return blogId;
+ }
+
+ public void setBlogId(Integer blogId)
+ {
+ this.blogId = blogId;
+ }
}
Deleted: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogLocal.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogLocal.java 2008-01-21 23:49:10 UTC (rev 7169)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogLocal.java 2008-01-22 00:45:29 UTC (rev 7170)
@@ -1,17 +0,0 @@
-package org.jboss.seam.example.seamspace;
-
-import javax.ejb.Local;
-
-@Local
-public interface BlogLocal
-{
- void getBlog();
-
- void createComment();
- void saveComment();
-
- void createEntry();
- void saveEntry();
-
- void destroy();
-}
[View Less]
17 years, 1 month
Seam SVN: r7169 - trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-01-21 18:49:10 -0500 (Mon, 21 Jan 2008)
New Revision: 7169
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
Log:
Fix possible non-threadsafe map access, async updater might write after purge
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/…
[View More]seam/wiki/connectors/cache/ConnectorCache.java 2008-01-21 23:38:47 UTC (rev 7168)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java 2008-01-21 23:49:10 UTC (rev 7169)
@@ -70,6 +70,7 @@
// 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.setAccessTimestamp(currentTime);
cacheKey.setUpdateTimestamp(currentTime);
} else {
[View Less]
17 years, 1 month
Seam SVN: r7168 - in trunk/examples/wiki: src/etc and 19 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-01-21 18:38:47 -0500 (Mon, 21 Jan 2008)
New Revision: 7168
Added:
trunk/examples/wiki/src/etc/messages_feedAggregator_en.properties
trunk/examples/wiki/src/etc/messages_feedConnector_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java
…
[View More] trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java
trunk/examples/wiki/view/plugins/feedAggregator/
trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
trunk/examples/wiki/view/themes/default/css/feedAggregator.css
trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css
Removed:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java
Modified:
trunk/examples/wiki/Wiki.iml
trunk/examples/wiki/Wiki.iws
trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml
trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css
trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
Log:
JBSEAM-2451 - Feed aggregator connector and plugin
Modified: trunk/examples/wiki/Wiki.iml
===================================================================
--- trunk/examples/wiki/Wiki.iml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/Wiki.iml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -390,6 +390,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/jdom.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: trunk/examples/wiki/Wiki.iws
===================================================================
--- trunk/examples/wiki/Wiki.iws 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/Wiki.iws 2008-01-21 23:38:47 UTC (rev 7168)
@@ -33,56 +33,47 @@
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.critical.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.critical.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.minor.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferencesSupport.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/plugins/jiraIssueList/plugin.xhtml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.optional.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/etc/messages_feedAggregator_en.properties" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css" />
+ <change type="MOVED" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Wiki.iml" afterPath="$PROJECT_DIR$/Wiki.iml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/ws-commons-util-1.0.2.jar" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.trivial.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.blocker.gif" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraDAO.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/plugins/jiraIssueList" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/messages_lastModifiedDocuments_en.properties" afterPath="$PROJECT_DIR$/src/etc/messages_lastModifiedDocuments_en.properties" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/xmlrpc-client-3.1.jar" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/META-INF/wiki.taglib.xml" afterPath="$PROJECT_DIR$/src/etc/META-INF/wiki.taglib.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/util/WikiUtil.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/util/WikiUtil.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/css/feedAggregator.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Wiki.iws" afterPath="$PROJECT_DIR$/Wiki.iws" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.blocker.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.major.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssue.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.trivial.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.major.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/css/jiraIssueList.css" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListConnector.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/etc/messages_jiraIssueList_en.properties" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/etc/messages_jiraConnector_en.properties" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/plugins/feedAggregator" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/feedAggregator.css" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/plugins/feedAggregator/plugin.xhtml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/themes/sfwkorg/css/faqBrowser.css" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/faqBrowser.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/WEB-INF/components.xml" afterPath="$PROJECT_DIR$/src/etc/WEB-INF/components.xml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/icon.priority.optional.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/xmlrpc-common-3.1.jar" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferencesSupport.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/jiraIssueList.css" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/default/img/icon.priority.minor.gif" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/themes/sfwkorg/css/blogArchive.css" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/blogArchive.css" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/etc/messages_feedConnector_en.properties" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/plugins/feedTeasers/plugin.xhtml" afterPath="$PROJECT_DIR$/view/plugins/feedTeasers/plugin.xhtml" />
</list>
<list name="Failed commit: Default" comment="Oops" />
<list name="Foo" comment="" />
</component>
- <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="ChangesViewManager" flattened_view="false" show_ignored="false" />
<component name="Commander">
<leftPanel />
<rightPanel />
@@ -200,19 +191,10 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="WikiBaseData.dbunit.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="272" column="0" selection-start="22780" selection-end="22780" vertical-scroll-proportion="0.49659863">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
<file leaf-file-name="log4j.xml" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/test/log4j.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="0" selection-start="609" selection-end="609" vertical-scroll-proportion="0.34210527">
+ <state line="15" column="29" selection-start="742" selection-end="742" vertical-scroll-proportion="0.28931752">
<folding />
</state>
</provider>
@@ -514,7 +496,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg/img" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg/css" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -540,13 +522,31 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/default" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ </PATH>
+ <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg/css" />
+ <option name="myItemId" value="Wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -566,11 +566,11 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/default" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins/feedAggregator" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -588,21 +588,39 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ </PATH>
+ <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/default" />
+ <option name="myItemId" value="Wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/default/img" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -618,13 +636,21 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/dao" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -640,17 +666,21 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins/feedTeasers" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -670,7 +700,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -692,11 +722,11 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -718,15 +748,15 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/dao" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -748,17 +778,21 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedTeasers" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -781,6 +815,18 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -807,6 +853,14 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -834,9 +888,13 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -864,11 +922,11 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -889,6 +947,10 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/etc" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
</subPane>
</component>
@@ -1127,7 +1189,7 @@
</method>
</configuration>
<configuration default="false" name="Test" type="Application" factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.plugin.jiraIssueList.JiraDAO" />
+ <option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.connectors.feed.FeedReader" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value=""oldblog/Christian Bauer/"" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
@@ -1235,7 +1297,7 @@
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="SUITE_NAME" value="" />
<option name="PACKAGE_NAME" value="org.jboss.seam.wiki.test.connector" />
- <option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.test.connector.JiraConnector" />
+ <option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.test.connector.FeedConnectorTest" />
<option name="METHOD_NAME" value="linkToDocumentFragments" />
<option name="GROUP_NAME" value="" />
<option name="TEST_OBJECT" value="CLASS" />
@@ -1432,7 +1494,7 @@
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23220704" order="0" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.6175637" order="1" />
<window_info id="Structure" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.16103522" order="7" />
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.28475034" order="12" x="24" y="688" width="925" height="442" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.28475034" order="12" x="24" y="688" width="925" height="442" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="5" />
<window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32961783" order="6" />
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39486468" order="13" />
@@ -1474,7 +1536,7 @@
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
- <option name="LAST_COMMIT_MESSAGE" value="JBSEAM-2502 - JIRA issue list plugin and JIRA connector (plus re-usable remote connector data cache)" />
+ <option name="LAST_COMMIT_MESSAGE" value="JBSEAM-2451 - Feed aggregator connector and plugin" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
@@ -1485,7 +1547,6 @@
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
- <MESSAGE value="Minor improvements to forum browsing and doc pager" />
<MESSAGE value="Avoid NPE" />
<MESSAGE value="Configurable forum reply e-mail notification and Safari3 fixes" />
<MESSAGE value="Use new SeamTest superclass" />
@@ -1510,6 +1571,7 @@
<MESSAGE value="Update IntelliJ, better headline rendering, minor fixes to FAQ plugin" />
<MESSAGE value="Various bugfixes" />
<MESSAGE value="JBSEAM-2502 - JIRA issue list plugin and JIRA connector (plus re-usable remote connector data cache)" />
+ <MESSAGE value="JBSEAM-2451 - Feed aggregator connector and plugin" />
</component>
<component name="VssConfiguration">
<option name="CLIENT_PATH" value="" />
@@ -1596,114 +1658,114 @@
<option name="myLastEditedConfigurable" value="Default" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedTeasers/FeedTeasersPreferences.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="48" column="0" selection-start="1790" selection-end="1790" vertical-scroll-proportion="0.5264271">
+ <state line="33" column="0" selection-start="694" selection-end="694" vertical-scroll-proportion="0.90697676">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/docDisplay_d.xhtml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="189" column="0" selection-start="10464" selection-end="10658" vertical-scroll-proportion="0.5011338">
+ <state line="103" column="0" selection-start="3178" selection-end="3178" vertical-scroll-proportion="0.77378434">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java">
+ <entry file="file://$PROJECT_DIR$/src/etc/messages_feedAggregator_en.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="240" column="52" selection-start="9888" selection-end="9888" vertical-scroll-proportion="0.7178003">
+ <state line="8" column="63" selection-start="582" selection-end="582" vertical-scroll-proportion="0.21987315">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DocumentNodeRemover.java">
+ <entry file="file://$PROJECT_DIR$/view/themes/default/css/feedAggregator.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="0" selection-start="814" selection-end="814" vertical-scroll-proportion="0.3227207">
+ <state line="9" column="1" selection-start="112" selection-end="112" vertical-scroll-proportion="0.2473573">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/feedAggregator.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="186" column="16" selection-start="6653" selection-end="6653" vertical-scroll-proportion="0.48480463">
+ <state line="11" column="0" selection-start="149" selection-end="149" vertical-scroll-proportion="0.30232558">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/migration.sql">
+ <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="162" column="52" selection-start="10631" selection-end="10631" vertical-scroll-proportion="0.34615386">
+ <state line="263" column="70" selection-start="23108" selection-end="23108" vertical-scroll-proportion="0.629742">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="0" selection-start="824" selection-end="824" vertical-scroll-proportion="0.37047756">
+ <state line="998" column="28" selection-start="15950" selection-end="15950" vertical-scroll-proportion="0.6637555">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/messages_jiraConnector_en.properties">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/faqBrowser.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="5" column="0" selection-start="424" selection-end="424" vertical-scroll-proportion="0.13742071">
+ <state line="6" column="55" selection-start="157" selection-end="157" vertical-scroll-proportion="0.15856236">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/WEB-INF/components.xml">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/blogArchive.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="116" column="44" selection-start="6165" selection-end="6165" vertical-scroll-proportion="0.7664399">
+ <state line="10" column="23" selection-start="173" selection-end="173" vertical-scroll-proportion="0.27484143">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/messages_lastModifiedDocuments_en.properties">
+ <entry file="file://$PROJECT_DIR$/view/plugins/feedAggregator/plugin.xhtml">
<provider selected="true" editor-type-id="text-editor">
- <state line="2" column="49" selection-start="198" selection-end="198" vertical-scroll-proportion="0.054968286">
+ <state line="66" column="27" selection-start="3900" selection-end="3900" vertical-scroll-proportion="0.81632656">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/messages_jiraIssueList_en.properties">
+ <entry file="file://$PROJECT_DIR$/migration.sql">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="44" selection-start="44" selection-end="44" vertical-scroll-proportion="0.0">
+ <state line="193" column="0" selection-start="12248" selection-end="12248" vertical-scroll-proportion="0.709607">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnectorPreferences.java">
+ <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/mainMenu.css">
<provider selected="true" editor-type-id="text-editor">
- <state line="41" column="24" selection-start="1300" selection-end="1300" vertical-scroll-proportion="0.4164905">
+ <state line="22" column="1" selection-start="395" selection-end="395" vertical-scroll-proportion="0.60465115">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/lastmodified/LastModifiedDocumentsPreferences.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="20" column="26" selection-start="563" selection-end="563" vertical-scroll-proportion="0.37626627">
+ <state line="20" column="13" selection-start="846" selection-end="846" vertical-scroll-proportion="0.47145876">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/jiraIssueList.css">
+ <entry file="file://$PROJECT_DIR$/src/etc/messages_en.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="23" column="29" selection-start="831" selection-end="831" vertical-scroll-proportion="0.1612426">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="272" column="0" selection-start="22780" selection-end="22780" vertical-scroll-proportion="0.49659863">
+ <state line="27" column="22" selection-start="882" selection-end="882" vertical-scroll-proportion="0.5079595">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/log4j.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="0" selection-start="609" selection-end="609" vertical-scroll-proportion="0.34210527">
+ <state line="15" column="29" selection-start="742" selection-end="742" vertical-scroll-proportion="0.28931752">
<folding />
</state>
</provider>
Modified: trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -55,6 +55,12 @@
</function>
<function>
+ <function-name>truncateStringOnWordBoundary</function-name>
+ <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
+ <function-signature>java.lang.String truncateStringOnWordBoundary(java.lang.String,int)</function-signature>
+ </function>
+
+ <function>
<function-name>concat</function-name>
<function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
<function-signature>java.lang.String concat(java.lang.String,java.lang.String)</function-signature>
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -118,6 +118,8 @@
<value>messages_faqBrowser</value>
<value>messages_jiraIssueList</value>
<value>messages_jiraConnector</value>
+ <value>messages_feedAggregator</value>
+ <value>messages_feedConnector</value>
</core:bundle-names>
</core:resource-loader>
Added: trunk/examples/wiki/src/etc/messages_feedAggregator_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_feedAggregator_en.properties (rev 0)
+++ trunk/examples/wiki/src/etc/messages_feedAggregator_en.properties 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,14 @@
+feedAggregator.preferences.Name=Plugin: Feed Aggregator
+feedAggregator.preferences.Title=Title of aggregator box
+feedAggregator.preferences.Urls=URLs of feeds to aggregate, space separated
+feedAggregator.preferences.NumberOfFeedEntries=Number of feed entries
+feedAggregator.preferences.TruncateDescription=Truncate description text after characters
+feedAggregator.preferences.HideDate=Hide date display
+feedAggregator.preferences.HideAuthor=Hide author display
+feedAggregator.preferences.HideFeedInfo=Hide link to feed
+feedAggregator.preferences.HideDescription=Hide feed entry text
+feedAggregator.preferences.HideTitle=Hide feed entry title
+
+feedAggregator.label.More=more...
+feedAggregator.label.By=by
+feedAggregator.label.NoEntriesFound=No feed entries found.
\ No newline at end of file
Added: trunk/examples/wiki/src/etc/messages_feedConnector_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_feedConnector_en.properties (rev 0)
+++ trunk/examples/wiki/src/etc/messages_feedConnector_en.properties 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,4 @@
+feedConnector.preferences.Name=Remote Connector: Feeds
+feedConnector.preferences.ConnectionTimeoutSeconds=Remote connection timeout in seconds (TODO:currently not used!)
+feedConnector.preferences.FeedCacheUpdateTimeoutSeconds=Feed cache update timeout in seconds
+feedConnector.preferences.FeedCacheIdleTimeoutSeconds=Feed cache idle timeout in seconds
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheAsyncUpdater.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -22,8 +22,8 @@
@Logger
Log log;
- protected void writeIntoCache(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key, List<T> result) {
- log.debug("writing data into cache: " + result.size());
+ public void writeIntoCache(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key, List<T> result) {
+ log.debug("writing data into cache for key: " + key + " size: " + result.size());
// Note that this write is not synchronized on the APPLICATION-scoped cache component!
// However, that is ok because the write only updates a value of the map, it does not
@@ -31,7 +31,7 @@
cache.write(key, result, System.currentTimeMillis());
}
- protected abstract void updateCacheAsynchronously(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key);
+ public abstract void updateCacheAsynchronously(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key);
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCacheKey.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -55,4 +55,8 @@
public int hashCode() {
return keyValue.hashCode();
}
+
+ public String toString() {
+ return keyValue.toString();
+ }
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.log.Log;
+
+import java.util.*;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("feedAggregatorDAO")
+(a)Scope(ScopeType.CONVERSATION)
+@AutoCreate
+public class FeedAggregatorDAO implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In("feedConnectorCache")
+ FeedConnector feedConnector;
+
+ public List<FeedEntryDTO> getLatestFeedEntries(int numberOfFeedEntries, String[] feedURLs) {
+ if (feedURLs == null) return Collections.EMPTY_LIST;
+
+ List<FeedEntryDTO> feedEntries = new ArrayList<FeedEntryDTO>();
+
+ for (String feedURL : feedURLs) {
+ // For each feed, get the feed entries and put them in a sorted collection,
+ // so we get overall sorting
+ log.debug("retrieving feed entries from connector for feed URL: " + feedURL);
+ List<FeedEntryDTO> result = feedConnector.getFeedEntries(feedURL);
+ log.debug("retrieved feed entries: " + result.size());
+ feedEntries.addAll(result);
+ log.debug("number of aggregated feed entries so far: " + feedEntries.size());
+ }
+
+ Collections.sort(
+ feedEntries,
+ // Sort by date of feed entry ascending
+ new Comparator<FeedEntryDTO>() {
+ public int compare(FeedEntryDTO a, FeedEntryDTO b) {
+ if (a.getFeedEntry().getPublishedDate().getTime() >
+ b.getFeedEntry().getPublishedDate().getTime()) return -1;
+
+ return (a.getFeedEntry().getPublishedDate().getTime() ==
+ b.getFeedEntry().getPublishedDate().getTime() ? 0 : 1);
+ }
+ }
+ );
+
+ return feedEntries.size() > numberOfFeedEntries
+ ? new ArrayList<FeedEntryDTO>(feedEntries).subList(0, numberOfFeedEntries)
+ : new ArrayList<FeedEntryDTO>(feedEntries);
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnector.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.core.model.FeedEntry;
+
+import java.util.List;
+
+/**
+ * @author Christian Bauer
+ */
+public interface FeedConnector {
+
+ public List<FeedEntryDTO> getFeedEntries(String feedURL);
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.connectors.cache.ConnectorCache;
+import org.jboss.seam.wiki.connectors.cache.ConnectorCacheAsyncUpdater;
+import org.jboss.seam.wiki.connectors.cache.ConnectorCacheKey;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.async.Asynchronous;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("feedConnectorCache")
+@AutoCreate
+public class FeedConnectorCache
+ extends ConnectorCache<FeedEntryDTO, FeedConnectorCache.FeedConnectorCacheKey>
+ implements FeedConnector {
+
+ @In("#{preferences.get('FeedConnector')}")
+ FeedConnectorPreferences prefs;
+
+ public List<FeedEntryDTO> getFeedEntries(String feedURL) {
+ FeedConnectorCacheKey newKey = new FeedConnectorCacheKey(feedURL);
+ return lookup( new ConnectorCacheKey<FeedConnectorCacheKey>(newKey));
+ }
+
+ protected long getUpdateTimeoutSeconds() {
+ return prefs.getFeedCacheUpdateTimeoutSeconds();
+ }
+
+ protected long getIdleTimeoutSeconds() {
+ return prefs.getFeedCacheIdleTimeoutSeconds();
+ }
+
+ protected Class<? extends ConnectorCacheAsyncUpdater<FeedEntryDTO, FeedConnectorCacheKey>> getAsyncUpdaterClass() {
+ return FeedConnectorCacheAsyncUpdater.class;
+ }
+
+ @Name("feedConnectorCacheAsyncUpdater")
+ @AutoCreate
+ public static class FeedConnectorCacheAsyncUpdater
+ extends ConnectorCacheAsyncUpdater<FeedEntryDTO, FeedConnectorCacheKey> {
+
+ @In
+ FeedConnector feedConnector;
+
+ @Asynchronous
+ public void updateCacheAsynchronously(ConnectorCache<FeedEntryDTO, FeedConnectorCacheKey> cache,
+ ConnectorCacheKey<FeedConnectorCacheKey> key) {
+
+ List<FeedEntryDTO> result = feedConnector.getFeedEntries(key.getKeyValue().getUrl());
+ super.writeIntoCache(cache, key, result);
+ }
+ }
+
+ public static class FeedConnectorCacheKey implements Serializable {
+ private String url;
+
+ public FeedConnectorCacheKey(String url) {
+ this.url = url;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ FeedConnectorCacheKey that = (FeedConnectorCacheKey) o;
+
+ if (!url.equals(that.url)) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ return url.hashCode();
+ }
+
+ public String toString() {
+ return getUrl();
+ }
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.hibernate.validator.Range;
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(name = "FeedConnector", description = "#{messages['feedConnector.preferences.Name']}")
+public class FeedConnectorPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['feedConnector.preferences.ConnectionTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM,
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 120l)
+ @NotNull
+ private Long connectionTimeoutSeconds;
+
+ @PreferenceProperty(
+ description = "#{messages['feedConnector.preferences.FeedCacheUpdateTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM
+ )
+ @Range(min = 1l, max = 864000)
+ @NotNull
+ private Long feedCacheUpdateTimeoutSeconds;
+
+ @PreferenceProperty(
+ description = "#{messages['feedConnector.preferences.FeedCacheIdleTimeoutSeconds']}",
+ visibility = PreferenceVisibility.SYSTEM
+ )
+ @Range(min = 1l, max = 864000)
+ @NotNull
+ private Long feedCacheIdleTimeoutSeconds;
+
+ public Long getConnectionTimeoutSeconds() {
+ return connectionTimeoutSeconds;
+ }
+
+ public Long getFeedCacheUpdateTimeoutSeconds() {
+ return feedCacheUpdateTimeoutSeconds;
+ }
+
+ public Long getFeedCacheIdleTimeoutSeconds() {
+ return feedCacheIdleTimeoutSeconds;
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferencesSupport.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
+import org.jboss.seam.wiki.preferences.metamodel.PreferencesSupport;
+import org.jboss.seam.annotations.Name;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("feedConnectorPreferencesSupport")
+public class FeedConnectorPreferencesSupport extends PreferencesSupport {
+
+ public Set<PreferenceEntity> getPreferenceEntities() {
+ return new HashSet<PreferenceEntity>() {{
+ add( createPreferenceEntity(FeedConnectorPreferences.class) );
+ }};
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedEntryDTO.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import org.jboss.seam.wiki.core.model.Feed;
+import org.jboss.seam.wiki.core.model.FeedEntry;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+public class FeedEntryDTO implements Serializable {
+
+ private Feed feed;
+ private FeedEntry feedEntry;
+
+ public FeedEntryDTO(Feed feed, FeedEntry feedEntry) {
+ this.feed = feed;
+ this.feedEntry = feedEntry;
+ }
+
+ public Feed getFeed() {
+ return feed;
+ }
+
+ public FeedEntry getFeedEntry() {
+ return feedEntry;
+ }
+
+ public String toString() {
+ return "FeedEntryDTO - TITLE: '" + getFeedEntry().getTitle() + "' FEED: '" + getFeed().getTitle() + "'";
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.connectors.feed;
+
+import com.sun.syndication.feed.synd.SyndContent;
+import com.sun.syndication.feed.synd.SyndEntry;
+import com.sun.syndication.feed.synd.SyndFeed;
+import com.sun.syndication.io.FeedException;
+import com.sun.syndication.io.SyndFeedInput;
+import com.sun.syndication.io.XmlReader;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.core.model.Feed;
+import org.jboss.seam.wiki.core.model.FeedEntry;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.SocketTimeoutException;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import sun.net.www.protocol.http.HttpURLConnection;
+
+/**
+ *
+ * TODO: This requires a system property for timeout: sun.net.client.defaultConnectTimeout=30000
+ *
+ * @author Christian Bauer
+ */
+@Name("feedConnector")
+(a)Scope(ScopeType.APPLICATION)
+@AutoCreate
+public class RomeFeedConnector implements FeedConnector {
+
+ @Logger
+ Log log;
+
+ @In("#{preferences.get('FeedConnector')}")
+ FeedConnectorPreferences prefs;
+
+ public List<FeedEntryDTO> getFeedEntries(String feedURL) {
+
+ try {
+
+ List<FeedEntryDTO> feedEntryDTOs = new ArrayList<FeedEntryDTO>();
+
+ log.debug("connecting to feed URL: " + feedURL);
+
+ URL feedSource = new URL(feedURL);
+
+ /** TODO: This breaks multi-threading somehow, two threads start calling this connector and one never returns...
+ URLConnection connection = feedSource.openConnection();
+ connection.setConnectTimeout(prefs.getConnectionTimeoutSeconds().intValue()*1000);
+ SyndFeedInput input = new SyndFeedInput();
+ SyndFeed syndFeed = input.build(new XmlReader(connection));
+ */
+ SyndFeedInput input = new SyndFeedInput();
+ SyndFeed syndFeed = input.build(new XmlReader(feedSource));
+
+ log.debug("starting conversion from feed URL: " + feedURL);
+
+ Feed feed = convertSyndFeed(syndFeed);
+
+ for (Object o : syndFeed.getEntries()) {
+ SyndEntry syndEntry = (SyndEntry)o;
+ FeedEntry fe = convertSyndEntry(syndEntry);
+
+ // Linking it in our model makes it persistable
+ feed.getFeedEntries().add(fe);
+
+ // Now project them so the client has a unified view without iterating collections of Feeds
+ FeedEntryDTO dto = new FeedEntryDTO(feed, fe);
+ feedEntryDTOs.add(dto);
+ }
+
+ log.debug("retrieved feed entries: " + feedEntryDTOs.size());
+ return feedEntryDTOs;
+
+ } catch (SocketTimeoutException timeoutEx) {
+ log.warn("timeout connecting to feed: " + feedURL, timeoutEx);
+ } catch (IllegalArgumentException iaEx) {
+ log.warn("could not connect to feed: " + feedURL, iaEx);
+ } catch (MalformedURLException urlEx) {
+ log.warn("URL is not valid: " + feedURL, urlEx);
+ } catch (IOException ioEx) {
+ log.warn("could not connect to feed: " + feedURL, ioEx);
+ } catch (FeedException fex) {
+ log.warn("could not marshall feed data: " + feedURL, fex);
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ private Feed convertSyndFeed(SyndFeed syndFeed) {
+ log.debug("converting SyndFeed: " + syndFeed.getTitle());
+ Feed feed = new Feed();
+ feed.setLink(syndFeed.getLink());
+ feed.setTitle(syndFeed.getTitle());
+ feed.setPublishedDate(syndFeed.getPublishedDate());
+ feed.setDescription(syndFeed.getDescription());
+ feed.setAuthor(syndFeed.getAuthor());
+ return feed;
+ }
+
+ private FeedEntry convertSyndEntry(SyndEntry syndEntry) {
+ log.debug("converting SyndEntry: " + syndEntry.getTitle());
+ FeedEntry feedEntry = new FeedEntry();
+ feedEntry.setLink(syndEntry.getLink());
+ feedEntry.setTitle(syndEntry.getTitle());
+ feedEntry.setPublishedDate(syndEntry.getPublishedDate());
+ feedEntry.setUpdatedDate(syndEntry.getUpdatedDate());
+ feedEntry.setAuthor(syndEntry.getAuthor());
+
+ if (syndEntry.getDescription() != null) {
+ SyndContent description = syndEntry.getDescription();
+
+ feedEntry.setDescriptionType(description.getType());
+ feedEntry.setDescriptionValue(description.getValue());
+ }
+
+ return feedEntry;
+ }
+
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -17,6 +17,9 @@
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "FEEDENTRY_TYPE", length = 255)
@DiscriminatorValue("EXTERNAL")
+/*
+TODO: This implementation of Comparable is not consistent with equals()!
+ */
public class FeedEntry implements Serializable, Comparable {
public static final String END_TEASER_MACRO = "endTeaser";
@@ -78,6 +81,10 @@
return title;
}
+ public String getTitleStripped() {
+ return stripHTMLTags(title);
+ }
+
public void setTitle(String title) {
this.title = title;
}
@@ -126,6 +133,10 @@
return stripHTMLTags(getDescriptionValue());
}
+ public String getDescriptionValueStrippedNoNewlines() {
+ return stripHTMLTags(getDescriptionValue()).replaceAll("(\n|\r)", " ");
+ }
+
public boolean isTeaserMarkerPresent() {
return getDescriptionValueStripped().contains(END_TEASER_MARKER);
}
@@ -169,6 +180,7 @@
}
private String stripHTMLTags(String original) {
+ // Hm, that should be enough to make stuff XSS-safe?
return original.replaceAll("\\<([a-zA-Z]|/){1}?.*?\\>","");
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceValue.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -22,6 +22,9 @@
})
@Entity
@Table(name = "PREFERENCE")
+/*
+TODO: This implementation of Comparable MIGHT not be consistent with equals()!
+ */
public class WikiPreferenceValue implements PreferenceValue, Serializable, Comparable {
@Id
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feedAggregator;
+
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.connectors.feed.FeedAggregatorDAO;
+import org.jboss.seam.wiki.connectors.feed.FeedEntryDTO;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("feedAggregator")
+(a)Scope(ScopeType.PAGE)
+public class FeedAggregator implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In
+ FeedAggregatorDAO feedAggregatorDAO;
+
+ @In("#{preferences.get('FeedAggregator', currentMacro)}")
+ FeedAggregatorPreferences prefs;
+
+ private List<FeedEntryDTO> feedEntries;
+
+ public List<FeedEntryDTO> getFeedEntries() {
+ if (feedEntries == null) loadFeedEntries();
+ return feedEntries;
+ }
+
+ @Observer(value = "Macro.render.feedAggregator", create = false)
+ public void loadFeedEntries() {
+
+ if (prefs.getUrls() == null || prefs.getUrls().length() < 8) return;
+
+ // Split the URLs by space
+ String[] urls = prefs.getUrls().split(" ");
+
+ // First check if the URLs are valid, if not we might as well just skip it...
+ List<String> validUrls = new ArrayList<String>();
+ for (String url : urls) {
+ try {
+ URL testUrl = new URL(url);
+ if (!testUrl.getProtocol().equals("http")) {
+ log.debug("skipping URL with unsupported protocol: " + url);
+ continue;
+ }
+ } catch (MalformedURLException e) {
+ log.debug("skipping invalid URL: " + url);
+ continue;
+ }
+ validUrls.add(url);
+ }
+
+ log.debug("aggregating feeds: " + validUrls.size());
+ feedEntries =
+ feedAggregatorDAO.getLatestFeedEntries(
+ prefs.getNumberOfFeedEntries().intValue(),
+ validUrls.toArray(new String[validUrls.size()])
+ );
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feedAggregator;
+
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Range;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(name = "FeedAggregator", description = "#{messages['feedAggregator.preferences.Name']}")
+public class FeedAggregatorPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.Title']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ @NotNull
+ private String title;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.Urls']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 4000)
+ private String urls;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.NumberOfFeedEntries']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 3l, max = 99l)
+ @NotNull
+ private Long numberOfFeedEntries;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.TruncateDescription']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 10l, max = 1000l)
+ @NotNull
+ private Long truncateDescription;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideDate']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideDate;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideAuthor']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideAuthor;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideFeedInfo']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideFeedInfo;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideDescription']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideDescription;
+
+ @PreferenceProperty(
+ description = "#{messages['feedAggregator.preferences.HideTitle']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideTitle;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getUrls() {
+ return urls;
+ }
+
+ public Long getNumberOfFeedEntries() {
+ return numberOfFeedEntries;
+ }
+
+ public Long getTruncateDescription() {
+ return truncateDescription;
+ }
+
+ public Boolean getHideDate() {
+ return hideDate;
+ }
+
+ public Boolean getHideAuthor() {
+ return hideAuthor;
+ }
+
+ public Boolean getHideFeedInfo() {
+ return hideFeedInfo;
+ }
+
+ public Boolean getHideDescription() {
+ return hideDescription;
+ }
+
+ public Boolean getHideTitle() {
+ return hideTitle;
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferencesSupport.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feedAggregator;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
+import org.jboss.seam.wiki.preferences.metamodel.PreferencesSupport;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("feedAggregatorPreferencesSupport")
+public class FeedAggregatorPreferencesSupport extends PreferencesSupport {
+
+ public Set<PreferenceEntity> getPreferenceEntities() {
+ return new HashSet<PreferenceEntity>() {{
+ add( createPreferenceEntity(FeedAggregatorPreferences.class) );
+ }};
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -76,7 +76,7 @@
visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
editorIncludeName = "NumberRange"
)
- @Range(min = 10l, max = 5000l)
+ @Range(min = 10l, max = 100l)
@NotNull
private Long truncateSummary;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -17,6 +17,9 @@
import java.lang.reflect.Field;
import java.util.*;
+/*
+TODO: This implementation of Comparable is not consistent with equals()!
+ */
public class PreferenceEntity implements Comparable, Serializable {
Log log = Logging.getLog(PreferenceEntity.class);
@@ -180,6 +183,9 @@
return "PreferenceEntity: " + getClazz().getName() + " properties: " + getProperties().size();
}
+ /*
+ TODO: This implementation of Comparable is not consistent with equals()!
+ */
public class Property implements Comparable, Serializable {
private Field field;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -66,6 +66,25 @@
return string.substring(0, length-1) + appendString;
}
+ public static String truncateStringOnWordBoundary(String string, int length) {
+ if (string.length() <= length) return string;
+
+ char [] chars = string.toCharArray();
+ StringBuffer buffer = new StringBuffer();
+ String result = "";
+ int lastWhitespace = 0;
+ for (int i = 0; i < chars.length; i++) {
+ if (chars[i] == ' ') lastWhitespace = i;
+ buffer.append(chars[i]);
+
+ if (i >= length) {
+ result = buffer.substring(0, lastWhitespace);
+ break;
+ }
+ }
+ return result;
+ }
+
public static String concat(String a, String b) {
return a + b;
}
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -68,6 +68,9 @@
<PREFERENCE PREF_ID = "190" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraIssueList" PROPERTY_NAME = "title" STRING_VALUE = "JIRA Issues" LONG_VALUE = "[NULL]" BOOLEAN_VALUE = "[NULL]"/>
<PREFERENCE PREF_ID = "191" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraIssueList" PROPERTY_NAME = "truncateSummary" STRING_VALUE = "[NULL]" LONG_VALUE = "35" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "200" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedAggregator" PROPERTY_NAME = "title" STRING_VALUE = "Aggregated Feeds" LONG_VALUE = "[NULL]" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "201" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedAggregator" PROPERTY_NAME = "truncateDescription" STRING_VALUE = "[NULL]" LONG_VALUE = "100" BOOLEAN_VALUE = "[NULL]"/>
+
<!-- CONNECTORS -->
<PREFERENCE PREF_ID = "300" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraConnector" PROPERTY_NAME = "connectionTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "15" BOOLEAN_VALUE = "[NULL]"/>
@@ -75,6 +78,10 @@
<PREFERENCE PREF_ID = "302" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraConnector" PROPERTY_NAME = "issueListCacheUpdateTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "600" BOOLEAN_VALUE = "[NULL]"/>
<PREFERENCE PREF_ID = "303" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "JiraConnector" PROPERTY_NAME = "issueListCacheIdleTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "36000" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "310" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedConnector" PROPERTY_NAME = "connectionTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "30" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "311" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedConnector" PROPERTY_NAME = "feedCacheUpdateTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "600" BOOLEAN_VALUE = "[NULL]"/>
+ <PREFERENCE PREF_ID = "312" OBJ_VERSION = "0" USER_ID = "[NULL]" ENTITY_NAME = "FeedConnector" PROPERTY_NAME = "feedCacheIdleTimeoutSeconds" STRING_VALUE = "[NULL]" LONG_VALUE = "36000" BOOLEAN_VALUE = "[NULL]"/>
+
<ROLES ROLE_ID = "1" OBJ_VERSION = "0" DISPLAY_NAME = "Administrator" NAME = "admin" ACCESS_LEVEL = "1000" CREATED_ON = "2006-06-27 13:45:00"/>
<ROLES ROLE_ID = "2" OBJ_VERSION = "0" DISPLAY_NAME = "Guest" NAME = "guest" ACCESS_LEVEL = "0" CREATED_ON = "2006-06-27 13:45:00"/>
<ROLES ROLE_ID = "3" OBJ_VERSION = "0" DISPLAY_NAME = "Member" NAME = "member" ACCESS_LEVEL = "1" CREATED_ON = "2006-06-27 13:45:00"/>
@@ -254,9 +261,9 @@
<WIKI_FILE
NODE_ID="8" FILE_REVISION="0"/>
<WIKI_DOCUMENT
- NODE_ID="8" CONTENT="Testdocument Three"
+ NODE_ID="8" CONTENT="Testdocument Three

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

[<=jiraIssueList[url=http://jira.jboss.com/jira][usernam..."
+ NODE_ID="9" CONTENT="Testdocument Four

[<=jiraIssueList[url=http://jira.jboss.com/jira][usernam...;"
HEADER="[NULL]" FOOTER="[NULL]"
HEADER_MACROS="[NULL]" CONTENT_MACROS="jiraIssueList" FOOTER_MACROS="[NULL]"
NAME_AS_TITLE="true" ENABLE_COMMENTS="true" ENABLE_COMMENT_FORM="true" ENABLE_COMMENTS_ON_FEEDS="true"/>
Added: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java (rev 0)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/FeedConnectorTest.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.test.connector;
+
+import org.dbunit.operation.DatabaseOperation;
+import org.jboss.seam.wiki.connectors.feed.FeedAggregatorDAO;
+import org.jboss.seam.wiki.connectors.feed.FeedEntryDTO;
+import org.jboss.seam.wiki.connectors.feed.FeedConnector;
+import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
+import org.jboss.seam.wiki.core.model.FeedEntry;
+import org.jboss.seam.wiki.core.model.Feed;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.ScopeType;
+import org.testng.annotations.Test;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Date;
+
+/**
+ * @author Christian Bauer
+ */
+public class FeedConnectorTest extends DBUnitSeamTest {
+
+ protected void prepareDBUnitOperations() {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml", DatabaseOperation.CLEAN_INSERT)
+ );
+ }
+
+ @Test
+ public void getFeedDTOs() throws Exception {
+
+ new NonFacesRequest() {
+ protected void renderResponse() throws Exception {
+ FeedAggregatorDAO dao = (FeedAggregatorDAO)getInstance(FeedAggregatorDAO.class);
+
+ String[] feedURLs = {
+ "http://foo", "http://bar", "http:WrongURL"
+ };
+
+ List<FeedEntryDTO> dtos = dao.getLatestFeedEntries(30, feedURLs);
+ assert dtos.size() == 0; // Asynchronous cache needs to do its job first
+
+ Thread.sleep(4000);
+
+ dtos = dao.getLatestFeedEntries(30, feedURLs);
+ assert dtos.size() == 3;
+
+ }
+ }.run();
+ }
+
+ @Name("feedConnector")
+ @Scope(ScopeType.APPLICATION)
+ @Install(precedence = Install.MOCK)
+ @AutoCreate
+ public static class MockFeedConnector implements FeedConnector {
+ public List<FeedEntryDTO> getFeedEntries(String feedURL) {
+
+ try {
+ Thread.sleep(3000); // Wait 3 seconds...
+ } catch (InterruptedException e) {}
+
+ List<FeedEntryDTO> entries = new ArrayList<FeedEntryDTO>();
+
+ if (feedURL.equals("http://foo")) {
+
+ FeedEntry feOne = new FeedEntry();
+ feOne.setTitle("One");
+ feOne.setPublishedDate(new Date());
+
+ FeedEntry feTwo = new FeedEntry();
+ feTwo.setTitle("Two");
+ feTwo.setPublishedDate(new Date());
+
+ Feed feed = new Feed();
+ feed.setTitle("Foo");
+ feed.getFeedEntries().add(feOne);
+ feed.getFeedEntries().add(feTwo);
+
+ entries.add(new FeedEntryDTO(feed, feOne));
+ entries.add(new FeedEntryDTO(feed, feTwo));
+
+ } else if (feedURL.equals("http://bar")) {
+
+ FeedEntry feOne = new FeedEntry();
+ feOne.setTitle("One");
+ feOne.setPublishedDate(new Date());
+
+ Feed feed = new Feed();
+ feed.setTitle("Bar");
+ feed.getFeedEntries().add(feOne);
+
+ entries.add(new FeedEntryDTO(feed, feOne));
+ }
+
+ return entries;
+
+ }
+ }
+
+}
Deleted: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.wiki.test.connector;
-
-import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
-import org.jboss.seam.wiki.connectors.jira.JiraDAO;
-import org.jboss.seam.wiki.connectors.jira.JiraIssueListConnector;
-import org.jboss.seam.wiki.connectors.jira.JiraIssue;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.ScopeType;
-import org.dbunit.operation.DatabaseOperation;
-import org.testng.annotations.Test;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author Christian Bauer
- */
-public class JiraConnector extends DBUnitSeamTest {
-
- protected void prepareDBUnitOperations() {
- beforeTestOperations.add(
- new DataSetOperation("org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml", DatabaseOperation.CLEAN_INSERT)
- );
- }
-
- @Test
- public void cacheIssueList() throws Exception {
-
- new NonFacesRequest() {
- protected void renderResponse() throws Exception {
- JiraDAO dao = (JiraDAO)getInstance(JiraDAO.class);
-
- List<JiraIssue> issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
- assert issues.size() == 0; // Asynchronous cache needs to do its job first
-
- Thread.sleep(1000);
-
- issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
- assert issues.size() == 0; // Still nothing
-
- Thread.sleep(3000);
-
- issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
- assert issues.size() == 3; // Now we have it
- }
- }.run();
- }
-
- @Name("jiraIssueListConnector")
- @Scope(ScopeType.APPLICATION)
- @Install(precedence = Install.MOCK)
- @AutoCreate
- public static class MockJiraIssueListConnector implements JiraIssueListConnector {
- public List<JiraIssue> getIssues(String url, String username, String password, String filterId) {
-
- try {
- Thread.sleep(3000); // Wait 3 seconds...
- } catch (InterruptedException e) {}
-
- List<JiraIssue> issues = new ArrayList<JiraIssue>();
-
- JiraIssue i1 = new JiraIssue();
- i1.setKey("one");
- issues.add(i1);
-
- JiraIssue i2 = new JiraIssue();
- i1.setKey("two");
- issues.add(i2);
-
- JiraIssue i3 = new JiraIssue();
- i1.setKey("three");
- issues.add(i3);
-
- JiraIssue i4 = new JiraIssue();
- i1.setKey("four");
- issues.add(i4);
-
- return issues;
- }
- }
-
-}
Copied: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java (from rev 7167, trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnector.java)
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java (rev 0)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/connector/JiraConnectorTest.java 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.test.connector;
+
+import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
+import org.jboss.seam.wiki.connectors.jira.JiraDAO;
+import org.jboss.seam.wiki.connectors.jira.JiraIssueListConnector;
+import org.jboss.seam.wiki.connectors.jira.JiraIssue;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.ScopeType;
+import org.dbunit.operation.DatabaseOperation;
+import org.testng.annotations.Test;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Christian Bauer
+ */
+public class JiraConnectorTest extends DBUnitSeamTest {
+
+ protected void prepareDBUnitOperations() {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml", DatabaseOperation.CLEAN_INSERT)
+ );
+ }
+
+ @Test
+ public void cacheIssueList() throws Exception {
+
+ new NonFacesRequest() {
+ protected void renderResponse() throws Exception {
+ JiraDAO dao = (JiraDAO)getInstance(JiraDAO.class);
+
+ List<JiraIssue> issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
+ assert issues.size() == 0; // Asynchronous cache needs to do its job first
+
+ Thread.sleep(1000);
+
+ issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
+ assert issues.size() == 0; // Still nothing
+
+ Thread.sleep(3000);
+
+ issues = dao.getJiraIssues("foo", "bar", "baz", "hum", 3);
+ assert issues.size() == 3; // Now we have it
+ }
+ }.run();
+ }
+
+ @Name("jiraIssueListConnector")
+ @Scope(ScopeType.APPLICATION)
+ @Install(precedence = Install.MOCK)
+ @AutoCreate
+ public static class MockJiraIssueListConnector implements JiraIssueListConnector {
+ public List<JiraIssue> getIssues(String url, String username, String password, String filterId) {
+
+ try {
+ Thread.sleep(3000); // Wait 3 seconds...
+ } catch (InterruptedException e) {}
+
+ List<JiraIssue> issues = new ArrayList<JiraIssue>();
+
+ JiraIssue i1 = new JiraIssue();
+ i1.setKey("one");
+ issues.add(i1);
+
+ JiraIssue i2 = new JiraIssue();
+ i1.setKey("two");
+ issues.add(i2);
+
+ JiraIssue i3 = new JiraIssue();
+ i1.setKey("three");
+ issues.add(i3);
+
+ JiraIssue i4 = new JiraIssue();
+ i1.setKey("four");
+ issues.add(i4);
+
+ return issues;
+ }
+ }
+
+}
Added: trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml (rev 0)
+++ trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,84 @@
+<wiki:plugin
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:div styleClass="feedAggregator box">
+
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{preferences.get('FeedAggregator', currentMacro).title}"/>
+ </s:div>
+
+ <div class="boxContent">
+ <h:dataTable value="#{feedAggregator.feedEntries}" var="feDTO"
+ rendered="#{not empty feedAggregator.feedEntries and feedAggregator.feedEntries.size() > 0}"
+ styleClass="datatable feedAggregatorTable"
+ columnClasses="feedEntryColumn"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <s:div styleClass="feedEntryInfo smallFont">
+
+ <s:span rendered="#{not preferences.get('FeedAggregator', currentMacro).hideDate}">
+ <h:outputText value="#{feDTO.feedEntry.publishedDate}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ </s:span>
+
+ <s:span styleClass="undecoratedLink"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideAuthor}">
+ <h:outputText value=", #{messages['feedAggregator.label.By']} "/>
+ <h:outputText styleClass="feedEntryAuthor" value="#{feDTO.feedEntry.author}"/>
+ </s:span>
+
+ <s:span styleClass="undecoratedLink"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideFeedInfo}">
+ (<h:outputLink value="#{feDTO.feed.link}">
+ <h:outputText value="#{feDTO.feed.title}"/>
+ </h:outputLink>)
+ </s:span>
+
+ </s:div>
+
+ <s:div styleClass="feedEntryTitle undecoratedLink"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideTitle}">
+ <h:outputLink target="_top" value="#{feDTO.feedEntry.link}">
+ <h:outputText escape="false" value="#{feDTO.feedEntry.titleStripped}"/>
+ </h:outputLink>
+ </s:div>
+
+ <s:div styleClass="feedEntryBody" rendered="#{not preferences.get('FeedAggregator', currentMacro).hideDescription}">
+ <h:outputText escape="false"
+ value="#{wiki:truncateStringOnWordBoundary(feDTO.feedEntry.descriptionValueStrippedNoNewlines,
+ preferences.get('FeedAggregator', currentMacro).truncateDescription)}"/>
+
+ <h:outputLink target="_top" styleClass="feedEntryBodyMoreLink"
+ value="#{feDTO.feedEntry.link}"
+ rendered="#{wiki:length(feDTO.feedEntry.descriptionValueStrippedNoNewlines)
+ > preferences.get('FeedAggregator', currentMacro).truncateDescription}">
+  #{messages['feedAggregator.label.More']}
+ </h:outputLink>
+ </s:div>
+
+ </h:column>
+
+ </h:dataTable>
+
+ </div>
+
+ <s:div styleClass="feedAggregatorEmpty"
+ rendered="#{empty feedAggregator.feedEntries or feedAggregator.feedEntries.size() == 0}">
+ <h:outputText value="#{messages['feedAggregator.label.NoEntriesFound']}"/>
+ </s:div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+</wiki:plugin>
\ No newline at end of file
Modified: trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml 2008-01-21 23:38:47 UTC (rev 7168)
@@ -47,7 +47,9 @@
</div>
<div class="teaserTitle undecoratedLink">
- <h:outputLink target="_top" value="#{fe.link}">#{fe.title}</h:outputLink>
+ <h:outputLink target="_top" value="#{fe.link}">
+ <h:outputText escape="false" value="#{fe.titleStripped}"/>
+ </h:outputLink>
</div>
<s:fragment rendered="#{fe.teaserMarkerPresent}">
@@ -59,7 +61,7 @@
<s:fragment rendered="#{not fe.teaserMarkerPresent}">
<h:outputText styleClass="teaserBody"
- value="#{wiki:truncateString(fe.descriptionValueStripped, preferences.get('FeedTeasers', currentMacro).truncateDescription, '')}"/>
+ value="#{wiki:truncateStringOnWordBoundary(fe.descriptionValueStripped, preferences.get('FeedTeasers', currentMacro).truncateDescription)}"/>
<h:outputLink target="_top" styleClass="teaserBody"
value="#{fe.link}"
Added: trunk/examples/wiki/view/themes/default/css/feedAggregator.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/feedAggregator.css (rev 0)
+++ trunk/examples/wiki/view/themes/default/css/feedAggregator.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,17 @@
+.feedEntryColumn {
+ padding: 10px;
+}
+
+.feedEntryTitle {
+ padding-top: 15px;
+ padding-bottom: 15px;
+}
+
+.feedEntryInfo {
+ text-align: right;
+}
+
+.feedEntryBody {
+ line-height: 150%;
+ text-align:justify;
+}
\ No newline at end of file
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -8,7 +8,7 @@
}
.blogArchiveFooter {
- background: white url(#{themePath}/img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(#{themePath}/img/th.bg.gif) 0 0 repeat-x;
padding-top: 5px;
padding-bottom: 10px;
padding-left: 15px;
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -4,10 +4,10 @@
.faqBrowserPanel {
border: 1px solid #d3d2d1;
- background: white url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
- padding: 2px;
+ background: #ede8db url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
padding-left: 5px;
padding-right: 5px;
+ padding-top: 5px;
line-height: 250%;
}
Added: trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css (rev 0)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -0,0 +1,16 @@
+.feedEntryColumn {
+ padding: 10px;
+}
+
+.feedEntryTitle {
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+.feedEntryInfo {
+ text-align: right;
+}
+
+.feedEntryBody {
+ line-height: 130%;
+}
\ No newline at end of file
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-01-21 13:02:48 UTC (rev 7167)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-01-21 23:38:47 UTC (rev 7168)
@@ -268,6 +268,55 @@
border: 1px solid #C3BBB6;
}
+/* ----- Homepage styles ------ */
+
+.homepageNews {
+ font-size: 90%;
+}
+
+.homepageNews .boxHeader {
+ background: none;
+ border: none;
+ border-bottom: 1px solid #b6b6b6;
+ padding-left: 0;
+ padding-bottom: 5px;
+}
+
+.homepageNews .boxContent {
+ background: none;
+ border: none;
+ padding-left: 0;
+}
+
+.homepageNews .boxFooter {
+ background: none;
+ border: none;
+ padding-left: 0;
+}
+
+.homepageNews .feedEntryColumn {
+ padding: 0;
+}
+
+.homepageNews .feedEntryTitle {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+
+.homepageNews .feedEntryBody {
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+.homepageNews .teaserColumn {
+ border-bottom: 1px solid #b6b6b6;
+}
+
+.homepageNews .rowOdd td, .homepageNews .rowEven td {
+ padding: 2px;
+ border-bottom: 1px solid #b6b6b6;
+}
+
/* ----- Footer styles ------ */
#footer {
@@ -531,17 +580,15 @@
.datatable .rowOdd {
background-color: #fff;
- line-height: 160%;
}
.datatable .rowEven {
background-color: #f5f5f5;
- line-height: 160%;
}
.datatable .sortableHeader {
white-space: nowrap;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
padding: 2px;
padding-left: 5px;
padding-right: 5px;
@@ -550,7 +597,7 @@
.datatable .regularHeader {
white-space: nowrap;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
padding: 2px;
padding-left: 5px;
padding-right: 5px;
@@ -612,7 +659,7 @@
border-top: 1px solid #d3d2d1;
border-left: 1px solid #d3d2d1;
border-right: 1px solid #d3d2d1;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
text-align: center;
}
.pager .pagerIconColumn {
@@ -754,7 +801,7 @@
}
.formListItem {
- background: #fff url(../img/th.bg.gif ) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif ) 0 0 repeat-x;
padding: 3px;
}
@@ -769,7 +816,7 @@
.formHead {
text-align: left;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
font-weight: bold;
color: #000;
padding-left: 13px;
@@ -931,7 +978,7 @@
}
.boxFooter {
- background: white url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
padding-top: 10px;
padding-bottom: 5px;
padding-left: 15px;
@@ -961,7 +1008,7 @@
.popupDialogHead {
text-align: left;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
font-weight: bold;
color: #000;
padding-left: 13px;
@@ -1031,7 +1078,7 @@
.directoryPathTable {
width: 100%;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
border-top: 1px solid #d3d2d1;
border-left: 1px solid #d3d2d1;
border-right: 1px solid #d3d2d1;
@@ -1107,7 +1154,7 @@
float: left;
margin: 0;
text-align: left;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
font-weight: bold;
padding-left: 13px;
padding-right: 10px;
[View Less]
17 years, 1 month
Seam SVN: r7167 - in trunk/examples/wiki: lib and 16 other directories.
by seam-commits@lists.jboss.org
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/…
[View More]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/jira][usernam..."
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
[View Less]
17 years, 1 month
Seam SVN: r7166 - in trunk/examples/wiki: src/main/org/jboss/seam/wiki/core/feeds and 3 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-01-21 07:25:45 -0500 (Mon, 21 Jan 2008)
New Revision: 7166
Added:
trunk/examples/wiki/view/includes/preferences/
trunk/examples/wiki/view/includes/preferences/editor.xhtml
trunk/examples/wiki/view/includes/preferences/editorAdaptiveTextInput.xhtml
trunk/examples/wiki/view/includes/preferences/editorNumberRange.xhtml
trunk/examples/wiki/view/includes/preferences/editorSelectOne.xhtml
Modified:
trunk/examples/wiki/src/main/org/…
[View More]jboss/seam/wiki/core/dao/TagDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java
Log:
Various bugfixes
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/TagDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/TagDAO.java 2008-01-21 12:04:34 UTC (rev 7165)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/TagDAO.java 2008-01-21 12:25:45 UTC (rev 7166)
@@ -58,7 +58,7 @@
public List<WikiFile> findWikFiles(WikiDirectory startDir, WikiFile ignoreFile, final String tag,
WikiNode.SortableProperty orderBy, boolean orderAscending) {
- if (tag == null || tag.length() == 0) return Collections.emptyList();
+ if (tag == null || tag.length() == 0) return Collections.EMPTY_LIST;
StringBuilder queryString = new StringBuilder();
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java 2008-01-21 12:04:34 UTC (rev 7165)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java 2008-01-21 12:25:45 UTC (rev 7166)
@@ -21,6 +21,7 @@
import javax.persistence.Query;
import java.util.Date;
import java.util.List;
+import java.util.Iterator;
/**
* DAO for feeds.
@@ -224,11 +225,25 @@
public void purgeOldFeedEntries(Date olderThan) {
log.debug("cleaning up feed entries older than: " + olderThan);
// Clean up _all_ feed entries that are older than N days
- int result = restrictedEntityManager.createQuery("delete from FeedEntry fe where fe.publishedDate < :oldestDate")
- .setParameter("oldestDate", olderThan).executeUpdate();
- log.debug("cleaned up " + result + " outdated feed entries");
+ List<Feed> feedsWithOutdatedEntries =
+ restrictedEntityManager
+ .createQuery("select distinct f from FeedEntry fe, WikiFeed f join f.feedEntries allFe " +
+ " where fe = allFe and fe.publishedDate < :oldestDate")
+ .setParameter("oldestDate", olderThan)
+ .getResultList();
+ for (Feed feed : feedsWithOutdatedEntries) {
+ log.debug("feed has outdated entries: " + feed);
+ Iterator<FeedEntry> it = feed.getFeedEntries().iterator();
+ while (it.hasNext()) {
+ FeedEntry feedEntry = it.next();
+ if (feedEntry.getPublishedDate().compareTo(olderThan) < 0) {
+ log.debug("removing outdated feed entry: " + feedEntry);
+ it.remove(); // Unlink from feed
+ restrictedEntityManager.remove(feedEntry);
+ }
+ }
+ }
}
-
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java 2008-01-21 12:04:34 UTC (rev 7165)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java 2008-01-21 12:25:45 UTC (rev 7166)
@@ -156,7 +156,10 @@
log.debug("found macro: " + macro);
URL faceletURL = getPluginURL(macro.getName(), ctx);
- if (faceletURL == null) return null;
+ if (faceletURL == null) {
+ log.debug("macro has no plugin facelets file: " + macro.getName());
+ return null;
+ }
log.debug("setting current macro in EVENT context before including facelets file");
Contexts.getEventContext().set(UIWikiFormattedText.CURRENT_MACRO_EVENT_VARIABLE, macro);
Added: trunk/examples/wiki/view/includes/preferences/editor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/preferences/editor.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/preferences/editor.xhtml 2008-01-21 12:25:45 UTC (rev 7166)
@@ -0,0 +1,50 @@
+<s:fragment
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'Boolean'}">
+ <h:selectBooleanCheckbox value="#{v.value}"/>
+ </s:div>
+
+ <s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'String'}">
+ <h:inputText styleClass="ajaxSupport" value="#{v.value}" size="25">
+ <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ reRender="preferenceValidationErrors"/>
+ </h:inputText>
+ </s:div>
+
+ <s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'Long'}">
+ <h:inputText styleClass="ajaxSupport" value="#{v.value}" size="5">
+ <f:converter converterId="javax.faces.Long"/>
+ <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ reRender="preferenceValidationErrors"/>
+ </h:inputText>
+ </s:div>
+
+ <s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'Double'}">
+ <h:inputText styleClass="ajaxSupport" value="#{v.value}" size="10">
+ <f:converter converterId="javax.faces.Double"/>
+ <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ reRender="preferenceValidationErrors"/>
+ </h:inputText>
+ </s:div>
+<!-- TODO: Duplicate identifiers...
+ <s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'Date'}">
+ <h:inputText styleClass="ajaxSupport" id="dt" value="#{v.value}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ reRender="preferenceValidationErrors"/>
+ </h:inputText>
+ <s:selectDate for="dt" dateFormat="dd. MMM yyyy, HH:mm">
+ <h:graphicImage style="vertical-align:bottom;margin-bottom:2px;"
+ value="/themes/#{preferences.get('Wiki').themeName}/img/icon.calendar.gif"
+ width="16" height="16"/>
+ </s:selectDate>
+ </s:div>
+-->
+
+</s:fragment>
Added: trunk/examples/wiki/view/includes/preferences/editorAdaptiveTextInput.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/preferences/editorAdaptiveTextInput.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/preferences/editorAdaptiveTextInput.xhtml 2008-01-21 12:25:45 UTC (rev 7166)
@@ -0,0 +1,29 @@
+<s:fragment
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:fragment rendered="#{not editorAdaptiveTextInput.isRenderTextArea(v.preferenceProperty)}">
+ <h:inputText styleClass="ajaxSupport"
+ value="#{v.value}"
+ size="#{editorAdaptiveTextInput.getSize(v.preferenceProperty)}"
+ maxlength="#{editorAdaptiveTextInput.getMaxLength(v.preferenceProperty)}">
+ <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ reRender="preferenceValidationErrors"/>
+ </h:inputText>
+ </s:fragment>
+ <s:fragment rendered="#{editorAdaptiveTextInput.isRenderTextArea(v.preferenceProperty)}">
+ <h:inputTextarea value="#{v.value}"
+ cols="#{editorAdaptiveTextInput.getTextAreaCols(v.preferenceProperty)}"
+ rows="#{editorAdaptiveTextInput.getTextAreaRows(v.preferenceProperty)}"
+ style="margin:5px;">
+ <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}"
+ reRender="preferenceValidationErrors"/>
+ </h:inputTextarea>
+ </s:fragment>
+
+</s:fragment>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/preferences/editorNumberRange.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/preferences/editorNumberRange.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/preferences/editorNumberRange.xhtml 2008-01-21 12:25:45 UTC (rev 7166)
@@ -0,0 +1,17 @@
+<s:fragment
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <rich:inputNumberSlider
+ value="#{v.value}" converter="javax.faces.Long"
+ enableManualInput="false"
+ minValue="#{editorNumberRange.getRangeMin(v.preferenceProperty)}"
+ maxValue="#{editorNumberRange.getRangeMax(v.preferenceProperty)}">
+ </rich:inputNumberSlider>
+
+</s:fragment>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/preferences/editorSelectOne.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/preferences/editorSelectOne.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/preferences/editorSelectOne.xhtml 2008-01-21 12:25:45 UTC (rev 7166)
@@ -0,0 +1,18 @@
+<s:fragment
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:selectOneMenu value="#{v.value}" tabindex="1">
+ <s:selectItems value="#{editorSelectOne.getAllValues(v.preferenceProperty)}"
+ var="templateValue"
+ label="#{templateValue}"
+ noSelectionLabel="#{editorSelectOne.isNullable(v.preferenceProperty)
+ ? messages['lacewiki.preferences.editor.SelectNone']
+ : null}"/>
+ </h:selectOneMenu>
+
+</s:fragment>
\ No newline at end of file
[View Less]
17 years, 1 month
Seam SVN: r7165 - trunk/src/main/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-01-21 07:04:34 -0500 (Mon, 21 Jan 2008)
New Revision: 7165
Modified:
trunk/src/main/org/jboss/seam/security/RuleBasedIdentity.java
Log:
fixed npe
Modified: trunk/src/main/org/jboss/seam/security/RuleBasedIdentity.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/RuleBasedIdentity.java 2008-01-21 11:45:19 UTC (rev 7164)
+++ trunk/src/main/org/jboss/seam/security/RuleBasedIdentity.…
[View More]java 2008-01-21 12:04:34 UTC (rev 7165)
@@ -222,45 +222,48 @@
*/
private void synchronizeContext()
{
- for ( Group sg : getSubject().getPrincipals(Group.class) )
+ if (getSecurityContext() != null)
{
- if ( ROLES_GROUP.equals( sg.getName() ) )
+ for ( Group sg : getSubject().getPrincipals(Group.class) )
{
- Enumeration e = sg.members();
- while (e.hasMoreElements())
+ if ( ROLES_GROUP.equals( sg.getName() ) )
{
- Principal role = (Principal) e.nextElement();
-
- boolean found = false;
- Iterator<Role> iter = getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class));
- while (iter.hasNext())
+ Enumeration e = sg.members();
+ while (e.hasMoreElements())
{
- Role r = iter.next();
- if (r.getName().equals(role.getName()))
+ Principal role = (Principal) e.nextElement();
+
+ boolean found = false;
+ Iterator<Role> iter = getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class));
+ while (iter.hasNext())
{
- FactHandle fh = getSecurityContext().getFactHandle(r);
- found = true;
- break;
+ Role r = iter.next();
+ if (r.getName().equals(role.getName()))
+ {
+ FactHandle fh = getSecurityContext().getFactHandle(r);
+ found = true;
+ break;
+ }
}
+
+ if (!found)
+ {
+ getSecurityContext().insert(new Role(role.getName()));
+ }
+
}
-
- if (!found)
- {
- getSecurityContext().insert(new Role(role.getName()));
- }
-
}
- }
- }
-
- Iterator<Role> iter = getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class));
- while (iter.hasNext())
- {
- Role r = iter.next();
- if (!super.hasRole(r.getName()))
+ }
+
+ Iterator<Role> iter = getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class));
+ while (iter.hasNext())
{
- FactHandle fh = getSecurityContext().getFactHandle(r);
- getSecurityContext().retract(fh);
+ Role r = iter.next();
+ if (!super.hasRole(r.getName()))
+ {
+ FactHandle fh = getSecurityContext().getFactHandle(r);
+ getSecurityContext().retract(fh);
+ }
}
}
}
[View Less]
17 years, 1 month