[portal-commits] JBoss Portal SVN: r12260 - in modules: metadata and 29 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Thu Nov 6 14:13:49 EST 2008


Author: mwringe
Date: 2008-11-06 14:13:49 -0500 (Thu, 06 Nov 2008)
New Revision: 12260

Added:
   modules/metadata/
   modules/metadata/trunk/
   modules/metadata/trunk/.classpath
   modules/metadata/trunk/.project
   modules/metadata/trunk/.settings/
   modules/metadata/trunk/.settings/org.eclipse.jdt.core.prefs
   modules/metadata/trunk/.settings/org.eclipse.jdt.ui.prefs
   modules/metadata/trunk/.settings/org.maven.ide.eclipse.prefs
   modules/metadata/trunk/build/
   modules/metadata/trunk/build/pom.xml
   modules/metadata/trunk/metadata/
   modules/metadata/trunk/metadata/pom.xml
   modules/metadata/trunk/metadata/src/
   modules/metadata/trunk/metadata/src/main/
   modules/metadata/trunk/metadata/src/main/java/
   modules/metadata/trunk/metadata/src/main/java/org/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/CacheInfo.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/LifeCyclePhase.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/TransportGuarantee.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication10MetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication20MetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ValidationErrorHandler.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/EventListAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/LocalizedStringAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletModeAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/WindowStateAdapter.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/.PortalAppObjectModelFactory.java.swp
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/PortalAppObjectModelFactory.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/JBossApplicationMetaDataFactory.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/CacheInfoImpl.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/LocalizedStringBuilder.java
   modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/PortletApplicationModelFactory.java
   modules/metadata/trunk/metadata/src/test/
   modules/metadata/trunk/pom.xml
Log:
Initial metadata module creation

Added: modules/metadata/trunk/.classpath
===================================================================
--- modules/metadata/trunk/.classpath	                        (rev 0)
+++ modules/metadata/trunk/.classpath	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target-eclipse/classes" path="metadata/src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target-eclipse/classes"/>
+</classpath>

Added: modules/metadata/trunk/.project
===================================================================
--- modules/metadata/trunk/.project	                        (rev 0)
+++ modules/metadata/trunk/.project	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>module-metadata</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: modules/metadata/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- modules/metadata/trunk/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ modules/metadata/trunk/.settings/org.eclipse.jdt.core.prefs	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,8 @@
+#Thu Oct 16 11:58:15 EDT 2008
+eclipse.preferences.version=1
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Added: modules/metadata/trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- modules/metadata/trunk/.settings/org.eclipse.jdt.ui.prefs	                        (rev 0)
+++ modules/metadata/trunk/.settings/org.eclipse.jdt.ui.prefs	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,3 @@
+#Thu Oct 16 11:49:13 EDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>

Added: modules/metadata/trunk/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- modules/metadata/trunk/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ modules/metadata/trunk/.settings/org.maven.ide.eclipse.prefs	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,9 @@
+#Thu Oct 16 11:55:23 EDT 2008
+activeProfiles=
+eclipse.preferences.version=1
+filterResources=false
+includeModules=true
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+useMavenFolders=false
+version=1

Added: modules/metadata/trunk/build/pom.xml
===================================================================
--- modules/metadata/trunk/build/pom.xml	                        (rev 0)
+++ modules/metadata/trunk/build/pom.xml	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,99 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss.portal</groupId>
+      <artifactId>jboss-portal-parent</artifactId>
+      <version>1-SNAPSHOT</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.jboss.portal.metadata</groupId>
+   <artifactId>module-parent</artifactId>
+   <packaging>pom</packaging>
+   <name>JBoss Portal Metadata</name>
+   <version>trunk-SNAPSHOT</version>
+   <url>http://labs.jboss.com/jbossportal</url>
+
+   <properties>
+      <version.jboss.portal.common>1.2.0</version.jboss.portal.common>
+      <version.jboss.portal.portlet>2.1.0-SNAPSHOT</version.jboss.portal.portlet>
+      <version.jboss-metadata>1.0.0.CR1</version.jboss-metadata>
+      <version.jboss.jbossxb>2.0.0.CR15</version.jboss.jbossxb>
+      <version.saxon>6.5.3</version.saxon>
+      <version.jaxb>2.1</version.jaxb>
+   </properties>
+
+    <repositories>
+      <repository>
+         <id>repository.jboss.org</id>
+         <name>JBoss Repository</name>
+         <layout>default</layout>
+         <url>http://repository.jboss.org/maven2/</url>
+         <snapshots>
+            <enabled>false</enabled>
+         </snapshots>
+      </repository>
+      <repository>
+         <id>snapshots.jboss.org</id>
+         <name>JBoss Snapshots Repository</name>
+         <layout>default</layout>
+         <url>http://snapshots.jboss.org/maven2/</url>
+         <snapshots>
+            <enabled>true</enabled>
+         </snapshots>
+         <releases>
+            <enabled>false</enabled>
+         </releases>
+      </repository>
+   </repositories>
+
+   <build>
+      <plugins>
+         <plugin>
+            <artifactId>maven-source-plugin</artifactId>
+         </plugin>
+      </plugins>
+   </build>
+
+   <dependencyManagement>
+      <dependencies>
+         <dependency>
+           <groupId>org.jboss.portal.common</groupId>
+           <artifactId>common-common</artifactId>
+           <version>${version.jboss.portal.common}</version>
+         </dependency>
+         <dependency>
+           <groupId>org.jboss.portal.common</groupId>
+           <artifactId>common-portal</artifactId>
+           <version>${version.jboss.portal.common}</version>
+         </dependency>
+         <dependency>
+           <groupId>org.jboss.portal.portlet</groupId>
+           <artifactId>portlet-portlet</artifactId>
+           <version>${version.jboss.portal.portlet}</version>
+         </dependency>
+         <dependency>
+           <groupId>org.jboss.metadata</groupId>
+           <artifactId>jboss-metadata</artifactId>
+           <version>${version.jboss-metadata}</version>
+         </dependency>
+         <dependency>
+           <groupId>org.jboss</groupId>
+           <artifactId>jbossxb</artifactId>
+           <version>${version.jboss.jbossxb}</version>
+         </dependency>
+         <dependency>
+            <groupId>saxon</groupId>
+            <artifactId>saxon</artifactId>
+            <version>${version.saxon}</version>
+         </dependency>
+         <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>${version.jaxb}</version>
+         </dependency>
+
+
+      </dependencies>
+   </dependencyManagement>
+
+</project>

