[jboss-svn-commits] JBL Code SVN: r26059 - in labs/jbosslabs/trunk/portal-extensions: forge-contributor and 10 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Apr 16 07:26:29 EDT 2009


Author: unibrew
Date: 2009-04-16 07:26:29 -0400 (Thu, 16 Apr 2009)
New Revision: 26059

Added:
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/.classpath
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/.project
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/forge-contributor.iml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/maven.xml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/project.properties
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/project.xml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/etc/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/etc/Messages.properties
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConAccessBean.java
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConCacheItem.java
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConDataBean.java
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConDescriptor.java
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConMainBean.java
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConNodeWatcher.java
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConServer.java
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/FacesTools.java
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/faces-config.xml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-app.xml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-portlet.xml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-web.xml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/portlet-instances.xml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/portlet.xml
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/forge.tld
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/portlet.tld
   labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/web.xml
Log:
Adding back contributors

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/.classpath
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/.classpath	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/.classpath	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<classpath>
+  <classpathentry excluding="" kind="src" path="src/java">
+  </classpathentry>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss-forge/jars/forge-common-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/mail.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/myfaces/jars/myfaces-api-1.1.4.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/myfaces/jars/myfaces-impl-1.1.4.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/myfaces/jars/tomahawk-1.1.3.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.1.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.1.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-el/jars/commons-el-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.8.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.7.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/javax.servlet/jars/jsp-api-2.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/javax.servlet/jars/servlet-api-2.4.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xercesImpl-2.6.2.jar">
+  </classpathentry>
+  <classpathentry kind="lib" path="/Users/rysiek/Work/codeTRUNK/shotoku/shotoku-cache/cache-base/dist/shotoku-cache.jar">
+  </classpathentry>
+  <classpathentry kind="lib" path="/Users/rysiek/Work/codeTRUNK/shotoku/lib/jboss-cache/jboss-cache.jar">
+  </classpathentry>
+  <classpathentry kind="lib" path="/Users/rysiek/Work/codeTRUNK/shotoku/lib/jboss-cache/jgroups.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.9.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xmlParserAPIs-2.6.2.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/xalan/jars/xalan-2.6.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jaxb/jars/jaxb-api.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jaxb/jars/jsr173_1.0_api.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jaxb/jars/activation.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jaxb/jars/jaxb-impl.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jaxb/jars/jaxb-xjc.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/portlet-api/jars/portlet-api-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-jmx.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-common.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-common-lib.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-common-portal-lib.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-identity-lib.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-core-lib.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-portlet-api-lib.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-api-lib.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-portlet-lib.jar">
+  </classpathentry>
+  <classpathentry kind="lib" path="/Users/rysiek/Work/codeTRUNK/shotoku/shotoku-base/target/shotoku-base.jar">
+  </classpathentry>
+  <classpathentry kind="lib" path="/Users/rysiek/Work/codeTRUNK/shotoku/shotoku-aop/target/shotoku-aop.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-dep-1.4.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/javassist.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/trove.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/concurrent.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-aop-jdk50.jar">
+  </classpathentry>
+  <classpathentry kind="output" path="target/classes">
+  </classpathentry>
+</classpath>
\ No newline at end of file

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/.project
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/.project	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/.project	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<projectDescription>
+  <name>forge-contributor</name>
+  <comment>
+  </comment>
+  <projects>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments>
+      </arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/forge-contributor.iml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/forge-contributor.iml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/forge-contributor.iml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="web" name="Web">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/web/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/src/web" relative="/" />
+        </webroots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="forge-contributor">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+      <facet type="jsf" name="JSF">
+        <configuration />
+      </facet>
+    </facet>
+    <facet type="web" name="Web2">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/target/forge-contributor/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/target/forge-contributor" relative="/" />
+        </webroots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="forge-contributor">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <output url="file://$MODULE_DIR$/target" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="forge-common" />
+    <orderEntry type="library" name="jboss" level="application" />
+    <orderEntry type="module" module-name="shotoku-aop" />
+    <orderEntry type="module" module-name="shotoku-base" />
+    <orderEntry type="library" name="myfaces" level="application" />
+    <orderEntry type="library" name="portal" level="application" />
+    <orderEntryProperties />
+  </component>
+</module>
+

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/maven.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/maven.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/maven.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,25 @@
+<!-- 
+	JBoss, the OpenSource J2EE webOS
+	Distributable under LGPL license.
+	See terms of license at gnu.org. 
+-->
+<project xmlns:j="jelly:core" xmlns:ant="jelly:ant"
+	xmlns:u="jelly:util">
+	<!-- Default war-project goals -->
+
+	<goal name="all">
+		<attainGoal name="prj-all" />
+	</goal>
+
+	<goal name="build">
+		<attainGoal name="prj-war-build" />
+	</goal>
+
+	<goal name="deploy">
+		<attainGoal name="prj-war-deploy" />
+	</goal>
+
+	<goal name="clean">
+		<attainGoal name="prj-clean" />
+	</goal>
+</project>

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/project.properties
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/project.properties	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/project.properties	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,9 @@
+maven.repo.remote=http://repo1.maven.org/maven
+maven.junit.fork=yes
+maven.war.src=${basedir}/src/web
+maven.war.classes.includes=**/*.class
+maven.war.classes.excludes=
+maven.jar.excludes=**/*.class
+maven.jar.includes=**/*.properties
+
+maven.final.name=${pom.artifactId}
\ No newline at end of file

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/project.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/project.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/project.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,244 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!-- 
+	JBoss, the OpenSource J2EE webOS
+	Distributable under LGPL license.
+	See terms of license at gnu.org. 
+-->
+<project>
+	<pomVersion>3</pomVersion>
+	<extend>../common.xml</extend>
+	<id>forge-contributor</id>
+	<name>Forge contributor application portlet</name>
+	<currentVersion>1.0</currentVersion>
+	<organization>
+		<name>Adam Warski</name>
+		<url>http://mamut.net.pl</url>
+	</organization>
+	<description></description>
+
+	<dependencies>
+		<dependency>
+			<groupId>jboss-forge</groupId>
+			<artifactId>forge-common</artifactId>
+			<version>1.0</version>
+		</dependency>
+
+		<dependency>
+			<groupId>jboss</groupId>
+			<artifactId>mail</artifactId>
+			<version>1.0</version>
+			<jar>mail.jar</jar>
+		</dependency>
+
+		<dependency>
+			<groupId>myfaces</groupId>
+			<artifactId>myfaces-api</artifactId>
+			<version>1.1.4</version>
+            <properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+        </dependency>
+		<dependency>
+			<groupId>myfaces</groupId>
+			<artifactId>myfaces-impl</artifactId>
+			<version>1.1.4</version>
+            <properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+        </dependency>
+
+		<dependency>
+			<groupId>myfaces</groupId>
+			<artifactId>tomahawk</artifactId>
+			<version>1.1.3</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+        
+        <dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload.jar</artifactId>
+			<version>1.1</version>
+			<jar>commons-fileupload-1.1.jar</jar>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.1</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+        <dependency>
+			<groupId>commons-el</groupId>
+			<artifactId>commons-el</artifactId>
+			<version>1.0</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+        <dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.2</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+        <dependency>
+			<groupId>commons-digester</groupId>
+			<artifactId>commons-digester</artifactId>
+			<version>1.8</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.7.0</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-lang</groupId>
+			<artifactId>commons-lang</artifactId>
+			<version>2.3</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.3</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>1.3</version>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+
+		<dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jsp-api</artifactId>
+            <version>2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.4</version>
+        </dependency>
+
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>2.6.2</version>
+		</dependency>
+
+
+        
+	        <dependency>
+		            <groupId>shotoku-cache</groupId>
+			                <artifactId>shotoku-cache</artifactId>
+					            <jar>shotoku-cache.jar</jar>
+						            </dependency>
+							            
+								            <dependency>
+									                <groupId>jboss-cache</groupId>
+											            <artifactId>jboss-cache</artifactId>
+												                <jar>jboss-cache.jar</jar>
+														        </dependency>
+															        
+																        <dependency>
+																	            <groupId>jgroups</groupId>
+																		                <artifactId>jgroups</artifactId>
+																				            <jar>jgroups.jar</jar>
+																					            </dependency>
+
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.9</version>
+        </dependency>
+
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xmlParserAPIs</artifactId>
+			<version>2.6.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>xalan</groupId>
+			<artifactId>xalan</artifactId>
+			<version>2.6.0</version>
+		</dependency>
+
+		<dependency>
+			<groupId>jaxb</groupId>
+			<artifactId>JAXB2</artifactId>
+			<version>2.0</version>
+			<jar>jaxb-api.jar</jar>
+		</dependency>
+		<dependency>
+			<groupId>jaxb</groupId>
+			<artifactId>JAXB2173API</artifactId>
+			<version>1.0</version>
+			<jar>jsr173_1.0_api.jar</jar>
+		</dependency>
+		<dependency>
+			<groupId>jaxb</groupId>
+			<artifactId>Activation</artifactId>
+			<version>1.0</version>
+			<jar>activation.jar</jar>
+		</dependency>
+		<dependency>
+			<groupId>jaxb</groupId>
+			<artifactId>JAXBIMPL</artifactId>
+			<version>2.0</version>
+			<jar>jaxb-impl.jar</jar>
+		</dependency>
+		<dependency>
+			<groupId>jaxb</groupId>
+			<artifactId>XJC</artifactId>
+			<version>2.0</version>
+			<jar>jaxb-xjc.jar</jar>
+		</dependency>
+
+		<dependency>
+			<groupId>jboss-forge</groupId>
+			<artifactId>forge-common</artifactId>
+			<version>1.0</version>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<sourceDirectory>src/java</sourceDirectory>
+		<resources>
+			<resource>
+				<directory>src/etc/</directory>
+				<include>**/*.properties</include>
+			</resource>
+		</resources>
+	</build>
+</project>

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/etc/Messages.properties
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/etc/Messages.properties	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/etc/Messages.properties	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,29 @@
+applicationAdded Success\! Your application has been added. Soon you will get an e-mail with a confirmation code.
+unableToAdd We are unable to add your application right now. Please try again later.
+unableToConfirm We are unable to confirm your application right now. Please try again later.
+confirmationCodeInvalid The confirmation code is invalid.
+confirmationSucceeded Your application has been successfully confirmed. You will receive an email when your application will be accepted or rejected.
+
+adminMailSubject New contributors application
+adminMailText New application added to agreements.xml; please accept it or delete\: \n {0} \nTo accept/delete the application go to the following website and click the "Administer applications" link\: \n{1}
+
+deletedMailSubject Application deletion
+deletedMailText Dear {0}, \n\nI am sorry to inform you that your application to become \na contributor to JBoss has been rejected. \n{1}\nThe JBoss Labs team.
+deletedMailTextWithComment Dear {0}, \n\nI am sorry to inform you that your application to become \na contributor to JBoss has been rejected. \n{1}\n\nThe JBoss Labs team.
+	
+acceptedMailSubject Application acceptation
+acceptedMailText Dear {0}, \n\nI am happy to inform you that your application to become \na contributor to JBoss has been accepted. Your name should \nnow be visible on the contributor's list on labs.jboss.com. \n\nThe JBoss Labs team.
+acceptedMailTextAdmin A new contributor has been accepted. \nName\: {0} \nProjects\: {4} \nEmail\: {1} \nType\: {2} \nLogin\: {3}
+
+confirmMailSubject Application confirmation
+confirmMailText Dear {0}, \n\nYou have applied to become a contributor to JBoss. \nThis e-mail was sent to you to confirm your application. \nIf you have not applied using the labs.jboss.com website, \nplease accept our apologies. \n\nTo confirm your application please click this link, or \ncopy-paste it into your web browser\: \n{1}\n\nThe JBoss Labs team.
+
+notAllFieldsFilledError Error\: not all fields have been filled.
+nameAlreadyExistsError Error\: the name you gave already exists.
+
+applicationAccepted Success\! Application accepted.
+applicationDeleted Success\! Application deleted.
+commitError Error\! Please check the xml descriptor.
+
+committerAccessMailSubject Committer access for
+committerAccessMailText A new contributor requested committer access. \nName\: {0} \nProjects\: {4} \nEmail\: {1} \nType\: {2} \nLogin\: {3}
\ No newline at end of file

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConAccessBean.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConAccessBean.java	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConAccessBean.java	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.forge.contributor;
+
+
+/**
+ * @author adamw
+ * A request-scoped bean for managing access rights to various pages of
+ * the portlet.
+ */
+public class ConAccessBean {
+
+	public boolean isAdminLogged() {
+        return isUserLogged() && FacesTools.hasPermission("con-admin");
+	}
+
+	public boolean isProjectLeadLogged() {
+		return FacesTools.isProjectLead();
+	}
+	
+	public boolean isUserLogged() {
+        return FacesTools.getRemoteUser() != null;
+	}
+}

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConCacheItem.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConCacheItem.java	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConCacheItem.java	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,7 @@
+package org.jboss.forge.contributor;
+
+/**
+ * @author <a href="mailto:adamw at aster.pl">Adam Warski</a>
+ */
+public class ConCacheItem {
+}

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConDataBean.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConDataBean.java	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConDataBean.java	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,236 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.forge.contributor;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.forge.common.projects.Projects;
+import org.jboss.forge.common.projects.ProjectsHelper;
+
+/**
+ * @author adamw
+ * @author dejp
+ * A bean holding information about one contributor.
+ */
+public class ConDataBean {
+	
+	private String name;
+	private String projects;
+	private String since;
+	private String type;
+	private String email;
+	private String accepted;
+	private String login;
+	private Date sinceDate;
+	private Map<String, String> projectsInfo;
+	private String committer;
+	
+	public ConDataBean() {
+		
+	}
+	
+	public ConDataBean(String accepted, String email, 
+			String name, List<String> projectsIds, String since, String type,
+			String login, String committer) {
+		
+		this.accepted = accepted;
+		this.email = email;
+		this.name = name;
+		this.since = since;
+		this.type = type;
+		this.login = login;
+		this.committer = committer;
+
+		this.projectsInfo = new LinkedHashMap<String, String>();
+		for (String projectId : projectsIds) {
+			this.projectsInfo.put(projectId, "0");
+		}
+		
+		setProjectsInfo(projectsInfo);
+		
+		try {
+			sinceDate = new SimpleDateFormat("MM/dd/yy").parse(since);
+		} catch (ParseException e) {
+			e.printStackTrace();
+			sinceDate = new Date();
+		}
+	}
+
+	public ConDataBean(String accepted, String email, 
+			String name, Map <String, String> projectsInfo, String since, String type,
+			String login, String committer) {
+		
+		this.accepted = accepted;
+		this.email = email;
+		this.name = name;
+		this.since = since;
+		this.type = type;
+		this.login = login;
+		this.committer = committer;
+
+		this.projectsInfo = projectsInfo;
+		
+		try {
+			sinceDate = new SimpleDateFormat("MM/dd/yy").parse(since);
+		} catch (ParseException e) {
+			e.printStackTrace();
+			sinceDate = new Date();
+		}
+	}
+	
+	/**
+	 * Creates a string with information held in this bean in XML form.
+	 * @return A string with information held in this bean in XML form.
+	 */
+	public String getXml() {
+		StringBuilder xml = new StringBuilder();
+		xml.append("\t<"+ConDescriptor.AGREEMENT_TAG+">\n");
+		xml.append("\t\t<id>" + name + "</id>\n");
+		xml.append("\t\t<projects>\n");
+		
+		for (String projectId : projectsInfo.keySet()) {
+			xml.append("\t\t\t<project>\n");
+			xml.append("\t\t\t\t<projectId>" + projectId + "</projectId>\n");
+			xml.append("\t\t\t\t<acceptedByProjectLead>" + projectsInfo.get(projectId) + "</acceptedByProjectLead>\n");
+			xml.append("\t\t\t</project>\n");
+		}
+		
+		xml.append("\t\t</projects>\n");
+		xml.append("\t\t<login>" + login + "</login>\n");
+		xml.append("\t\t<e-mail>" + email + "</e-mail>\n");
+		xml.append("\t\t<since>" + since + "</since>\n");
+		xml.append("\t\t<type>" + type + "</type>\n");
+		xml.append("\t\t<accepted>" + accepted + "</accepted>\n");
+		xml.append("\t\t<committer>" + committer + "</committer>\n");
+		xml.append("\t</"+ConDescriptor.AGREEMENT_TAG+">\n");
+		return xml.toString();
+	}
+	
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+    public String getProjects() {
+        return projects;
+    }
+
+    public void setProjects(String projects) {
+        this.projects = projects;
+    }
+    
+	public String getSince() {
+		return since;
+	}
+
+	public void setSince(String since) {
+		this.since = since;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getAccepted() {
+		return accepted;
+	}
+
+	public void setAccepted(String accepted) {
+		this.accepted = accepted;
+	}
+
+	public String getEmail() {
+		return email;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
+	public String getLogin() {
+		return login;
+	}
+
+	public void setLogin(String login) {
+		this.login = login;
+	}
+
+	public Date getSinceDate() {
+		return sinceDate;
+	}
+
+	public void setSinceDate(Date sinceDate) {
+		this.sinceDate = sinceDate;
+	}
+
+	public Map<String, String> getProjectsInfo() {
+		return projectsInfo;
+	}
+
+	public void setProjectsInfo(Map<String, String> projectsInfo) {
+        Projects prjs = ProjectsHelper.getProjects();
+        
+        String tmp = new String("");
+        if (prjs != null) {
+            for (String projectId : projectsInfo.keySet()) {
+                if (tmp.length() > 0)           
+                    tmp = tmp + ", " + prjs.getProjectName(projectId);
+                else 
+                    tmp = prjs.getProjectName(projectId);
+            }
+        }
+        this.projects = tmp;
+        if (projectsInfo != null) {
+            this.projectsInfo = projectsInfo;
+        } else {
+            this.projectsInfo = new LinkedHashMap<String, String>();
+        }
+	}
+	
+	public boolean isAcceptedByProjectLeads() {
+        if (projectsInfo == null)
+            return false;
+        
+		return !projectsInfo.containsValue("0");
+	}
+
+	public String getCommitter() {
+		return committer;
+	}
+
+	public void setCommitter(String committer) {
+		this.committer = committer;
+	}
+	
+}

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConDescriptor.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConDescriptor.java	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConDescriptor.java	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,304 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.forge.contributor;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.xerces.parsers.DOMParser;
+import org.jboss.forge.common.XmlTools;
+import org.jboss.shotoku.ContentManager;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * A descriptor of contributor's applications (parses the corresponding
+ * XML and gives access to a context for JSP pages).
+ * @author adamw
+ */
+public class ConDescriptor {
+	
+	public static final String AGREEMENT_TAG	= "agreement";
+	public static final String AGREEMENTS_TAG	= "agreements";
+	
+	public static final String ID_TAG = "id";
+	public static final String PROJECTS_TAG = "projects";
+	public static final String LOGIN_TAG = "login";
+	public static final String EMAIL_TAG = "e-mail";
+	public static final String SINCE_TAG = "since";
+	public static final String TYPE_TAG = "type";
+	public static final String ACCEPTED_TAG = "accepted";
+	public static final String PROJECT_TAG = "project";
+	public static final String PROJECT_ID_TAG = "projectId";
+	public static final String ACCEPTED_BY_PROJECT_LEAD_TAG = "acceptedByProjectLead";
+	public static final String COMMITTER_TAG = "committer";
+	
+	private List<ConDataBean> data;
+	private List<ConDataBean> notAcceptedData;
+	private Set<String> takenIds;
+	
+	private Map<String, List<ConDataBean>> ascSort;
+	private Map<String, List<ConDataBean>> descSort;
+	
+	private List<ConDataBean> unconfirmedData;
+	private List<ConDataBean> notAcceptedByLeadsData;
+	
+	/**
+	 * Makes a copy of the given list and sorts it with respect to the given
+	 * property.
+	 * @param original Original list to copy and sort.
+	 * @param propertyName Name of the property with respect to which beans
+	 * on the list will be sorted.
+	 * @param ascending True iff the sorting is to be ascending.
+	 * @return A sorted copy of the given list.
+	 */
+	private List copyAndSort(List<ConDataBean> original, String propertyName, 
+			final boolean ascending) {
+
+		List<ConDataBean> copy = new ArrayList<ConDataBean>(original);
+		
+		String prNameCaptialized = 
+			Character.toUpperCase(propertyName.charAt(0)) +
+			propertyName.substring(1);
+		
+		final Method property;
+		
+		try {
+			property = ConDataBean.class.getMethod("get"+prNameCaptialized);
+		} catch (NoSuchMethodException e) {
+		    e.printStackTrace();
+			return copy;
+		}
+		
+		Collections.sort(copy, new Comparator<ConDataBean>() {
+			@SuppressWarnings("unchecked")
+			public int compare(ConDataBean o1, ConDataBean o2) {
+				
+				try {
+					int res = ((Comparable) 
+							property.invoke(o1)).
+						compareTo(property.invoke(o2));
+					
+					if (ascending) return res; else return -res;
+				} catch (Exception e) {
+				    e.printStackTrace();
+					return 0;
+				}
+			}
+		});
+		return copy;
+	}
+	
+	public ConDescriptor(ContentManager cm) {
+		
+		this(cm, ConServer.AGREEMENTS_XML);
+	}
+	
+	/**
+	 * Creates a new contributors descriptor.
+	 * @param cm A contetnt manager prefixed with the contributors directory.
+	 */
+	@SuppressWarnings("unchecked")
+	public ConDescriptor(ContentManager cm, String xmlPath) {
+	
+		data = new ArrayList<ConDataBean>();
+		notAcceptedData = new ArrayList<ConDataBean>();
+		takenIds = new HashSet<String>();
+		
+		ascSort = new HashMap<String, List<ConDataBean>>();
+		descSort = new HashMap<String, List<ConDataBean>>();
+		
+		unconfirmedData = new ArrayList<ConDataBean>();
+		notAcceptedByLeadsData = new ArrayList<ConDataBean>();
+		
+		try {
+			DOMParser parser = new DOMParser();
+			parser.parse(new InputSource(cm.getNode(xmlPath).getContentInputStream()));
+			Document doc = parser.getDocument();
+			
+			Node node = doc.getDocumentElement();
+			
+			NodeList nodes = node.getChildNodes();
+			
+			Node n = null;
+
+			for (int i = 0; i < nodes.getLength(); i++) {
+	            n = nodes.item(i);
+
+	            if ((n.getNodeType() == Node.ELEMENT_NODE) && (n.getNodeName().equals(AGREEMENT_TAG))) {
+	            	
+	            	ConDataBean contributor = unmarshallContributor(n);
+	            	
+					if ("1".equals(contributor.getAccepted())) {
+						data.add(contributor);
+					} else if ("0".equals(contributor.getAccepted()) &&
+							contributor.isAcceptedByProjectLeads()) {
+						notAcceptedData.add(contributor);
+					} else if ("0".equals(contributor.getAccepted())) {	
+						notAcceptedByLeadsData.add(contributor);
+					} else {
+						unconfirmedData.add(contributor);
+					}
+					
+					takenIds.add(contributor.getName());
+
+	            }
+	        }
+			
+			// Sorting data
+			ascSort.put("name", copyAndSort(data, "name", true));
+			ascSort.put("projects", copyAndSort(data, "projects", true));
+			ascSort.put("since", copyAndSort(data, "sinceDate", true));
+			ascSort.put("type", copyAndSort(data, "type", true));
+			
+			descSort.put("name", copyAndSort(data, "name", false));
+			descSort.put("projects", copyAndSort(data, "projects", false));
+			descSort.put("since", copyAndSort(data, "sinceDate", false));
+			descSort.put("type", copyAndSort(data, "type", false));
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public List<ConDataBean> getData() {
+		return data;
+	}
+	
+	public List<ConDataBean> getSortedAscData(String column) {
+		return ascSort.get(column);
+	}
+	
+	public List<ConDataBean> getSortedDescData(String column) {
+		return descSort.get(column);
+	}
+	
+	public List<ConDataBean> getNotAcceptedData() {
+		return notAcceptedData;
+	}
+
+	public List<ConDataBean> getNotAcceptedByLeadsData() {
+		return notAcceptedByLeadsData;
+	}
+
+	public Set getTakenIds() {
+		return takenIds;
+	}
+
+	public ConDataBean unmarshallContributor(Node root) {
+		NodeList nodeList = root.getChildNodes();
+	
+		ConDataBean contributor = new ConDataBean();
+		
+		for (int i = 0; i < nodeList.getLength(); i++) {
+			Node n = nodeList.item(i);
+			if (n.getNodeType() == Node.ELEMENT_NODE) {
+				String nodeName = n.getNodeName();
+				
+				if (ID_TAG.equals(nodeName)) {
+					contributor.setName(XmlTools.unmarshallText(n));
+				} else if (PROJECTS_TAG.equals(nodeName)) {
+					Map<String, String> map = new LinkedHashMap<String, String>();
+					NodeList projectsList = n.getChildNodes();
+					
+					String id = null;
+					String accepted = null;
+					for (int j = 0; j < projectsList.getLength(); j++) {
+						
+						Node projectNode = projectsList.item(j);
+						if (PROJECT_TAG.equals(projectNode.getNodeName())) {
+							NodeList projectList = projectNode.getChildNodes();
+							for (int k = 0; k < projectList.getLength(); k++) {
+								Node tmp = projectList.item(k);
+								if (tmp.getNodeType() == Node.ELEMENT_NODE) {
+									String name = tmp.getNodeName();
+									
+									if (PROJECT_ID_TAG.equals(name)) {
+										id = XmlTools.unmarshallText(tmp);
+									} else if (ACCEPTED_BY_PROJECT_LEAD_TAG.equals(name)) {
+										accepted = XmlTools.unmarshallText(tmp);
+									}
+									map.put(id, accepted);
+								}
+							}
+						}
+					}
+					
+					contributor.setProjectsInfo(map);
+				} else if (LOGIN_TAG.equals(nodeName)) {
+					contributor.setLogin(XmlTools.unmarshallText(n));
+				} else if (EMAIL_TAG.equals(nodeName)) {
+					contributor.setEmail(XmlTools.unmarshallText(n));
+				} else if (SINCE_TAG.equals(nodeName)) {
+					contributor.setSince(XmlTools.unmarshallText(n));
+				} else if (TYPE_TAG.equals(nodeName)) {
+					contributor.setType(XmlTools.unmarshallText(n));
+				} else if (ACCEPTED_TAG.equals(nodeName)) {
+					contributor.setAccepted(XmlTools.unmarshallText(n));
+				} else if (COMMITTER_TAG.equals(nodeName)) {
+					contributor.setCommitter(XmlTools.unmarshallText(n));
+				}
+			}
+		}
+		
+		return contributor;
+	}
+
+	public ConDataBean getUnconfirmedContributor(String code) {
+
+		for (ConDataBean contributor : unconfirmedData) {
+			if (contributor.getName().equals(code)) {
+				return contributor;
+			}
+		}
+		
+		return null;
+	}
+	
+	public List<ConDataBean> getNotAcceptedByLeadData(Set<String> projectIds) {
+		
+		List<ConDataBean> contributors = new ArrayList<ConDataBean>(); 
+		
+		for (ConDataBean contributor : notAcceptedByLeadsData) {
+			Map<String, String> projectInfo = contributor.getProjectsInfo();
+			for (String projectId : projectIds) {
+
+				if (projectInfo.containsKey(projectId)) {
+					contributors.add(contributor);
+					break;
+				}
+			}
+		}
+
+		return contributors;
+	}
+
+}

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConMainBean.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConMainBean.java	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConMainBean.java	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,416 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.forge.contributor;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIData;
+import javax.faces.context.FacesContext;
+
+import org.jboss.forge.common.Constants;
+import org.jboss.forge.common.SearchTools;
+
+/**
+ * @author adamw
+ * @author dejp
+ * Main, session-scoped bean for holding user's sort order and new application
+ * information.
+ */
+public class ConMainBean {
+
+	private String name;
+	private String email;
+	private List<String> projects;
+	private String type;
+	
+	private String searchName;
+	private String searchEmail;
+	private List<String> searchProjects;
+	
+	private boolean committer;
+	
+	private boolean ascending;
+	private String sort;
+	
+	private boolean filteredData;
+	private List<ConDataBean> filteredList;
+	
+	private UIData dataTable;
+	private UIData adminDataTable;
+    
+	private UIData leadDataTable;
+	
+    private ConServer server;
+
+    private String comment;
+    
+    private ConDataBean contributorForDel;
+    
+ 	private void addMessage(String message) {
+		FacesContext.getCurrentInstance().addMessage(null, 
+				new FacesMessage(message));
+	}		
+	
+	/*
+	 * ACTION HANDLERS
+	 */
+	
+	public String acceptByProjectLead() {
+		ConDataBean conDataBean = (ConDataBean) leadDataTable.getRowData();
+		if (getServer().acceptByProjectLead(conDataBean)) {
+			addMessage(getServer().getMessages().getString("applicationAccepted"));
+		} else {
+			addMessage(getServer().getMessages().getString("commitError"));
+		}
+		getServer().resetDesc(FacesTools.getPortalName());		
+		return null;
+	}
+	
+	public String acceptByAdmin() {
+		ConDataBean conDataBean = (ConDataBean) adminDataTable.getRowData();
+		if (getServer().accept(conDataBean)) {
+			addMessage(getServer().getMessages().getString("applicationAccepted"));
+		} else {
+			addMessage(getServer().getMessages().getString("commitError"));
+		}
+		getServer().resetDesc(FacesTools.getPortalName());
+		return null;
+	}
+	
+	public String adminDelete() {
+		setContributorForDel((ConDataBean) adminDataTable.getRowData());
+		return "adminDelete";
+	}
+	
+	public String leadDelete() {
+		setContributorForDel((ConDataBean) leadDataTable.getRowData());
+		return "leadDelete";
+	}
+	
+	public String deleteByAdmin() {
+		if (getServer().delete(getContributorForDel(), getComment())) {
+			addMessage(getServer().getMessages().getString("applicationDeleted"));
+			setContributorForDel(null);
+			setComment(null);
+			return "admin";
+		} else {
+			addMessage(getServer().getMessages().getString("commitError"));
+		}
+		
+		setComment(null);
+		getServer().resetDesc(FacesTools.getPortalName());
+		return null;
+	}
+	
+	public String deleteByProjectLead() {
+		if (getServer().deleteByLead(getContributorForDel(), getComment())) {
+			addMessage(getServer().getMessages().getString("applicationDeleted"));
+			setContributorForDel(null);
+			setComment(null);
+			return "admin";
+		} else {
+			addMessage(getServer().getMessages().getString("commitError"));
+		}
+		
+		setComment(null);
+		getServer().resetDesc(FacesTools.getPortalName());
+		return null;
+	}
+	
+	public String processApplication() {
+		
+		String error = null;
+		
+		if (committer) {
+			error = getServer().processApplication(name, email, type,
+					projects, FacesTools.getRemoteUser(), "1");
+		} else {
+			error = getServer().processApplication(name, email, type,
+					projects, FacesTools.getRemoteUser(), "0");			
+		}
+		
+		if (error == null) {
+			addMessage(getServer().getMessages().getString("applicationAdded"));
+		
+			return "back";
+		} else {
+			addMessage(error);
+			return null;
+		}
+	}
+	
+	@SuppressWarnings("unchecked")
+	public String backAfterConfirm() {
+		FacesTools.getExternalContext().getSessionMap().remove("confirm");
+		FacesTools.getExternalContext().getSessionMap().put(ALREADY_CONFIRMED_KEY,
+				Constants.FALSE_VALUE);
+		
+		return null;
+	}
+	
+	public String clearSearch() {
+		filteredData = false;
+		searchEmail = null;
+		searchName = null;
+		searchProjects = null;
+		
+		dataTable.setFirst(0);
+		
+		return null;
+	}
+	
+	public String search() {
+		filteredList = new ArrayList<ConDataBean>();
+		List<ConDataBean> allData = 
+			getServer().getDesc(FacesTools.getPortalName()).getData();
+		
+		for (ConDataBean bean : allData) {
+			if ((SearchTools.searchInString(bean.getName(), SearchTools.prepareTokens(searchName, " "))) ||
+					//(SearchTools.searchInString(bean.getProjects(), SearchTools.prepareTokens(searchProjects, " "))) ||
+					//(SearchTools.searchInString(bean.getProjects(), new String[] { searchProjects.toLowerCase().trim() })) ||
+					searchInProjectsInfo(bean.getProjectsInfo(), searchProjects) ||
+					(SearchTools.searchInString(bean.getEmail(), SearchTools.prepareTokens(searchEmail, " ")))) {
+				filteredList.add(bean);
+			}
+		}
+		
+		dataTable.setFirst(0);
+		sort = null;
+		filteredData = true;
+		
+		return null;
+	}
+
+	private boolean searchInProjectsInfo(Map<String, String> projectsInfo, 
+			List<String> searchProjects) {
+		
+        if (projectsInfo == null) {
+            return false;
+        }
+        
+		for (String projectId : projectsInfo.keySet()) {
+			if (searchProjects.contains(projectId)) {
+				return true;
+			}
+		}
+		
+		return false;
+	}
+	
+	/*
+	 * GETTERS/ SETTERS
+	 */
+	
+	public List getData() {
+		String portalName = FacesTools.getPortalName();
+		
+		if (sort != null) filteredData = false;
+		
+		if (filteredData)
+			return filteredList;
+		else
+			if (sort == null)
+				return getServer().getDesc(portalName).getData();
+			else
+				if (ascending)
+					return getServer().getDesc(portalName).getSortedAscData(sort);
+				else
+					return getServer().getDesc(portalName).getSortedDescData(sort);
+	}
+	
+	private final static String ALREADY_CONFIRMED_KEY = "alreadyConfirmed";
+	
+	@SuppressWarnings("unchecked")
+	public boolean getConfirmation() {
+		
+		String code = (String) FacesTools.getExternalContext().
+			getRequestParameterMap().get("confirm");
+
+		if (code != null) {
+			if (Constants.TRUE_VALUE.equals(FacesTools.getExternalContext().
+					getSessionMap().get(ALREADY_CONFIRMED_KEY)))
+				return true;
+			
+			String error = getServer().confirm(code);
+		
+			if (error != null)
+				addMessage(error);
+			else
+				addMessage(server.getMessages().getString("confirmationSucceeded"));
+			
+			FacesTools.getExternalContext().getSessionMap().put(
+					ALREADY_CONFIRMED_KEY, Constants.TRUE_VALUE);
+			
+			getServer().resetDesc(FacesTools.getPortalName());
+			
+			return true;
+		}
+		
+		return false;
+	}
+	
+	public List getAdminData() {
+		return getServer().getDesc(FacesTools.getPortalName()).getNotAcceptedData();
+	}
+
+	public String getEmail() {
+		return email;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public List<String> getProjects() {
+		return projects;
+	}
+
+	public void setProjects(List<String> projects) {
+		this.projects = projects;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public UIData getDataTable() {
+		return dataTable;
+	}
+
+	public void setDataTable(UIData dataTable) {
+		this.dataTable = dataTable;
+	}
+
+	public ConServer getServer() {
+		return server;
+	}
+
+	public void setServer(ConServer server) {
+		this.server = server;
+	}
+
+	public UIData getAdminDataTable() {
+		return adminDataTable;
+	}
+
+	public void setAdminDataTable(UIData adminDataTable) {
+		this.adminDataTable = adminDataTable;
+	}
+
+	public boolean isAscending() {
+		return ascending;
+	}
+
+	public void setAscending(boolean ascending) {
+		this.ascending = ascending;
+	}
+
+	public String getSort() {
+		return sort;
+	}
+
+	public void setSort(String sort) {
+		this.sort = sort;
+	}
+
+	public String getSearchEmail() {
+		return searchEmail;
+	}
+
+	public void setSearchEmail(String searchEmail) {
+		this.searchEmail = searchEmail;
+	}
+
+	public String getSearchName() {
+		return searchName;
+	}
+
+	public void setSearchName(String searchName) {
+		this.searchName = searchName;
+	}
+
+	public List<String> getSearchProjects() {
+		return searchProjects;
+	}
+
+	public void setSearchProjects(List<String> searchProjects) {
+		this.searchProjects = searchProjects;
+	}
+
+	public UIData getLeadDataTable() {
+		return leadDataTable;
+	}
+
+	public void setLeadDataTable(UIData leadDataTable) {
+		this.leadDataTable = leadDataTable;
+	}	
+	
+	public boolean isCommitter() {
+		return committer;
+	}
+
+	public void setCommitter(boolean committer) {
+		this.committer = committer;
+	}
+
+	public Map<String, String> getProjectsNameIds() {
+		return server.getProjectsNameIds();
+	}
+
+	public String getComment() {
+		return comment;
+	}
+
+	public void setComment(String comment) {
+		this.comment = comment;
+	}
+
+	public ConDataBean getContributorForDel() {
+		return contributorForDel;
+	}
+
+	public void setContributorForDel(ConDataBean contributorForDel) {
+		this.contributorForDel = contributorForDel;
+	}
+
+	public List<ConDataBean> getLeadData() {
+		Set<String> projectIds = FacesTools.getLeadProjectIds();
+		return getServer().getDesc(FacesTools.getPortalName()).getNotAcceptedByLeadData(projectIds);
+	}
+	
+}

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConNodeWatcher.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConNodeWatcher.java	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConNodeWatcher.java	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.forge.contributor;
+
+import org.jboss.shotoku.ContentManager;
+import org.jboss.shotoku.cache.ShotokuResourceWatcher;
+import org.jboss.shotoku.cache.ValueChange;
+import org.jboss.shotoku.cache.ValueInit;
+
+import java.util.Map;
+
+public class ConNodeWatcher extends ShotokuResourceWatcher<String, ConDescriptor> {
+
+	private ConDescriptor getDesc(String key) {
+        return new ConDescriptor(getContentManager(key));
+    }
+	
+    public ValueInit<ConDescriptor> init(String key) {
+        addWatchedPath(key, ConServer.AGREEMENTS_XML);
+        addWatchedPath(key, ConServer.UNCONFIRMED_XML);
+
+        return ValueInit.realValue(getDesc(key));
+    }
+
+    protected ValueChange<ConDescriptor> update(String key, ConDescriptor currentObject, Map changes) {
+        return ValueChange.changeTo(getDesc(key));
+    }
+
+    protected ContentManager initContentManager(String key) {
+        return ContentManager.getContentManager(key + "/" + ConServer.CONTRIBUTOR_DIR);
+    }
+}

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConServer.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConServer.java	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/ConServer.java	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,567 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.forge.contributor;
+
+import java.text.DateFormat;
+import java.text.MessageFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Random;
+import java.util.ResourceBundle;
+import java.util.Set;
+
+import org.jboss.forge.common.PermissionTools;
+import org.jboss.forge.common.ForgeHelper;
+import org.jboss.forge.common.projects.ProjectsHelper;
+import org.jboss.forge.common.projects.project.Developers;
+import org.jboss.forge.common.ejb3.LabsServices;
+import org.jboss.forge.common.ejb3.ProjectsService;
+import org.jboss.portal.api.node.PortalNodeURL;
+import org.jboss.portal.identity.User;
+import org.jboss.shotoku.ContentManager;
+import org.jboss.shotoku.Node;
+import org.jboss.shotoku.aop.CacheItemInject;
+import org.jboss.shotoku.aop.Inject;
+import org.jboss.shotoku.cache.CacheItemUser;
+import org.jboss.shotoku.exceptions.ResourceDoesNotExist;
+import org.jboss.shotoku.exceptions.SaveException;
+
+/**
+ * @author adamw
+ * @author dejp
+ * A "server" bean for the contributors portlet, which handles reading
+ * and writing the xml file with agreements.
+ */
+public class ConServer {
+	/**
+	 * <code>CONTRIBUTOR_DIR</code> - Directory in which the xml with
+	 * agreements is held relative to portal directory.
+	 */
+	final static String CONTRIBUTOR_DIR = "contributor";
+	/**
+	 * <code>AGREEMENTS_XML</code> - Name of the xml file with
+	 * signed agreements.
+	 */
+	final static String AGREEMENTS_XML  = "agreements.xml";
+	/**
+	 * <code>UNCOFIRMED_XML</code> - Name of the xml file with
+	 * unconfirmed agreements.
+	 */
+	final static String UNCONFIRMED_XML  = "unconfirmed.xml";
+	
+	static String getBaseFilePath() {
+		return FacesTools.getPortalName() + "/" + ConServer.CONTRIBUTOR_DIR ;
+	}
+	
+	static String getConfirmedFilePath() {
+		return getBaseFilePath() + "/" + ConServer.AGREEMENTS_XML;
+	}
+	
+	static String getUnconfirmedFilePath() {
+		return getBaseFilePath() + "/" + ConServer.UNCONFIRMED_XML;
+	}
+	
+	@Inject
+    private ContentManager cm;
+
+    @CacheItemInject(dataSource=ConNodeWatcher.class)
+    private CacheItemUser<String, ConDescriptor> conf;
+	
+    private ResourceBundle messages;
+    private Locale currentLocale;
+    
+	public ConServer() {
+        currentLocale = new Locale("en", "US");
+        messages = ResourceBundle.getBundle("Messages", currentLocale);
+	}
+	
+	ResourceBundle getMessages() {
+		return messages;
+	}
+	
+	/**
+	 * Gets a contributors descriptor for the given portal.
+	 * @param portalName Name of the current portal. 
+	 * @return A contributors descriptor.
+	 */
+	synchronized ConDescriptor getDesc(final String portalName) {
+		return conf.get(portalName);
+	}
+	
+	synchronized void resetDesc(String portalName) {
+		// TODO
+	}
+
+	private boolean checkString(String s) {
+        return !((s == null) || (s.trim().equals("")));
+    }
+	
+	private String getFormattedMessage(String key, Object[] arguments) {
+		MessageFormat formatter = new MessageFormat("");
+		formatter.setLocale(currentLocale);
+		formatter.applyPattern(messages.getString(key));
+		return formatter.format(arguments);
+	}
+	
+	synchronized boolean acceptByProjectLead(ConDataBean contributor) {
+		
+		String oldXml = contributor.getXml();
+		
+		Set<String> projectIds = FacesTools.getLeadProjectIds();
+		Map<String, String> projectsInfo = contributor.getProjectsInfo();
+		for (String projectId : projectsInfo.keySet()) {
+			if (projectIds.contains(projectId)) {
+				if ("0".equals(projectsInfo.get(projectId))) {
+					projectsInfo.put(projectId, "1");
+				}
+			}
+		}
+		
+		contributor.setProjectsInfo(projectsInfo);
+		String newXml = contributor.getXml();
+	
+		try {
+			Node confirmed = cm.getNode(getConfirmedFilePath());
+			String content = confirmed.getContent();
+			
+			String newContent = ForgeHelper.replace(content, 
+				oldXml, newXml);
+			
+			confirmed.setContent(newContent);
+			confirmed.save("New application accepted");
+			
+			getDesc(FacesTools.getPortalName()).getNotAcceptedByLeadsData().remove(contributor);
+			
+			if (!projectsInfo.containsValue("0")) {
+				PortalNodeURL url = FacesTools.createRenderURL();
+				String adminURL = FacesTools.getBaseServerAddress() + 
+					url.toString();
+
+				// sending email to admin
+				ForgeHelper.postMail(
+						ForgeHelper.getProperties().getProperty("contribadmin"),
+						messages.getString("adminMailSubject"),
+						getFormattedMessage("adminMailText", 
+								new Object[] { newXml, adminURL }),
+						"noreply at jboss.org");
+			}
+			
+			org.jboss.portal.identity.User projectLead = FacesTools.getUser();
+			
+			if (projectLead != null) {
+			    String projectLeadEmail = PermissionTools.getUserProfileModule().
+                        getProperty(projectLead, User.INFO_USER_EMAIL_REAL).toString();
+				
+				if (projectLeadEmail != null && projectLeadEmail.length() > 0) {
+					
+					// email to project lead
+					ForgeHelper.postMail(
+							projectLeadEmail,
+							messages.getString("acceptedMailSubject"),
+							getFormattedMessage("acceptedMailTextAdmin", 
+									new Object[] { contributor.getName(),
+									contributor.getEmail(), contributor.getType(),
+									contributor.getLogin(), contributor.getProjects() }),
+							"noreply at jboss.org");
+				}
+			}
+			
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+	
+	/**
+	 * Accepts the given application.
+	 * @param dataBean Application to accept.
+	 * @return True iff accepting was successfull.
+	 */
+	synchronized boolean accept(ConDataBean dataBean) {
+		String oldXml = dataBean.getXml();
+		
+		dataBean.setAccepted("1");
+		String newXml = dataBean.getXml();	
+		
+		try {
+			// Values ok, adding application.
+			Node confirmed = cm.getNode(getConfirmedFilePath());
+			String content = confirmed.getContent();
+			
+			String newContent = ForgeHelper.replace(content, 
+				oldXml, newXml);
+			
+			confirmed.setContent(newContent);
+			confirmed.save("New application accepted");
+			
+			getDesc(FacesTools.getPortalName()).getNotAcceptedData().remove(dataBean);
+			
+			// Posting a notification to the contributor
+			ForgeHelper.postMail(dataBean.getEmail(),
+					messages.getString("acceptedMailSubject"),
+					getFormattedMessage("acceptedMailText", 
+							new Object[] { dataBean.getName() }),
+					"noreply at jboss.org");
+			
+			// Posting a notification to the con-admin
+			ForgeHelper.postMail(
+					ForgeHelper.getProperties().getProperty("contribadmin"),
+					messages.getString("acceptedMailSubject"),
+					getFormattedMessage("acceptedMailTextAdmin", 
+							new Object[] { dataBean.getName(),
+							dataBean.getEmail(), dataBean.getType(),
+							dataBean.getLogin(), dataBean.getProjects() }),
+					"noreply at jboss.org");
+			
+			if ("1".equals(dataBean.getCommitter())) {
+				ForgeHelper.postMail(
+						ForgeHelper.getProperties().getProperty("jira"),
+						messages.getString("committerAccessMailSubject") + " " + dataBean.getName(),
+						getFormattedMessage("committerAccessMailText", 
+								new Object[] { dataBean.getName(),
+								dataBean.getEmail(), dataBean.getType(),
+								dataBean.getLogin(), dataBean.getProjects() }),
+						"noreply at jboss.org");				
+			}
+			
+			return true;
+		} catch (Exception e) {
+		    e.printStackTrace();
+			return false;
+		}
+	}
+	
+	/**
+	 * Deletes the given application.
+	 * @param dataBean Application to delete.
+	 * @return True iff deleting was successfull.
+	 */
+	synchronized boolean delete(ConDataBean dataBean, String comment) {
+		String oldXml = dataBean.getXml();
+		
+		try {
+			// Values ok, adding application.
+			Node confirmed;
+			try {
+				confirmed = cm.getNode(getConfirmedFilePath());
+			} catch (ResourceDoesNotExist e) {
+				// Nothing to do here ...
+				throw new RuntimeException(e);
+			}
+			String content = confirmed.getContent();
+			
+			String newContent = ForgeHelper.replace(content, 
+				oldXml, "");
+			
+			confirmed.setContent(newContent);
+			try {
+				confirmed.save("New application deleted");
+			} catch (SaveException e) {
+				// TODO 
+				throw new RuntimeException(e);
+			}
+			
+			getDesc(FacesTools.getPortalName()).getNotAcceptedData().remove(dataBean);
+			
+			return true;
+		} finally {
+			// Sending the "you-are-reject" email no matter exception or not.
+			try {
+				if (comment != null && comment.length() != 0) {
+					ForgeHelper.postMail(dataBean.getEmail(),
+							messages.getString("deletedMailSubject"),
+							getFormattedMessage("deletedMailTextWithComment", 
+									new Object[] { dataBean.getName(), comment }),
+							"noreply at jboss.org");
+				} else {
+					ForgeHelper.postMail(dataBean.getEmail(),
+						messages.getString("deletedMailSubject"),
+						getFormattedMessage("deletedMailText", 
+								new Object[] { dataBean.getName() }),
+						"noreply at jboss.org");
+				}
+			} catch (Exception e) {
+			    e.printStackTrace();
+				// Nothing to do here. No mail... well.
+			}
+		}
+	}
+
+	/**
+	 * Deletes the given application.
+	 * @param dataBean Application to delete.
+	 * @return True iff deleting was successfull.
+	 */
+	synchronized boolean deleteByLead(ConDataBean dataBean, String comment) {
+		String oldXml = dataBean.getXml();
+		
+		try {
+			// Values ok, adding application.
+			Node confirmed;
+			try {
+				confirmed = cm.getNode(getConfirmedFilePath());
+			} catch (ResourceDoesNotExist e) {
+				// Nothing to do here ...
+				throw new RuntimeException(e);
+			}
+			String content = confirmed.getContent();
+			
+			String newContent = ForgeHelper.replace(content, 
+				oldXml, "");
+			
+			confirmed.setContent(newContent);
+			try {
+				confirmed.save("New application deleted");
+			} catch (SaveException e) {
+				// TODO 
+				throw new RuntimeException(e);
+			}
+			
+			getDesc(FacesTools.getPortalName()).getNotAcceptedByLeadsData().remove(dataBean);
+			
+			return true;
+		} finally {
+			// Sending the "you-are-reject" email no matter exception or not.
+			try {
+				if (comment != null && comment.length() != 0) {
+					ForgeHelper.postMail(dataBean.getEmail(),
+							messages.getString("deletedMailSubject"),
+							getFormattedMessage("deletedMailTextWithComment", 
+									new Object[] { dataBean.getName(), comment }),
+							"noreply at jboss.org");
+				} else {
+					ForgeHelper.postMail(dataBean.getEmail(),
+						messages.getString("deletedMailSubject"),
+						getFormattedMessage("deletedMailText", 
+								new Object[] { dataBean.getName() }),
+						"noreply at jboss.org");
+				}
+			} catch (Exception e) {
+			    e.printStackTrace();
+				// Nothing to do here. No mail... well.
+			}
+		}
+	}
+	
+	/**
+	 * Confirms the given agreement.
+	 * @param code Confirmation code.
+	 * @return An error string or null, if no error occured.
+	 */
+	String confirm(String code) {
+		String unconfirmedXmlFilePath = getUnconfirmedFilePath();
+		String confirmedXmlFilePath = getConfirmedFilePath();
+		
+		// Looking for agreement that is to be confirmed.
+		//ElementDescriptor toConfirm;
+		ConDataBean toConfirm;
+		try {
+			ConDescriptor desc = new ConDescriptor(cm, getUnconfirmedFilePath());
+			toConfirm = desc.getUnconfirmedContributor(code);
+			
+			/*toConfirm = new ElementsDescriptor(
+					new InputSource(cm.getNode(
+							unconfirmedXmlFilePath).getContentInputStream()),
+					XmlInputFactory.getContentReadingInstance(cm),
+					ConDescriptor.AGREEMENT_TAG,
+					new PropertiesHandlerDefault()).getElementWithId(code);*/
+			
+		} catch (Exception e) {
+		    e.printStackTrace();
+			return messages.getString("unableToConfirm");
+		}
+		
+		if (toConfirm == null)
+			return messages.getString("confirmationCodeInvalid");
+		
+		// Generating xml representations of the agreement - before
+		// and after confirmation.
+		String oldXml = toConfirm.getXml();
+
+		String newXml = new ConDataBean("0",
+				toConfirm.getEmail(),
+				toConfirm.getAccepted(),
+				toConfirm.getProjectsInfo(),
+				toConfirm.getSince(),
+				toConfirm.getType(), 
+				toConfirm.getLogin(),
+				toConfirm.getCommitter()).getXml();
+		
+		// Writing changes to xml files.
+		try {
+			Node confirmed = cm.getNode(confirmedXmlFilePath);
+			Node unconfirmed = cm.getNode(unconfirmedXmlFilePath);
+			
+			String confirmedContent = confirmed.getContent();
+			String unconfirmedContent = unconfirmed.getContent(); 
+			
+			confirmedContent = ForgeHelper.replace(confirmedContent, 
+					"</"+ConDescriptor.AGREEMENTS_TAG+">",
+					newXml
+					+ "</"+ConDescriptor.AGREEMENTS_TAG+">"
+					);
+			unconfirmedContent = ForgeHelper.replace(unconfirmedContent, 
+					oldXml, "");
+			
+			confirmed.setContent(confirmedContent);
+			unconfirmed.setContent(unconfirmedContent);
+			
+			confirmed.save("Confirming new application");
+			unconfirmed.save("Confirming new application");
+			
+			PortalNodeURL url = FacesTools.createRenderURL();
+			String adminURL = FacesTools.getBaseServerAddress() + 
+				url.toString();
+			
+			try {
+				ProjectsService projectsService = LabsServices.getProjectsService();
+
+				for (String projectId : toConfirm.getProjectsInfo().keySet()) {
+					Developers developers = projectsService.getProjectDevelopers(projectId);
+
+					if (developers != null) {
+						String username = developers.getLeadDeveloper();
+
+						if (username != null && username.trim().length() > 0) {
+							org.jboss.portal.identity.User projectLead = 
+								LabsServices.getPrimatesService().getUser(username);
+
+							// Sending an email to project lead
+							if (projectLead != null) {
+							    String realEmail = PermissionTools.getUserProfileModule().
+							        getProperty(projectLead, User.INFO_USER_EMAIL_REAL).toString();
+							    if (realEmail != null && realEmail.length() > 0) {
+							        ForgeHelper.postMail(realEmail,
+							                messages.getString("adminMailSubject"),
+							                getFormattedMessage("adminMailText", 
+                                                    new Object[] { newXml, adminURL }),
+							                "noreply at jboss.org");
+							    }
+							}
+						}
+					}
+				}
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+
+		} catch (Exception e) {
+			e.printStackTrace();
+			return messages.getString("unableToConfirm");
+		} 
+
+		
+		
+		return null;
+	}
+	
+	/**
+	 * Generates a unique string that can be used as an confirmation code.
+	 * @return A string containing random characters.
+	 */
+	private String generateCode() {
+		Random random =  new Random();
+		return Long.toHexString(random.nextLong()) + 
+			Long.toHexString(random.nextLong());
+	}
+	
+	/**
+	 * Processes the given applications, that is, adds it to the xml file
+	 * as not accepted.
+	 * @param name
+	 * @param email
+	 * @param type
+	 * @param projects
+	 * @param username
+	 * @return An error string or null, if no error occured.
+	 */
+	synchronized String processApplication(String name, String email, String type,
+			List<String> projects, String username, String committer) {
+		
+		if ((!checkString(name)) || (!checkString(email)) ||
+				(!checkString(type)) || (projects.isEmpty()))
+			return messages.getString("notAllFieldsFilledError");
+		
+		String portalName = FacesTools.getPortalName();
+		
+		if ((getDesc(portalName).getTakenIds().contains(name)))
+			return messages.getString("nameAlreadyExistsError");
+		
+		// Getting the "since" date, that is, the current date.
+		String since = DateFormat.getDateInstance(DateFormat.SHORT, currentLocale).format(
+				new Date(Calendar.getInstance().getTimeInMillis()));
+			
+		// Getting the confirmation code.
+		String confirmationCode = generateCode();
+		
+		// Creating the new xml entry. Putting the contributor's name in
+		// "accepted", and the code into the "name" field, to easily find
+		// the agreement during confimation.
+		String newAgreement =
+			new ConDataBean(name, email, confirmationCode, 
+					projects, since, type, username, committer).getXml();
+		
+		try {
+			// Values ok, adding application.
+			
+			// Sending the confirmation e-mail.
+			PortalNodeURL url = FacesTools.createRenderURL();
+			url.setParameter("confirm", confirmationCode);
+			String confirmationURL = FacesTools.getBaseServerAddress() + 
+				url.toString();
+			
+			Node unconfirmed = cm.getNode(getUnconfirmedFilePath());
+			String content = unconfirmed.getContent();
+			
+			String newContent = ForgeHelper.replace(content, 
+				"</"+ConDescriptor.AGREEMENTS_TAG+">",
+				newAgreement
+				+ "</"+ConDescriptor.AGREEMENTS_TAG+">"
+				);
+			
+			unconfirmed.setContent(newContent);
+			unconfirmed.save("Moving application to uncofirmed");
+			
+			ForgeHelper.postMail(email,
+					messages.getString("confirmMailSubject"),
+					getFormattedMessage("confirmMailText", 
+							new Object[] { name, confirmationURL }),
+					"noreply at jboss.org");
+
+		} catch (Exception e) {
+			e.printStackTrace();
+			return messages.getString("unableToAdd");
+		} 
+		
+		return null;
+	}
+	
+	public Map<String, String> getProjectsNameIds() {
+		
+		return ProjectsHelper.getProjectsNameId(FacesTools.getPortalName());
+	}
+
+}
\ No newline at end of file

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/FacesTools.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/FacesTools.java	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/java/org/jboss/forge/contributor/FacesTools.java	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,249 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.forge.contributor;
+
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.portlet.PortletRequest;
+
+import org.jboss.forge.common.projects.ProjectsHelper;
+import org.jboss.forge.common.PermissionTools;
+import org.jboss.forge.common.ForgeHelper;
+import org.jboss.forge.common.Constants;
+import org.jboss.forge.common.projects.permissions.PermissionsCheckerFactory;
+import org.jboss.portal.api.node.PortalNodeURL;
+import org.jboss.portlet.JBossActionRequest;
+import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.JBossRenderRequest;
+import org.jboss.portlet.JBossRenderResponse;
+
+/**
+ * @author adamw
+ * @author dejp
+ * @author pawel
+ * 
+ * Various static helper methods, mainly reading from the current
+ * faces and external contexts.
+ */
+public class FacesTools {
+
+    public static ExternalContext getExternalContext() {
+        return FacesContext.getCurrentInstance().getExternalContext();
+    }
+
+    public static String getRequestProperty(String propertyName) {
+        Object request = getExternalContext().getRequest();
+        if (request instanceof JBossActionRequest) {
+            return ((JBossActionRequest) request).getPortalContext().
+                            getProperty(propertyName);
+        } else if (request instanceof JBossRenderRequest) {
+            return ((JBossRenderRequest) request).getPortalContext().
+                            getProperty(propertyName);
+        } else return null;
+    }
+
+    public static PortalNodeURL createRenderURL() {
+        Object response = getExternalContext().getResponse();
+        if (response instanceof JBossActionResponse) {
+            //TODO
+            //New "feature" of portal 2.2 ...
+            return ((JBossActionResponse) response).createRenderURL(
+                    ((JBossActionRequest) getExternalContext().getRequest()).getPortalNode());
+            //return null;
+        } else if (response instanceof JBossRenderResponse) {
+            return ((JBossRenderResponse) response).createRenderURL(
+                    ((JBossRenderRequest) getExternalContext().getRequest()).getPortalNode());
+        } else {
+            return null;
+        }
+    }
+
+    public static String getBaseServerAddress() {
+        Object request = getExternalContext().getRequest();
+        if (request instanceof JBossActionRequest) {
+            return ForgeHelper.getBaseServerAddress((JBossActionRequest) request);
+        } else if (request instanceof JBossRenderRequest) {
+            return ForgeHelper.getBaseServerAddress((JBossRenderRequest) request);
+        } else return "";
+    }
+
+    public static String getPortalName() {
+        return Constants.LABS_PORTAL;
+    }
+
+    public static boolean hasPermission(String permission) {
+    	
+        Object request = getExternalContext().getRequest();
+        if (request instanceof JBossActionRequest) {
+            org.jboss.portal.identity.User u = ((JBossActionRequest) request).getUser();
+            if (u == null) {
+                return false;
+            }
+
+            return PermissionTools.isUserInRole(u, permission);
+        } else if (request instanceof JBossRenderRequest) {
+            org.jboss.portal.identity.User u = ((JBossRenderRequest) request).getUser();
+            if (u == null) {
+                return false;
+            }
+
+            return PermissionTools.isUserInRole(u, permission);
+        } else 
+        	return false;
+    }
+
+    public static boolean isProjectLead() {
+    	
+    	Set<String> projectIds = ProjectsHelper.getProjectIds(FacesTools.getPortalName());
+    	
+        org.jboss.portal.identity.User u = getUser();
+
+        if (u == null) {
+        	return false;
+        }
+            
+        List<String> roles = PermissionTools.getRoleNames(u);
+        for (String role : roles) {
+        	if (role.endsWith("-admin")) {
+        		if (projectIds.contains(role.replaceAll("-admin", "")))
+        			return true;
+        	}
+        }
+            
+        return false;
+    }
+    
+    public static org.jboss.portal.identity.User getUser() {
+    	
+        Object request = getExternalContext().getRequest();
+        
+        org.jboss.portal.identity.User u = null;
+        if (request instanceof JBossActionRequest) {
+            u = ((JBossActionRequest) request).getUser();
+        } else if (request instanceof JBossRenderRequest) {
+            u = ((JBossRenderRequest) request).getUser();
+        }
+        return u;
+    }
+    
+    public static Set<String> getLeadProjectIds() {
+    	
+    	Set<String> projectIds = ProjectsHelper.getProjectIds(FacesTools.getPortalName());
+    	
+    	org.jboss.portal.identity.User user = getUser();
+    	
+    	if (user == null) {
+    		return null;
+    	}
+    	
+    	Set<String> results = new LinkedHashSet<String>();
+    	
+        List<String> roles = PermissionTools.getRoleNames(user);
+        for (String role : roles) {
+        	if (role.endsWith("-admin")) {
+        		String projectId = role.replaceAll("-admin", "");
+        		if (projectIds.contains(projectId))
+        			results.add(projectId);
+        	}
+        }
+    	
+    	return results;
+    }
+    
+    public static String getRemoteUser() {
+        return getExternalContext().getRemoteUser();
+    }
+    
+    public static boolean isUserLogged() {
+    		return getRemoteUser() != null;
+    }
+    
+    public static boolean isProjectAdminLogged() {
+    	
+    		if (!isUserLogged()) {
+    			return false;
+    		}
+    		
+    		String projectId = FacesTools.getSelectedProjectId();
+		String projectAdminString = null;
+		
+		if ((projectId != null) && (!projectId.equals(""))) {
+			projectAdminString = projectId.concat("-admin");
+		}
+		
+		org.jboss.portal.identity.User user = getUser();
+		
+		return ((projectAdminString != null) &&	
+							(PermissionTools.isUserInRole(user, projectAdminString))
+					|| PermissionTools.isUserInRole(user, "Administrators"));
+    }
+    
+    public static org.jboss.portal.identity.User getUser(String username) {
+    		return null;    	
+    }
+
+    public static String getSelectedProjectId() {
+    
+    	 	PortletRequest request = (PortletRequest) getExternalContext().getRequest();
+    	 	
+    	 	return ProjectsHelper.getSelectedProjectId(request);	
+    }
+    
+    public static void addMessage(String message) {
+		FacesContext.getCurrentInstance().addMessage(null, 
+				new FacesMessage(message));
+	}
+    
+    public static String getRequestParameter(String param) {
+    	
+    		FacesContext context = FacesContext.getCurrentInstance(); 
+    		Map map = context.getExternalContext().getRequestParameterMap();
+    		return (String) map.get(param);
+    }
+    
+    public static void resetSessionBean(String beanName) {
+    	
+    		FacesContext fc = FacesContext.getCurrentInstance();
+    		fc.getApplication().createValueBinding( "#{" + beanName + "}").setValue(fc, null );
+    }
+    
+    public static boolean isAllowedToEdit() {
+    	
+    		String projectId = getSelectedProjectId();
+    	
+    		Object request = getExternalContext().getRequest();
+
+        if (request instanceof PortletRequest) {
+            return ProjectsHelper.getProjects().editPermissionAllowed(
+                    PermissionsCheckerFactory.getPermissionsChecker((PortletRequest) request),
+                    projectId);
+        }
+        
+        return false;
+	}
+}

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/faces-config.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/faces-config.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/faces-config.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,161 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!DOCTYPE faces-config PUBLIC
+  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<faces-config>
+	<navigation-rule>
+		<from-view-id>
+			/repo-access/default/contributor/contributor.jsp
+		</from-view-id>
+		<navigation-case>
+			<from-outcome>apply</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/apply.jsp
+			</to-view-id>
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>admin</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/admin.jsp
+			</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+	<navigation-rule>
+		<from-view-id>
+			/repo-access/default/contributor/admin.jsp
+		</from-view-id>
+		<navigation-case>
+			<from-outcome>back</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/contributor.jsp
+			</to-view-id>
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>adminDelete</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/adminDelete.jsp
+			</to-view-id>
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>leadDelete</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/leadDelete.jsp
+			</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+	<navigation-rule>
+		<from-view-id>
+			/repo-access/default/contributor/adminDelete.jsp
+		</from-view-id>
+		<navigation-case>
+			<from-outcome>back</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/admin.jsp
+			</to-view-id>
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>admin</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/admin.jsp
+			</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+	<navigation-rule>
+		<from-view-id>
+			/repo-access/default/contributor/leadDelete.jsp
+		</from-view-id>
+		<navigation-case>
+			<from-outcome>back</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/admin.jsp
+			</to-view-id>
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>admin</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/admin.jsp
+			</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+	<navigation-rule>
+		<from-view-id>
+			/repo-access/default/contributor/apply.jsp
+		</from-view-id>
+		<navigation-case>
+			<from-outcome>back</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/contributor.jsp
+			</to-view-id>
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>individual</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/individual.jsp
+			</to-view-id>
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>corporate</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/corporate.jsp
+			</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+	<navigation-rule>
+		<from-view-id>
+			/repo-access/default/contributor/individual.jsp
+		</from-view-id>
+		<navigation-case>
+			<from-outcome>back</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/apply.jsp
+			</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+	<navigation-rule>
+		<from-view-id>
+			/repo-access/default/contributor/corporate.jsp
+		</from-view-id>
+		<navigation-case>
+			<from-outcome>back</from-outcome>
+			<to-view-id>
+				/repo-access/default/contributor/apply.jsp
+			</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+	<managed-bean>
+		<managed-bean-name>conServer</managed-bean-name>
+		<managed-bean-class>
+			org.jboss.forge.contributor.ConServer
+		</managed-bean-class>
+		<managed-bean-scope>application</managed-bean-scope>
+	</managed-bean>
+
+	<managed-bean>
+		<managed-bean-name>con</managed-bean-name>
+		<managed-bean-class>
+			org.jboss.forge.contributor.ConMainBean
+		</managed-bean-class>
+		<managed-bean-scope>session</managed-bean-scope>
+		<managed-property>
+			<property-name>server</property-name>
+			<value>#{conServer}</value>
+		</managed-property>
+	</managed-bean>
+
+	<managed-bean>
+		<managed-bean-name>conAccessBean</managed-bean-name>
+		<managed-bean-class>
+			org.jboss.forge.contributor.ConAccessBean
+		</managed-bean-class>
+		<managed-bean-scope>request</managed-bean-scope>
+	</managed-bean>
+</faces-config>

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-app.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-app.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-app.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,3 @@
+<jboss-app>
+    <app-name>con</app-name>
+</jboss-app>

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-portlet.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-portlet.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-portlet.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<portlet-app>
+	
+	<portlet>
+		<portlet-name>ConPortlet</portlet-name>
+		<transaction>
+			<trans-attribute>Required</trans-attribute>
+		</transaction>
+	</portlet>
+	
+</portlet-app>
\ No newline at end of file

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-web.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/jboss-web.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<jboss-web>
+</jboss-web>

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/portlet-instances.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/portlet-instances.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/portlet-instances.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployments>
+	<deployment>
+		<if-exists>overwrite</if-exists>
+		<instance>
+			<instance-id>ConPortletInstance</instance-id>
+			<portlet-ref>ConPortlet</portlet-ref>
+		</instance>
+	</deployment>
+</deployments>
\ No newline at end of file

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/portlet.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/portlet.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/portlet.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app
+	xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd /opt/SUNWps/dtd/portlet.xsd"
+	version="1.0">
+	<portlet>
+		<portlet-name>ConPortlet</portlet-name>
+		<portlet-class>
+			org.apache.myfaces.portlet.MyFacesGenericPortlet
+		</portlet-class>
+		<init-param>
+			<name>default-view</name>
+			<value>
+				/repo-access/default/contributor/contributor.jsp
+			</value>
+		</init-param>
+		<expiration-cache>-1</expiration-cache>
+		<supported-locale>en</supported-locale>
+		<supports>
+			<mime-type>text/html</mime-type>
+			<portlet-mode>VIEW</portlet-mode>
+		</supports>
+		<portlet-info>
+			<title>Contributor Agreements</title>
+		</portlet-info>
+	</portlet>
+	
+</portlet-app>

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/forge.tld
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/forge.tld	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/forge.tld	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,192 @@
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
+  version="2.0">
+  <!-- 
+  JBoss, the OpenSource J2EE webOS
+  Distributable under LGPL license.
+  See terms of license at gnu.org. 
+ -->
+   <tlib-version>1.1</tlib-version>
+   <jsp-version>2.0</jsp-version>
+   <shortname>forge</shortname>
+   <info>Forge tags</info>
+   
+   <tag>
+      <name>pageURL</name>
+      <tagclass>org.jboss.forge.common.taglib.PageURLTag</tagclass>
+      <attribute>
+         <name>page</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
+         <name>form</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+   <tag>
+		<name>tagmeButton</name>
+		<tagclass>org.jboss.forge.common.taglib.TagMeTag</tagclass>
+		<attribute>
+	         <name>div</name>
+	         <required>true</required>
+	         <rtexprvalue>true</rtexprvalue>
+      	</attribute>
+      	<attribute>
+	         <name>service</name>
+	         <required>true</required>
+	         <rtexprvalue>true</rtexprvalue>
+	    </attribute>
+      	<attribute>
+	         <name>user</name>
+	         <required>true</required>
+	         <rtexprvalue>true</rtexprvalue>
+	    </attribute>
+      	<attribute>
+	         <name>path</name>
+	         <required>true</required>
+	         <rtexprvalue>true</rtexprvalue>
+	    </attribute>
+	    <attribute>
+	         <name>id</name>
+	         <required>true</required>
+	         <rtexprvalue>true</rtexprvalue>
+	    </attribute>
+	    <attribute>
+	         <name>website</name>
+	         <required>true</required>
+	         <rtexprvalue>true</rtexprvalue>
+	    </attribute>
+   </tag>
+   
+   <tag>
+      <name>param</name>
+      <tagclass>org.jboss.forge.common.taglib.ParamTag</tagclass>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
+         <name>value</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+   <tag>
+      <name>wikiURL</name>
+      <tagclass>org.jboss.forge.common.taglib.WikiURLTag</tagclass>
+      <attribute>
+         <name>page</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+   <tag>
+      <name>freezoneURL</name>
+      <tagclass>org.jboss.forge.common.taglib.FreezoneURLTag</tagclass>
+      <attribute>
+         <name>page</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+   <tag>
+      <name>projectURL</name>
+      <tagclass>org.jboss.forge.common.taglib.ProjectURLTag</tagclass>
+      <attribute>
+         <name>project</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
+         <name>page</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
+         <name>form</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+   
+   <tag>
+      <name>selectedProject</name>
+      <tagclass>org.jboss.forge.common.taglib.SelectedProjectTag</tagclass>
+   </tag>
+   
+   <tag>
+      <name>imagePath</name>
+      <tagclass>org.jboss.forge.common.taglib.ImagePathTag</tagclass>
+      <attribute>
+         <name>src</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+      <attribute>
+         <name>project</name>
+         <required>false</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+   <tag>
+      <name>attrValue</name>
+      <tagclass>org.jboss.forge.common.taglib.AttrValueTag</tagclass>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+   <tag>
+      <name>attrIf</name>
+      <tagclass>org.jboss.forge.common.taglib.AttrIfTag</tagclass>
+      <attribute>
+         <name>name</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+    <tag>
+      <name>ifEmpty</name>
+      <tagclass>org.jboss.forge.common.taglib.IfEmptyTag</tagclass>
+      <attribute>
+         <name>value</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+    <tag>
+      <name>ifNotEmpty</name>
+      <tagclass>org.jboss.forge.common.taglib.IfNotEmptyTag</tagclass>
+      <attribute>
+         <name>value</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+   
+     <tag>
+      <name>htmlOut</name>
+      <tagclass>org.jboss.forge.common.taglib.HtmlOutTag</tagclass>
+       <body-content>scriptless</body-content>
+   </tag>
+   
+    <tag>
+      <name>ifAllowedToEdit</name>
+      <tagclass>org.jboss.forge.common.taglib.IfAllowedToEditTag</tagclass>
+   </tag>
+   
+</taglib>

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/portlet.tld
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/portlet.tld	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/tld/portlet.tld	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,81 @@
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+  version="2.0">
+   <tlib-version>1.1</tlib-version>
+   <short-name>JBoss-Portal-tags</short-name>
+
+   <tag>
+      <name>if</name>
+      <tag-class>org.jboss.portal.core.servlet.jsp.taglib.IfTag</tag-class>
+      <body-content>JSP</body-content>
+      <attribute>
+         <name>ctx</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+
+   <tag>
+      <name>iterate</name>
+      <tag-class>org.jboss.portal.core.servlet.jsp.taglib.IterateTag</tag-class>
+      <body-content>JSP</body-content>
+      <attribute>
+         <name>ctx</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+
+   <tag>
+      <name>include</name>
+      <tag-class>org.jboss.portal.core.servlet.jsp.taglib.IncludeTag</tag-class>
+      <body-content>JSP</body-content>
+      <attribute>
+         <name>page</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+
+   <tag>
+      <name>error</name>
+      <tag-class>org.jboss.portal.core.servlet.jsp.taglib.ErrorTag</tag-class>
+      <body-content>JSP</body-content>
+      <attribute>
+         <name>key</name>
+         <required>true</required>
+         <rtexprvalue>true</rtexprvalue>
+      </attribute>
+   </tag>
+
+   <tag>
+      <name>errors</name>
+      <tag-class>org.jboss.portal.core.servlet.jsp.taglib.ErrorsTag</tag-class>
+      <body-content>JSP</body-content>
+   </tag>
+
+   <tag>
+      <name>success</name>
+      <tag-class>org.jboss.portal.core.servlet.jsp.taglib.SuccessTag</tag-class>
+      <body-content>JSP</body-content>
+   </tag>
+   <function>
+      <name>i18n</name>
+      <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+      <function-signature>java.lang.String getMessage(java.lang.String)</function-signature>
+   </function>
+
+   <function>
+      <name>out</name>
+      <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+      <function-signature>java.lang.String out(java.lang.String)</function-signature>
+   </function>
+
+   <function>
+      <name>i18nout</name>
+      <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+      <function-signature>java.lang.String i18nOut(java.lang.String)</function-signature>
+   </function>
+
+</taglib>

Added: labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/web.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/web.xml	                        (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-contributor/src/web/WEB-INF/web.xml	2009-04-16 11:26:29 UTC (rev 26059)
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+            http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+         version="2.4">
+	<listener>
+		<listener-class>
+			org.apache.myfaces.webapp.StartupServletContextListener
+		</listener-class>
+	</listener>
+
+    <context-param>
+	  <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
+	  <param-value>true</param-value>
+	</context-param>
+
+    <filter>
+		<filter-name>filesFromRepoFilter</filter-name>
+		<filter-class>
+			org.jboss.forge.common.FilesFromRepoFilter
+		</filter-class>
+	</filter>
+
+	<filter-mapping>
+		<filter-name>filesFromRepoFilter</filter-name>
+		<url-pattern>/repo-access/*</url-pattern>
+		<dispatcher>INCLUDE</dispatcher>
+	</filter-mapping>
+</web-app>




More information about the jboss-svn-commits mailing list