You are viewing a plain text version of this content. The canonical link for it is here.
Posted to portalapps-dev@portals.apache.org by vk...@apache.org on 2009/03/16 18:25:33 UTC

svn commit: r754965 [1/2] - in /portals/applications/rss/trunk: ./ rss-jar/ rss-jar/src/ rss-jar/src/main/ rss-jar/src/main/java/ rss-jar/src/main/java/org/ rss-jar/src/main/java/org/apache/ rss-jar/src/main/java/org/apache/portals/ rss-jar/src/main/ja...

Author: vkumar
Date: Mon Mar 16 17:25:31 2009
New Revision: 754965

URL: http://svn.apache.org/viewvc?rev=754965&view=rev
Log:
Aligning Rss portlet to Portal apps structure
http://issues.apache.org/jira/browse/APA-3

Added:
    portals/applications/rss/trunk/
    portals/applications/rss/trunk/pom.xml
      - copied, changed from r750897, portals/applications/rss/pom.xml
    portals/applications/rss/trunk/rss-jar/
      - copied from r750897, portals/applications/rss/rss-jar/
    portals/applications/rss/trunk/rss-jar/src/
    portals/applications/rss/trunk/rss-jar/src/main/
    portals/applications/rss/trunk/rss-jar/src/main/java/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/AbstractRssPortlet.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RSSPortlet.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RomeRSSPortlet.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RssInfo.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_en.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_es.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_fr.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_hu.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_it.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ja.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ko.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ua.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh_TW.properties
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/servlets/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/servlets/SpringInitServlet.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/Transform.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCache.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCacheEntry.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformException.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformObjectPublisher.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/impl/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/impl/JetspeedTransform.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/impl/MemoryTransformCache.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/impl/TransformDTDEntityResolver.java
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/util/
    portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/util/Streams.java
    portals/applications/rss/trunk/rss-war/
      - copied from r750897, portals/applications/rss/rss-war/
    portals/applications/rss/trunk/rss-war/src/
    portals/applications/rss/trunk/rss-war/src/main/
    portals/applications/rss/trunk/rss-war/src/main/webapp/
      - copied from r750897, portals/applications/rss/src/main/webapp/
Modified:
    portals/applications/rss/trunk/rss-jar/pom.xml
    portals/applications/rss/trunk/rss-war/pom.xml

Copied: portals/applications/rss/trunk/pom.xml (from r750897, portals/applications/rss/pom.xml)
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/pom.xml?p2=portals/applications/rss/trunk/pom.xml&p1=portals/applications/rss/pom.xml&r1=750897&r2=754965&rev=754965&view=diff
==============================================================================
--- portals/applications/rss/pom.xml (original)
+++ portals/applications/rss/trunk/pom.xml Mon Mar 16 17:25:31 2009
@@ -27,14 +27,14 @@
     </prerequisites>
 
     <!-- POM Identification -->
-
-    <artifactId>rss-main</artifactId>
     <parent>
-        <groupId>org.apache.portals.applications</groupId>
+        <groupId>org.apache.portals</groupId>
         <artifactId>applications</artifactId>
-        <version>2.2-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
+        <version>1.0-SNAPSHOT</version>
     </parent>
+    
+    <groupId>org.apache.portals.applications</groupId>
+    <artifactId>apa-rss</artifactId>
     <packaging>pom</packaging>
     <name>Portals RSS Application</name>
     <description>