Added: modules/metadata/trunk/metadata/pom.xml
===================================================================
--- modules/metadata/trunk/metadata/pom.xml	                        (rev 0)
+++ modules/metadata/trunk/metadata/pom.xml	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,65 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss.portal.metadata</groupId>
+      <artifactId>module-parent</artifactId>
+      <version>trunk-SNAPSHOT</version>
+      <relativePath>../build/pom.xml</relativePath>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>metadata-metadata</artifactId>
+   <packaging>jar</packaging>
+   <name>JBoss Portal Modules Deployer</name>
+
+   <dependencies>
+
+     <dependency>
+       <groupId>org.jboss.portal.common</groupId>
+       <artifactId>common-common</artifactId>
+<!--       <scope>provided</scope> -->
+    </dependency>
+     <dependency>
+       <groupId>org.jboss.portal.common</groupId>
+       <artifactId>common-portal</artifactId>
+<!--       <scope>provided</scope> -->
+     </dependency> 
+<!--     <dependency>
+       <groupId>org.jboss.portal.portlet</groupId>
+       <artifactId>portlet-portlet</artifactId>
+     </dependency> -->
+      <dependency>
+         <groupId>org.jboss.metadata</groupId>
+         <artifactId>jboss-metadata</artifactId>
+         <scope>provided</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss</groupId>
+         <artifactId>jbossxb</artifactId>
+         <scope>provided</scope>
+      </dependency>
+<!--      <dependency>
+         <groupId>saxon</groupId>
+         <artifactId>saxon</artifactId>
+         <scope>provided</scope>
+      </dependency> -->
+      <dependency>
+         <groupId>javax.xml.bind</groupId>
+         <artifactId>jaxb-api</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+               <encoding>iso-8859-1</encoding>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+
+   <properties/>
+</project>

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/CacheInfo.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/CacheInfo.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/CacheInfo.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.figureoutlocationlater;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public interface CacheInfo
+{
+
+   /**
+    * The expiration in seconds.
+    *
+    * @return the expiration in seconds
+    */
+   int getExpirationSecs();
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/LifeCyclePhase.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/LifeCyclePhase.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/LifeCyclePhase.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.figureoutlocationlater;
+
+import javax.xml.bind.annotation.XmlEnumValue;
+
+/**
+ * Enumerate the life cycle phase of a Portlet.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public enum LifeCyclePhase
+{
+   @XmlEnumValue("ACTION_PHASE") ACTION,
+   @XmlEnumValue("EVENT_PHASE") EVENT,
+   @XmlEnumValue("RENDER_PHASE") RENDER,
+   @XmlEnumValue("RESOURCE_PHASE") RESOURCE
+}
\ No newline at end of file

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/TransportGuarantee.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/TransportGuarantee.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/TransportGuarantee.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.figureoutlocationlater;
+
+/**
+ * Type safe enumeration class for transport guarantee.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public enum TransportGuarantee
+{
+   NONE, INTEGRAL, CONFIDENTIAL
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,20 @@
+package org.jboss.portal.metadata.jboss.app;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+public class PortalAppMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+	
+	private String appName;
+	
+	public void setAppName(String appname)
+	{
+		this.appName = appname;
+	}
+	
+	public String getAppName()
+	{
+		return appName;
+	}
+	
+}


Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java
___________________________________________________________________
Name: svn:executable
   + 

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.jboss.portlet;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class JBossApplicationMetaData
+{
+
+   /** . */
+   protected Boolean remotable;
+
+   /** The application id that overrides the context path. */
+   protected String id;
+
+   /** . */
+   protected Map<String, JBossPortletMetaData> portlets;
+
+   public JBossApplicationMetaData()
+   {
+      portlets = new LinkedHashMap<String, JBossPortletMetaData>();
+   }
+
+   public Map<String, JBossPortletMetaData> getPortlets()
+   {
+      return portlets;
+   }
+
+   public Boolean getRemotable()
+   {
+      return remotable;
+   }
+
+   public void setRemotable(Boolean remotable)
+   {
+      this.remotable = remotable;
+   }
+
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+}


Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java
___________________________________________________________________
Name: svn:executable
   + 

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,163 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.jboss.portlet;
+
+import org.jboss.portal.common.transaction.Transactions;
+
+/**
+ * Specific metadata specified to jboss portlet container.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 7226 $
+ */
+public class JBossPortletMetaData implements Cloneable
+{
+
+   /** . */
+   private String name;
+
+   /** . */
+   private Boolean remotable;
+
+   /** . */
+   private SecurityConstraintMetaData securityConstraint;
+
+   /** . */
+   private Integer cacheRefType;
+
+   /** . */
+   private Transactions.Type txType;
+
+   /** . */
+   private Boolean distributed;
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   public Boolean getRemotable()
+   {
+      return remotable;
+   }
+
+   public void setRemotable(Boolean remotable)
+   {
+      this.remotable = remotable;
+   }
+
+   public Boolean getDistributed()
+   {
+      return distributed;
+   }
+
+   public void setDistributed(Boolean distributed)
+   {
+      this.distributed = distributed;
+   }
+
+   public SecurityConstraintMetaData getSecurityConstraint()
+   {
+      return securityConstraint;
+   }
+
+   public void setSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+   {
+      this.securityConstraint = securityConstraint;
+   }
+
+   public Integer getCacheRefType()
+   {
+      return cacheRefType;
+   }
+
+   public void setCacheRefType(Integer cacheRefType)
+   {
+      this.cacheRefType = cacheRefType;
+   }
+
+   public Transactions.Type getTxType()
+   {
+      return txType;
+   }
+
+   public void setTxType(Transactions.Type txType)
+   {
+      this.txType = txType;
+   }
+
+   /**
+    * Merge the current meta data with portlet application.
+    */
+   public void merge(JBossApplicationMetaData application)
+   {
+      if (remotable == null)
+      {
+         remotable = application.getRemotable();
+      }
+   }
+
+   /**
+    * Merge the current meta data with a specified one.
+    */
+   public void merge(JBossPortletMetaData portlet)
+   {
+      if (remotable == null)
+      {
+         remotable = portlet.getRemotable();
+      }
+      if (txType == null)
+      {
+         txType = portlet.getTxType();
+      }
+      if (cacheRefType == null)
+      {
+         cacheRefType = portlet.getCacheRefType();
+      }
+      if (securityConstraint == null)
+      {
+         securityConstraint = portlet.getSecurityConstraint();
+      }
+      if (distributed == null)
+      {
+         distributed = portlet.getDistributed();
+      }
+   }
+
+   public Object clone()
+   {
+      try
+      {
+         return super.clone();
+      }
+      catch (CloneNotSupportedException e)
+      {
+         throw new Error(e);
+      }
+   }
+}


Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
___________________________________________________________________
Name: svn:executable
   + 

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.jboss.portlet;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class PolicyPermissionMetaData
+{
+
+   private String roleName;
+   private Set actions;
+
+   public PolicyPermissionMetaData()
+   {
+      actions = new HashSet();
+   }
+
+   public String getRoleName()
+   {
+      return roleName;
+   }
+
+   public void setRoleName(String roleName)
+   {
+      this.roleName = roleName;
+   }
+
+   public Set getActions()
+   {
+      return actions;
+   }
+
+   public void setActions(Set actions)
+   {
+      this.actions = actions;
+   }
+}


Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java
___________________________________________________________________
Name: svn:executable
   + 

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.jboss.portlet;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class SecurityConstraintMetaData
+{
+
+   private Map policyPermissions;
+
+   public SecurityConstraintMetaData()
+   {
+      policyPermissions = new LinkedHashMap();
+   }
+
+   public Map getPolicyPermissions()
+   {
+      return policyPermissions;
+   }
+
+   public void setPolicyPermissions(Map policyPermissions)
+   {
+      this.policyPermissions = policyPermissions;
+   }
+}


Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java
___________________________________________________________________
Name: svn:executable
   + 

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication10MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication10MetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication10MetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlRootElement(name = "portlet-app")
+ at XmlType(name = "portlet-appType")
+ at JBossXmlSchema(xmlns = {@XmlNs(namespaceURI = PortletMetaDataConstants.PORTLET_JSR_168_NS, prefix = "portlet")},
+   ignoreUnresolvedFieldOrClass = false,
+   namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS,
+   elementFormDefault = XmlNsForm.QUALIFIED)
+public class AnnotationPortletApplication10MetaData extends PortletApplication10MetaData
+{
+}
\ No newline at end of file

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication20MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication20MetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication20MetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import org.jboss.portal.metadata.portlet.PortletApplication20MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+ at XmlRootElement(name = "portlet-app")
+ at XmlType(name = "portlet-appType")
+ at JBossXmlSchema(xmlns = {@XmlNs(namespaceURI = PortletMetaDataConstants.PORTLET_JSR_286_NS, prefix = "portlet")},
+   ignoreUnresolvedFieldOrClass = false,
+   namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS,
+   elementFormDefault = XmlNsForm.QUALIFIED)
+public class AnnotationPortletApplication20MetaData extends PortletApplication20MetaData
+{
+}
\ No newline at end of file

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "custom-portlet-modeType")
+public class CustomPortletModeMetaData extends DescribableMetaData
+{
+
+   /** The custom portlet mode id*/
+   private String id;
+
+   /** The portlet mode */
+   private String portletMode;
+
+   /** Is portal managed */
+   private boolean portalManaged = true;
+
+   public CustomPortletModeMetaData() {}
+   
+   public CustomPortletModeMetaData(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "portlet-mode")
+   public String getPortletMode()
+   {
+      return portletMode;
+   }
+
+   public void setPortletMode(String portletMode)
+   {
+      this.portletMode = portletMode;
+   }
+
+   @XmlElement(name = "portal-managed", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public boolean isPortalManaged()
+   {
+      return portalManaged;
+   }
+
+   public void setPortalManaged(boolean portalManaged)
+   {
+      this.portalManaged = portalManaged;
+   }
+   
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "custom-window-stateType")
+public class CustomWindowStateMetaData extends DescribableMetaData
+{
+
+   /** The window state id */
+   private String id;
+
+   /** The window state */
+   private String windowState;
+
+   public CustomWindowStateMetaData() {}
+   
+   public CustomWindowStateMetaData(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "window-state")
+   public String getWindowState()
+   {
+      return windowState;
+   }
+
+   public void setWindowState(String windowState)
+   {
+      this.windowState = windowState;
+   }
+
+}
\ No newline at end of file

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,95 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "listenerType")
+public class ListenerMetaData extends DescribableMetaData
+{
+
+   /** The id */
+   private String id;
+   
+   /** The display name */
+   private LocalizedString displayName;
+   
+   /** The listener class */
+   private String listenerClass;
+
+   public ListenerMetaData() {}
+   
+   public ListenerMetaData(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "display-name")
+   @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+   public LocalizedString getDisplayName()
+   {
+      return displayName;
+   }
+
+   public void setDisplayName(LocalizedString displayName)
+   {
+      this.displayName = displayName;
+   }
+
+   @XmlElement(name = "listener-class")
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getListenerClass()
+   {
+      return listenerClass;
+   }
+
+   public void setListenerClass(String listenerClass)
+   {
+      this.listenerClass = listenerClass;
+   }
+   
+}
+

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,217 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+import org.jboss.portal.metadata.portlet.security.SecurityConstraintMetaData;
+import org.jboss.portal.metadata.portlet.adapter.CustomPortletModeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.CustomWindowStateAdapter;
+import org.jboss.portal.metadata.portlet.adapter.PortletListAdapter;
+import org.jboss.portal.metadata.portlet.adapter.UserAttributeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+ at XmlRootElement(name = "portlet-app")
+ at XmlType(name = "portlet-appType")
+public class PortletApplication10MetaData
+{
+   /** The portlet application id. */
+   private String id;
+
+   /** The portlet application version. */
+   private String version;
+
+   /** A bunch of portlets. */
+   private Map<String, PortletMetaData> portlets;
+
+   /** The user attributes. */
+   private Map<String, UserAttributeMetaData> userAttributes;
+
+   /** The custom portlet mode. */
+   private Map<String, CustomPortletModeMetaData> customPortletModes;
+
+   /** The custom window states. */
+   private Map<String, CustomWindowStateMetaData> customWindowStates;
+
+   /** The security constraints */
+   private List<SecurityConstraintMetaData> securityConstraints;
+
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute(name = "version")
+   public String getVersion()
+   {
+      return version;
+   }
+
+   public void setVersion(String version)
+   {
+      this.version = version;
+   }
+
+   @XmlElement(name = "portlet")
+   @XmlJavaTypeAdapter(PortletListAdapter.class)
+   public Map<String, PortletMetaData> getPortlets()
+   {
+      return portlets;
+   }
+
+   public void setPortlets(Map<String, PortletMetaData> portlets)
+   {
+      // Adding reference to the portlet application metadata
+      for( PortletMetaData p : portlets.values())
+      {
+         p.setPortletApplication(this);
+      }
+      this.portlets = portlets;
+   }
+
+   public Collection<PortletMetaData> getPortletCollection()
+   {
+      return portlets != null ? portlets.values() : null;
+   }
+
+   public PortletMetaData getPortlet(String portletName)
+   {
+      return portlets.get(portletName);
+   }
+   
+   public void addPortlet(PortletMetaData portlet)
+   {
+      if(this.portlets == null)
+      {
+         this.portlets = new LinkedHashMap<String, PortletMetaData>();
+      }
+      // Adding reference to the portlet application metadata
+      portlet.setPortletApplication(this);
+      this.portlets.put(portlet.getPortletName(), portlet);
+   }
+
+   @XmlElement(name = "user-attribute")
+   @XmlJavaTypeAdapter(UserAttributeAdapter.class)
+   public Map<String, UserAttributeMetaData> getUserAttributes()
+   {
+      return userAttributes;
+   }
+
+   public void setUserAttributes(Map<String, UserAttributeMetaData> userAttributes)
+   {
+      this.userAttributes = userAttributes;
+   }
+   
+   public void addUserAttribute(UserAttributeMetaData userAttribute)
+   {
+      if( this.userAttributes == null )
+      {
+         this.userAttributes = new HashMap<String, UserAttributeMetaData>();
+      }
+      this.userAttributes.put(userAttribute.getName(), userAttribute);
+   }
+
+   @XmlElement(name = "custom-portlet-mode")
+   @XmlJavaTypeAdapter(CustomPortletModeAdapter.class)
+   public Map<String, CustomPortletModeMetaData> getCustomPortletModes()
+   {
+      return customPortletModes;
+   }
+
+   public void setCustomPortletModes(Map<String, CustomPortletModeMetaData> customPortletMode)
+   {
+      this.customPortletModes = customPortletMode;
+   }
+   
+   public void addCustomPortletMode(CustomPortletModeMetaData portletMode)
+   {
+      if ( this.customPortletModes == null)
+      {
+         this.customPortletModes = new HashMap<String, CustomPortletModeMetaData>();
+      }
+      this.customPortletModes.put(portletMode.getPortletMode(), portletMode);
+   }
+
+   @XmlElement(name = "custom-window-state")
+   @XmlJavaTypeAdapter(CustomWindowStateAdapter.class)
+   public Map<String, CustomWindowStateMetaData> getCustomWindowStates()
+   {
+      return customWindowStates;
+   }
+
+   public void setCustomWindowStates(Map<String, CustomWindowStateMetaData> customWindowState)
+   {
+      this.customWindowStates = customWindowState;
+   }
+   
+   public void addCustomWindowState(CustomWindowStateMetaData windowState)
+   {
+      if( this.customWindowStates == null )
+      {
+         this.customWindowStates = new HashMap<String, CustomWindowStateMetaData>();
+      }
+      this.customWindowStates.put(windowState.getWindowState(), windowState);
+   }
+
+   @XmlElement(name = "security-constraint")
+   public List<SecurityConstraintMetaData> getSecurityConstraints()
+   {
+      return securityConstraints;
+   }
+
+   public void setSecurityConstraints(List<SecurityConstraintMetaData> securityConstraints)
+   {
+      this.securityConstraints = securityConstraints;
+   }
+   
+   public void addSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+   {
+      if(this.securityConstraints == null)
+      {
+         this.securityConstraints = new ArrayList<SecurityConstraintMetaData>();
+      }
+      this.securityConstraints.add(securityConstraint);
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,238 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMappingMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMetaData;
+import org.jboss.portal.metadata.portlet.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.FilterAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletApplication20MetaData extends PortletApplication10MetaData
+{
+   /** The resource bundle (JSR 286) */
+   private String resourceBundle;
+
+   /** The default namespace URI (JSR 286) */
+   private URI defaultNamespace;
+
+   /** The filters (JSR 286) */
+   private Map<String, FilterMetaData> filters;
+
+   /** The filter mapping (JSR 286) */
+   private List<FilterMappingMetaData> filterMapping;
+
+   /** The events (JSR 286) */
+   private List<EventDefinitionMetaData> events;
+
+   /** The public render parameters */
+   private List<PublicRenderParameterMetaData> publicRenderParameters;
+   
+   /** The url generation listener */
+   private List<ListenerMetaData> listeners;
+
+   /** The container runtime options */
+   private Map<String, ContainerRuntimeMetaData> containerRuntimeOptions;
+
+   @XmlElement(name = "resource-bundle", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public String getResourceBundle()
+   {
+      return resourceBundle;
+   }
+
+   public void setResourceBundle(String resourceBundle)
+   {
+      this.resourceBundle = resourceBundle;
+   }
+
+   @XmlElement(name = "default-namespace")
+   public URI getDefaultNamespace()
+   {
+      return defaultNamespace;
+   }
+
+   public void setDefaultNamespace(URI defaultNamespace)
+   {
+      this.defaultNamespace = defaultNamespace;
+   }
+
+   @XmlElement(name = "filter", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   @XmlJavaTypeAdapter(FilterAdapter.class)
+   public Map<String, FilterMetaData> getFilters()
+   {
+      return this.filters;
+   }
+
+   public void setFilters(Map<String, FilterMetaData> filters)
+   {
+      this.filters = filters;
+   }
+
+   public Collection<FilterMetaData> getFilterCollection()
+   {
+      return this.filters != null ? this.filters.values() : null;
+   }
+
+   public FilterMetaData getFilter(String filterName)
+   {
+      return this.filters.get(filterName);
+   }
+   
+   public void addFilter(FilterMetaData filter)
+   {
+      if ( this.filters == null)
+      {
+         this.filters = new LinkedHashMap<String, FilterMetaData>();
+      }
+      this.filters.put(filter.getFilterName(), filter);
+   }
+
+   @XmlElement(name = "filter-mapping", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public List<FilterMappingMetaData> getFilterMapping()
+   {
+      return filterMapping;
+   }
+
+   public void setFilterMapping(List<FilterMappingMetaData> filterMapping)
+   {
+      this.filterMapping = filterMapping;
+   }
+   
+   public void addFilterMapping(FilterMappingMetaData filterMapping)
+   {
+      if(this.filterMapping == null)
+      {
+         this.filterMapping = new ArrayList<FilterMappingMetaData>();
+      }
+      this.filterMapping.add(filterMapping);
+   }
+   
+   @XmlElement(name = "event-definition", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public List<EventDefinitionMetaData> getEvents()
+   {
+      return events;
+   }
+
+   public void setEvents(List<EventDefinitionMetaData> events)
+   {
+      this.events = events;
+   }
+   
+   public void addEventDefinition(EventDefinitionMetaData eventDefinition)
+   {
+      if(this.events == null)
+      {
+         this.events = new ArrayList<EventDefinitionMetaData>();
+      }
+      this.events.add(eventDefinition);
+   }
+
+   @XmlElement(name = "public-render-parameter", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public List<PublicRenderParameterMetaData> getPublicRenderParameters()
+   {
+      return publicRenderParameters;
+   }
+
+   public void setPublicRenderParameters(List<PublicRenderParameterMetaData> publicRenderParameters)
+   {
+      this.publicRenderParameters = publicRenderParameters;
+   }
+   
+   public void addPublicRenderParameter(PublicRenderParameterMetaData renderParameter)
+   {
+      if( this.publicRenderParameters == null)
+      {
+         this.publicRenderParameters = new ArrayList<PublicRenderParameterMetaData>();
+      }
+      this.publicRenderParameters.add(renderParameter);
+   }
+   
+   @XmlElement(name = "listener", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public List<ListenerMetaData> getListeners()
+   {
+      return listeners;
+   }
+   
+   public void setListeners(List<ListenerMetaData> listeners)
+   {
+      this.listeners = listeners;
+   }
+   
+   public void addListener(ListenerMetaData listener)
+   {
+      if (this.listeners == null)
+      {
+         this.listeners = new ArrayList<ListenerMetaData>();
+      }
+      this.listeners.add(listener);
+   }
+
+   @XmlElement(name = "container-runtime-option",
+         namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   @XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
+   public Map<String, ContainerRuntimeMetaData> getContainerRuntimeOptions()
+   {
+      return containerRuntimeOptions;
+   }
+
+   public void setContainerRuntimeOptions(Map<String, ContainerRuntimeMetaData> containerRuntimeOptions)
+   {
+      this.containerRuntimeOptions = containerRuntimeOptions;
+   }
+
+   public ContainerRuntimeMetaData getContainerRuntimeOption(String option)
+   {
+      return this.containerRuntimeOptions.get(option);
+   }
+
+   public Set<String> getContainerRuntimeOptionSet()
+   {
+      return this.containerRuntimeOptions != null ? this.containerRuntimeOptions.keySet() : null;
+   }
+   
+   public void addContainerRuntime(ContainerRuntimeMetaData option)
+   {
+      if (this.containerRuntimeOptions == null)
+      {
+         this.containerRuntimeOptions = new HashMap<String, ContainerRuntimeMetaData>();
+      }
+      this.containerRuntimeOptions.put(option.getName(), option);
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import static javax.xml.XMLConstants.XML_NS_URI;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class PortletMetaDataConstants
+{
+
+   /** The portlet version 1.0 namespace */
+   public final static String PORTLET_JSR_168_NS = "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";
+
+   /** The portlet version 2.0 namespace */
+   public final static String PORTLET_JSR_286_NS = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd";
+
+   /** The xml namespace */
+   public final static String NS_XML_NAMESPACE = XML_NS_URI;
+
+   /** The default locale */
+   public final static String DEFAULT_LOCALE = "en";
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,129 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "public-render-parameterType")
+public class PublicRenderParameterMetaData extends DescribableMetaData
+{
+
+   /** The public render parameter id */
+   private String id;
+
+   /** The public render parameter identifier */
+   private String identifier;
+
+   /** The QName */
+   private QName qname;
+   
+   /** The name */
+   private String name;
+
+   /** The public render parameter alias */
+   private List<QName> alias;
+
+   public PublicRenderParameterMetaData() {}
+   
+   public PublicRenderParameterMetaData(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "identifier")
+   public String getIdentifier()
+   {
+      return identifier;
+   }
+
+   public void setIdentifier(String identifier)
+   {
+      this.identifier = identifier;
+   }
+
+   @XmlElement(name = "qname")
+   public QName getQname()
+   {
+      return qname;
+   }
+
+   public void setQname(QName qname)
+   {
+      this.qname = qname;
+   }
+   
+   @XmlElement(name = "name")
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   @XmlElement(name = "alias")
+   public List<QName> getAlias()
+   {
+      return alias;
+   }
+
+   public void setAlias(List<QName> alias)
+   {
+      this.alias = alias;
+   }
+   
+   public void addAlias(QName alias)
+   {
+      if(this.alias == null)
+      {
+         this.alias = new ArrayList<QName>();
+      }
+      this.alias.add(alias);
+   }
+   
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "user-attributeType")
+public class UserAttributeMetaData extends DescribableMetaData
+{
+
+   /** The id */
+   private String id;
+   
+   /** The name */
+   private String name;
+   
+   public UserAttributeMetaData() {}
+   
+   public UserAttributeMetaData(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+   
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlElement(name = "name")
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+}
+

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ValidationErrorHandler.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ValidationErrorHandler.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ValidationErrorHandler.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet;
+
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ValidationErrorHandler implements ErrorHandler
+{
+
+   public void error(SAXParseException e) throws SAXException
+   {
+      throw new SAXException("Syntax error on line: " + e.getLineNumber() + ", column: " + e.getColumnNumber() + "\n"
+            + e.getMessage());
+   }
+
+   public void fatalError(SAXParseException e) throws SAXException
+   {
+      throw new SAXException("Fatal syntax error on line: " + e.getLineNumber() + ", column: " + e.getColumnNumber()
+            + "\n" + e.getMessage());
+   }
+
+   public void warning(SAXParseException e) throws SAXException
+   {
+      // TODO - maybe logging or similar stuff
+   }
+
+}
\ No newline at end of file

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ContainerRuntimeAdapter
+      extends XmlAdapter<List<ContainerRuntimeMetaData>, java.util.Map<String, ContainerRuntimeMetaData>>
+{
+
+   @Override
+   public List<ContainerRuntimeMetaData> marshal(Map<String, ContainerRuntimeMetaData> map) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Map<String, ContainerRuntimeMetaData> unmarshal(List<ContainerRuntimeMetaData> list) throws Exception
+   {
+      Map<String, ContainerRuntimeMetaData> map = new HashMap<String, ContainerRuntimeMetaData>();
+      for (ContainerRuntimeMetaData c : list)
+      {
+         map.put(c.getName(), c);
+      }
+      return map;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.CustomPortletModeMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CustomPortletModeAdapter extends XmlAdapter<List<CustomPortletModeMetaData>, Map<String, CustomPortletModeMetaData>>
+{
+
+   @Override
+   public List<CustomPortletModeMetaData> marshal(Map<String, CustomPortletModeMetaData> map) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Map<String, CustomPortletModeMetaData> unmarshal(List<CustomPortletModeMetaData> list) throws Exception
+   {
+      Map<String, CustomPortletModeMetaData> map = new LinkedHashMap<String, CustomPortletModeMetaData>();
+      for (CustomPortletModeMetaData md : list)
+      {
+         map.put(md.getPortletMode(), md);
+      }
+      return map;
+   }
+
+}
+

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.CustomWindowStateMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CustomWindowStateAdapter extends XmlAdapter<List<CustomWindowStateMetaData>, Map<String, CustomWindowStateMetaData>>
+{
+
+   @Override
+   public List<CustomWindowStateMetaData> marshal(Map<String, CustomWindowStateMetaData> map) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Map<String, CustomWindowStateMetaData> unmarshal(List<CustomWindowStateMetaData> list) throws Exception
+   {
+      Map<String, CustomWindowStateMetaData> map = new LinkedHashMap<String, CustomWindowStateMetaData>();
+      for(CustomWindowStateMetaData md : list)
+      {
+         map.put(md.getWindowState(), md);
+      }
+      return map;
+   }
+
+}
+

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/EventListAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/EventListAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/EventListAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.event.EventDefinitionMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class EventListAdapter
+   extends XmlAdapter<EventDefinitionMetaData[], Map<String, EventDefinitionMetaData>>
+{
+
+   @Override
+   public EventDefinitionMetaData[] marshal(Map<String, EventDefinitionMetaData> eventMap) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Map<String, EventDefinitionMetaData> unmarshal(EventDefinitionMetaData[] eventList) throws Exception
+   {
+      Map<String, EventDefinitionMetaData> eventMap = new HashMap<String, EventDefinitionMetaData>();
+      for (EventDefinitionMetaData eventDef : eventList)
+      {
+         eventMap.put(eventDef.getQname().getLocalPart(), eventDef);
+      }
+      return eventMap;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.filter.FilterMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class FilterAdapter
+   extends XmlAdapter<List<FilterMetaData>, Map<String, FilterMetaData>>
+{
+
+   @Override
+   public List<FilterMetaData> marshal(Map<String, FilterMetaData> map) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Map<String, FilterMetaData> unmarshal(List<FilterMetaData> list) throws Exception
+   {
+      Map<String, FilterMetaData> map = new LinkedHashMap<String, FilterMetaData>();
+      for (FilterMetaData f : list)
+      {
+         String filterName = f.getFilterName();
+         if (!map.containsKey(filterName))
+         {
+            map.put(filterName, f);
+         }
+         else
+         {
+            throw new IllegalArgumentException("Duplicate filter: " + filterName);
+         }
+      }
+      return map;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/LocalizedStringAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/LocalizedStringAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/LocalizedStringAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.common.i18n.LocaleFormat;
+import org.jboss.portal.common.i18n.LocalizedString;
+import static org.jboss.portal.metadata.portlet.PortletMetaDataConstants.*;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class LocalizedStringAdapter
+   extends XmlAdapter<List<LocalizedDescriptionMetaData>, LocalizedString>
+{
+
+   @Override
+   public List<LocalizedDescriptionMetaData> marshal(LocalizedString arg0) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public LocalizedString unmarshal(List<LocalizedDescriptionMetaData> descriptionList) throws Exception
+   {
+      Map<Locale, String> map = new LinkedHashMap<Locale, String>();
+      for (LocalizedDescriptionMetaData d : descriptionList)
+      {
+         Locale locale = LocaleFormat.DEFAULT.getLocale(d.getLang());
+         map.put(locale, d.getDescription());
+      }
+      return new LocalizedString(map, new Locale(DEFAULT_LOCALE));
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class PortletListAdapter
+   extends XmlAdapter<List<PortletMetaData>, Map<String, PortletMetaData>>
+{
+
+   @Override
+   public List<PortletMetaData> marshal(Map<String, PortletMetaData> portletMap) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Map<String, PortletMetaData> unmarshal(List<PortletMetaData> portletList) throws Exception
+   {
+      Map<String, PortletMetaData> portletMap = new LinkedHashMap<String, PortletMetaData>();
+      for (PortletMetaData portlet : portletList)
+      {
+         if (!portletMap.containsKey(portlet.getPortletName()))
+         {
+            portletMap.put(portlet.getPortletName(), portlet);
+         }
+         else
+         {
+            throw new IllegalArgumentException("Portlet name '" + portlet.getPortletName() + "' already defined.");
+         }
+      }
+      return portletMap;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletModeAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletModeAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletModeAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.Mode;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletModeAdapter extends XmlAdapter<String, Mode>
+{
+
+   @Override
+   public String marshal(Mode mode) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Mode unmarshal(String name) throws Exception
+   {
+      return Mode.create(name);
+   }
+
+}
+

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletPreferenceMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletPreferencesListAdapter
+      extends XmlAdapter<List<PortletPreferenceMetaData>, Map<String, PortletPreferenceMetaData>>
+{
+
+   @Override
+   public List<PortletPreferenceMetaData> marshal(Map<String, PortletPreferenceMetaData> arg0) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Map<String, PortletPreferenceMetaData> unmarshal(List<PortletPreferenceMetaData> list) throws Exception
+   {
+      Map<String, PortletPreferenceMetaData> map = new LinkedHashMap<String, PortletPreferenceMetaData>();
+      for (PortletPreferenceMetaData p : list)
+      {
+         map.put(p.getName(), p);
+      }
+      return map;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.UserAttributeMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+public class UserAttributeAdapter
+      extends XmlAdapter<List<UserAttributeMetaData>, Map<String, UserAttributeMetaData>>
+{
+
+   @Override
+   public List<UserAttributeMetaData> marshal(Map<String, UserAttributeMetaData> arg0) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public Map<String, UserAttributeMetaData> unmarshal(List<UserAttributeMetaData> list) throws Exception
+   {
+      HashMap<String, UserAttributeMetaData> m = new HashMap<String, UserAttributeMetaData>();
+      for (UserAttributeMetaData a : list)
+      {
+         String userAttributeName = a.getName();
+         if (!m.containsKey(userAttributeName))
+         {
+            m.put(a.getName(), a);
+         }
+         else
+         {
+            throw new IllegalArgumentException("Duplicate user-attribute: " + userAttributeName);
+         }
+      }
+      return m;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/WindowStateAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/WindowStateAdapter.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/WindowStateAdapter.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.adapter;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.WindowState;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class WindowStateAdapter extends XmlAdapter<String, WindowState>
+{
+
+   @Override
+   public String marshal(WindowState arg0) throws Exception
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public WindowState unmarshal(String name) throws Exception
+   {
+      return WindowState.create(name);
+   }
+
+}
+

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "container-runtime-optionType")
+public class ContainerRuntimeMetaData
+{
+
+   /** The name */
+   private String name;
+
+   /** The value list */
+   private List<String> values;
+
+   @XmlElement(name = "name")
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   @XmlElement(name = "value")
+   public List<String> getValues()
+   {
+      return values;
+   }
+
+   public void setValues(List<String> values)
+   {
+      this.values = values;
+   }
+
+   public void addValue(String value)
+   {
+      if( this.values == null)
+      {
+         this.values = new ArrayList<String>();
+      }
+      this.values.add(value);
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.common;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public abstract class DescribableMetaData
+{
+
+   /** The description */
+   private LocalizedString description;
+
+   @XmlElement(name = "description")
+   @XmlJavaTypeAdapter(value= LocalizedStringAdapter.class, type=LocalizedString.class)
+   public LocalizedString getDescription()
+   {
+      return description;
+   }
+
+   public void setDescription(LocalizedString description)
+   {
+      this.description = description;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "init-paramType")
+public class InitParamMetaData extends DescribableMetaData
+{
+
+   /** The init param id */
+   private String id;
+
+   /** The init param name */
+   private String name;
+
+   /** The init param value */
+   private String value;
+   
+   public InitParamMetaData() {}
+   
+   public InitParamMetaData(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "name")
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   @XmlElement(name = "value")
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getValue()
+   {
+      return value;
+   }
+
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+
+/**
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "descriptionType")
+public class LocalizedDescriptionMetaData
+{
+
+   /** The lang */
+   private String lang = "en";
+
+   /** The description */
+   private String description;
+   
+   public LocalizedDescriptionMetaData() {}
+   
+   public LocalizedDescriptionMetaData(String lang)
+   {
+      this.lang = lang;
+   }
+
+   @XmlAttribute(name = "lang", 
+         namespace = PortletMetaDataConstants.NS_XML_NAMESPACE)
+   public String getLang()
+   {
+      return this.lang;
+   }
+
+   public void setLang(String lang)
+   {
+      this.lang = lang;
+   }
+
+   @XmlValue
+   public String getDescription()
+   {
+      return description;
+   }
+
+   public void setDescription(String description)
+   {
+      this.description = description;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,130 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.event;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.namespace.QName;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "event-definitionType")
+public class EventDefinitionMetaData extends DescribableMetaData
+{
+   /** The event definition id */
+   private String id;
+
+   /** The QName */
+   private QName qname;
+   
+   /** The name */
+   private String name;
+
+   /** The value-type */
+   private String valueType;
+
+   /** The alias */
+   private List<QName> alias;
+   
+   public EventDefinitionMetaData() {}
+   
+   public EventDefinitionMetaData(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "qname")
+   public QName getQname()
+   {
+      return qname;
+   }
+
+   public void setQname(QName qname)
+   {
+      this.qname = qname;
+   }
+   
+   @XmlElement(name = "name")
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   @XmlElement(name = "value-type")
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getValueType()
+   {
+      return valueType;
+   }
+
+   public void setValueType(String valueType)
+   {
+      this.valueType = valueType;
+   }
+
+   @XmlElement(name = "alias")
+   public List<QName> getAlias()
+   {
+      return alias;
+   }
+
+   public void setAlias(List<QName> alias)
+   {
+      this.alias = alias;
+   }
+   
+   public void addAlias(QName alias)
+   {
+      if (this.alias == null)
+      {
+         this.alias = new ArrayList<QName>();
+      }
+      this.alias.add(alias);
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.event;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "event-definition-referenceType")
+public class EventDefinitionReferenceMetaData
+{
+
+   /** The reference id */
+   private String id;
+
+   /** The qname */
+   private QName qname;
+   
+   /** The name */
+   private String name;
+   
+   public EventDefinitionReferenceMetaData() {}
+   
+   public EventDefinitionReferenceMetaData(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "qname")
+   public QName getQname()
+   {
+      return qname;
+   }
+
+   public void setQname(QName qname)
+   {
+      this.qname = qname;
+   }
+   
+   @XmlElement(name = "name")
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+ at XmlType(name = "filter-mappingType")
+public class FilterMappingMetaData
+{
+
+   /** The filter name */
+   private String name;
+
+   /** The mapped portlet names */
+   private List<String> portletNames;
+
+   @XmlElement(name = "filter-name")
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   @XmlElement(name = "portlet-name")
+   public List<String> getPortletNames()
+   {
+      return portletNames;
+   }
+
+   public void setPortletNames(List<String> portletNames)
+   {
+      this.portletNames = portletNames;
+   }
+   
+   public void addPortletName(String portletName)
+   {
+      if( this.portletNames == null)
+      {
+         this.portletNames = new ArrayList<String>();
+      }
+      this.portletNames.add(portletName);
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.figureoutlocationlater.LifeCyclePhase;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.InitParamMetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+ at XmlType(name = "filterType", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS,
+      propOrder = {"description", "displayName", "filterName", "filterClass", "lifecycle", "initParams"})
+public class FilterMetaData extends DescribableMetaData
+{
+   /** The filter name */
+   private String filterName;
+
+   /** The filter class */
+   private String filterClass;
+
+   /** The filter lifecycle */
+   private List<LifeCyclePhase> lifecycle;
+
+   /** The filter display name */
+   private LocalizedString displayName;
+
+   /** The filter init parameters */
+   private List<InitParamMetaData> initParams;
+
+   @XmlElement(name = "filter-name", required = true)
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getFilterName()
+   {
+      return filterName;
+   }
+
+   public void setFilterName(String filterName)
+   {
+      this.filterName = filterName;
+   }
+
+   @XmlElement(name = "filter-class", required = true)
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getFilterClass()
+   {
+      return filterClass;
+   }
+
+   public void setFilterClass(String filterClass)
+   {
+      this.filterClass = filterClass;
+   }
+
+   @XmlElement(name = "lifecycle", required = true)
+   public List<LifeCyclePhase> getLifecycle()
+   {
+      return lifecycle;
+   }
+
+   public void setLifecycle(List<LifeCyclePhase> lifecycle)
+   {
+      this.lifecycle = lifecycle;
+   }
+   
+   public void addLifecycle(LifeCyclePhase lifecycle)
+   {
+      if( this.lifecycle == null)
+      {
+         this.lifecycle = new ArrayList<LifeCyclePhase>();
+      }
+      this.lifecycle.add(lifecycle);
+   }
+
+   @XmlElement(name = "display-name")
+   @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+   public LocalizedString getDisplayName()
+   {
+      return displayName;
+   }
+
+   public void setDisplayName(LocalizedString displayNames)
+   {
+      this.displayName = displayNames;
+   }
+
+   @XmlElement(name = "init-param")
+   public List<InitParamMetaData> getInitParams()
+   {
+      return initParams;
+   }
+
+   public void setInitParams(List<InitParamMetaData> initParams)
+   {
+      this.initParams = initParams;
+   }
+   
+   public void addInitParam(InitParamMetaData initParam)
+   {
+      if(this.initParams == null)
+      {
+         this.initParams = new ArrayList<InitParamMetaData>();
+      }
+      this.initParams.add(initParam);
+   }
+
+}
\ No newline at end of file

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlEnum
+public enum PortletCacheScopeEnum {
+
+   /** The private cache scope */
+   PRIVATE,
+
+   /** The public cache scope */
+   PUBLIC
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,102 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "portlet-infoType")
+public class PortletInfoMetaData
+{
+
+   /** The portlet info id */
+   private String id;
+
+   /** The portlet title */
+   private String title;
+
+   /** The portlet short-title */
+   private String shortTitle;
+
+   /* The portlet keywords*/
+   private String keywords;
+   
+   public PortletInfoMetaData() {}
+   
+   public PortletInfoMetaData(String id) 
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "title")
+   public String getTitle()
+   {
+      return title;
+   }
+
+   public void setTitle(String title)
+   {
+      this.title = title;
+   }
+
+   @XmlElement(name = "short-title")
+   public String getShortTitle()
+   {
+      return shortTitle;
+   }
+
+   public void setShortTitle(String shortTitle)
+   {
+      this.shortTitle = shortTitle;
+   }
+
+   @XmlElement(name = "keywords")
+//   @XmlJavaTypeAdapter(KeywordsAdapter.class)
+   public String getKeywords()
+   {
+      return keywords;
+   }
+
+   public void setKeywords(String keywords)
+   {
+      this.keywords = keywords;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,402 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.InitParamMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionReferenceMetaData;
+import org.jboss.portal.metadata.portlet.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "portletType",
+      propOrder = {"id", "description", "portletName", "displayName", "portletClass", "initParams", "expirationCache", "cacheScope",
+      "supports", "supportedLocale", "resourceBundle", "portletInfo", "portletPreferences", "securityRoleRef",
+      "supportedProcessingEvent", "supportedPublishingEvent", "supportedPublicRenderParameters",
+      "containerRuntimeOptions"})
+public class PortletMetaData extends DescribableMetaData
+{
+
+   /** The portlet id */
+   private String id;
+
+   /** The portlet name */
+   private String portletName;
+
+   /** The portlet class */
+   private String portletClass;
+
+   /** The portlet display name */
+   private LocalizedString displayName;
+
+   /** The portlet init parameters */
+   private List<InitParamMetaData> initParams;
+
+   /** The portlet expiration cache */
+   private int expirationCache;
+
+   /** The cache scope */
+   private PortletCacheScopeEnum cacheScope = PortletCacheScopeEnum.PRIVATE;
+
+   /** The supports */
+   private List<SupportsMetaData> supports;
+
+   /** The supported locale */
+   private List<SupportedLocaleMetaData> supportedLocale;
+
+   /** The resource bundle */
+   private String resourceBundle;
+
+   /** The portlet info */
+   private PortletInfoMetaData portletInfo;
+
+   /** The portlet preferences */
+   private PortletPreferencesMetaData portletPreferences;
+
+   /** The portlet security role references */
+   private List<SecurityRoleRefMetaData> securityRoleRef;
+
+   /** The portlet event supported processing event */
+   private List<EventDefinitionReferenceMetaData> supportedProcessingEvent;
+
+   /** The portlet event supported publishing event */
+   private List<EventDefinitionReferenceMetaData> supportedPublishingEvent;
+
+   /** The portlet supported public render parameters */
+   private List<String> supportedPublicRenderParameters;
+
+   /** The portlet container runtime options */
+   private Map<String, ContainerRuntimeMetaData> containerRuntimeOptions;
+   
+   /** Reference to the PortletApplicationMetaData */
+   private PortletApplication10MetaData portletApplication;
+
+   public PortletMetaData() {}
+   
+   public PortletMetaData(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "portlet-name",
+         required = true)
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getPortletName()
+   {
+      return portletName;
+   }
+
+   public void setPortletName(String portletName)
+   {
+      this.portletName = portletName;
+   }
+
+   @XmlElement(name = "portlet-class",
+         required = true)
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getPortletClass()
+   {
+      return portletClass;
+   }
+
+   public void setPortletClass(String portletClass)
+   {
+      this.portletClass = portletClass;
+   }
+
+   @XmlElement(name = "display-name")
+   @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+   public LocalizedString getDisplayName()
+   {
+      return displayName;
+   }
+
+   public void setDisplayName(LocalizedString displayNames)
+   {
+      this.displayName = displayNames;
+   }
+
+   @XmlElement(name = "init-param")
+   public List<InitParamMetaData> getInitParams()
+   {
+      return initParams;
+   }
+
+   public void setInitParams(List<InitParamMetaData> initParams)
+   {
+      this.initParams = initParams;
+   }
+   
+   public void addInitParam(InitParamMetaData initParam)
+   {
+      if (this.initParams == null)
+      {
+         this.initParams = new ArrayList<InitParamMetaData>();
+      }
+      this.initParams.add(initParam);
+   }
+
+   @XmlElement(name = "expiration-cache")
+   public int getExpirationCache()
+   {
+      return expirationCache;
+   }
+
+   public void setExpirationCache(int expirationCache)
+   {
+      this.expirationCache = expirationCache;
+   }
+
+   @XmlElement(name = "cache-scope",
+         namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS, type = PortletCacheScopeEnum.class)
+   public PortletCacheScopeEnum getCacheScope()
+   {
+      return cacheScope;
+   }
+
+   public void setCacheScope(PortletCacheScopeEnum cacheScope)
+   {
+      this.cacheScope = cacheScope;
+   }
+
+   @XmlElement(name = "supports",
+         required = true)
+   public List<SupportsMetaData> getSupports()
+   {
+      return supports;
+   }
+
+   public void setSupports(List<SupportsMetaData> supports)
+   {
+      this.supports = supports;
+   }
+   
+   public void addSupport(SupportsMetaData support)
+   {
+      if (this.supports == null)
+      {
+         this.supports = new ArrayList<SupportsMetaData>();
+      }
+      this.supports.add(support);
+   }
+
+   @XmlElement(name = "supported-locale")
+//   @XmlJavaTypeAdapter(SupportedLocaleAdapter.class)
+   public List<SupportedLocaleMetaData> getSupportedLocale()
+   {
+      return supportedLocale;
+   }
+
+   public void setSupportedLocale(List<SupportedLocaleMetaData> supportedLocale)
+   {
+      this.supportedLocale = supportedLocale;
+   }
+   
+   public void addSupportedLocale(SupportedLocaleMetaData supportedLocale)
+   {
+      if(this.supportedLocale == null)
+      {
+         this.supportedLocale = new ArrayList<SupportedLocaleMetaData>();
+      }
+      this.supportedLocale.add(supportedLocale);
+   }
+
+   @XmlElement(name = "resource-bundle")
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getResourceBundle()
+   {
+      return resourceBundle;
+   }
+
+   public void setResourceBundle(String resourceBundle)
+   {
+      this.resourceBundle = resourceBundle;
+   }
+
+   @XmlElement(name = "portlet-info")
+   public PortletInfoMetaData getPortletInfo()
+   {
+      return portletInfo;
+   }
+
+   public void setPortletInfo(PortletInfoMetaData portletInfo)
+   {
+      this.portletInfo = portletInfo;
+   }
+
+   @XmlElement(name = "portlet-preferences")
+   public PortletPreferencesMetaData getPortletPreferences()
+   {
+      return portletPreferences;
+   }
+
+   public void setPortletPreferences(PortletPreferencesMetaData portletPreferences)
+   {
+      this.portletPreferences = portletPreferences;
+   }
+
+   @XmlElement(name = "security-role-ref")
+   public List<SecurityRoleRefMetaData> getSecurityRoleRef()
+   {
+      return securityRoleRef;
+   }
+
+   public void setSecurityRoleRef(List<SecurityRoleRefMetaData> securityRoleRef)
+   {
+      this.securityRoleRef = securityRoleRef;
+   }
+   
+   public void addSecurityRoleRef(SecurityRoleRefMetaData securityRoleRef)
+   {
+      if (this.securityRoleRef == null)
+      {
+         this.securityRoleRef = new ArrayList<SecurityRoleRefMetaData>();
+      }
+      this.securityRoleRef.add(securityRoleRef);
+   }
+
+   @XmlElement(name = "supported-processing-event",
+         namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public List<EventDefinitionReferenceMetaData> getSupportedProcessingEvent()
+   {
+      return supportedProcessingEvent;
+   }
+
+   public void setSupportedProcessingEvent(List<EventDefinitionReferenceMetaData> supportedProcessingEvent)
+   {
+      this.supportedProcessingEvent = supportedProcessingEvent;
+   }
+   
+   public void addSupportedProcessingEvent(EventDefinitionReferenceMetaData eventRef)
+   {
+      if (this.supportedProcessingEvent == null)
+      {
+         this.supportedProcessingEvent = new ArrayList<EventDefinitionReferenceMetaData>();
+      }
+      this.supportedProcessingEvent.add(eventRef);
+   }
+
+   @XmlElement(name = "supported-publishing-event",
+         namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public List<EventDefinitionReferenceMetaData> getSupportedPublishingEvent()
+   {
+      return supportedPublishingEvent;
+   }
+
+   public void setSupportedPublishingEvent(List<EventDefinitionReferenceMetaData> supportedPublishingEvent)
+   {
+      this.supportedPublishingEvent = supportedPublishingEvent;
+   }
+   
+   public void addSupportedPublishingEvent(EventDefinitionReferenceMetaData eventRef)
+   {
+      if(this.supportedPublishingEvent == null)
+      {
+         this.supportedPublishingEvent = new ArrayList<EventDefinitionReferenceMetaData>();
+      }
+      this.supportedPublishingEvent.add(eventRef);
+   }
+
+   @XmlElement(name = "supported-public-render-parameter",
+         namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public List<String> getSupportedPublicRenderParameters()
+   {
+      return supportedPublicRenderParameters;
+   }
+
+   public void setSupportedPublicRenderParameters(List<String> supportedPublicRenderParameters)
+   {
+      this.supportedPublicRenderParameters = supportedPublicRenderParameters;
+   }
+   
+   public void addSupportedPublicRenderParameter(String parameter)
+   {
+      if (this.supportedPublicRenderParameters == null)
+      {
+         this.supportedPublicRenderParameters = new ArrayList<String>();
+      }
+      this.supportedPublicRenderParameters.add(parameter);
+   }
+
+   @XmlElement(name = "container-runtime-option",
+         namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   @XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
+   public Map<String, ContainerRuntimeMetaData> getContainerRuntimeOptions()
+   {
+      return containerRuntimeOptions;
+   }
+
+   public void setContainerRuntimeOptions(Map<String, ContainerRuntimeMetaData> containerRuntimeOptions)
+   {
+      this.containerRuntimeOptions = containerRuntimeOptions;
+   }
+   
+   public void addContainerRuntime(ContainerRuntimeMetaData containerRuntimeOption)
+   {
+      if ( this.containerRuntimeOptions == null)
+      {
+         this.containerRuntimeOptions = new HashMap<String, ContainerRuntimeMetaData>();
+      }
+      this.containerRuntimeOptions.put(containerRuntimeOption.getName(), containerRuntimeOption);
+   }
+   
+   /** . */
+   public PortletApplication10MetaData getPortletApplication()
+   {
+      return portletApplication;
+   }
+   
+   public void setPortletApplication(PortletApplication10MetaData portletApplication)
+   {
+      this.portletApplication = portletApplication;
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.metadata.portlet.adapter.PortletModeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+ at XmlType(name = "portlet-modeType")
+public class PortletModeMetaData
+{
+
+   /** The portlet mode */
+   private Mode portletMode;
+
+   @XmlValue
+   @XmlJavaTypeAdapter(PortletModeAdapter.class)
+   public Mode getPortletMode()
+   {
+      return portletMode;
+   }
+
+   public void setPortletMode(Mode portletMode)
+   {
+      this.portletMode = portletMode;
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,112 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "portlet-preferenceType")
+public class PortletPreferenceMetaData
+{
+
+   /** The portlet preference id */
+   private String id;
+
+   /** The portlet preference name */
+   private String name;
+
+   /** The portlet preference value */
+   private List<String> value;
+
+   /** Is read only */
+   private boolean readOnly;
+   
+   public PortletPreferenceMetaData() {}
+   
+   public PortletPreferenceMetaData(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "name")
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   @XmlElement(name = "value")
+   public List<String> getValue()
+   {
+      return value;
+   }
+
+   public void setValue(List<String> value)
+   {
+      this.value = value;
+   }
+   
+   public void addValue(String value)
+   {
+      if (this.value == null)
+      {
+         this.value = new ArrayList<String>();
+      }
+      this.value.add(value);
+   }
+
+   @XmlElement(name = "read-only")
+   public boolean isReadOnly()
+   {
+      return readOnly;
+   }
+
+   public void setReadOnly(boolean readOnly)
+   {
+      this.readOnly = readOnly;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.adapter.PortletPreferencesListAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "portlet-preferencesType")
+public class PortletPreferencesMetaData
+{
+
+   /** The portlet preferences id */
+   private String id;
+
+   /** The portlet preferences */
+   private Map<String, PortletPreferenceMetaData> portletPreferences;
+
+   /** The portlet preference validator */
+   private String preferenceValidator;
+
+   public PortletPreferencesMetaData() {}
+   
+   public PortletPreferencesMetaData(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "preference")
+   @XmlJavaTypeAdapter(PortletPreferencesListAdapter.class)
+   public Map<String, PortletPreferenceMetaData> getPortletPreferences()
+   {
+      return portletPreferences;
+   }
+
+   public void setPortletPreferences(Map<String, PortletPreferenceMetaData> portletPreferences)
+   {
+      this.portletPreferences = portletPreferences;
+   }
+   
+   public void addPortletPreference(PortletPreferenceMetaData preference)
+   {
+      if(this.portletPreferences == null)
+      {
+         this.portletPreferences = new HashMap<String, PortletPreferenceMetaData>();
+      }
+      this.portletPreferences.put(preference.getName(), preference);
+   }
+
+   @XmlElement(name = "preferences-validator")
+   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+   public String getPreferenceValidator()
+   {
+      return preferenceValidator;
+   }
+
+   public void setPreferenceValidator(String preferenceValidator)
+   {
+      this.preferenceValidator = preferenceValidator;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+ at XmlType(name = "security-role-refType")
+public class SecurityRoleRefMetaData extends DescribableMetaData
+{
+
+   /** The security role ref id */
+   private String id;
+
+   /** The role name */
+   private String roleName;
+
+   /** The role link */
+   private String roleLink;
+
+   public SecurityRoleRefMetaData() {}
+   
+   public SecurityRoleRefMetaData(String id)
+   {
+      this.id = id;
+   }
+   
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "role-name")
+   public String getRoleName()
+   {
+      return roleName;
+   }
+
+   public void setRoleName(String roleName)
+   {
+      this.roleName = roleName;
+   }
+
+   @XmlElement(name = "role-link")
+   public String getRoleLink()
+   {
+      return roleLink;
+   }
+
+   public void setRoleLink(String roleLink)
+   {
+      this.roleLink = roleLink;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "supported-localeType")
+public class SupportedLocaleMetaData
+{
+
+   /** The supported locale */
+   private String locale;
+
+   @XmlValue
+   public String getLocale()
+   {
+      return locale;
+   }
+
+   public void setLocale(String locale)
+   {
+      this.locale = locale;
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,125 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "supportsType")
+public class SupportsMetaData
+{
+
+   /** The supports id */
+   @XmlAttribute(name = "id")
+   private String id;
+
+   /** The mime type */
+   private String mimeType;
+
+   /** The portletModes */
+   private List<PortletModeMetaData> portletModes;
+
+   /** The window states */
+   private List<WindowStateMetaData> windowStates;
+   
+   public SupportsMetaData() {}
+   
+   public SupportsMetaData(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "mime-type")
+   public String getMimeType()
+   {
+      return mimeType;
+   }
+
+   public void setMimeType(String mimeType)
+   {
+      this.mimeType = mimeType;
+   }
+
+   @XmlElement(name = "portlet-mode")
+   public List<PortletModeMetaData> getPortletModes()
+   {
+      return this.portletModes;
+   }
+
+   public void setPortletModes(List<PortletModeMetaData> portletModes)
+   {
+      this.portletModes = portletModes;
+   }
+   
+   public void addPortletMode(PortletModeMetaData portletMode)
+   {
+      if (this.portletModes == null)
+      {
+         this.portletModes = new ArrayList<PortletModeMetaData>();
+      }
+      this.portletModes.add(portletMode);
+   }
+
+   @XmlElement(name = "window-state",
+         namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+   public List<WindowStateMetaData> getWindowStates()
+   {
+      return this.windowStates;
+   }
+
+   public void setWindowStates(List<WindowStateMetaData> windowStates)
+   {
+      this.windowStates = windowStates;
+   }
+
+   public void addWindowState(WindowStateMetaData windowState)
+   {
+      if (this.windowStates == null)
+      {
+         this.windowStates = new ArrayList<WindowStateMetaData>();
+      }
+      this.windowStates.add(windowState);
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.WindowState;
+import org.jboss.portal.metadata.portlet.adapter.WindowStateAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "window-stateType")
+public class WindowStateMetaData
+{
+
+   /** The window state */
+   private WindowState windowState;
+
+   @XmlValue
+   @XmlJavaTypeAdapter(WindowStateAdapter.class)
+   public WindowState getWindowState()
+   {
+      return windowState;
+   }
+
+   public void setWindowState(WindowState windowState)
+   {
+      this.windowState = windowState;
+   }
+
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.security;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "portlet-collectionType")
+public class PortletCollectionMetaData
+{
+   /** The portlet name List */
+   private List<String> portletNames;
+
+   @XmlElement(name = "portlet-name")
+   public List<String> getPortletNames()
+   {
+      return portletNames;
+   }
+
+   public void setPortletNames(List<String> portletNames)
+   {
+      this.portletNames = portletNames;
+   }
+   
+   public void addPortletname(String portletName)
+   {
+      if( this.portletNames == null )
+      {
+         this.portletNames = new ArrayList<String>();
+      }
+      this.portletNames.add(portletName);
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.security;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "security-constraintType")
+public class SecurityConstraintMetaData
+{
+
+   /** The security constraint id */
+   private String id;
+
+   /** The security constraint display name */
+   private LocalizedString displayName;
+
+   /** The portlet collection */
+   private PortletCollectionMetaData portletList;
+
+   /** The user data constraints */
+   private UserDataConstraintMetaData userDataConstraint;
+   
+   public SecurityConstraintMetaData() {}
+   
+   public SecurityConstraintMetaData(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "display-name")
+   @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+   public LocalizedString getDisplayName()
+   {
+      return displayName;
+   }
+
+   public void setDisplayName(LocalizedString displayName)
+   {
+      this.displayName = displayName;
+   }
+
+   @XmlElement(name = "portlet-collection")
+   public PortletCollectionMetaData getPortletList()
+   {
+      return portletList;
+   }
+
+   public void setPortletList(PortletCollectionMetaData portletList)
+   {
+      this.portletList = portletList;
+   }
+
+   @XmlElement(name = "user-data-constraint")
+   public UserDataConstraintMetaData getUserDataConstraint()
+   {
+      return userDataConstraint;
+   }
+
+   public void setUserDataConstraint(UserDataConstraintMetaData userDataConstraint)
+   {
+      this.userDataConstraint = userDataConstraint;
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metadata.portlet.security;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.figureoutlocationlater.TransportGuarantee;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlType(name = "user-data-constraint")
+public class UserDataConstraintMetaData extends DescribableMetaData
+{
+
+   /** The user data constraint id */
+   private String id;
+
+   /** The user transport quarantee */
+   private TransportGuarantee transportQuarantee;
+   
+   public UserDataConstraintMetaData() {}
+   
+   public UserDataConstraintMetaData(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlAttribute(name = "id")
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   @XmlElement(name = "transport-guarantee")
+   public TransportGuarantee getTransportQuarantee()
+   {
+      return transportQuarantee;
+   }
+
+   public void setTransportQuarantee(TransportGuarantee transportQuarantee)
+   {
+      this.transportQuarantee = transportQuarantee;
+   }
+}
\ No newline at end of file

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/.PortalAppObjectModelFactory.java.swp
===================================================================
(Binary files differ)


Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/.PortalAppObjectModelFactory.java.swp
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/PortalAppObjectModelFactory.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/PortalAppObjectModelFactory.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/PortalAppObjectModelFactory.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,57 @@
+package org.jboss.portal.metamodel.jboss.app;
+
+import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+public class PortalAppObjectModelFactory implements GenericObjectModelFactory
+{
+
+	
+	public void addChild(Object parent, Object child, UnmarshallingContext ctx,
+			String namespaceURI, String localName)
+	{
+		//intentionally left empty
+	}
+
+	public Object newChild(Object parent, UnmarshallingContext ctx,
+			String namespaceURI, String localName, Attributes attrs)
+	{
+		return null;
+	}
+
+	public void setValue(Object o, UnmarshallingContext ctx,
+			String namespaceURI, String localName, String value)
+	{
+		if (o instanceof PortalAppMetaData)
+		{
+			PortalAppMetaData app = (PortalAppMetaData)o;
+			if ("app-name".equals(localName))
+			{
+				app.setAppName(value);
+			}
+			else
+			{
+				throw new RuntimeException("[" + localName + "] is an unknown element for jboss-portal-app.xml");
+			}
+		}
+	}
+
+	public Object completeRoot(Object root, UnmarshallingContext ctx,
+			String namespaceURI, String localName)
+	{
+		return root;
+	}
+
+	public Object newRoot(Object root, UnmarshallingContext ctx,
+			String namespaceURI, String localName, Attributes attrs)
+	{
+		if (root == null)
+		{
+			root = new PortalAppMetaData();
+		}
+		return root;
+	}
+}
+

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/JBossApplicationMetaDataFactory.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/JBossApplicationMetaDataFactory.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/JBossApplicationMetaDataFactory.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,267 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metamodel.jboss.portlet;
+
+import org.jboss.portal.common.transaction.Transactions;
+import org.jboss.portal.metadata.jboss.portlet.JBossApplicationMetaData;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
+import org.jboss.portal.metadata.jboss.portlet.PolicyPermissionMetaData;
+import org.jboss.portal.metamodel.jboss.portlet.info.impl.CacheInfoImpl;
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 10557 $
+ */
+public class JBossApplicationMetaDataFactory implements GenericObjectModelFactory
+{
+
+   public Object newRoot(Object root,
+                         UnmarshallingContext nav,
+                         String nsURI,
+                         String localName,
+                         Attributes attrs)
+   {
+      if (root == null)
+      {
+         root = new JBossApplicationMetaData();
+      }
+      return root;
+   }
+
+   public Object completeRoot(Object root, UnmarshallingContext nav, String uri, String name)
+   {
+      return root;
+   }
+
+   public Object newChild(Object object, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+   {
+      if (object instanceof JBossApplicationMetaData)
+      {
+         if ("portlet".equals(localName))
+         {
+            return createJBossPortlet();
+         }
+      }
+//      else if (object instanceof JBossPortletMetaData)
+//      {
+//         if ("security-constraint".equals(localName))
+//         {
+//            return new SecurityConstraintMetaData();
+//         }
+//      }
+//      else if (object instanceof SecurityConstraintMetaData)
+//      {
+//         if ("policy-permission".equals(localName))
+//         {
+//            return new PolicyPermissionMetaData();
+//         }
+//      }
+      else if (object instanceof PolicyPermissionMetaData)
+      {
+         if ("unchecked".equals(localName))
+         {
+            return "unchecked";
+         }
+      }
+      return null;
+   }
+
+   public void addChild(Object parent, Object child, UnmarshallingContext nav, String nsURI, String localName)
+   {
+      if (parent instanceof JBossApplicationMetaData)
+      {
+         JBossApplicationMetaData app = (JBossApplicationMetaData)parent;
+         if (child instanceof JBossPortletMetaData)
+         {
+            JBossPortletMetaData portlet = (JBossPortletMetaData)child;
+            app.getPortlets().put(portlet.getName(), portlet);
+            portlet.merge(app);
+         }
+      }
+//      else if (parent instanceof JBossPortletMetaData)
+//      {
+//         JBossPortletMetaData portlet = (JBossPortletMetaData)parent;
+//         if (child instanceof SecurityConstraintMetaData)
+//         {
+//            portlet.setSecurityConstraint((SecurityConstraintMetaData)child);
+//         }
+//      }
+//      else if (parent instanceof SecurityConstraintMetaData)
+//      {
+//         SecurityConstraintMetaData securityConstraint = (SecurityConstraintMetaData)parent;
+//         if (child instanceof PolicyPermissionMetaData)
+//         {
+//            PolicyPermissionMetaData policyPermission = (PolicyPermissionMetaData)child;
+//            PolicyPermissionMetaData other = (PolicyPermissionMetaData)securityConstraint.getPolicyPermissions().get(policyPermission.getRoleName());
+//            if (other != null)
+//            {
+//               other.getActions().addAll(policyPermission.getActions());
+//            }
+//            else
+//            {
+//               securityConstraint.getPolicyPermissions().put(policyPermission.getRoleName(), policyPermission);
+//            }
+//         }
+//      }
+//      else if (parent instanceof PolicyPermissionMetaData)
+//      {
+//         PolicyPermissionMetaData policyPermission = (PolicyPermissionMetaData)parent;
+//         if ("unchecked".equals(child))
+//         {
+//            policyPermission.setRoleName(SecurityConstants.UNCHECKED_ROLE_NAME);
+//         }
+//      }
+   }
+
+   public void setValue(Object object, UnmarshallingContext nav, String nsURI, String localName, String value)
+   {
+      if (object instanceof JBossApplicationMetaData)
+      {
+         JBossApplicationMetaData app = (JBossApplicationMetaData)object;
+         if ("app-id".equals(localName))
+         {
+            app.setId(value);
+         }
+         else if ("remotable".equals(localName))
+         {
+            if ("true".equalsIgnoreCase(value))
+            {
+               app.setRemotable(Boolean.TRUE);
+            }
+            else if ("false".equalsIgnoreCase(value))
+            {
+               app.setRemotable(Boolean.FALSE);
+            }
+            else
+            {
+               throw new RuntimeException();
+            }
+         }
+      }
+      else if (object instanceof JBossPortletMetaData)
+      {
+         JBossPortletMetaData portlet = (JBossPortletMetaData)object;
+         if ("portlet-name".equals(localName))
+         {
+            portlet.setName(value);
+         }
+         else if ("remotable".equals(localName))
+         {
+            if ("true".equalsIgnoreCase(value))
+            {
+               portlet.setRemotable(Boolean.TRUE);
+            }
+            else if ("false".equalsIgnoreCase(value))
+            {
+               portlet.setRemotable(Boolean.FALSE);
+            }
+            else
+            {
+               throw new RuntimeException();
+            }
+         }
+         else if ("distributed".equals(localName))
+         {
+            if ("true".equalsIgnoreCase(value))
+            {
+               portlet.setDistributed(Boolean.TRUE);
+            }
+            else if ("false".equalsIgnoreCase(value))
+            {
+               portlet.setDistributed(Boolean.FALSE);
+            }
+            else
+            {
+               throw new RuntimeException();
+            }
+         }
+         else if ("ref-type".equals(localName))
+         {
+            if ("strong".equals(localName))
+            {
+               portlet.setCacheRefType(new Integer(CacheInfoImpl.REF_STRONG));
+            }
+            else if ("soft".equals(localName))
+            {
+               portlet.setCacheRefType(new Integer(CacheInfoImpl.REF_SOFT));
+            }
+            else
+            {
+               // log.warn("Unrecognized reference type " + refType);
+            }
+         }
+         else if ("trans-attribute".equals(localName))
+         {
+            if ("Required".equalsIgnoreCase(value))
+            {
+               portlet.setTxType(Transactions.TYPE_REQUIRED);
+            }
+            else if ("Mandatory".equals(value))
+            {
+               portlet.setTxType(Transactions.TYPE_MANDATORY);
+            }
+            else if ("Never".equals(value))
+            {
+               portlet.setTxType(Transactions.TYPE_NEVER);
+            }
+            else if ("Supports".equals(value))
+            {
+               portlet.setTxType(Transactions.TYPE_SUPPORTS);
+            }
+            else if ("NotSupported".equals(value))
+            {
+               portlet.setTxType(Transactions.TYPE_NOT_SUPPORTED);
+            }
+            else if ("RequiresNew".equals(value))
+            {
+               portlet.setTxType(Transactions.TYPE_REQUIRES_NEW);
+            }
+            else
+            {
+               throw new RuntimeException();
+            }
+         }
+      }
+      else if (object instanceof PolicyPermissionMetaData)
+      {
+         PolicyPermissionMetaData policyPermission = (PolicyPermissionMetaData)object;
+         if ("role-name".equals(localName))
+         {
+            policyPermission.setRoleName(value);
+         }
+         else if ("action-name".equals(localName))
+         {
+            policyPermission.getActions().add(value);
+         }
+      }
+   }
+
+   /** Can be subclasses to allow sub class. */
+   protected JBossPortletMetaData createJBossPortlet()
+   {
+      return new JBossPortletMetaData();
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/CacheInfoImpl.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/CacheInfoImpl.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/CacheInfoImpl.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, 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.portal.metamodel.jboss.portlet.info.impl;
+
+import org.apache.log4j.Logger;
+//import org.jboss.portal.portlet.info.CacheInfo;
+import org.jboss.portal.figureoutlocationlater.CacheInfo;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 6697 $
+ */
+public class CacheInfoImpl implements CacheInfo
+{
+
+   /** Cache uses strong references. */
+   public static int REF_STRONG = 0;
+
+   /** Cache uses soft references. */
+   public static int REF_SOFT = 1;
+
+   /** . */
+   private static Logger log = Logger.getLogger(CacheInfoImpl.class);
+
+   /** . */
+   private int expirationTimeSecs;
+
+   /** . */
+   private int referenceType;
+
+   public CacheInfoImpl(PortletMetaData portletMD, JBossPortletMetaData jbossPortletMD)
+   {
+      expirationTimeSecs = portletMD.getExpirationCache();
+      if (expirationTimeSecs < 0 && expirationTimeSecs != -1)
+      {
+         log.warn("Seen bad caching expiration value " + expirationTimeSecs + " disable caching instead");
+         expirationTimeSecs = 0;
+      }
+
+      referenceType = REF_STRONG;
+      if (jbossPortletMD != null)
+      {
+         referenceType = jbossPortletMD.getCacheRefType() == null ? REF_STRONG : jbossPortletMD.getCacheRefType().intValue();
+      }
+   }
+
+   public int getExpirationSecs()
+   {
+      return expirationTimeSecs;
+   }
+
+   public int getReferenceType()
+   {
+      return referenceType;
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/LocalizedStringBuilder.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/LocalizedStringBuilder.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/LocalizedStringBuilder.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.portal.metamodel.portlet;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class LocalizedStringBuilder
+{
+
+   /** The object to localized meta data. */
+   private Map<Object, LocalizedMetaDataContainer> map = new LinkedHashMap<Object, LocalizedMetaDataContainer>();
+
+   /** The logger. */
+   private static final Logger log = Logger.getLogger(LocalizedStringBuilder.class);
+
+   public void put(Object object, LocalizedDescriptionMetaData description)
+   {
+      LocalizedMetaDataContainer container = map.get(object);
+      if (container == null)
+      {
+         container = new LocalizedMetaDataContainer();
+         map.put(object, container);
+      }
+      container.addLocalizedDescription(description);
+   }
+
+   public LocalizedString getLocalizedString(Object key)
+   {
+      try
+      {
+         return this.map.get(key) != null ? this.map.get(key).getLocalizedString() : null;
+      }
+      catch (Exception e)
+      {
+         log.error("could not generate localized string.", e);
+         return null;
+      }
+   }
+
+   private static class LocalizedMetaDataContainer
+   {
+      /** The list of localiezd meta data */
+      private List<LocalizedDescriptionMetaData> list = new ArrayList<LocalizedDescriptionMetaData>();
+
+      public void addLocalizedDescription(LocalizedDescriptionMetaData description)
+      {
+         this.list.add(description);
+      }
+
+      public LocalizedString getLocalizedString() throws Exception
+      {
+         LocalizedStringAdapter adapter = new LocalizedStringAdapter();
+         return adapter.unmarshal(list);
+      }
+   }
+}

Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/PortletApplicationModelFactory.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/PortletApplicationModelFactory.java	                        (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/PortletApplicationModelFactory.java	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,852 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.portal.metamodel.portlet;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.AnnotationPortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.AnnotationPortletApplication20MetaData;
+import org.jboss.portal.metadata.portlet.CustomPortletModeMetaData;
+import org.jboss.portal.metadata.portlet.CustomWindowStateMetaData;
+import org.jboss.portal.metadata.portlet.ListenerMetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication20MetaData;
+import org.jboss.portal.metadata.portlet.PublicRenderParameterMetaData;
+import org.jboss.portal.metadata.portlet.UserAttributeMetaData;
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.InitParamMetaData;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionReferenceMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMappingMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletInfoMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletModeMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletPreferenceMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletPreferencesMetaData;
+import org.jboss.portal.metadata.portlet.portlet.SecurityRoleRefMetaData;
+import org.jboss.portal.metadata.portlet.portlet.SupportedLocaleMetaData;
+import org.jboss.portal.metadata.portlet.portlet.SupportsMetaData;
+import org.jboss.portal.metadata.portlet.portlet.WindowStateMetaData;
+import org.jboss.portal.metadata.portlet.security.PortletCollectionMetaData;
+import org.jboss.portal.metadata.portlet.security.SecurityConstraintMetaData;
+import org.jboss.portal.metadata.portlet.security.UserDataConstraintMetaData;
+import static org.jboss.portal.metadata.portlet.PortletMetaDataConstants.DEFAULT_LOCALE;
+import static org.jboss.portal.metadata.portlet.PortletMetaDataConstants.PORTLET_JSR_286_NS;
+import org.jboss.portal.figureoutlocationlater.LifeCyclePhase;
+import org.jboss.portal.figureoutlocationlater.TransportGuarantee;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletCacheScopeEnum;
+
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletApplicationModelFactory implements GenericObjectModelFactory
+{
+
+   /** LocalizedDescriptionMetaData container for descriptions */
+   private LocalizedStringBuilder descriptions = new LocalizedStringBuilder();
+
+   /** LocalizedDescriptionMetaData container for displayNames */
+   private LocalizedStringBuilder displayNames = new LocalizedStringBuilder();
+
+   /** Guess what? The logger. */
+   private static final Logger log = Logger.getLogger(PortletApplicationModelFactory.class);
+
+   public Object newRoot(Object root, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+   {
+
+      String version = attrs.getValue("version");
+      String id = attrs.getValue("id");
+
+      // portlet-app 2.0 or 1.0
+      PortletApplication10MetaData md = PORTLET_JSR_286_NS.equals(nsURI)
+         ? new AnnotationPortletApplication20MetaData()
+         : new AnnotationPortletApplication10MetaData();
+
+      // Set portlet-app id
+      md.setId(id);
+      // Set portlet-app version
+      md.setVersion(version);
+      // return
+      return md;
+   }
+
+   public Object completeRoot(Object root, UnmarshallingContext ctx, String nsURI, String name)
+   {
+      return root;
+   }
+
+   public Object newChild(Object object, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+   {
+      String id = attrs.getValue("id");
+      if (object instanceof DescribableMetaData)
+      {
+
+         if ("description".equals(localName))
+         {
+            String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+            LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+            this.descriptions.put(object, localized);
+            return localized;
+         }
+      }
+
+      // portlet-app
+      if (object instanceof PortletApplication10MetaData)
+      {
+         if ("portlet".equals(localName))
+         {
+            return new PortletMetaData(id);
+         }
+         else if ("custom-portlet-mode".equals(localName))
+         {
+            return new CustomPortletModeMetaData(id);
+         }
+         else if ("custom-window-state".equals(localName))
+         {
+            return new CustomWindowStateMetaData(id);
+         }
+         else if ("user-attribute".equals(localName))
+         {
+            return new UserAttributeMetaData(id);
+         }
+         else if ("security-constraint".equals(localName))
+         {
+            return new SecurityConstraintMetaData(id);
+         }
+      }
+
+      // portlet-app 2.0
+      if (object instanceof PortletApplication20MetaData && PORTLET_JSR_286_NS.equals(nsURI))
+      {
+         if ("public-render-parameter".equals(localName))
+         {
+            return new PublicRenderParameterMetaData(id);
+         }
+         else if ("event-definition".equals(localName))
+         {
+            return new EventDefinitionMetaData(id);
+         }
+         else if ("filter".equals(localName))
+         {
+            return new FilterMetaData();
+         }
+         else if ("filter-mapping".equals(localName))
+         {
+            return new FilterMappingMetaData();
+         }
+         else if ("listener".equals(localName))
+         {
+            return new ListenerMetaData(id);
+         }
+         else if ("container-runtime-option".equals(localName))
+         {
+            return new ContainerRuntimeMetaData();
+         }
+      }
+
+      // portlet
+      if (object instanceof PortletMetaData)
+      {
+         if ("init-param".equals(localName))
+         {
+            return new InitParamMetaData(id);
+         }
+         else if ("display-name".equals(localName))
+         {
+            String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+            LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+            this.displayNames.put(object, localized);
+            return localized;
+         }
+         else if ("supports".equals(localName))
+         {
+            return new SupportsMetaData(id);
+         }
+         else if ("supported-locale".equals(localName))
+         {
+            return new SupportedLocaleMetaData();
+         }
+         else if ("portlet-info".equals(localName))
+         {
+            return new PortletInfoMetaData(id);
+         }
+         else if ("portlet-preferences".equals(localName))
+         {
+            return new PortletPreferencesMetaData(id);
+         }
+         else if ("security-role-ref".equals(localName))
+         {
+            return new SecurityRoleRefMetaData(id);
+         }
+         else if ("supported-processing-event".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+         {
+            return new EventDefinitionReferenceMetaData(id);
+         }
+         else if ("supported-publishing-event".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+         {
+            return new EventDefinitionReferenceMetaData(id);
+         }
+         else if ("container-runtime-option".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+         {
+            return new ContainerRuntimeMetaData();
+         }
+      }
+
+      // security-constraint
+      if (object instanceof SecurityConstraintMetaData)
+      {
+         if ("portlet-collection".equals(localName))
+         {
+            return new PortletCollectionMetaData();
+         }
+         else if ("user-data-constraint".equals(localName))
+         {
+            return new UserDataConstraintMetaData(id);
+         }
+         else if ("display-name".equals(localName))
+         {
+            String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+            LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+            this.displayNames.put(object, localized);
+            return localized;
+         }
+      }
+
+      // supports
+      if (object instanceof SupportsMetaData)
+      {
+         if ("portlet-mode".equals(localName))
+         {
+            return new PortletModeMetaData();
+         }
+         else if ("window-state".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+         {
+            return new WindowStateMetaData();
+         }
+      }
+
+      // preference (in portlet-preferences)
+      if (object instanceof PortletPreferencesMetaData)
+      {
+         if ("preference".equals(localName))
+         {
+            return new PortletPreferenceMetaData(id);
+         }
+      }
+
+      // filter
+      if (object instanceof FilterMetaData)
+      {
+         if ("init-param".equals(localName))
+         {
+            return new InitParamMetaData(id);
+         }
+         else if ("display-name".equals(localName))
+         {
+            String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+            LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+            this.displayNames.put(object, localized);
+            return localized;
+         }
+      }
+
+      // listener
+      if (object instanceof ListenerMetaData)
+      {
+         if ("display-name".equals(localName))
+         {
+            String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+            LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+            this.displayNames.put(object, localized);
+            return localized;
+         }
+      }
+
+      return null;
+   }
+
+   public void addChild(Object parent, Object child, UnmarshallingContext nav, String nsURI, String localName)
+   {
+
+      if (child instanceof DescribableMetaData)
+      {
+         DescribableMetaData md = (DescribableMetaData)child;
+         LocalizedString d = this.descriptions.getLocalizedString(md);
+         md.setDescription(d);
+      }
+
+      // portlet app
+      if (parent instanceof PortletApplication10MetaData)
+      {
+         PortletApplication10MetaData md = (PortletApplication10MetaData)parent;
+         // add portlet
+         if (child instanceof PortletMetaData)
+         {
+            PortletMetaData portlet = (PortletMetaData)child;
+            portlet.setDisplayName(this.displayNames.getLocalizedString(portlet));
+            md.addPortlet(portlet);
+         }
+         // add custom-portlet-mode
+         else if (child instanceof CustomPortletModeMetaData)
+         {
+            md.addCustomPortletMode((CustomPortletModeMetaData)child);
+         }
+         // add custom window state
+         else if (child instanceof CustomWindowStateMetaData)
+         {
+            md.addCustomWindowState((CustomWindowStateMetaData)child);
+         }
+         // add user-attribute
+         else if (child instanceof UserAttributeMetaData)
+         {
+            md.addUserAttribute((UserAttributeMetaData)child);
+         }
+         // add security-constraint
+         else if (child instanceof SecurityConstraintMetaData)
+         {
+            SecurityConstraintMetaData security = (SecurityConstraintMetaData)child;
+            // display-name
+            security.setDisplayName(this.displayNames.getLocalizedString(security));
+            md.addSecurityConstraint(security);
+         }
+      }
+
+      // portlet-app 2.0
+      if (parent instanceof PortletApplication20MetaData)
+      {
+         PortletApplication20MetaData md = (PortletApplication20MetaData)parent;
+         // add public-render-parameter
+         if (child instanceof PublicRenderParameterMetaData)
+         {
+            md.addPublicRenderParameter((PublicRenderParameterMetaData)child);
+         }
+         // add event-defintion
+         else if (child instanceof EventDefinitionMetaData)
+         {
+            md.addEventDefinition((EventDefinitionMetaData)child);
+         }
+         // add filter
+         else if (child instanceof FilterMetaData)
+         {
+            FilterMetaData filter = (FilterMetaData)child;
+            filter.setDisplayName(this.displayNames.getLocalizedString(filter));
+            md.addFilter(filter);
+         }
+         // add filter-mapping
+         else if (child instanceof FilterMappingMetaData)
+         {
+            md.addFilterMapping((FilterMappingMetaData)child);
+         }
+         // add container-runtime-option
+         else if (child instanceof ContainerRuntimeMetaData)
+         {
+            md.addContainerRuntime((ContainerRuntimeMetaData)child);
+         }
+         // add listener
+         else if (child instanceof ListenerMetaData)
+         {
+            ListenerMetaData listener = (ListenerMetaData)child;
+            listener.setDisplayName(this.displayNames.getLocalizedString(listener));
+            md.addListener(listener);
+         }
+      }
+
+      // portlet
+      if (parent instanceof PortletMetaData)
+      {
+         PortletMetaData md = (PortletMetaData)parent;
+         // init-param
+         if (child instanceof InitParamMetaData)
+         {
+            md.addInitParam((InitParamMetaData)child);
+         }
+         // supports
+         else if (child instanceof SupportsMetaData)
+         {
+            md.addSupport((SupportsMetaData)child);
+         }
+         // supported-locale
+         else if (child instanceof SupportedLocaleMetaData)
+         {
+            md.addSupportedLocale((SupportedLocaleMetaData)child);
+         }
+         // portlet-info
+         else if (child instanceof PortletInfoMetaData)
+         {
+            md.setPortletInfo((PortletInfoMetaData)child);
+         }
+         // portlet-preferences
+         else if (child instanceof PortletPreferencesMetaData)
+         {
+            md.setPortletPreferences((PortletPreferencesMetaData)child);
+         }
+         // security-role-ref
+         else if (child instanceof SecurityRoleRefMetaData)
+         {
+            md.addSecurityRoleRef((SecurityRoleRefMetaData)child);
+         }
+         // supported-events
+         else if (child instanceof EventDefinitionReferenceMetaData)
+         {
+            if ("supported-processing-event".equals(localName))
+            {
+               md.addSupportedProcessingEvent((EventDefinitionReferenceMetaData)child);
+            }
+            else if ("supported-publishing-event".equals(localName))
+            {
+               md.addSupportedPublishingEvent((EventDefinitionReferenceMetaData)child);
+            }
+         }
+         // container-runtime-option
+         else if (child instanceof ContainerRuntimeMetaData)
+         {
+            md.addContainerRuntime((ContainerRuntimeMetaData)child);
+         }
+      }
+
+      // adding user-data-constraint and portlet-name(s) to security-constraint
+      if (parent instanceof SecurityConstraintMetaData)
+      {
+         SecurityConstraintMetaData md = (SecurityConstraintMetaData)parent;
+         // add user-data-constraint
+         if (child instanceof UserDataConstraintMetaData)
+         {
+            md.setUserDataConstraint((UserDataConstraintMetaData)child);
+         }
+         // add portlet-collection
+         else if (child instanceof PortletCollectionMetaData)
+         {
+            md.setPortletList((PortletCollectionMetaData)child);
+         }
+      }
+
+      // filter
+      if (parent instanceof FilterMetaData)
+      {
+         FilterMetaData md = (FilterMetaData)parent;
+         // add init-param
+         if (child instanceof InitParamMetaData)
+         {
+            md.addInitParam((InitParamMetaData)child);
+         }
+      }
+
+      // add portlet-mode and window-state
+      if (parent instanceof SupportsMetaData)
+      {
+         SupportsMetaData md = (SupportsMetaData)parent;
+         if (child instanceof PortletModeMetaData)
+         {
+            md.addPortletMode((PortletModeMetaData)child);
+         }
+         else if (child instanceof WindowStateMetaData)
+         {
+            md.addWindowState((WindowStateMetaData)child);
+         }
+      }
+
+      // add preference
+      if (parent instanceof PortletPreferencesMetaData)
+      {
+         PortletPreferencesMetaData md = (PortletPreferencesMetaData)parent;
+         if (child instanceof PortletPreferenceMetaData)
+         {
+            md.addPortletPreference((PortletPreferenceMetaData)child);
+         }
+      }
+   }
+
+   public void setValue(Object object, UnmarshallingContext nav, String nsURI, String localName, String value)
+   {
+
+      // JSR 286 portlet-app attributes - default-namespace and resource-bundle.
+      if (object instanceof PortletApplication20MetaData)
+      {
+         PortletApplication20MetaData md = (PortletApplication20MetaData)object;
+         if ("resource-bundle".equals(localName))
+         {
+            md.setResourceBundle(value);
+         }
+         else if ("default-namespace".equals(localName))
+         {
+            try
+            {
+               md.setDefaultNamespace(new URI(value));
+            }
+            catch (URISyntaxException e)
+            {
+               log.error("Invalid syntax for default-namespace: " + value);
+            }
+         }
+      }
+
+      // portlet
+      if (object instanceof PortletMetaData)
+      {
+         PortletMetaData md = (PortletMetaData)object;
+         if ("portlet-name".equals(localName))
+         {
+            md.setPortletName(value);
+         }
+         else if ("portlet-class".equals(localName))
+         {
+            md.setPortletClass(value);
+         }
+         else if ("cache-scope".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+         {
+            md.setCacheScope(PortletCacheScopeEnum.valueOf(value));
+         }
+         else if ("expiration-cache".equals(localName))
+         {
+            md.setExpirationCache(Integer.valueOf(value));
+         }
+         else if ("resource-bundle".equals(localName))
+         {
+            md.setResourceBundle(value);
+         }
+         else if ("supported-public-render-parameter".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+         {
+            md.addSupportedPublicRenderParameter(value);
+         }
+      }
+
+      if (object instanceof LocalizedDescriptionMetaData)
+      {
+         LocalizedDescriptionMetaData localized = (LocalizedDescriptionMetaData)object;
+         if ("description".equals(localName))
+         {
+            localized.setDescription(value);
+         }
+         else if ("display-name".equals(localName))
+         {
+            localized.setDescription(value);
+         }
+      }
+
+      // init-param
+      if (object instanceof InitParamMetaData)
+      {
+         InitParamMetaData md = (InitParamMetaData)object;
+         if ("name".equals(localName))
+         {
+            md.setName(value);
+         }
+         else if ("value".equals(localName))
+         {
+            md.setValue(value);
+         }
+      }
+
+      // supports
+      if (object instanceof SupportsMetaData)
+      {
+         SupportsMetaData md = (SupportsMetaData)object;
+         if ("mime-type".equals(localName))
+         {
+            md.setMimeType(value);
+         }
+      }
+
+      // supports --- portlet-mode
+      if (object instanceof PortletModeMetaData)
+      {
+         PortletModeMetaData md = (PortletModeMetaData)object;
+         if ("portlet-mode".equals(localName))
+         {
+            md.setPortletMode(Mode.create(value));
+         }
+      }
+
+      // supports --- window-state
+      if (object instanceof WindowStateMetaData)
+      {
+         WindowStateMetaData md = (WindowStateMetaData)object;
+         if ("window-state".equals(localName))
+         {
+            md.setWindowState(WindowState.create(value));
+         }
+      }
+
+      // supported-locale
+      if (object instanceof SupportedLocaleMetaData)
+      {
+         SupportedLocaleMetaData md = (SupportedLocaleMetaData)object;
+         if ("supported-locale".equals(localName))
+         {
+            md.setLocale(value);
+         }
+      }
+
+      // portlet-info
+      if (object instanceof PortletInfoMetaData)
+      {
+         PortletInfoMetaData md = (PortletInfoMetaData)object;
+         if ("title".equals(localName))
+         {
+            md.setTitle(value);
+         }
+         else if ("short-title".equals(localName))
+         {
+            md.setShortTitle(value);
+         }
+         else if ("keywords".equals(localName))
+         {
+            md.setKeywords(value);
+         }
+      }
+
+      // portlet-preferences
+      if (object instanceof PortletPreferencesMetaData)
+      {
+         PortletPreferencesMetaData md = (PortletPreferencesMetaData)object;
+         if ("preferences-validator".equals(localName))
+         {
+            md.setPreferenceValidator(value);
+         }
+      }
+
+      // preference
+      if (object instanceof PortletPreferenceMetaData)
+      {
+         PortletPreferenceMetaData md = (PortletPreferenceMetaData)object;
+         if ("name".equals(localName))
+         {
+            md.setName(value);
+         }
+         else if ("value".equals(localName))
+         {
+            md.addValue(value);
+         }
+         else if ("read-only".equals(localName))
+         {
+            md.setReadOnly(Boolean.valueOf(value));
+         }
+      }
+
+      // security-role-ref
+      if (object instanceof SecurityRoleRefMetaData)
+      {
+         SecurityRoleRefMetaData md = (SecurityRoleRefMetaData)object;
+         if ("role-name".equals(localName))
+         {
+            md.setRoleName(value);
+         }
+         else if ("role-link".equals(localName))
+         {
+            md.setRoleLink(value);
+         }
+      }
+
+      // supported events
+      if (object instanceof EventDefinitionReferenceMetaData)
+      {
+         EventDefinitionReferenceMetaData md = (EventDefinitionReferenceMetaData)object;
+         if ("qname".equals(localName))
+         {
+            md.setQname(nav.resolveQName(value));
+         }
+         else if ("name".equals(localName))
+         {
+            md.setName(value);
+         }
+      }
+
+      // custom-portlet-mode
+      if (object instanceof CustomPortletModeMetaData)
+      {
+         CustomPortletModeMetaData mode = (CustomPortletModeMetaData)object;
+         if ("portlet-mode".equals(localName))
+         {
+            mode.setPortletMode(value);
+         }
+         else if ("portal-managed".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+         {
+            mode.setPortalManaged(Boolean.parseBoolean(value));
+         }
+      }
+
+      // custom-window-state
+      if (object instanceof CustomWindowStateMetaData)
+      {
+         CustomWindowStateMetaData md = (CustomWindowStateMetaData)object;
+         if ("window-state".equals(localName))
+         {
+            md.setWindowState(value);
+         }
+      }
+
+      // user-attribute
+      if (object instanceof UserAttributeMetaData)
+      {
+         UserAttributeMetaData md = (UserAttributeMetaData)object;
+         if ("name".equals(localName))
+         {
+            md.setName(value);
+         }
+      }
+
+      // user-data-constraint
+      if (object instanceof UserDataConstraintMetaData)
+      {
+         UserDataConstraintMetaData md = (UserDataConstraintMetaData)object;
+         if ("transport-guarantee".equals(localName))
+         {
+            md.setTransportQuarantee(TransportGuarantee.valueOf(value));
+         }
+      }
+
+      // portlet-collection in security-constraint
+      if (object instanceof PortletCollectionMetaData)
+      {
+         PortletCollectionMetaData md = (PortletCollectionMetaData)object;
+         if ("portlet-name".equals(localName))
+         {
+            md.addPortletname(value);
+         }
+      }
+
+      // filter
+      if (object instanceof FilterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+      {
+         FilterMetaData md = (FilterMetaData)object;
+         if ("filter-class".equals(localName))
+         {
+            md.setFilterClass(value);
+         }
+         else if ("filter-name".equals(localName))
+         {
+            md.setFilterName(value);
+         }
+         else if ("lifecycle".equals(localName))
+         {
+            int end = value.length() - "_PHASE".length();
+            String lifeCycle = value.substring(0, end > 0 ? end : 0);
+            try
+            {
+               md.addLifecycle(LifeCyclePhase.valueOf(lifeCycle));
+            }
+            catch (IllegalArgumentException e)
+            {
+               throw new IllegalArgumentException("Invalid value for lifecycle. Valid values are [RENDER_PHASE, RESOURCE_PHASE, ACTION_PHASE, EVENT_PHASE]");
+            }
+         }
+      }
+
+      // filter-mapping
+      if (object instanceof FilterMappingMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+      {
+         FilterMappingMetaData md = (FilterMappingMetaData)object;
+         if ("filter-name".equals(localName))
+         {
+            md.setName(value);
+         }
+         if ("portlet-name".equals(localName))
+         {
+            md.addPortletName(value);
+         }
+      }
+
+      // event-defintion
+      if (object instanceof EventDefinitionMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+      {
+         EventDefinitionMetaData md = (EventDefinitionMetaData)object;
+         if ("name".equals(localName))
+         {
+            md.setName(value);
+         }
+         else if ("qname".equals(localName))
+         {
+            md.setQname(nav.resolveQName(value));
+         }
+         else if ("value-type".equals(localName))
+         {
+            md.setValueType(value);
+         }
+         else if ("alias".equals(localName))
+         {
+            md.addAlias(nav.resolveQName(value));
+         }
+      }
+
+      // public-render-parameter
+      if (object instanceof PublicRenderParameterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+      {
+         PublicRenderParameterMetaData md = (PublicRenderParameterMetaData)object;
+         if ("identifier".equals(localName))
+         {
+            md.setIdentifier(value);
+         }
+         else if ("name".equals(localName))
+         {
+            md.setName(value);
+         }
+         else if ("qname".equals(localName))
+         {
+            md.setQname(nav.resolveQName(value));
+         }
+         else if ("alias".equals(localName))
+         {
+            md.addAlias(nav.resolveQName(value));
+         }
+      }
+
+      // container-runtime-option
+      if (object instanceof ContainerRuntimeMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+      {
+         ContainerRuntimeMetaData md = (ContainerRuntimeMetaData)object;
+         if ("name".equals(localName))
+         {
+            md.setName(value);
+         }
+         else if ("value".equals(localName))
+         {
+            md.addValue(value);
+         }
+      }
+
+      // listener
+      if (object instanceof ListenerMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+      {
+         ListenerMetaData md = (ListenerMetaData)object;
+         if ("listener-class".equals(localName))
+         {
+            md.setListenerClass(value);
+         }
+      }
+   }
+}

Added: modules/metadata/trunk/pom.xml
===================================================================
--- modules/metadata/trunk/pom.xml	                        (rev 0)
+++ modules/metadata/trunk/pom.xml	2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,41 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.portal.metadata</groupId>
+  <artifactId>module-aggregator</artifactId>
+   <packaging>pom</packaging>
+   <name>JBoss Portal Metadata</name>
+  <version>trunk-SNAPSHOT</version>
+
+   <distributionManagement>
+      <repository>
+         <!--Copy the distribution jar file to a local checkout of the maven repository
+       -  This variable can be set in $MAVEN_HOME/conf/settings.xml-->
+         <id>repository.jboss.org</id>
+         <url>file://${jboss.repository.root}</url>
+      </repository>
+      <snapshotRepository>
+         <id>snapshots.jboss.org</id>
+         <name>JBoss Snapshot Repository</name>
+         <url>dav:https://snapshots.jboss.org/maven2</url>
+         <uniqueVersion>true</uniqueVersion>
+      </snapshotRepository>
+   </distributionManagement>
+
+   <modules>
+      <module>build</module>
+      <module>metadata</module>
+   </modules>
+
+   <reporting>
+      <plugins>
+         <plugin>
+           <groupId>org.apache.maven.plugins</groupId>
+           <artifactId>maven-javadoc-plugin</artifactId>
+           <configuration>
+              <aggregate>true</aggregate>
+           </configuration>
+         </plugin>
+      </plugins>
+  </reporting>
+</project>




More information about the portal-commits mailing list