Author: simoneg
Date: Mon Oct 19 23:32:29 2009
New Revision: 826881
URL: http://svn.apache.org/viewvc?rev=826881&view=rev
Log:
LABS-483 contributed component content feed
Added:
labs/magma/trunk/fragment-contentFeed-web/pom.xml
labs/magma/trunk/fragment-contentFeed-web/src/
labs/magma/trunk/fragment-contentFeed-web/src/main/
labs/magma/trunk/fragment-contentFeed-web/src/main/java/
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/magma/
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/magma/web/
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/magma/web/contentFeed/
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/magma/web/contentFeed/AddFeedToContentWebHandler.aj
Added: labs/magma/trunk/fragment-contentFeed-web/pom.xml
URL:
http://svn.apache.org/viewvc/labs/magma/trunk/fragment-contentFeed-web/pom.xml?rev=826881&view=auto
==============================================================================
--- labs/magma/trunk/fragment-contentFeed-web/pom.xml (added)
+++ labs/magma/trunk/fragment-contentFeed-web/pom.xml Mon Oct 19 23:32:29 2009
@@ -0,0 +1,80 @@
+<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>
+ <groupId>org.apache.magma</groupId>
+ <artifactId>fragment-contentFeed-web</artifactId>
+ <packaging>magma</packaging>
+ <version>0.0.2-SNAPSHOT</version>
+ <parent>
+ <artifactId>magma-parent</artifactId>
+ <groupId>org.apache.magma</groupId>
+ <version>2</version>
+ </parent>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.magma</groupId>
+ <artifactId>fragment-contentFeed-domain</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.magma</groupId>
+ <artifactId>fragment-content-web</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.magma</groupId>
+ <artifactId>foundation-website</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.magma</groupId>
+ <artifactId>website-beansview</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.magma</groupId>
+ <artifactId>website-administration</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.magma</groupId>
+ <artifactId>foundation-database</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.magma</groupId>
+ <artifactId>website-feed</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>semeru-snaps</id>
+ <name>Semeru snapshots</name>
+ <url>http://svn.semeru.it/maven-snaps</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>semeru-snaps</id>
+ <name>Semeru snapshots</name>
+ <url>http://svn.semeru.it/maven-snaps</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ <scm>
+
<connection>scm:svn:http://svn.semeru.it/svn/magma/fragments/fragment-contentFeed-web</connection>
+
<developerConnection>scm:svn:https://svn.semeru.it:4443/svn/magma/fragments/fragment-contentFeed-web/</developerConnection>
+
<url>http://svn.semeru.it/svn/magma/fragments/fragment-contentFeed-web</url>
+ </scm>
+</project>
\ No newline at end of file
Added:
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/magma/web/contentFeed/AddFeedToContentWebHandler.aj
URL:
http://svn.apache.org/viewvc/labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/magma/web/contentFeed/AddFeedToContentWebHandler.aj?rev=826881&view=auto
==============================================================================
---
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/magma/web/contentFeed/AddFeedToContentWebHandler.aj
(added)
+++
labs/magma/trunk/fragment-contentFeed-web/src/main/java/org/apache/magma/web/contentFeed/AddFeedToContentWebHandler.aj
Mon Oct 19 23:32:29 2009
@@ -0,0 +1,28 @@
+package org.apache.magma.web.contentFeed;
+
+import java.util.List;
+
+import org.apache.magma.database.Database;
+import org.apache.magma.domain.content.Content;
+import org.apache.magma.domain.content.ContentCategory;
+import org.apache.magma.website.Producer;
+import org.apache.magma.website.feed.RssFeedProducer;
+import org.apache.magma.web.content.ContentWebHandler;
+import java.util.List;
+
+public aspect AddFeedToContentWebHandler {
+ public Producer ContentWebHandler.doFeed(){
+ List<Content> items = new Database().query(Content.class, 0,
10, "");
+ RssFeedProducer feed = new RssFeedProducer(Content.class,
items, "doShow");
+ feed.setFeedTitle("Feed RSS");
+ feed.setFeedDescription("");
+ return feed;
+ }
+ public Producer ContentWebHandler.doCategoryFeed(ContentCategory
category){
+ List<Content> items = new Database().query(Content.class, 0,
10, "where x.category=?1", category);
+ RssFeedProducer feed = new RssFeedProducer(Content.class,
items, "doShow");
+ feed.setFeedTitle("Feed RSS");
+ feed.setFeedDescription("");
+ return feed;
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]