You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ms...@apache.org on 2015/01/28 15:42:45 UTC

[10/14] portals-pluto git commit: Initial adaptation of Container JAXB code allowing a v3.0 deployement descriptor to be read

Initial adaptation of Container JAXB code allowing a v3.0 deployement descriptor to be read


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/d2574528
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/d2574528
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/d2574528

Branch: refs/heads/V3Prototype
Commit: d2574528c7b36cf8550da4d17692748b79ab0900
Parents: cea47a7
Author: Scott Nicklous <ms...@apache.org>
Authored: Wed Jan 28 11:45:54 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Wed Jan 28 11:45:54 2015 +0100

----------------------------------------------------------------------
 .../src/main/webapp/WEB-INF/jsp/view-isp.jsp    |  30 +-
 .../src/main/webapp/WEB-INF/portlet.xml         |   6 +-
 .../portlet/PortletApplicationDefinition.java   | 179 ++--
 .../impl/PortletAppDescriptorServiceImpl.java   |   7 +-
 .../om/portlet20/impl/PortletAppType.java       |   4 +-
 .../impl/ContainerRuntimeOptionType.java        |  87 ++
 .../portlet30/impl/CustomPortletModeType.java   | 121 +++
 .../portlet30/impl/CustomWindowStateType.java   | 107 +++
 .../om/portlet30/impl/DescriptionType.java      | 120 +++
 .../om/portlet30/impl/DisplayNameType.java      | 122 +++
 .../impl/EventDefinitionReferenceType.java      |  85 ++
 .../om/portlet30/impl/EventDefinitionType.java  | 161 ++++
 .../om/portlet30/impl/FilterMappingType.java    |  88 ++
 .../container/om/portlet30/impl/FilterType.java | 214 +++++
 .../om/portlet30/impl/InitParamType.java        | 121 +++
 .../om/portlet30/impl/ListenerType.java         | 142 ++++
 .../om/portlet30/impl/ObjectFactory.java        |  53 ++
 .../om/portlet30/impl/PortletAppType.java       | 551 ++++++++++++
 .../portlet30/impl/PortletCollectionType.java   |  64 ++
 .../om/portlet30/impl/PortletInfoType.java      |  92 ++
 .../portlet30/impl/PortletPreferencesType.java  | 101 +++
 .../om/portlet30/impl/PortletType.java          | 521 ++++++++++++
 .../om/portlet30/impl/PreferenceType.java       |  98 +++
 .../impl/PublicRenderParameterType.java         | 156 ++++
 .../portlet30/impl/SecurityConstraintType.java  | 128 +++
 .../om/portlet30/impl/SecurityRoleRefType.java  | 125 +++
 .../om/portlet30/impl/SupportsType.java         | 118 +++
 .../om/portlet30/impl/UserAttributeType.java    | 108 +++
 .../portlet30/impl/UserDataConstraintType.java  | 107 +++
 .../om/portlet30/impl/package-info.java         |  21 +
 .../pluto/container/impl/portlet-app_3_0.xsd    | 830 +++++++++++++++++++
 31 files changed, 4558 insertions(+), 109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-isp.jsp
----------------------------------------------------------------------
diff --git a/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-isp.jsp b/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-isp.jsp
index 675fe32..ed90d92 100644
--- a/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-isp.jsp
+++ b/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-isp.jsp
@@ -77,27 +77,27 @@ limitations under the License.
    },
    
    // function to select the proper image depending on radio button or dropdown display
