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:37 UTC

[02/14] portals-pluto git commit: work towards enabling v3 deployment descriptor

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/FilterType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/FilterType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/FilterType.java
new file mode 100644
index 0000000..9d26b93
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/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.portlet20.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/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/InitParamType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/InitParamType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/InitParamType.java
new file mode 100644
index 0000000..b62732f
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/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.portlet20.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/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/ListenerType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/ListenerType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/ListenerType.java
new file mode 100644
index 0000000..ddab472
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/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.portlet20.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/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/ObjectFactory.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/ObjectFactory.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/ObjectFactory.java
new file mode 100644
index 0000000..6fc2283
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/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.portlet20.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.portlet20 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_2_0.xsd",
+                                                             "portlet-app");
+
+    public ObjectFactory()
+    {
+    }
+
+    public PortletAppType createPortletApp()
+    {
+        return new PortletAppType();
+    }
+
+    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "portlet-app")
+    public JAXBElement<PortletAppType> createPortletApp(PortletAppType value)
+    {
+        return new JAXBElement<PortletAppType>(_PortletApp_QNAME, PortletAppType.class, null, value);
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/a8bed7fb/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
new file mode 100644
index 0000000..b3b473a
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletAppType.java
@@ -0,0 +1,549 @@
+/*
+ * 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.portlet20.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlTransient;
+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.ContainerRuntimeOption;
+import org.apache.pluto.container.om.portlet.CustomPortletMode;
+import org.apache.pluto.container.om.portlet.CustomWindowState;
+import org.apache.pluto.container.om.portlet.EventDefinition;
+import org.apache.pluto.container.om.portlet.Filter;
+import org.apache.pluto.container.om.portlet.FilterMapping;
+import org.apache.pluto.container.om.portlet.Listener;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
+import org.apache.pluto.container.om.portlet.PortletDefinition;
+import org.apache.pluto.container.om.portlet.PublicRenderParameter;
+import org.apache.pluto.container.om.portlet.SecurityConstraint;
+import org.apache.pluto.container.om.portlet.UserAttribute;
+
+/**
+ * <p>Java class for portlet-appType complex type. <p>The following schema fragment specifies the expected content
+ * contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;portlet-appType&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;portlet&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portletType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;custom-portlet-mode&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}custom-portlet-modeType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;custom-window-state&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}custom-window-stateType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;user-attribute&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}user-attributeType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;security-constraint&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}security-constraintType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;resource-bundle&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}resource-bundleType&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;filter&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}filterType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;filter-mapping&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}filter-mappingType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;default-namespace&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}anyURI&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;event-definition&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}event-definitionType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;public-render-parameter&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}public-render-parameterType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;listener&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}listenerType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;container-runtime-option&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}container-runtime-optionType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name=&quot;version&quot; use=&quot;required&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; /&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$
+ */
+@XmlRootElement(name = "portlet-app")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "portlet-appType", propOrder = { "portlet", "customPortletMode", "customWindowState", "userAttribute",
+                                                "securityConstraint", "resourceBundle", "filter", "filterMapping",
+                                                "defaultNamespace", "eventDefinition", "publicRenderParameter",
+                                                "listener", "containerRuntimeOption" })
+public class PortletAppType implements PortletApplicationDefinition
+{
+    @XmlElement(name = "portlet")
+    protected List<PortletType> portlet;
+    @XmlElement(name = "custom-portlet-mode")
+    protected List<CustomPortletModeType> customPortletMode;
+    @XmlElement(name = "custom-window-state")
+    protected List<CustomWindowStateType> customWindowState;
+    @XmlElement(name = "user-attribute")
+    protected List<UserAttributeType> userAttribute;
+    @XmlElement(name = "security-constraint")
+    protected List<SecurityConstraintType> securityConstraint;
+    @XmlElement(name = "resource-bundle")
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String resourceBundle;
+    @XmlElement(name = "filter")
+    protected List<FilterType> filter;
+    @XmlElement(name = "filter-mapping")
+    protected List<FilterMappingType> filterMapping;
+    @XmlElement(name = "default-namespace")
+    @XmlSchemaType(name = "anyURI")
+    protected String defaultNamespace;
+    @XmlElement(name = "event-definition")
+    protected List<EventDefinitionType> eventDefinition;
+    @XmlElement(name = "public-render-parameter")
+    protected List<PublicRenderParameterType> publicRenderParameter;
+    @XmlElement(name = "listener")
+    protected List<ListenerType> listener;
+    @XmlElement(name = "container-runtime-option")
+    protected List<ContainerRuntimeOptionType> containerRuntimeOption;
+    @XmlAttribute(required = true)
+    protected String version = JSR_286_VERSION;
+    
+    @XmlTransient
+    protected String name;
+    @XmlTransient
+    protected String contextPath;
+    @XmlTransient
+    protected Map<Locale, String> localeEncodingMappings;
+    
+    public String getName()
+    {
+        return name;
+    }
+    
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+    
+    public String getContextPath()
+    {
+        return contextPath;
+    }
+    
+    public void setContextPath(String contextPath)
+    {
+        this.contextPath = contextPath;
+    }
+    
+    public PortletDefinition getPortlet(String portletName)
+    {
+        for (PortletDefinition pd : getPortlets())
+        {
+            if (pd.getPortletName().equals(portletName))
+            {
+                return pd;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends PortletDefinition> getPortlets()
+    {
+        if (portlet == null)
+        {
+            portlet = new ArrayList<PortletType>();
+        }
+        return portlet;
+    }
+    
+    public PortletDefinition addPortlet(String portletName)
+    {
+        if (getPortlet(portletName) != null)
+        {
+            throw new IllegalArgumentException("Portlet with name: "+portletName+" already defined");
+        }
+        PortletType p = new PortletType();
+        p.setPortletName(portletName);
+        p.setApplication(this);
+        portlet.add(p);
+        return p;
+    }
+
+    public CustomPortletMode getCustomPortletMode(String name)
+    {
+        for (CustomPortletMode cpm : getCustomPortletModes())
+        {
+            if (cpm.getPortletMode().equalsIgnoreCase(name))
+            {
+                return cpm;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends CustomPortletMode> getCustomPortletModes()
+    {
+        if (customPortletMode == null)
+        {
+            customPortletMode = new ArrayList<CustomPortletModeType>();
+        }
+        return customPortletMode;
+    }
+    
+    public CustomPortletMode addCustomPortletMode(String name)
+    {
+        if (getCustomPortletMode(name) != null)
+        {
+            throw new IllegalArgumentException("Custom PortletMode with mode name: "+name+" already defined");
+        }
+        CustomPortletModeType cpm = new CustomPortletModeType();
+        cpm.setPortletMode(name);
+        customPortletMode.add(cpm);
+        return cpm;        
+    }
+    
+    public CustomWindowState getCustomWindowState(String name)
+    {
+        for (CustomWindowState cws : getCustomWindowStates())
+        {
+            if (cws.getWindowState().equalsIgnoreCase(name))
+            {
+                return cws;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends CustomWindowState> getCustomWindowStates()
+    {
+        if (customWindowState == null)
+        {
+            customWindowState = new ArrayList<CustomWindowStateType>();
+        }
+        return customWindowState;
+    }
+    
+    public CustomWindowState addCustomWindowState(String name)
+    {
+        if (getCustomWindowState(name) != null)
+        {
+            throw new IllegalArgumentException("Custom WindowState with state name: "+name+" already defined");
+        }
+        CustomWindowStateType cws = new CustomWindowStateType();
+        cws.setWindowState(name);
+        customWindowState.add(cws);
+        return cws;        
+    }
+    
+    public UserAttribute getUserAttribute(String name)
+    {
+        for (UserAttribute ua : getUserAttributes())
+        {
+            if (ua.getName().equals(name))
+            {
+                return ua;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends UserAttribute> getUserAttributes()
+    {
+        if (userAttribute == null)
+        {
+            userAttribute = new ArrayList<UserAttributeType>();
+        }
+        return userAttribute;
+    }
+    
+    public UserAttribute addUserAttribute(String name)
+    {
+        if (getUserAttribute(name) != null)
+        {
+            throw new IllegalArgumentException("User attribute with name: "+name+" already defined");
+        }
+        UserAttributeType ua = new UserAttributeType();
+        ua.setName(name);
+        userAttribute.add(ua);
+        return ua;        
+    }
+    
+    public List<? extends SecurityConstraint> getSecurityConstraints()
+    {
+        if (securityConstraint == null)
+        {
+            securityConstraint = new ArrayList<SecurityConstraintType>();
+        }
+        return securityConstraint;
+    }
+    
+    public SecurityConstraint addSecurityConstraint(String transportGuarantee)
+    {
+        SecurityConstraintType sc = new SecurityConstraintType();
+        ((UserDataConstraintType)sc.getUserDataConstraint()).setTransportGuarantee(transportGuarantee);
+        getSecurityConstraints();
+        securityConstraint.add(sc);
+        return sc;        
+    }
+    
+    public String getResourceBundle()
+    {
+        return resourceBundle;
+    }
+
+    public void setResourceBundle(String value)
+    {
+        resourceBundle = value;
+    }
+    
+    public Filter getFilter(String name)
+    {
+        for (Filter f : getFilters())
+        {
+            if (f.getFilterName().equals(name))
+            {
+                return f;
+            }
+        }
+        return null;
+    }
+
+    public List<? extends Filter> getFilters()
+    {
+        if (filter == null)
+        {
+            filter = new ArrayList<FilterType>();
+        }
+        return filter;
+    }
+    
+    public Filter addFilter(String name)
+    {
+        if (getFilter(name) != null)
+        {
+            throw new IllegalArgumentException("Filter with name: "+name+" already defined");
+        }
+        FilterType f = new FilterType();
+        f.setFilterName(name);
+        filter.add(f);
+        return f;        
+    }
+    
+    public FilterMapping getFilterMapping(String name)
+    {
+        for (FilterMapping f : getFilterMappings())
+        {
+            if (f.getFilterName().equals(name))
+            {
+                return f;
+            }
+        }
+        return null;
+    }
+
+    public List<? extends FilterMapping> getFilterMappings()
+    {
+        if (filterMapping == null)
+        {
+            filterMapping = new ArrayList<FilterMappingType>();
+        }
+        return filterMapping;
+    }
+    
+    public FilterMapping addFilterMapping(String name)
+    {
+        if (getFilterMapping(name) != null)
+        {
+            throw new IllegalArgumentException("Filtermapping for filter: "+name+" already defined");
+        }
+        FilterMappingType fm = new FilterMappingType();
+        fm.setFilterName(name);
+        filterMapping.add(fm);
+        return fm;        
+    }
+    
+    public String getDefaultNamespace()
+    {
+        return defaultNamespace != null ? defaultNamespace : XMLConstants.NULL_NS_URI;
+    }
+
+    public void setDefaultNamespace(String value)
+    {
+        defaultNamespace = value;
+    }
+
+    public List<? extends EventDefinition> getEventDefinitions()
+    {
+        if (eventDefinition == null)
+        {
+            eventDefinition = new ArrayList<EventDefinitionType>();
+        }
+        return eventDefinition;
+    }
+    
+    public EventDefinition addEventDefinition(String name)
+    {
+        // TODO: check duplicates (complication: set of qname and name)
+        EventDefinitionType ed = new EventDefinitionType();
+        ed.setName(name);
+        eventDefinition.add(ed);
+        return ed;        
+    }
+    
+    public EventDefinition addEventDefinition(QName qname)
+    {
+        // TODO: check duplicates (complication: set of qname and name)
+        EventDefinitionType ed = new EventDefinitionType();
+        ed.setQName(qname);
+        eventDefinition.add(ed);
+        return ed;        
+    }
+    
+    public PublicRenderParameter getPublicRenderParameter(String identifier)
+    {
+        for (PublicRenderParameter prp : getPublicRenderParameters())
+        {
+            if (prp.getIdentifier().equals(identifier))
+            {
+                return prp;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends PublicRenderParameter> getPublicRenderParameters()
+    {
+        if (publicRenderParameter == null)
+        {
+            publicRenderParameter = new ArrayList<PublicRenderParameterType>();
+        }
+        return publicRenderParameter;
+    }
+    
+    public PublicRenderParameter addPublicRenderParameter(String name, String identifier)
+    {
+        if (getPublicRenderParameter(identifier) != null)
+        {
+            throw new IllegalArgumentException("PublicRenderParameter with identifier: "+identifier+" already defined");
+        }
+        // TODO: check duplicates on name|qname?
+        PublicRenderParameterType p = new PublicRenderParameterType();
+        p.setName(name);
+        p.setIdentifier(identifier);
+        publicRenderParameter.add(p);
+        return p;        
+    }
+    
+    public PublicRenderParameter addPublicRenderParameter(QName qname, String identifier)
+    {
+        if (getPublicRenderParameter(identifier) != null)
+        {
+            throw new IllegalArgumentException("PublicRenderParameter with identifier: "+identifier+" already defined");
+        }
+        // TODO: check duplicates on name|qname?
+        PublicRenderParameterType p = new PublicRenderParameterType();
+        p.setQName(qname);
+        p.setIdentifier(identifier);
+        publicRenderParameter.add(p);
+        return p;        
+    }
+    
+    public List<? extends Listener> getListeners()
+    {
+        if (listener == null)
+        {
+            listener = new ArrayList<ListenerType>();
+        }
+        return listener;
+    }
+    
+    public Listener addListener(String listenerClass)
+    {
+        for (Listener l : getListeners())
+        {
+            if (l.getListenerClass().equals(listenerClass))
+            {
+                throw new IllegalArgumentException("Listener of class: "+listenerClass+" already defined");
+            }
+        }
+        ListenerType l = new ListenerType();
+        l.setListenerClass(listenerClass);
+        listener.add(l);
+        return l;        
+    }
+    
+    public ContainerRuntimeOption getContainerRuntimeOption(String name)
+    {
+        for (ContainerRuntimeOption cro : getContainerRuntimeOptions())
+        {
+            if (cro.getName().equals(name))
+            {
+                return cro;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends ContainerRuntimeOption> getContainerRuntimeOptions()
+    {
+        if (containerRuntimeOption == null)
+        {
+            containerRuntimeOption = new ArrayList<ContainerRuntimeOptionType>();
+        }
+        return containerRuntimeOption;
+    }
+    
+    public ContainerRuntimeOption addContainerRuntimeOption(String name)
+    {
+        if (getContainerRuntimeOption(name) != null)
+        {
+            throw new IllegalArgumentException("Container runtime option with name: "+name+" already defined");
+        }
+        ContainerRuntimeOptionType cro = new ContainerRuntimeOptionType();
+        cro.setName(name);
+        containerRuntimeOption.add(cro);
+        return cro;        
+    }
+    
+    public String getVersion()
+    {
+        return version;
+    }
+
+    public void setVersion(String value)
+    {
+        if (JSR_168_VERSION.equals(value) || JSR_286_VERSION.equals(value))
+        {
+            version = value;
+        }
+        else
+        {
+            throw new IllegalArgumentException("Application descriptor version: "+value+" unsupported.");
+        }
+    }
+    
+    public Map<Locale, String> getLocaleEncodingMappings()
+    {
+        if (localeEncodingMappings == null)
+        {
+            localeEncodingMappings = new HashMap<Locale,String>();
+        }
+        return localeEncodingMappings;
+    }
+    
+    public void addLocaleEncodingMapping(Locale locale, String encoding)
+    {
+        getLocaleEncodingMappings().put(locale, encoding);
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletCollectionType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletCollectionType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletCollectionType.java
new file mode 100644
index 0000000..3cfd5e8
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletCollectionType.java
@@ -0,0 +1,64 @@
+/*
+ * 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.portlet20.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;
+
+/**
+ * The portlet-collectionType is used to identify a subset of portlets within a portlet application to which a security
+ * constraint applies. Used in: security-constraint <p>Java class for portlet-collectionType complex type. <p>The
+ * following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;portlet-collectionType&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;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 = "portlet-collectionType", propOrder = { "portletName" })
+public class PortletCollectionType
+{
+    @XmlElement(name = "portlet-name", required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected List<String> portletName;
+
+    public List<String> getPortletNames()
+    {
+        if (portletName == null)
+        {
+            portletName = new ArrayList<String>();
+        }
+        return portletName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletInfoType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletInfoType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletInfoType.java
new file mode 100644
index 0000000..01f42a2
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletInfoType.java
@@ -0,0 +1,92 @@
+/*
+ * 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.portlet20.impl;
+
+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.PortletInfo;
+
+/**
+ * <p>Java class for portlet-infoType complex type. <p>The following schema fragment specifies the expected content
+ * contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;portlet-infoType&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;title&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}titleType&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;short-title&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}short-titleType&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;keywords&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}keywordsType&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 = "portlet-infoType", propOrder = { "title", "shortTitle", "keywords" })
+public class PortletInfoType implements PortletInfo
+{
+    @XmlElement (name = "title")
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String title;
+    @XmlElement(name = "short-title")
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String shortTitle;
+    @XmlElement(name = "keywords")
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String keywords;
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void setTitle(String value)
+    {
+        title = value;
+    }
+
+    public String getShortTitle()
+    {
+        return shortTitle;
+    }
+
+    public void setShortTitle(String value)
+    {
+        shortTitle = value;
+    }
+
+    public String getKeywords()
+    {
+        return keywords;
+    }
+
+    public void setKeywords(String value)
+    {
+        keywords = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletPreferencesType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletPreferencesType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletPreferencesType.java
new file mode 100644
index 0000000..ee1d092
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletPreferencesType.java
@@ -0,0 +1,101 @@
+/*
+ * 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.portlet20.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 org.apache.pluto.container.om.portlet.Preference;
+import org.apache.pluto.container.om.portlet.Preferences;
+
+/**
+ * Portlet persistent preference store. Used in: portlet <p>Java class for portlet-preferencesType complex type. <p>The
+ * following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;portlet-preferencesType&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;preference&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}preferenceType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;preferences-validator&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}preferences-validatorType&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 = "portlet-preferencesType", propOrder = { "preference", "preferencesValidator" })
+public class PortletPreferencesType implements Preferences
+{
+    @XmlElement(name = "preference")
+    protected List<PreferenceType> preference;
+    @XmlElement(name = "preferences-validator")
+    protected String preferencesValidator;
+
+    public Preference getPortletPreference(String name)
+    {
+        for (Preference p : getPortletPreferences())
+        {
+            if (p.getName().equals(name))
+            {
+                return p;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends Preference> getPortletPreferences()
+    {
+        if (preference == null)
+        {
+            preference = new ArrayList<PreferenceType>();
+        }
+        return preference;
+    }
+    
+    public Preference addPreference(String name)
+    {
+        if (getPortletPreference(name) != null)
+        {
+            throw new IllegalArgumentException("Portlet preference with name: "+name+" already defined");
+        }
+        PreferenceType pref = new PreferenceType();
+        pref.setName(name);
+        preference.add(pref);
+        return pref;        
+    }
+    
+    public String getPreferencesValidator()
+    {
+        return preferencesValidator;
+    }
+
+    public void setPreferencesValidator(String value)
+    {
+        preferencesValidator = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletType.java
new file mode 100644
index 0000000..6bb2207
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PortletType.java
@@ -0,0 +1,521 @@
+/*
+ * 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.portlet20.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+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.ContainerRuntimeOption;
+import org.apache.pluto.container.om.portlet.Description;
+import org.apache.pluto.container.om.portlet.DisplayName;
+import org.apache.pluto.container.om.portlet.EventDefinitionReference;
+import org.apache.pluto.container.om.portlet.InitParam;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
+import org.apache.pluto.container.om.portlet.PortletDefinition;
+import org.apache.pluto.container.om.portlet.PortletInfo;
+import org.apache.pluto.container.om.portlet.Preferences;
+import org.apache.pluto.container.om.portlet.SecurityRoleRef;
+import org.apache.pluto.container.om.portlet.Supports;
+
+/**
+ * The portlet element contains the declarative data of a portlet. Used in: portlet-app <p>Java class for portletType
+ * complex type. <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;portletType&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-name&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-nameType&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;portlet-class&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-classType&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;element name=&quot;expiration-cache&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}expiration-cacheType&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;cache-scope&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}cache-scopeType&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;supports&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}supportsType&quot; maxOccurs=&quot;unbounded&quot;/&gt;
+ *         &lt;element name=&quot;supported-locale&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}supported-localeType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;resource-bundle&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}resource-bundleType&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;portlet-info&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-infoType&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;portlet-preferences&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-preferencesType&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;security-role-ref&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}security-role-refType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;supported-processing-event&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}event-definition-referenceType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;supported-publishing-event&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}event-definition-referenceType&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;supported-public-render-parameter&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
+ *         &lt;element name=&quot;container-runtime-option&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}container-runtime-optionType&quot; maxOccurs=&quot;unbounded&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 = "portletType", propOrder = { "description", "portletName", "displayName", "portletClass", "initParam",
+                                            "expirationCache", "cacheScope", "supports", "supportedLocale",
+                                            "resourceBundle", "portletInfo", "portletPreferences", "securityRoleRef",
+                                            "supportedProcessingEvent", "supportedPublishingEvent",
+                                            "supportedPublicRenderParameter", "containerRuntimeOption" })
+public class PortletType implements PortletDefinition
+{
+    @XmlElement(name = "description")
+    protected List<DescriptionType> description;
+    @XmlElement(name = "portlet-name", required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String portletName;
+    @XmlElement(name = "display-name")
+    protected List<DisplayNameType> displayName;
+    @XmlElement(name = "portlet-class", required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String portletClass;
+    @XmlElement(name = "init-param")
+    protected List<InitParamType> initParam;
+    @XmlElement(name = "expiration-cache")
+    protected Integer expirationCache;
+    @XmlElement(name = "cache-scope")
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String cacheScope;
+    @XmlElement(required = true)
+    protected List<SupportsType> supports;
+    @XmlElement(name = "supported-locale")
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected List<String> supportedLocale;
+    @XmlElement(name = "resource-bundle")
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String resourceBundle;
+    @XmlElement(name = "portlet-info")
+    protected PortletInfoType portletInfo;
+    @XmlElement(name = "portlet-preferences")
+    protected PortletPreferencesType portletPreferences;
+    @XmlElement(name = "security-role-ref")
+    protected List<SecurityRoleRefType> securityRoleRef;
+    @XmlElement(name = "supported-processing-event")
+    protected List<EventDefinitionReferenceType> supportedProcessingEvent;
+    @XmlElement(name = "supported-publishing-event")
+    protected List<EventDefinitionReferenceType> supportedPublishingEvent;
+    @XmlElement(name = "supported-public-render-parameter")
+    protected List<String> supportedPublicRenderParameter;
+    @XmlElement(name = "container-runtime-option")
+    protected List<ContainerRuntimeOptionType> containerRuntimeOption;
+    
+    @XmlTransient
+    private PortletApplicationDefinition application;
+    
+    public PortletType()
+    {
+    }
+    
+    public PortletApplicationDefinition getApplication()
+    {
+        return application;
+    }
+    
+    public void setApplication(PortletApplicationDefinition app)
+    {
+        this.application = app;
+    }
+
+    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 getPortletName()
+    {
+        return portletName;
+    }
+
+    public void setPortletName(String value)
+    {
+        portletName = value;
+    }
+
+    public String getPortletClass()
+    {
+        return portletClass;
+    }
+
+    public void setPortletClass(String value)
+    {
+        portletClass = value;
+    }
+
+    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;
+    }
+    
+    public int getExpirationCache()
+    {
+        return expirationCache != null ? expirationCache.intValue() : 0;
+    }
+
+    public void setExpirationCache(int value)
+    {
+        expirationCache = new Integer(value);
+    }
+
+    /**
+     * Caching scope, allowed values are "private" indicating that the content should not be shared across users and
+     * "public" indicating that the content may be shared across users. The default value if not present is "private".
+     */
+    public String getCacheScope()
+    {
+        return cacheScope != null ? cacheScope : "private";
+    }
+
+    public void setCacheScope(String cacheScope)
+    {
+        this.cacheScope = cacheScope;
+    }
+
+    public Supports getSupports(String mimeType)
+    {
+        for (Supports s : getSupports())
+        {
+            if (s.getMimeType().equals(mimeType))
+            {
+                return s;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends Supports> getSupports()
+    {
+        if (supports == null)
+        {
+            supports = new ArrayList<SupportsType>();
+        }
+        return supports;
+    }
+    
+    public Supports addSupports(String mimeType)
+    {
+        if (getSupports(mimeType) != null)
+        {
+            throw new IllegalArgumentException("Supports for mime type: "+mimeType+" already defined");
+        }
+        SupportsType s = new SupportsType();
+        s.setMimeType(mimeType);
+        supports.add(s);
+        return s;        
+    }
+    
+    public List<String> getSupportedLocales()
+    {
+        if (supportedLocale == null)
+        {
+            supportedLocale = new ArrayList<String>();
+        }
+        return supportedLocale;
+    }
+    
+    public void addSupportedLocale(String lang)
+    {
+        for (String l : getSupportedLocales())
+        {
+            if (l.equals(lang))
+            {
+                throw new IllegalArgumentException("Supported locale: "+lang+" already defined");
+            }
+        }
+        supportedLocale.add(lang);    
+    }
+
+    public String getResourceBundle()
+    {
+        return resourceBundle;
+    }
+
+    public void setResourceBundle(String value)
+    {
+        resourceBundle = value;
+    }
+
+    public PortletInfo getPortletInfo()
+    {
+        if (portletInfo == null)
+        {
+            portletInfo = new PortletInfoType();
+        }
+        return portletInfo;
+    }
+
+    public Preferences getPortletPreferences()
+    {
+        if (portletPreferences == null)
+        {
+            portletPreferences = new PortletPreferencesType();
+        }
+        return portletPreferences;
+    }
+    
+    public SecurityRoleRef getSecurityRoleRef(String roleName)
+    {
+        for (SecurityRoleRef ref : getSecurityRoleRefs())
+        {
+            if (ref.getRoleName().equals(roleName))
+            {
+                return ref;
+            }
+        }
+        return null;
+    }
+
+    public List<? extends SecurityRoleRef> getSecurityRoleRefs()
+    {
+        if (securityRoleRef == null)
+        {
+            securityRoleRef = new ArrayList<SecurityRoleRefType>();
+        }
+        return securityRoleRef;
+    }
+    
+    public SecurityRoleRef addSecurityRoleRef(String roleName)
+    {
+        if (getSecurityRoleRef(roleName) != null)
+        {
+            throw new IllegalArgumentException("Security role reference for role: "+roleName+" already defined");
+        }
+        SecurityRoleRefType srr = new SecurityRoleRefType();
+        srr.setRoleName(roleName);
+        securityRoleRef.add(srr);
+        return srr;        
+    }
+    
+    public List<? extends EventDefinitionReference> getSupportedProcessingEvents()
+    {
+        if (supportedProcessingEvent == null)
+        {
+            supportedProcessingEvent = new ArrayList<EventDefinitionReferenceType>();            
+        }
+        return supportedProcessingEvent;
+    }
+
+    public EventDefinitionReference addSupportedProcessingEvent(QName qname)
+    {
+        // TODO: check duplicates
+        getSupportedProcessingEvents();
+        EventDefinitionReferenceType edr = new EventDefinitionReferenceType();
+        edr.setQName(qname);
+        supportedProcessingEvent.add(edr);
+        return edr;
+    }
+    
+    public EventDefinitionReference addSupportedProcessingEvent(String name)
+    {
+        // TODO check duplicates
+        getSupportedProcessingEvents();
+        EventDefinitionReferenceType edr = new EventDefinitionReferenceType();
+        edr.setName(name);
+        supportedProcessingEvent.add(edr);
+        return edr;
+    }
+        
+    public List<? extends EventDefinitionReference> getSupportedPublishingEvents()
+    {
+        if (supportedPublishingEvent == null)
+        {
+            supportedPublishingEvent = new ArrayList<EventDefinitionReferenceType>();            
+        }
+        return supportedPublishingEvent;
+    }
+
+    public EventDefinitionReference addSupportedPublishingEvent(QName qname)
+    {
+        // TODO: check duplicates
+        getSupportedPublishingEvents();
+        EventDefinitionReferenceType edr = new EventDefinitionReferenceType();
+        edr.setQName(qname);
+        supportedPublishingEvent.add(edr);
+        return edr;
+    }
+    
+    public EventDefinitionReference addSupportedPublishingEvent(String name)
+    {
+        // TODO check duplicates
+        getSupportedPublishingEvents();
+        EventDefinitionReferenceType edr = new EventDefinitionReferenceType();
+        edr.setName(name);
+        supportedPublishingEvent.add(edr);
+        return edr;
+    }
+        
+    public List<String> getSupportedPublicRenderParameters()
+    {
+        if (supportedPublicRenderParameter == null)
+        {
+            supportedPublicRenderParameter = new ArrayList<String>();
+        }
+        return supportedPublicRenderParameter;
+    }
+    
+    public void addSupportedPublicRenderParameter(String identifier)
+    {
+        for (String ident : getSupportedPublicRenderParameters())
+        {
+            if (ident.equals(identifier))
+            {
+                throw new IllegalArgumentException("Support for public render parameter with identifier: "+identifier+" already defined");
+            }
+        }
+        supportedPublicRenderParameter.add(identifier);
+    }
+
+    public ContainerRuntimeOption getContainerRuntimeOption(String name)
+    {
+        for (ContainerRuntimeOption cro : getContainerRuntimeOptions())
+        {
+            if (cro.getName().equals(name))
+            {
+                return cro;
+            }
+        }
+        return null;
+    }
+    
+    public List<? extends ContainerRuntimeOption> getContainerRuntimeOptions()
+    {
+        if (containerRuntimeOption == null)
+        {
+            containerRuntimeOption = new ArrayList<ContainerRuntimeOptionType>();
+        }
+        return containerRuntimeOption;
+    }
+    
+    public ContainerRuntimeOption addContainerRuntimeOption(String name)
+    {
+        if (getContainerRuntimeOption(name) != null)
+        {
+            throw new IllegalArgumentException("Container runtime option with name: "+name+" already defined");
+        }
+        ContainerRuntimeOptionType cro = new ContainerRuntimeOptionType();
+        cro.setName(name);
+        containerRuntimeOption.add(cro);
+        return cro;        
+    }
+    
+    public void afterUnmarshal(Unmarshaller u, Object parent) {
+        application = (PortletApplicationDefinition)parent;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PreferenceType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PreferenceType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PreferenceType.java
new file mode 100644
index 0000000..3a147c1
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PreferenceType.java
@@ -0,0 +1,98 @@
+/*
+ * 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.portlet20.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.Preference;
+
+/**
+ * Persistent preference values that may be used for customization and personalization by the portlet. Used in:
+ * portlet-preferences <p>Java class for preferenceType complex type. <p>The following schema fragment specifies the
+ * expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;preferenceType&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;element name=&quot;read-only&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}read-onlyType&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 = "preferenceType", propOrder = { "name", "value", "readOnly" })
+public class PreferenceType implements Preference
+{
+    @XmlElement(required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String name;
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected List<String> value;
+    @XmlElement(name = "read-only")
+    protected Boolean readOnly;
+
+    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);
+    }
+
+    public boolean isReadOnly()
+    {
+        return readOnly != null ? readOnly.booleanValue() : false;
+    }
+
+    public void setReadOnly(boolean value)
+    {
+        readOnly = value ? Boolean.TRUE : Boolean.FALSE;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/a8bed7fb/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PublicRenderParameterType.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PublicRenderParameterType.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PublicRenderParameterType.java
new file mode 100644
index 0000000..f9d7e02
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet20/impl/PublicRenderParameterType.java
@@ -0,0 +1,156 @@
+/*
+ * 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.portlet20.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.PublicRenderParameter;
+
+/**
+ * The public-render-parameters defines a render parameter that is allowed to be public and thus be shared with other
+ * portlets. The identifier must be used for referencing this public render parameter in the portlet code. Used in:
+ * portlet-app <p>Java class for public-render-parameterType complex type. <p>The following schema fragment specifies
+ * the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name=&quot;public-render-parameterType&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;identifier&quot; type=&quot;{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string&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;/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 = "public-render-parameterType", propOrder = { "description", "identifier", "qname", "name", "alias" })
+public class PublicRenderParameterType implements PublicRenderParameter
+{
+    @XmlElement(name = "description")
+    protected List<DescriptionType> description;
+    @XmlElement(required = true)
+    protected String identifier;
+    protected QName qname;
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlSchemaType(name = "NCName")
+    protected String name;
+    protected List<QName> alias;
+
+    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 getIdentifier()
+    {
+        return identifier;
+    }
+
+    public void setIdentifier(String value)
+    {
+        identifier = value;
+    }
+
+    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 duplicates
+        getAliases().add(alias);
+    }
+}