Modified: portals/applications/rss/trunk/rss-jar/pom.xml
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/pom.xml?rev=754965&r1=750897&r2=754965&view=diff
==============================================================================
--- portals/applications/rss/trunk/rss-jar/pom.xml (original)
+++ portals/applications/rss/trunk/rss-jar/pom.xml Mon Mar 16 17:25:31 2009
@@ -1,127 +1,125 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-  $Id:$
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <prerequisites>
-        <maven>2.0.4</maven>
-    </prerequisites>
-
-    <!-- POM Identification -->
-
-    <artifactId>portals-rss</artifactId>
-    <parent>
-        <groupId>org.apache.portals.applications</groupId>
-        <artifactId>rss-main</artifactId>
-        <version>2.2-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <packaging>jar</packaging>
-    <name>Portals RSS Application JAR</name>
-
-    <!-- Build Configuration -->
-
-    <build>
-
-        <!-- Standard Directories -->
-        <sourceDirectory>../src/java</sourceDirectory>
-        <scriptSourceDirectory>../src/scripts</scriptSourceDirectory>
-        <testSourceDirectory>../src/test</testSourceDirectory>
-
-        <!-- Resources -->
-        <resources>
-            <resource>
-                <directory>../src/main/java</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </resource>
-        </resources>
-
-        <!-- Test Resources -->
-        <testResources>
-            <testResource>
-                <directory>../src/main/java</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </testResource>
-            <testResource>
-                <directory>../src/test/java</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </testResource>
-        </testResources>
-
-    </build>
-
-    <!-- Dependencies -->
-
-    <dependencies>
-
-        <!-- Build Dependencies -->
-        <dependency>
-            <groupId>org.apache.portals.bridges</groupId>
-            <artifactId>portals-bridges-velocity</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>velocity</groupId>
-            <artifactId>velocity</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>rome</groupId>
-            <artifactId>rome</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>jdom</groupId>
-            <artifactId>jdom</artifactId>
-        </dependency>
-
-        <!-- Runtime Dependencies -->
-        <dependency>
-            <groupId>xml-apis</groupId>
-            <artifactId>xml-apis</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>xerces</groupId>
-            <artifactId>xercesImpl</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-            <scope>runtime</scope>
-        </dependency>
+	<!--
+		Licensed to the Apache Software Foundation (ASF) under one or more
+		contributor license agreements. See the NOTICE file distributed with
+		this work for additional information regarding copyright ownership.
+		The ASF licenses this file to You under the Apache License, Version
+		2.0 (the "License"); you may not use this file except in compliance
+		with the License. You may obtain a copy of the License at
+
+		http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+		applicable law or agreed to in writing, software distributed under the
+		License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+		CONDITIONS OF ANY KIND, either express or implied. See the License for
+		the specific language governing permissions and limitations under the
+		License. $Id:$
+	-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<prerequisites>
+		<maven>2.0.4</maven>
+	</prerequisites>
+
+	<!-- POM Identification -->
+	<parent>
+		<groupId>org.apache.portals.applications</groupId>
+		<artifactId>apa-rss</artifactId>
+		<version>1.0-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>apa-rss-jar</artifactId>
+	<packaging>jar</packaging>
+	<name>Portals RSS Application JAR</name>
+
+	<properties>
+		<portlet-api.version>2.0</portlet-api.version>
+		<javax.servlet.version>2.4</javax.servlet.version>
+		<org.apache.portals.bridges.velocity.version>1.0.4</org.apache.portals.bridges.velocity.version>
+		<spring.version>2.5.2</spring.version>
+		<velocity.version>1.5</velocity.version>
+		<xalan.version>2.4.1</xalan.version>
+		<xerces.version>2.3.0</xerces.version>
+		<xml-apis.version>2.0.2</xml-apis.version>
+		<rome.version>0.8</rome.version>
+		<commons-logging.version>1.1</commons-logging.version>
+		<rome.version>0.8</rome.version>
+		<jdom.version>1.0</jdom.version>
+		<portlet-api.version>1.0</portlet-api.version>
+		<javax.servlet.version>2.4</javax.servlet.version>
+	</properties>
+
+	<!-- Dependencies -->
+
+	<dependencies>
+
+		<!-- Build Dependencies -->
+		<dependency>
+			<groupId>javax.portlet</groupId>
+			<artifactId>portlet-api</artifactId>
+			<version>${portlet-api.version}</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>${javax.servlet.version}</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.portals.bridges</groupId>
+			<artifactId>portals-bridges-velocity</artifactId>
+			<version>${org.apache.portals.bridges.velocity.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>velocity</groupId>
+			<artifactId>velocity</artifactId>
+			<version>${velocity.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>${commons-logging.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>rome</groupId>
+			<artifactId>rome</artifactId>
+			<version>${rome.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>jdom</groupId>
+			<artifactId>jdom</artifactId>
+			<version>${jdom.version}</version>
+		</dependency>
+
+
+		<!-- Runtime Dependencies -->
+		<dependency>
+			<groupId>xml-apis</groupId>
+			<artifactId>xml-apis</artifactId>
+			<scope>runtime</scope>
+			<version>${xml-apis.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<scope>runtime</scope>
+			<version>${xerces.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>xalan</groupId>
+			<artifactId>xalan</artifactId>
+			<scope>runtime</scope>
+			<version>${xalan.version}</version>
+		</dependency>
 
-    </dependencies>
+	</dependencies>
 
 </project>

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/AbstractRssPortlet.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/AbstractRssPortlet.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/AbstractRssPortlet.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/AbstractRssPortlet.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.rss;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.portals.applications.rss.servlets.SpringInitServlet;
+import org.apache.portals.applications.transform.Transform;
+import org.apache.portals.applications.transform.TransformCache;
+import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
+import org.springframework.beans.factory.BeanFactory;
+
+
+/**
+ * AbstractRssPortlet
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: AbstractRssPortlet.java 516448 2007-03-09 16:25:47Z ate $
+ */
+public abstract class AbstractRssPortlet extends GenericVelocityPortlet
+{
+    protected TransformCache cache;
+    protected Transform transform;
+
+    public void init(PortletConfig config) throws PortletException
+    {
+        super.init(config);
+        BeanFactory factory = SpringInitServlet.getSpringFactory();
+        cache = (TransformCache)factory.getBean("transformCache");
+        transform = (Transform)factory.getBean("transform");           
+    }
+
+    public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException
+    {
+        response.setContentType("text/html");        
+        doPreferencesEdit(request, response);
+    }
+
+    /**
+     * Save the prefs
+     */
+    public void processAction(ActionRequest request, ActionResponse actionResponse) throws PortletException,
+            IOException
+    {
+        processPreferencesAction(request, actionResponse);
+        String url = request.getPreferences().getValue("url", "http://www.npr.org/rss/rss.php?topicId=4");
+        String stylesheet = getPortletConfig().getInitParameter("stylesheet");
+        String key = cache.constructKey(url, stylesheet); // TODO: use the entire parameter list        
+        cache.remove(key);
+    }
+    
+}

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RSSPortlet.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RSSPortlet.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RSSPortlet.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RSSPortlet.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,223 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.rss;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletPreferences;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.portals.applications.transform.TransformCacheEntry;
+import org.apache.portals.applications.util.Streams;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+
+
+/**
+ * RSSPortlet
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: RSSPortlet.java 517719 2007-03-13 15:05:48Z ate $
+ */
+public class RSSPortlet extends AbstractRssPortlet implements EntityResolver
+{
+
+    private Document document = null;
+
+    private Map stylesheets = null;
+    
+    public void init(PortletConfig config) throws PortletException
+    {
+        super.init(config);
+
+        // load stylesheets available
+        stylesheets = new HashMap();
+
+        Enumeration e = this.getPortletConfig().getInitParameterNames();
+        while (e.hasMoreElements())
+        {
+            String name = (String) e.nextElement();
+            String base = "text/html";
+
+            if (name.startsWith("stylesheet"))
+            {
+                int idx = -1;
+                if ((idx = name.indexOf(".")) > -1)
+                {
+                    base = name.substring(idx + 1, name.length());
+                }
+                stylesheets.put(base, getPortletConfig().getInitParameter(name));
+            }
+        }
+    }
+
+    public InputSource resolveEntity(String publicId, String systemId)
+    {
+        try
+        {
+            //access Jetspeed cache and get a java.io.Reader
+            Reader rdr = openURL(publicId);
+            InputSource is = new InputSource(rdr);
+            is.setPublicId(publicId);
+            is.setSystemId(systemId);
+            return is;
+        }
+        catch (IOException x)
+        {
+            System.err.println("Entity Resolution error: ( " + publicId + " Taking " + systemId + " from cache throwed Exception: " + x);
+
+        }
+        return null;
+    }
+
+    private Reader openURL(String urlPath) throws IOException
+    {
+        URL url = new URL(urlPath);
+        URLConnection conn = url.openConnection();
+
+        String enc = conn.getContentEncoding();
+        if (enc == null)
+        {
+            enc = "ISO-8859-1";
+        }
+
+        BufferedInputStream is = new BufferedInputStream(conn.getInputStream());
+        is.mark(20480);
+        BufferedReader asciiReader = new BufferedReader(new InputStreamReader(is, "ASCII"));
+        String decl = asciiReader.readLine();
+        String key = "encoding=\"";
+        if (decl != null)
+        {
+            int off = decl.indexOf(key);
+            if (off > 0)
+            {
+                enc = decl.substring(off + key.length(), decl.indexOf('"', off + key.length()));
+            }
+        }
+        //Reset the bytes read
+        is.reset();
+        Reader rdr = new InputStreamReader(is, enc);
+        return rdr;
+    }    
+    
+    public Document getDocument(String url)
+    throws Exception
+    {
+        DocumentBuilder parser = null;
+        
+        // read content, clean it, parse it and cache the DOM try { final
+        DocumentBuilderFactory docfactory = DocumentBuilderFactory.newInstance(); //Have it non-validating
+        docfactory.setValidating(false); 
+        parser = docfactory.newDocumentBuilder(); 
+        parser.setEntityResolver(this);
+
+        Reader rdr = openURL(url);
+        InputSource isrc = new InputSource(rdr);
+        isrc.setSystemId(url);
+        this.document = parser.parse(isrc);
+        return document;        
+    }
+    
+    
+    public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+    {
+        response.setContentType("text/html");
+        
+        
+        PortletPreferences prefs = request.getPreferences();
+            
+        // TODO: use stylesheet based on mimetype            
+        String stylesheet = getPortletConfig().getInitParameter("stylesheet");
+        String realStylesheet = getPortletConfig().getPortletContext().getRealPath(stylesheet);
+        String url = prefs.getValue("url", "http://news.bbc.co.uk/rss/sportonline_uk_edition/football/internationals/england/squad_profiles/rss091.xml");        
+
+        String key = cache.constructKey(url, stylesheet); // TODO: use the entire parameter list
+        TransformCacheEntry entry = cache.get(key);
+        if (entry != null)
+        {
+            byte[] bytes = (byte[])entry.getDocument();
+            Streams.drain(new StringReader(new String(bytes,"UTF-8")),  response.getWriter());
+        }
+        else
+        {
+            try
+            {
+                Document document = getDocument(url);
+                InputSource source = new InputSource(url);
+                source.setSystemId(url); 
+                source.setEncoding("UTF-8");                
+                
+                Map parameters = new HashMap();            
+                parameters.put("itemdisplayed", prefs.getValue("itemdisplayed", "15"));
+                parameters.put("openinpopup", prefs.getValue("openinpopup", "true"));
+                parameters.put("showdescription", prefs.getValue("showdescription", "true"));
+                parameters.put("showtitle", prefs.getValue("showtitle", "true"));
+                parameters.put("showtextinput", prefs.getValue("showtextinput", "true"));
+                           
+                StringWriter sw= new StringWriter();
+                transform.transform(realStylesheet, source, sw, parameters); //response.getPortletOutputStream(), parameters);
+                Streams.drain(new StringReader(sw.toString()), response.getWriter());
+                try
+                {
+                	// Java 1.5 only
+                    // String t = document.getDocumentElement().getElementsByTagName("title").item(0).getTextContent();
+                    NodeList nodes = document.getDocumentElement().getElementsByTagName("title");
+                    if (nodes != null)
+                    {
+                        Node node = nodes.item(0);
+                        if (node != null)
+                        {
+                            Node title = node.getFirstChild();
+                            if (title != null)
+                                response.setTitle(title.getNodeValue());
+                        }
+                    }
+                }
+                catch(Exception e)
+                {
+                	
+                }
+                
+                cache.put(key, sw.toString().getBytes("UTF-8"), 15);                
+            }
+            catch (Exception ex)
+            {
+                response.getPortletOutputStream().write(new String("Failed to process RSS Feed: " + url + ", " + ex).getBytes());
+            }
+        }
+    }
+    
+}
\ No newline at end of file

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RomeRSSPortlet.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RomeRSSPortlet.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RomeRSSPortlet.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RomeRSSPortlet.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.rss;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletPreferences;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
+
+import org.apache.velocity.context.Context;
+
+import com.sun.syndication.feed.synd.SyndFeed;
+import com.sun.syndication.io.SyndFeedInput;
+import com.sun.syndication.io.XmlReader;
+
+/**
+ * Rome RSS Portlet
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: RomeRSSPortlet.java 516448 2007-03-09 16:25:47Z ate $
+ */
+public class RomeRSSPortlet extends GenericVelocityPortlet
+{
+
+    protected Log log = LogFactory.getLog(RomeRSSPortlet.class);
+
+    /**
+     * @see javax.portlet.Portlet#init(javax.portlet.PortletConfig)
+     */
+    public void init(PortletConfig config) throws PortletException
+    {
+        super.init(config);
+
+    }
+
+    /**
+     * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
+     */
+    public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+    {
+
+        response.setContentType("text/html");
+        Context velocityContext = this.getContext(request);
+        PortletPreferences prefs = request.getPreferences();
+        String url = prefs.getValue("url", "http://www.npr.org/rss/rss.php?topicId=4");
+        try
+        {
+            URL feedUrl = new URL(url);
+            SyndFeedInput input = new SyndFeedInput();
+
+            SyndFeed feed = input.build(new XmlReader(feedUrl));
+
+            RssInfo rssInfo = new RssInfo(feed, new Integer(prefs.getValue("itemdisplayed", "15")).intValue(), new Boolean(prefs
+                    .getValue("openinpopup", "true")).booleanValue(), new Boolean(prefs.getValue("showdescription", "true"))
+                    .booleanValue(), new Boolean(prefs.getValue("showtitle", "true")).booleanValue(), new Boolean(prefs.getValue(
+                    "showtextinput", "true")).booleanValue());
+            if (feed.getTitle() != null)
+                response.setTitle(feed.getTitle());
+            velocityContext.put("rssInfo", rssInfo);
+
+            super.doView(request, response);
+
+        }
+        catch (Exception e)
+        {
+            throw new PortletException(new String("Failed to process RSS Feed: " + url + ", " + e));
+        }
+
+    }
+
+    /**
+     * 
+     * @see javax.portlet.GenericPortlet#doEdit(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
+     */
+    public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException
+    {
+        response.setContentType("text/html");
+        doPreferencesEdit(request, response);
+    }
+
+    /**
+     * 
+     * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
+     */
+    public void processAction(ActionRequest request, ActionResponse actionResponse) throws PortletException, java.io.IOException
+    {
+        String add = request.getParameter("Save");
+        if (add != null)
+        { 
+            processPreferencesAction(request, actionResponse);
+        }
+    }
+
+}
\ No newline at end of file

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RssInfo.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RssInfo.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RssInfo.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/RssInfo.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.rss;
+
+import com.sun.syndication.feed.synd.SyndFeed;
+
+/**
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: RssInfo.java 516448 2007-03-09 16:25:47Z ate $
+ */
+public class RssInfo
+{
+    private SyndFeed feed;
+    private int itemdisplayed;
+    private boolean openinpopup;
+    private boolean showdescription;
+    private boolean showtitle;
+    private boolean showtextinput;
+    
+    
+    
+    /**
+     * @param feed
+     * @param itemdisplayed
+     * @param openinpopup
+     * @param showdescription
+     * @param showtitle
+     * @param showtextinput
+     */
+    public RssInfo(SyndFeed feed, int itemdisplayed, boolean openinpopup, boolean showdescription, boolean showtitle,
+            boolean showtextinput)
+    {        
+        this.feed = feed;
+        this.itemdisplayed = itemdisplayed;
+        this.openinpopup = openinpopup;
+        this.showdescription = showdescription;
+        this.showtitle = showtitle;
+        this.showtextinput = showtextinput;
+    }
+    
+    public SyndFeed getFeed()
+    {
+        return feed;
+    }
+    public void setFeed(SyndFeed feed)
+    {
+        this.feed = feed;
+    }
+    public int getItemdisplayed()
+    {
+        return itemdisplayed;
+    }
+    public void setItemdisplayed(int itemdisplayed)
+    {
+        this.itemdisplayed = itemdisplayed;
+    }
+    public boolean isOpeninpopup()
+    {
+        return openinpopup;
+    }
+    public void setOpeninpopup(boolean openinpopup)
+    {
+        this.openinpopup = openinpopup;
+    }
+    public boolean isShowdescription()
+    {
+        return showdescription;
+    }
+    public void setShowdescription(boolean showdescription)
+    {
+        this.showdescription = showdescription;
+    }
+    public boolean isShowtextinput()
+    {
+        return showtextinput;
+    }
+    public void setShowtextinput(boolean showtextinput)
+    {
+        this.showtextinput = showtextinput;
+    }
+    public boolean isShowtitle()
+    {
+        return showtitle;
+    }
+    public void setShowtitle(boolean showtitle)
+    {
+        this.showtitle = showtitle;
+    }
+}

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources.properties 516448 2007-03-09 16:25:47Z ate $
+#
+
+error.not.valid = This does not appear to be an RSS document
+error.invalid.type = Unable to display for this browser

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_en.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_en.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_en.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_en.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_en.properties 516448 2007-03-09 16:25:47Z ate $
+#
+# LOCALIZATION MAINTAINER:
+#  Jetspeed Development Team
+
+error.not.valid = This does not appear to be an RSS document
+error.invalid.type = Unable to display for this browser

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_es.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_es.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_es.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_es.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_en.properties,v 1.2 2005/02/20 23:00:25 shinsuke Exp $
+#
+# LOCALIZATION MAINTAINER:
+#  Jetspeed Development Team
+
+error.not.valid = Esto no parece ser un documento RSS
+error.invalid.type = Imposible visualizar para este navegador

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_fr.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_fr.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_fr.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_fr.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_fr.properties 516448 2007-03-09 16:25:47Z ate $
+#
+
+error.not.valid = This does not appear to be an RSS document
+error.invalid.type = Unable to display for this browser
+
+
+

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_hu.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_hu.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_hu.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_hu.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_en.properties 188342 2005-02-20 23:00:25Z shinsuke $
+#
+# LOCALIZATION MAINTAINER:
+#  Jetspeed Development Team
+
+error.not.valid = \u00dagy t\u0171nik ez nem RSS dokumentum
+error.invalid.type = Ebben a b\u00f6ng\u00e9sz\u0151ben ez a tartalom nem megjelen\u00edthet\u0151

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_it.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_it.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_it.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_it.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#    Please contact me if you have any questions or suggestion : desmax74@yahoo.it
+#
+#    Italian version by Dessì Massimiliano  <a href="desmax74@yahoo.it.it">desmax74@yahoo.it</a>.
+#    Vers 0.1 jetspeed 2.0   03/04/2005
+
+error.not.valid = Questo non sembra essere un documento RSS
+error.invalid.type = Non visualizzabile per questo browser

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ja.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ja.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ja.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ja.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_ja.properties 516448 2007-03-09 16:25:47Z ate $
+#
+
+error.not.valid = \u3053\u308c\u306fRSS\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093
+error.invalid.type = \u3053\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ko.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ko.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ko.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ko.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_en.properties 188342 2005-02-20 23:00:25Z shinsuke $
+#
+# LOCALIZATION MAINTAINER:
+#  Jetspeed Development Team
+
+error.not.valid = RSS \ubb38\uc11c\uac00 \uc544\ub2cc \uac83\uc73c\ub85c \ubcf4\uc785\ub2c8\ub2e4.
+error.invalid.type = \uc774 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \ubcf4\uc5ec\uc9c8 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ua.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ua.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ua.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_ua.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_en.properties 188342 2005-02-20 23:00:25Z shinsuke $
+#
+# LOCALIZATION MAINTAINER:
+#  Jetspeed Development Team
+
+error.not.valid = \u0412\u0438\u044f\u0432\u043b\u044f\u0454\u0442\u044c\u0441\u044f, \u0446\u0435 \u043d\u0435 \u043d\u0435 RSS \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442
+error.invalid.type = \u041d\u0435\u043c\u043e\u0436\u043b\u0438\u0432\u043e \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0438 \u0432 \u0434\u0430\u043d\u043e\u043c\u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_en.properties 188342 2005-02-20 23:00:25Z shinsuke $
+#
+# LOCALIZATION MAINTAINER:
+#  James Liao <ji...@gmail.com>
+
+error.not.valid = \u8fd9\u4e0d\u50cf\u662f\u4e00\u4e2aRSS\u6587\u6863
+error.invalid.type = \u65e0\u6cd5\u6b63\u786e\u6d4f\u89c8

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh_TW.properties
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh_TW.properties?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh_TW.properties (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/resources/RssResources_zh_TW.properties Mon Mar 16 17:25:31 2009
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Id: RssResources_en.properties 188342 2005-02-20 23:00:25Z shinsuke $
+#
+# LOCALIZATION MAINTAINER:
+#  Cubehead Fang <cu...@gmail.com>
+
+error.not.valid = \u9019\u4e0d\u50cf\u662f\u4e00\u500bRSS\u6587\u6a94
+error.invalid.type = \u7121\u6cd5\u6b63\u78ba\u6d41\u89bd

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/servlets/SpringInitServlet.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/servlets/SpringInitServlet.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/servlets/SpringInitServlet.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/rss/servlets/SpringInitServlet.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.rss.servlets;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.xml.XmlBeanFactory;
+import org.springframework.web.context.support.ServletContextResourceLoader;
+
+/**
+ * SpringInitServlet
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: SpringInitServlet.java 517121 2007-03-12 07:45:49Z ate $
+ */
+public class SpringInitServlet extends HttpServlet
+{
+    /**
+     * Init Parameter: default spring configuration property
+     */
+    private static final String INITPARAM_SPRING_CONFIG = "spring-configuration";
+    private static Object semaphore = new Object();
+
+    /**
+     * Spring Factory 
+     */
+    private static XmlBeanFactory springFactory = null;
+    
+    
+    /**
+     * Intialize Servlet.
+     */
+    public final void init( ServletConfig config ) throws ServletException
+    {
+        super.init(config);
+        String springConfig = getInitParameter(INITPARAM_SPRING_CONFIG);       
+        if (springConfig == null) { throw new ServletException("Spring Configuration file not specified"); }
+        
+        // load Spring
+        try 
+        {
+            synchronized (semaphore)
+            {
+                if (null == springFactory)
+                {
+                    ServletContextResourceLoader resourceLoader = new ServletContextResourceLoader(this.getServletContext());
+                    springFactory = new XmlBeanFactory(resourceLoader.getResource(springConfig));
+                }
+            }
+         } 
+         catch (Exception e) 
+         {
+             throw new ServletException("Failed to load spring configuration.", e);
+         }   
+        
+    }
+    
+    public static final BeanFactory getSpringFactory()
+    {
+        return springFactory;
+    }
+    
+}

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/Transform.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/Transform.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/Transform.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/Transform.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.transform;
+
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Map;
+
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+
+/**
+ * This interface is a facade for all Transformation related operations.
+ * Transformation service abstracts the XSL Transform manipulation, maintenance,
+ * caching and transformation resolution algorithms.
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: Transform.java 516448 2007-03-09 16:25:47Z ate $
+ */
+public interface Transform
+{
+    
+    /**
+     * Performs a transform on an input stream, writing the transformed content to a Writer
+     * 
+     * @param xsltPath The path to a local XSLT file 
+     * @param inputSource The input stream and description containing content to be transformed.
+     * @param writer The output stream receiving the transformed content.
+     * @param properties Map of XSLT properties passed into transformer
+     */    
+    public void transform(String xsltPath, InputSource inputSource, Writer writer, Map properties)
+        throws TransformException;
+
+    /**
+     * Performs a transform on an input stream, writing the transformed content to a Writer
+     * 
+     * @param xsltPath The path to a local XSLT file 
+     * @param inputSource The input stream and description containing content to be transformed.
+     * @param outputStream The output stream receiving the transformed content.
+     * @param properties Map of XSLT properties passed into transformer
+     */    
+    public void transform(String xsltPath, InputSource inputSource, OutputStream os, Map properties)
+        throws TransformException;
+    
+        
+    /**
+     * Performs a transform on an input stream, writing the transformed content to a Writer
+     * 
+     * @param xsltPath The path to a local XSLT file 
+     * @param document The W3C document to be transformed.
+     * @param outputStream The output stream receiving the transformed content.
+     * @param properties Map of XSLT properties passed into transformer
+     */    
+    public TransformObjectPublisher getPublisher();
+
+    public void transform(String xsltPath, Document document, OutputStream os, Map parameters)
+        throws TransformException;
+    
+}

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCache.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCache.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCache.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCache.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.transform;
+
+import java.util.Comparator;
+import java.util.Observer;
+
+
+/**
+ * TransformCache
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: TransformCache.java 516448 2007-03-09 16:25:47Z ate $
+ */
+public interface TransformCache extends Observer, Comparator
+{
+    /**
+     * Get the maximum size of the cache 
+     *
+     * @return the current maximum size of the cache
+     */
+    public int getMaxSize();
+
+    /**
+     * Set the new maximum size of the cache 
+     *
+     * @param maxSize the maximum size of the cache
+     */
+    public void setMaxSize(int maxSize);
+    
+    /**
+     * Get the eviction percentage of the cache 
+     *
+     * @return the eviction percentage of the cache
+     */
+    public int getEvictionPercentage();
+    
+    /**
+     * Find out if TransformCache is enables 
+     *
+     * @return the enable flag of the cache
+     */
+    public boolean isEnabled();
+
+
+    /**
+     * Put a value in the TransformCache keyed off with the TransformId and the
+     * DocumentId.
+     * @param key
+     * @param document
+     */
+    public void put(String key, Object document, long timeToLive);
+
+    /**
+     * Remove a unique value keyed off with the TransformId and DocumentId from the
+     * cache.
+     * @param key
+     * @return Object
+     */
+    public Object remove(String key);
+
+    /**
+     * Retrieve the unique TransformCacheEntry keyed off with key
+     * @param key
+     * @return TransformCacheEntry
+     */
+    public TransformCacheEntry get(String key);
+
+    /**
+     * Retrieve the byte[] storing the transformed content for the transfomId
+     * and the documentId combination.
+     * @param transformId
+     * @param documentId
+     * @return Object
+     */
+    public Object getDocument(String key);
+
+    /**
+     * Construct the key for the TransformDocumentTreeMap cache
+     * @return String
+     */
+    public String constructKey(String url, String stylesheet);
+
+    
+    /**
+     * Clear the Transform Cache
+     */
+    public void clearCache();
+
+}

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCacheEntry.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCacheEntry.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCacheEntry.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformCacheEntry.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.transform;
+
+import java.util.Date;
+
+
+/**
+ * TransformCacheEntry
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: TransformCacheEntry.java 516448 2007-03-09 16:25:47Z ate $
+ */
+public class TransformCacheEntry
+{
+    protected String key;
+    protected Object document;
+    protected long lastAccessed;
+    protected long timeToLive = 15 * 60 * 1000; // in seconds, 15 minutes
+    
+    private TransformCacheEntry()
+    {
+    }
+
+    /**
+     * Constructs a TransformCacheEntry object
+     *
+     * @param key 
+     * @param timeToLive seconds to keep this in the cache
+     * @param document The user specific content being cached
+     */
+    public TransformCacheEntry(String key, Object document, long timeToLive)
+    {
+        this.key = key;
+        this.document = document;
+        this.timeToLive = timeToLive;
+        this.lastAccessed = new Date().getTime();
+    }
+
+
+    /**
+     * Set the cache's last accessed stamp
+     *
+     * @param lastAccessed the cache's last access stamp
+     */
+    public void setLastAccessed(long lastAccessed)
+    {
+        this.lastAccessed = lastAccessed;
+    }
+
+    /**
+     * Get the cache's lastAccessed stamp
+     *
+     * @return the cache's last accessed stamp
+     */
+    public long getLastAccessed()
+    {
+        return this.lastAccessed;
+    }
+
+    /**
+     * Set the Document in the cache
+     *
+     * @param document the document being cached
+     */
+    public void setDocument(Object document)
+    {
+        this.document = document;
+    }
+
+    /**
+     * Get the Document
+     *
+     * @return the document being cached
+     */
+    public Object getDocument()
+    {
+        return this.document;
+    }
+    
+
+    /**
+     * @return Returns the key.
+     */
+    public String getKey()
+    {
+        return key;
+    }
+    /**
+     * @param key The key to set.
+     */
+    public void setKey(String key)
+    {
+        this.key = key;
+    }
+    /**
+     * @return Returns the timeToLive.
+     */
+    public long getTimeToLive()
+    {
+        return timeToLive;
+    }
+    /**
+     * @param timeToLive The timeToLive in seconds
+     */
+    public void setTimeToLive(long timeToLive)
+    {
+        this.timeToLive = timeToLive;
+    }
+}

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformException.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformException.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformException.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformException.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.transform;
+
+
+/**
+ * TransformException
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: TransformException.java 516448 2007-03-09 16:25:47Z ate $
+ */
+public class TransformException extends Exception
+{
+    /**
+     * Constructs a new <code>TransformException</code> without specified detail
+     * message.
+     */
+    public TransformException()
+    {
+    }
+
+    /**
+     * Constructs a new <code>TransformException</code> with specified detail
+     * message.
+     *
+     * @param msg the error message.
+     */
+    public TransformException(String msg)
+    {
+        super(msg);
+    }
+
+    /**
+     * Constructs a new <code>TransformException</code> with specified nested
+     * <code>Throwable</code>.
+     *
+     * @param nested the exception or error that caused this exception
+     *               to be thrown.
+     */
+    public TransformException(Throwable nested)
+    {
+        super(nested);
+    }
+
+    /**
+     * Constructs a new <code>TransformException</code> with specified detail
+     * message and nested <code>Throwable</code>.
+     *
+     * @param msg the error message.
+     * @param nested the exception or error that caused this exception
+     *               to be thrown.
+     */
+    public TransformException(String msg, Throwable nested)
+    {
+        super(msg, nested);
+    }
+}

Added: portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformObjectPublisher.java
URL: http://svn.apache.org/viewvc/portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformObjectPublisher.java?rev=754965&view=auto
==============================================================================
--- portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformObjectPublisher.java (added)
+++ portals/applications/rss/trunk/rss-jar/src/main/java/org/apache/portals/applications/transform/TransformObjectPublisher.java Mon Mar 16 17:25:31 2009
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.applications.transform;
+
+import java.util.Observable;
+
+
+/**
+ * Transform Object Publisher base implementation.
+ *
+ * The Transform Object Publisher notifies observers by publishing messages when
+ * the transforms have been updated.
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: TransformObjectPublisher.java 516448 2007-03-09 16:25:47Z ate $
+ */
+public class TransformObjectPublisher extends Observable
+{
+    /**
+     * Constructor
+     *
+     */
+    public TransformObjectPublisher()
+    {
+    }
+    /**
+     * Notify all observers that object has changed.
+     * @see java.util.Observable#notifyObservers(Object ob)
+     * @param transform
+     */        
+    public void publish(Transform transform)
+    { 
+        setChanged(); 
+        notifyObservers(transform); 
+    } 
+    
+    
+
+}