-   selectImage = function (seltype, imgName) {
+   selectImage = function (seltype, photo) {
       var ii, f = document.getElementById(fid);
       
-      if (!imgName) {
-         imgName = 'default';
+      if (!photo) {
+         photo = 'default';
       }
       
       if (seltype === 'radio') {
-         for (ii=0; ii < f.imgName.length; ii++) {
-            if (f.imgName[ii].value === imgName) {
-               console.log("ISP: image clicked: " + imgName);
-               f.imgName[ii].checked = true;
+         for (ii=0; ii < f.photo.length; ii++) {
+            if (f.photo[ii].value === photo) {
+               console.log("ISP: image clicked: " + photo);
+               f.photo[ii].checked = true;
             } else {
-               f.imgName[ii].checked = false;
+               f.photo[ii].checked = false;
             }
          }
       } else {
-         for (ii=0; ii < f.imgName.length; ii++) {
-            if (f.imgName[ii].value === imgName) {
-               console.log("ISP: image selected: " + imgName);
-               f.imgName[ii].selected = true;
+         for (ii=0; ii < f.photo.length; ii++) {
+            if (f.photo[ii].value === photo) {
+               console.log("ISP: image selected: " + photo);
+               f.photo[ii].selected = true;
             }
          }
       }
@@ -123,9 +123,9 @@ limitations under the License.
                   // default is radio buttons
                   var ii, f = document.getElementById(fid);
                   if (newST === 'radio') {
-                     for (ii=0; ii < f.imgName.length; ii++) {
-                        console.log("ISP: adding selection handler for: " + f.imgName[ii].value);
-                        f.imgName[ii].onclick = handleImgRadio;
+                     for (ii=0; ii < f.photo.length; ii++) {
+                        console.log("ISP: adding selection handler for: " + f.photo[ii].value);
+                        f.photo[ii].onclick = handleImgRadio;
                      }
                   } else if (newST === 'dropdown') {
                      console.log("ISP: adding selection handler to dropdown list element: " + selBox);

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml
----------------------------------------------------------------------
diff --git a/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml b/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml
index 62ef563..1b7f4e7 100644
--- a/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml
+++ b/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml
@@ -1,8 +1,8 @@
-<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" 
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_3_0.xsd" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xmlns:rp="http://www.apache.org/portals/pluto/pub-render-params/ResourcePortlet"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" 
-             version="2.0"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_3_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_3_0.xsd" 
+             version="3.0"
     		id="v3.demo.portlet">
    <portlet>
       <portlet-name>V3ImageViewer</portlet-name>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container-api/src/main/java/org/apache/pluto/container/om/portlet/PortletApplicationDefinition.java
----------------------------------------------------------------------
diff --git a/pluto-container-api/src/main/java/org/apache/pluto/container/om/portlet/PortletApplicationDefinition.java b/pluto-container-api/src/main/java/org/apache/pluto/container/om/portlet/PortletApplicationDefinition.java
index f19fcd3..8f98611 100644
--- a/pluto-container-api/src/main/java/org/apache/pluto/container/om/portlet/PortletApplicationDefinition.java
+++ b/pluto-container-api/src/main/java/org/apache/pluto/container/om/portlet/PortletApplicationDefinition.java
@@ -1,90 +1,91 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.container.om.portlet;
-
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-public interface PortletApplicationDefinition {
-
-    String JSR_168_VERSION = "1.0";
-    String JSR_286_VERSION = "2.0";
-
-    String getName();
-    void setName(String name);
-    
-    String getContextPath();
-    void setContextPath(String contextPath);
-    
-    PortletDefinition getPortlet(String portletName);
-	List<? extends PortletDefinition> getPortlets();
-	PortletDefinition addPortlet(String name);
-	
-	List<? extends EventDefinition> getEventDefinitions();
-	EventDefinition addEventDefinition(String name);
-    EventDefinition addEventDefinition(QName qname);
-
-	PublicRenderParameter getPublicRenderParameter(String identifier);
-	List<? extends PublicRenderParameter> getPublicRenderParameters();
-	PublicRenderParameter addPublicRenderParameter(String name, String identifier);
-    PublicRenderParameter addPublicRenderParameter(QName qname, String identifier);
-
-	String getVersion();
-	void setVersion(String version);
-
-	CustomPortletMode getCustomPortletMode(String name);
-	List<? extends CustomPortletMode> getCustomPortletModes();
-	CustomPortletMode addCustomPortletMode(String name);
-
-    CustomWindowState getCustomWindowState(String name);
-	List<? extends CustomWindowState> getCustomWindowStates();
-	CustomWindowState addCustomWindowState(String name);
-
-	UserAttribute getUserAttribute(String name);
-	List<? extends UserAttribute> getUserAttributes();
-	UserAttribute addUserAttribute(String name);
-
-	List<? extends SecurityConstraint> getSecurityConstraints();
-	SecurityConstraint addSecurityConstraint(String transportGuarantee);
-
-	String getResourceBundle();
-	void setResourceBundle(String resourceBundle);
-
-	Filter getFilter(String filterName);
-	List<? extends Filter> getFilters();
-	Filter addFilter(String filterName);
-
-	FilterMapping getFilterMapping(String filterName);
-	List<? extends FilterMapping> getFilterMappings();
-	FilterMapping addFilterMapping(String filterName);
-
-	List<? extends Listener> getListeners();
-	Listener addListener(String listenerClass);
-
-	String getDefaultNamespace();
-	void setDefaultNamespace(String defaultNamespace);
-
-	ContainerRuntimeOption getContainerRuntimeOption(String name);
-	List<? extends ContainerRuntimeOption> getContainerRuntimeOptions();
-	ContainerRuntimeOption addContainerRuntimeOption(String name);
-
-    Map<Locale, String> getLocaleEncodingMappings();
-    void addLocaleEncodingMapping(Locale locale, String encoding);
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet;
+
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+public interface PortletApplicationDefinition {
+
+    String JSR_168_VERSION = "1.0";
+    String JSR_286_VERSION = "2.0";
+    String JSR_362_VERSION = "3.0";
+
+    String getName();
+    void setName(String name);
+    
+    String getContextPath();
+    void setContextPath(String contextPath);
+    
+    PortletDefinition getPortlet(String portletName);
+	List<? extends PortletDefinition> getPortlets();
+	PortletDefinition addPortlet(String name);
+	
+	List<? extends EventDefinition> getEventDefinitions();
+	EventDefinition addEventDefinition(String name);
+    EventDefinition addEventDefinition(QName qname);
+
+	PublicRenderParameter getPublicRenderParameter(String identifier);
+	List<? extends PublicRenderParameter> getPublicRenderParameters();
+	PublicRenderParameter addPublicRenderParameter(String name, String identifier);
+    PublicRenderParameter addPublicRenderParameter(QName qname, String identifier);
+
+	String getVersion();
+	void setVersion(String version);
+
+	CustomPortletMode getCustomPortletMode(String name);
+	List<? extends CustomPortletMode> getCustomPortletModes();
+	CustomPortletMode addCustomPortletMode(String name);
+
+    CustomWindowState getCustomWindowState(String name);
+	List<? extends CustomWindowState> getCustomWindowStates();
+	CustomWindowState addCustomWindowState(String name);
+
+	UserAttribute getUserAttribute(String name);
+	List<? extends UserAttribute> getUserAttributes();
+	UserAttribute addUserAttribute(String name);
+
+	List<? extends SecurityConstraint> getSecurityConstraints();
+	SecurityConstraint addSecurityConstraint(String transportGuarantee);
+
+	String getResourceBundle();
+	void setResourceBundle(String resourceBundle);
+
+	Filter getFilter(String filterName);
+	List<? extends Filter> getFilters();
+	Filter addFilter(String filterName);
+
+	FilterMapping getFilterMapping(String filterName);
+	List<? extends FilterMapping> getFilterMappings();
+	FilterMapping addFilterMapping(String filterName);
+
+	List<? extends Listener> getListeners();
+	Listener addListener(String listenerClass);
+
+	String getDefaultNamespace();
+	void setDefaultNamespace(String defaultNamespace);
+
+	ContainerRuntimeOption getContainerRuntimeOption(String name);
+	List<? extends ContainerRuntimeOption> getContainerRuntimeOptions();
+	ContainerRuntimeOption addContainerRuntimeOption(String name);
+
+    Map<Locale, String> getLocaleEncodingMappings();
+    void addLocaleEncodingMapping(Locale locale, String encoding);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java
index 397df22..1464ec9 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java
@@ -91,6 +91,10 @@ public class PortletAppDescriptorServiceImpl implements PortletAppDescriptorServ
                 {
                     adjustedNamespaceURI = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd";
                 }
+                else if ("3.0".equals(version))
+                {
+                    adjustedNamespaceURI = "http://java.sun.com/xml/ns/portlet/portlet-app_3_0.xsd";
+                }
             }
             return eventCode;
         }
@@ -183,7 +187,8 @@ public class PortletAppDescriptorServiceImpl implements PortletAppDescriptorServ
         ClassLoader containerClassLoader = PortletAppDescriptorServiceImpl.class.getClassLoader();
         try {
             jaxbContext = JAXBContext.newInstance(org.apache.pluto.container.om.portlet10.impl.ObjectFactory.class.getPackage().getName() + ":" +
-                                                  org.apache.pluto.container.om.portlet20.impl.ObjectFactory.class.getPackage().getName(), 
+                                                  org.apache.pluto.container.om.portlet20.impl.ObjectFactory.class.getPackage().getName() + ":" +
+                                                  org.apache.pluto.container.om.portlet30.impl.ObjectFactory.class.getPackage().getName(), 
                                                   containerClassLoader);
         }
         catch (JAXBException e) {

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletAppType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletAppType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletAppType.java
index b3b473a..348a451 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletAppType.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletAppType.java
@@ -523,7 +523,9 @@ public class PortletAppType implements PortletApplicationDefinition
 
     public void setVersion(String value)
     {
-        if (JSR_168_VERSION.equals(value) || JSR_286_VERSION.equals(value))
+        if (JSR_168_VERSION.equals(value) 
+           || JSR_286_VERSION.equals(value)
+           || JSR_362_VERSION.equals(value))
         {
             version = value;
         }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ContainerRuntimeOptionType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ContainerRuntimeOptionType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ContainerRuntimeOptionType.java
new file mode 100644
index 0000000..0f75ef3
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ContainerRuntimeOptionType.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+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.apache.pluto.container.om.portlet.ContainerRuntimeOption;
+
+/**
+ * The container-runtime-option element contains settings for the portlet container that the portlet expects to be
+ * honored at runtime. These settings may re-define default portlet container behavior, like the javax.portlet.escapeXml
+ * setting that disables XML encoding of URLs produced by the portlet tag library as default. Names with the
+ * javax.portlet prefix are reserved for the Java Portlet Specification. Used in: portlet-app, portlet <p>Java class
+ * for container-runtime-optionType complex type. <p>The following schema fragment specifies the expected content
+ * contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;container-runtime-optionType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name=&quot;name&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}nameType&quot;/&gt;
+ *         &lt;element name=&quot;value&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}valueType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "container-runtime-optionType", propOrder = { "name", "value" })
+public class ContainerRuntimeOptionType implements ContainerRuntimeOption
+{
+    @XmlElement(required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String name;
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected List<String> value;
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String value)
+    {
+        name = value;
+    }
+
+    public List<String> getValues()
+    {
+        if (value == null)
+        {
+            value = new ArrayList<String>();
+        }
+        return value;
+    }
+
+    public void addValue(String value)
+    {
+        getValues().add(value);
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/CustomPortletModeType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/CustomPortletModeType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/CustomPortletModeType.java
new file mode 100644
index 0000000..6499712
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/CustomPortletModeType.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+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.apache.pluto.container.om.portlet.CustomPortletMode;
+import org.apache.pluto.container.om.portlet.Description;
+
+/**
+ * A custom portlet mode that one or more portlets in this portlet application supports. If the portal does not need to
+ * provide some management functionality for this portlet mode, the portal-managed element needs to be set to "false",
+ * otherwise to "true". Default is "true". Used in: portlet-app <p>Java class for custom-portlet-modeType complex type.
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;custom-portlet-modeType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name=&quot;description&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;portlet-mode&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-modeType&quot;/&gt;
+ *         &lt;element name=&quot;portal-managed&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portal-managedType&quot; minOccurs=&quot;0&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name=&quot;id&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "custom-portlet-modeType", propOrder = { "description", "portletMode", "portalManaged" })
+public class CustomPortletModeType implements CustomPortletMode
+{
+    @XmlElement(name = "description")
+    protected List<DescriptionType> description;
+    @XmlElement(name = "portlet-mode", required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String portletMode;
+    @XmlElement(name = "portal-managed")
+    protected Boolean portalManaged;
+    
+    public Description getDescription(Locale locale)
+    {
+        for (Description d : getDescriptions())
+        {
+            if (d.getLocale().equals(locale))
+            {
+                return d;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends Description> getDescriptions()
+    {
+        if (description == null)
+        {
+            description = new ArrayList<DescriptionType>();
+        }
+        return description;
+    }
+    
+    public Description addDescription(String lang)
+    {
+        DescriptionType d = new DescriptionType();
+        d.setLang(lang);
+        if (getDescription(d.getLocale()) != null)
+        {
+            throw new IllegalArgumentException("Description for language: "+d.getLocale()+" already defined");
+        }
+        getDescriptions();
+        description.add(d);
+        return d;
+    }
+
+    public String getPortletMode()
+    {
+        return portletMode != null ? portletMode.toLowerCase() : null;
+    }
+
+    public void setPortletMode(String value)
+    {
+        portletMode = value.toLowerCase();
+    }
+
+    public boolean isPortalManaged()
+    {
+        return portalManaged != null ? portalManaged.booleanValue() : true;
+    }
+
+    public void setPortalManaged(boolean value)
+    {
+        portalManaged = value ? Boolean.TRUE : Boolean.FALSE;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/CustomWindowStateType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/CustomWindowStateType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/CustomWindowStateType.java
new file mode 100644
index 0000000..80a1c92
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/CustomWindowStateType.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+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.apache.pluto.container.om.portlet.CustomWindowState;
+import org.apache.pluto.container.om.portlet.Description;
+
+/**
+ * A custom window state that one or more portlets in this portlet application supports. Used in: portlet-app <p>Java
+ * class for custom-window-stateType complex type. <p>The following schema fragment specifies the expected content
+ * contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;custom-window-stateType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name=&quot;description&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;window-state&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}window-stateType&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name=&quot;id&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "custom-window-stateType", propOrder = { "description", "windowState" })
+public class CustomWindowStateType implements CustomWindowState
+{
+    @XmlElement(name = "description")
+    protected List<DescriptionType> description;
+    @XmlElement(name = "window-state", required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String windowState;
+
+    public Description getDescription(Locale locale)
+    {
+        for (Description d : getDescriptions())
+        {
+            if (d.getLocale().equals(locale))
+            {
+                return d;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends Description> getDescriptions()
+    {
+        if (description == null)
+        {
+            description = new ArrayList<DescriptionType>();
+        }
+        return description;
+    }
+    
+    public Description addDescription(String lang)
+    {
+        DescriptionType d = new DescriptionType();
+        d.setLang(lang);
+        if (getDescription(d.getLocale()) != null)
+        {
+            throw new IllegalArgumentException("Description for language: "+d.getLocale()+" already defined");
+        }
+        getDescriptions();
+        description.add(d);
+        return d;
+    }
+
+    public String getWindowState()
+    {
+        return windowState != null ? windowState.toLowerCase() : null;
+    }
+
+    public void setWindowState(String value)
+    {
+        windowState = value.toLowerCase();
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/DescriptionType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/DescriptionType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/DescriptionType.java
new file mode 100644
index 0000000..6c86768
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/DescriptionType.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.apache.pluto.container.om.portlet.Description;
+
+/**
+ * The description element is used to provide text describing the parent element. The description element should include
+ * any information that the portlet application war file producer wants to provide to the consumer of the portlet
+ * application war file (i.e., to the Deployer). Typically, the tools used by the portlet application war file consumer
+ * will display the description when processing the parent element that contains the description. It has an optional
+ * attribute xml:lang to indicate which language is used in the description according to RFC 1766
+ * (http://www.ietf.org/rfc/rfc1766.txt). The default value of this attribute is English(“en�?). Used in: init-param,
+ * portlet, portlet-app, security-role <p>Java class for descriptionType complex type. <p>The following schema
+ * fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;descriptionType&quot;&gt;
+ *   &lt;simpleContent&gt;
+ *     &lt;extension base=&quot;&lt;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&gt;string&quot;&gt;
+ *       &lt;attribute ref=&quot;{http://www.w3.org/XML/1998/namespace}lang&quot;/&gt;
+ *     &lt;/extension&gt;
+ *   &lt;/simpleContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "descriptionType", propOrder = { "value" })
+public class DescriptionType implements Description
+{
+    @XmlValue
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String value;
+    @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
+    protected String lang = null;
+    @XmlTransient
+    protected Locale locale;
+
+    public String getDescription()
+    {
+        return value;
+    }
+
+    public void setDescription(String value)
+    {
+        this.value = value;
+    }
+
+    public String getLang()
+    {
+        return lang == null ? Locale.ENGLISH.toString() : lang;
+    }
+
+    public void setLang(String value)
+    {
+        lang = value;
+        deriveLocale();
+    }
+    
+    public Locale getLocale()
+    {
+        return locale == null ? deriveLocale() : locale;
+    }
+    
+    protected Locale deriveLocale()
+    {
+        Locale locale = null;
+        String lang = this.getLang();
+        if (lang != null)
+        {
+            String country = "";
+            String variant = "";
+            String[] localeArray = lang.split("[-|_]");
+            for (int i = 0; i < localeArray.length; i++)
+            {
+                if (i == 0)
+                {
+                    lang = localeArray[i];
+                }
+                else if (i == 1)
+                {
+                    country = localeArray[i];
+                }
+                else if (i == 2)
+                {
+                    variant = localeArray[i];
+                }
+            }
+            locale = new Locale(lang, country, variant);
+        }
+        return this.locale = locale;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/DisplayNameType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/DisplayNameType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/DisplayNameType.java
new file mode 100644
index 0000000..ae3fbbd
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/DisplayNameType.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.apache.pluto.container.om.portlet.DisplayName;
+
+/**
+ * The display-name type contains a short name that is intended to be displayed by tools. It is used by display-name
+ * elements. The display name need not be unique. Example: ...
+ * 
+ * <pre>
+ * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;display-name xmlns="http://www.w3.org/2001/XMLSchema" xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en"&gt;Employee Self Service&lt;/display-name&gt;
+ * </pre>
+ * 
+ * It has an optional attribute xml:lang to indicate which language is used in the description according to RFC 1766
+ * (http://www.ietf.org/rfc/rfc1766.txt). The default value of this attribute is English(“en�?). <p>Java class for
+ * display-nameType complex type. <p>The following schema fragment specifies the expected content contained within this
+ * class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;display-nameType&quot;&gt;
+ *   &lt;simpleContent&gt;
+ *     &lt;extension base=&quot;&lt;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&gt;string&quot;&gt;
+ *       &lt;attribute ref=&quot;{http://www.w3.org/XML/1998/namespace}lang&quot;/&gt;
+ *     &lt;/extension&gt;
+ *   &lt;/simpleContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "display-nameType", propOrder = { "value" })
+public class DisplayNameType implements DisplayName
+{
+    @XmlValue
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String value;
+    @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
+    protected String lang = null;
+    @XmlTransient
+    protected Locale locale;
+
+    public String getDisplayName()
+    {
+        return value;
+    }
+
+    public void setDisplayName(String value)
+    {
+        this.value = value;
+    }
+
+    public String getLang()
+    {
+        return lang == null ? Locale.ENGLISH.toString() : lang;
+    }
+
+    public void setLang(String value)
+    {
+        lang = value;
+    }
+
+    public Locale getLocale()
+    {
+        return locale == null ? deriveLocale() : locale;
+    }
+    
+    protected Locale deriveLocale()
+    {
+        Locale locale = null;
+        String lang = this.getLang();
+        if (lang != null)
+        {
+            String country = "";
+            String variant = "";
+            String[] localeArray = lang.split("[-|_]");
+            for (int i = 0; i < localeArray.length; i++)
+            {
+                if (i == 0)
+                {
+                    lang = localeArray[i];
+                }
+                else if (i == 1)
+                {
+                    country = localeArray[i];
+                }
+                else if (i == 2)
+                {
+                    variant = localeArray[i];
+                }
+            }
+            locale = new Locale(lang, country, variant);
+        }
+        return this.locale = locale;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/EventDefinitionReferenceType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/EventDefinitionReferenceType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/EventDefinitionReferenceType.java
new file mode 100644
index 0000000..81679fa
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/EventDefinitionReferenceType.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlSchemaType;
+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.apache.pluto.container.om.portlet.EventDefinitionReference;
+
+/**
+ * The event-definition-referenceType is used to reference events declared with the event-definition element at
+ * application level. Used in: portlet <p>Java class for event-definition-referenceType complex type. <p>The following
+ * schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;event-definition-referenceType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;choice&gt;
+ *         &lt;element name=&quot;qname&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}QName&quot;/&gt;
+ *         &lt;element name=&quot;name&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}NCName&quot;/&gt;
+ *       &lt;/choice&gt;
+ *       &lt;attribute name=&quot;id&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "event-definition-referenceType", propOrder = { "qname", "name" })
+public class EventDefinitionReferenceType implements EventDefinitionReference
+{
+    protected QName qname;
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlSchemaType(name = "NCName")
+    protected String name;
+
+    public QName getQName()
+    {
+        return qname;
+    }
+
+    public void setQName(QName value)
+    {
+        qname = value;
+        name = null;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String value)
+    {
+        name = value;
+        qname = null;
+    }
+
+    public QName getQualifiedName(String defaultNamespace)
+    {
+        return qname != null ? qname : name != null ? new QName(defaultNamespace, name) : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/EventDefinitionType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/EventDefinitionType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/EventDefinitionType.java
new file mode 100644
index 0000000..237fff4
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/EventDefinitionType.java
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+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.apache.pluto.container.om.portlet.Description;
+import org.apache.pluto.container.om.portlet.EventDefinition;
+
+/**
+ * The event-definitionType is used to declare events the portlet can either receive or emit. The name must be unique
+ * and must be the one the portlet is using in its code for referencing this event. Used in: portlet-app <p>Java class
+ * for event-definitionType complex type. <p>The following schema fragment specifies the expected content contained
+ * within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;event-definitionType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name=&quot;description&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;choice&gt;
+ *           &lt;element name=&quot;qname&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}QName&quot;/&gt;
+ *           &lt;element name=&quot;name&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}NCName&quot;/&gt;
+ *         &lt;/choice&gt;
+ *         &lt;element name=&quot;alias&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}QName&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;value-type&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}fully-qualified-classType&quot; minOccurs=&quot;0&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name=&quot;id&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "event-definitionType", propOrder = { "description", "qname", "name", "alias", "valueType" })
+public class EventDefinitionType implements EventDefinition
+{
+    @XmlElement(name = "description")
+    protected List<DescriptionType> description;
+    protected QName qname;
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlSchemaType(name = "NCName")
+    protected String name;
+    protected List<QName> alias;
+    @XmlElement(name = "value-type")
+    protected String valueType;
+
+    public Description getDescription(Locale locale)
+    {
+        for (Description d : getDescriptions())
+        {
+            if (d.getLocale().equals(locale))
+            {
+                return d;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends Description> getDescriptions()
+    {
+        if (description == null)
+        {
+            description = new ArrayList<DescriptionType>();
+        }
+        return description;
+    }
+    
+    public Description addDescription(String lang)
+    {
+        DescriptionType d = new DescriptionType();
+        d.setLang(lang);
+        if (getDescription(d.getLocale()) != null)
+        {
+            throw new IllegalArgumentException("Description for language: "+d.getLocale()+" already defined");
+        }
+        getDescriptions();
+        description.add(d);
+        return d;
+    }
+
+    public QName getQName()
+    {
+        return qname;
+    }
+
+    public void setQName(QName value)
+    {
+        qname = value;
+        name = null;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String value)
+    {
+        name = value;
+        qname = null;
+    }
+
+    public List<QName> getAliases()
+    {
+        if (alias == null)
+        {
+            alias = new ArrayList<QName>();
+        }
+        return alias;
+    }
+    
+    public void addAlias(QName alias)
+    {
+        // TODO: check for duplicates
+        getAliases().add(alias);
+    }
+
+    public String getValueType()
+    {
+        return valueType;
+    }
+
+    public void setValueType(String value)
+    {
+        valueType = value;
+    }
+
+    public QName getQualifiedName(String defaultNamespace)
+    {
+        return qname != null ? qname : name != null ? new QName(defaultNamespace, name) : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/FilterMappingType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/FilterMappingType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/FilterMappingType.java
new file mode 100644
index 0000000..e2c7815
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/FilterMappingType.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+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.apache.pluto.container.om.portlet.FilterMapping;
+
+/**
+ * Declaration of the filter mappings in this portlet application is done by using filter-mappingType. The container
+ * uses the filter-mapping declarations to decide which filters to apply to a request, and in what order. To determine
+ * which filters to apply it matches filter-mapping declarations on the portlet-name and the lifecyle phase defined in
+ * the filter element. The order in which filters are invoked is the order in which filter-mapping declarations that
+ * match appear in the list of filter-mapping elements. Used in: portlet-app <p>Java class for filter-mappingType
+ * complex type. <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;filter-mappingType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name=&quot;filter-name&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}filter-nameType&quot;/&gt;
+ *         &lt;element name=&quot;portlet-name&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-nameType&quot; maxOccurs=&quot;unbounded&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "filter-mappingType", propOrder = { "filterName", "portletName" })
+public class FilterMappingType implements FilterMapping
+{
+    @XmlElement(name = "filter-name", required = true)
+    protected String filterName;
+    @XmlElement(name = "portlet-name", required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected List<String> portletName;
+
+    public String getFilterName()
+    {
+        return filterName;
+    }
+
+    public void setFilterName(String value)
+    {
+        filterName = value;
+    }
+
+    public List<String> getPortletNames()
+    {
+        if (portletName == null)
+        {
+            portletName = new ArrayList<String>();
+        }
+        return portletName;
+    }
+    
+    public void addPortletName(String name)
+    {
+        // TODO: check for duplicates
+        getPortletNames().add(name);
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/FilterType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/FilterType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/FilterType.java
new file mode 100644
index 0000000..ff13368
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/FilterType.java
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.pluto.container.om.portlet.Description;
+import org.apache.pluto.container.om.portlet.DisplayName;
+import org.apache.pluto.container.om.portlet.Filter;
+import org.apache.pluto.container.om.portlet.InitParam;
+
+/**
+ * The filter element specifies a filter that can transform the content of portlet requests and portlet responses.
+ * Filters can access the initialization parameters declared in the deployment descriptor at runtime via the
+ * FilterConfig interface. A filter can be restricted to one or more lifecycle phases of the portlet. Valid entries for
+ * lifecycle are: ACTION_PHASE, EVENT_PHASE, RENDER_PHASE, RESOURCE_PHASE Used in: portlet-app <p>Java class for
+ * filterType complex type. <p>The following schema fragment specifies the expected content contained within this
+ * class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;filterType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name=&quot;description&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;display-name&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}display-nameType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;filter-name&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}filter-nameType&quot;/&gt;
+ *         &lt;element name=&quot;filter-class&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}fully-qualified-classType&quot;/&gt;
+ *         &lt;element name=&quot;lifecycle&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; maxOccurs=&quot;unbounded&quot;/&gt;
+ *         &lt;element name=&quot;init-param&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}init-paramType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "filterType", propOrder = { "description", "displayName", "filterName", "filterClass", "lifecycle",
+                                           "initParam" })
+public class FilterType implements Filter
+{
+    @XmlElement(name = "description")
+    protected List<DescriptionType> description;
+    @XmlElement(name = "display-name")
+    protected List<DisplayNameType> displayName;
+    @XmlElement(name = "filter-name", required = true)
+    protected String filterName;
+    @XmlElement(name = "filter-class", required = true)
+    protected String filterClass;
+    @XmlElement(required = true)
+    protected List<String> lifecycle;
+    @XmlElement(name = "init-param")
+    protected List<InitParamType> initParam;
+
+    public Description getDescription(Locale locale)
+    {
+        for (Description d : getDescriptions())
+        {
+            if (d.getLocale().equals(locale))
+            {
+                return d;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends Description> getDescriptions()
+    {
+        if (description == null)
+        {
+            description = new ArrayList<DescriptionType>();
+        }
+        return description;
+    }
+    
+    public Description addDescription(String lang)
+    {
+        DescriptionType d = new DescriptionType();
+        d.setLang(lang);
+        if (getDescription(d.getLocale()) != null)
+        {
+            throw new IllegalArgumentException("Description for language: "+d.getLocale()+" already defined");
+        }
+        getDescriptions();
+        description.add(d);
+        return d;
+    }
+
+    public DisplayName getDisplayName(Locale locale)
+    {
+        for (DisplayName d : getDisplayNames())
+        {
+            if (d.getLocale().equals(locale))
+            {
+                return d;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends DisplayName> getDisplayNames()
+    {
+        if (displayName == null)
+        {
+            displayName = new ArrayList<DisplayNameType>();
+        }
+        return displayName;
+    }
+    
+    public DisplayName addDisplayName(String lang)
+    {
+        DisplayNameType d = new DisplayNameType();
+        d.setLang(lang);
+        if (getDisplayName(d.getLocale()) != null)
+        {
+            throw new IllegalArgumentException("DisplayName for language: "+d.getLocale()+" already defined");
+        }
+        getDisplayNames();
+        displayName.add(d);
+        return d;
+    }
+
+    public String getFilterName()
+    {
+        return filterName;
+    }
+
+    public void setFilterName(String value)
+    {
+        filterName = value;
+    }
+
+    public String getFilterClass()
+    {
+        return filterClass;
+    }
+
+    public void setFilterClass(String value)
+    {
+        filterClass = value;
+    }
+
+    public List<String> getLifecycles()
+    {
+        if (lifecycle == null)
+        {
+            lifecycle = new ArrayList<String>();
+        }
+        return lifecycle;
+    }
+    
+    public void addLifecycle(String name)
+    {
+        // TODO: check valid name and duplicates
+        getLifecycles().add(name);
+    }
+    
+    public InitParam getInitParam(String name)
+    {
+        for (InitParam param : getInitParams())
+        {
+            if (param.getParamName().equals(name))
+            {
+                return param;
+            }
+        }
+        return null;
+    }
+
+    public List<? extends InitParam> getInitParams()
+    {
+        if (initParam == null)
+        {
+            initParam = new ArrayList<InitParamType>();
+        }
+        return initParam;
+    }
+    
+    public InitParam addInitParam(String paramName)
+    {
+        if (getInitParam(paramName) != null)
+        {
+            throw new IllegalArgumentException("Init parameter: "+paramName+" already defined");
+        }
+        InitParamType param = new InitParamType();
+        param.setParamName(paramName);
+        getInitParams();
+        initParam.add(param);
+        return param;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/InitParamType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/InitParamType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/InitParamType.java
new file mode 100644
index 0000000..f0fc42f
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/InitParamType.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+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.apache.pluto.container.om.portlet.Description;
+import org.apache.pluto.container.om.portlet.InitParam;
+
+/**
+ * The init-param element contains a name/value pair as an initialization param of the portlet Used in:portlet <p>Java
+ * class for init-paramType complex type. <p>The following schema fragment specifies the expected content contained
+ * within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;init-paramType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name=&quot;description&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;name&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}nameType&quot;/&gt;
+ *         &lt;element name=&quot;value&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}valueType&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name=&quot;id&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "init-paramType", propOrder = { "description", "name", "value" })
+public class InitParamType implements InitParam
+{
+    @XmlElement(name = "description")
+    protected List<DescriptionType> description;
+    @XmlElement(required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String name;
+    @XmlElement(required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String value;
+
+    public Description getDescription(Locale locale)
+    {
+        for (Description d : getDescriptions())
+        {
+            if (d.getLocale().equals(locale))
+            {
+                return d;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends Description> getDescriptions()
+    {
+        if (description == null)
+        {
+            description = new ArrayList<DescriptionType>();
+        }
+        return description;
+    }
+    
+    public Description addDescription(String lang)
+    {
+        DescriptionType d = new DescriptionType();
+        d.setLang(lang);
+        if (getDescription(d.getLocale()) != null)
+        {
+            throw new IllegalArgumentException("Description for language: "+d.getLocale()+" already defined");
+        }
+        getDescriptions();
+        description.add(d);
+        return d;
+    }
+
+    public String getParamName()
+    {
+        return name;
+    }
+
+    public void setParamName(String value)
+    {
+        name = value;
+    }
+
+    public String getParamValue()
+    {
+        return value;
+    }
+
+    public void setParamValue(String value)
+    {
+        this.value = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ListenerType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ListenerType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ListenerType.java
new file mode 100644
index 0000000..b98b3fb
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ListenerType.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.pluto.container.om.portlet.Description;
+import org.apache.pluto.container.om.portlet.DisplayName;
+import org.apache.pluto.container.om.portlet.Listener;
+
+/**
+ * The listenerType is used to declare listeners for this portlet application. Used in: portlet-app <p>Java class for
+ * listenerType complex type. <p>The following schema fragment specifies the expected content contained within this
+ * class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;listenerType&quot;&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name=&quot;description&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;display-name&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}display-nameType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;listener-class&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}fully-qualified-classType&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name=&quot;id&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "listenerType", propOrder = { "description", "displayName", "listenerClass" })
+public class ListenerType implements Listener
+{
+    @XmlElement(name = "description")
+    protected List<DescriptionType> description;
+    @XmlElement(name = "display-name")
+    protected List<DisplayNameType> displayName;
+    @XmlElement(name = "listener-class", required = true)
+    protected String listenerClass;
+
+    public Description getDescription(Locale locale)
+    {
+        for (Description d : getDescriptions())
+        {
+            if (d.getLocale().equals(locale))
+            {
+                return d;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends Description> getDescriptions()
+    {
+        if (description == null)
+        {
+            description = new ArrayList<DescriptionType>();
+        }
+        return description;
+    }
+    
+    public Description addDescription(String lang)
+    {
+        DescriptionType d = new DescriptionType();
+        d.setLang(lang);
+        if (getDescription(d.getLocale()) != null)
+        {
+            throw new IllegalArgumentException("Description for language: "+d.getLocale()+" already defined");
+        }
+        getDescriptions();
+        description.add(d);
+        return d;
+    }
+
+    public DisplayName getDisplayName(Locale locale)
+    {
+        for (DisplayName d : getDisplayNames())
+        {
+            if (d.getLocale().equals(locale))
+            {
+                return d;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends DisplayName> getDisplayNames()
+    {
+        if (displayName == null)
+        {
+            displayName = new ArrayList<DisplayNameType>();
+        }
+        return displayName;
+    }
+    
+    public DisplayName addDisplayName(String lang)
+    {
+        DisplayNameType d = new DisplayNameType();
+        d.setLang(lang);
+        if (getDisplayName(d.getLocale()) != null)
+        {
+            throw new IllegalArgumentException("DisplayName for language: "+d.getLocale()+" already defined");
+        }
+        getDisplayNames();
+        displayName.add(d);
+        return d;
+    }
+
+    public String getListenerClass()
+    {
+        return listenerClass;
+    }
+
+    public void setListenerClass(String value)
+    {
+        listenerClass = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/d2574528/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ObjectFactory.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ObjectFactory.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ObjectFactory.java
new file mode 100644
index 0000000..73ed471
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet30/impl/ObjectFactory.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.om.portlet30.impl;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+/**
+ * This object contains factory methods for each Java content interface and Java element interface generated in the
+ * org.apache.pluto.descriptors.portlet30 package. <p>An ObjectFactory allows you to programatically construct new
+ * instances of the Java representation for XML content. The Java representation of XML content can consist of schema
+ * derived interfaces and classes representing the binding of schema type definitions, element declarations and model
+ * groups. Factory methods for each of these are provided in this class.
+ * 
+ * @version $Id$
+ */
+@XmlRegistry
+public class ObjectFactory
+{
+    private final static QName _PortletApp_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_3_0.xsd",
+                                                             "portlet-app");
+
+    public ObjectFactory()
+    {
+    }
+
+    public PortletAppType createPortletApp()
+    {
+        return new PortletAppType();
+    }
+
+    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_3_0.xsd", name = "portlet-app")
+    public JAXBElement<PortletAppType> createPortletApp(PortletAppType value)
+    {
+        return new JAXBElement<PortletAppType>(_PortletApp_QNAME, PortletAppType.class, null, value);
+    }
+}