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 at...@apache.org on 2008/10/15 02:01:11 UTC

svn commit: r704743 [4/7] - in /portals/pluto/branches/2.0-spi-refactoring: ./ pluto-container-api/src/main/java/org/apache/pluto/ pluto-container-api/src/main/java/org/apache/pluto/om/ pluto-container-api/src/main/java/org/apache/pluto/om/common/ plut...

Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/EventDefinitionType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/EventDefinitionType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/EventDefinitionType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/EventDefinitionType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,158 @@
+/*
+ * 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.descriptors.portlet20;
+
+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.XmlAttribute;
+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.om.ElementFactoryList;
+import org.apache.pluto.om.common.Description;
+import org.apache.pluto.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", type=DescriptionType.class)
+    protected List<Description> description;
+    protected QName qname;
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlSchemaType(name = "NCName")
+    protected String name;
+    protected List<QName> alias;
+    @XmlElement(name = "value-type")
+    protected String valueType;
+    @XmlAttribute
+    protected String id;
+
+    public ElementFactoryList<Description> getDescriptions()
+    {
+        if (description == null || !(description instanceof ElementFactoryList))
+        {
+            ElementFactoryList<Description> lf = 
+                new ElementFactoryList<Description>( new ElementFactoryList.Factory<Description>()
+                {
+                    public Class<? extends Description> getElementClass()
+                    {
+                        return DescriptionType.class;
+                    }
+
+                    public Description newElement()
+                    {
+                        return new DescriptionType();
+                    }
+                }); 
+            if (description != null)
+            {
+                lf.addAll(description);
+            }
+            description = lf;
+        }
+        return (ElementFactoryList<Description>)description;
+    }
+
+    public QName getQName()
+    {
+        return qname;
+    }
+
+    public void setQName(QName value)
+    {
+        qname = value;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String value)
+    {
+        name = value;
+    }
+
+    public List<QName> getAliases()
+    {
+        if (alias == null)
+        {
+            alias = new ArrayList<QName>();
+        }
+        return alias;
+    }
+
+    public String getValueType()
+    {
+        return valueType;
+    }
+
+    public void setValueType(String value)
+    {
+        valueType = value;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId(String value)
+    {
+        id = value;
+    }
+
+    public QName getQualifiedName(String defaultNamespace)
+    {
+        return qname != null ? qname : name != null ? new QName(defaultNamespace, name) : null;
+    }
+}

Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/EventDefinitionType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterMappingType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterMappingType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterMappingType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterMappingType.java Tue Oct 14 17:01:07 2008
@@ -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.descriptors.portlet20;
+
+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.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 setPortletNames(List<String> portletNames)
+    {
+        this.portletName = portletNames;
+    }
+}

Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterMappingType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,189 @@
+/*
+ * 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.descriptors.portlet20;
+
+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.om.ElementFactoryList;
+import org.apache.pluto.om.common.Description;
+import org.apache.pluto.om.common.DisplayName;
+import org.apache.pluto.om.common.InitParam;
+import org.apache.pluto.om.portlet.Filter;
+
+/**
+ * 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", type=DescriptionType.class)
+    protected List<Description> description;
+    @XmlElement(name = "display-name", type=DisplayNameType.class)
+    protected List<DisplayName> 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", type=InitParamType.class)
+    protected List<InitParam> initParam;
+
+    public ElementFactoryList<Description> getDescriptions()
+    {
+        if (description == null || !(description instanceof ElementFactoryList))
+        {
+            ElementFactoryList<Description> lf = 
+                new ElementFactoryList<Description>( new ElementFactoryList.Factory<Description>()
+                {
+                    public Class<? extends Description> getElementClass()
+                    {
+                        return DescriptionType.class;
+                    }
+
+                    public Description newElement()
+                    {
+                        return new DescriptionType();
+                    }
+                }); 
+            if (description != null)
+            {
+                lf.addAll(description);
+            }
+            description = lf;
+        }
+        return (ElementFactoryList<Description>)description;
+    }
+
+    public ElementFactoryList<DisplayName> getDisplayNames()
+    {
+        if (displayName == null || !(displayName instanceof ElementFactoryList))
+        {
+            ElementFactoryList<DisplayName> lf = 
+                new ElementFactoryList<DisplayName>( new ElementFactoryList.Factory<DisplayName>()
+                {
+                    public Class<? extends DisplayName> getElementClass()
+                    {
+                        return DisplayNameType.class;
+                    }
+
+                    public DisplayName newElement()
+                    {
+                        return new DisplayNameType();
+                    }
+                }); 
+            if (displayName != null)
+            {
+                lf.addAll(displayName);
+            }
+            displayName = lf;
+        }
+        return (ElementFactoryList<DisplayName>)displayName;
+    }
+
+    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 ElementFactoryList<InitParam> getInitParams()
+    {
+        if (initParam == null || !(initParam instanceof ElementFactoryList))
+        {
+            ElementFactoryList<InitParam> lf = 
+                new ElementFactoryList<InitParam>( new ElementFactoryList.Factory<InitParam>()
+                {
+                    public Class<? extends InitParam> getElementClass()
+                    {
+                        return InitParamType.class;
+                    }
+
+                    public InitParam newElement()
+                    {
+                        return new InitParamType();
+                    }
+                }); 
+            if (initParam != null)
+            {
+                lf.addAll(initParam);
+            }
+            initParam = lf;
+        }
+        return (ElementFactoryList<InitParam>)initParam;
+    }
+
+    public void setLifecycles(List<String> lifecycles)
+    {
+        this.lifecycle = lifecycles;
+    }
+}

Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/FilterType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/InitParamType.java (from r702850, portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/InitParamDD.java)
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/InitParamType.java?p2=portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/InitParamType.java&p1=portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/InitParamDD.java&r1=702850&r2=704743&rev=704743&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/InitParamDD.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/InitParamType.java Tue Oct 14 17:01:07 2008
@@ -6,10 +6,6 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * Licensed 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
@@ -18,167 +14,112 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pluto.descriptors.common;
+package org.apache.pluto.descriptors.portlet20;
 
 import java.util.List;
 
 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.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
+import org.apache.pluto.om.ElementFactoryList;
+import org.apache.pluto.om.common.Description;
 import org.apache.pluto.om.common.InitParam;
-import org.apache.pluto.om.portlet.Portlet;
 
 /**
- * Initialization Parameter configuration.
- *
- * @version $Id: InitParamDD.java 157038 2005-03-11 03:44:40Z ddewolf $
- * @since Feb 28, 2005
- *
- * 
- *                      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.
+ * 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="init-paramType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="description" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType" maxOccurs="unbounded" minOccurs="0"/>
- *         &lt;element name="name" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}nameType"/>
- *         &lt;element name="value" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}valueType"/>
- *       &lt;/sequence>
- *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
+ * &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", "description1",
-    "paramName", "paramName1",
-    "paramValue", "paramValue1",
-    "descriptions", "descriptions1"
-})
-public class InitParamDD implements InitParam {
-	
-	/** The description of the parameter. */
-	@XmlElement(name = "description")
-    private String description;
-	
-	/** The description of the parameter. */
-	@XmlElement(name = "description", namespace = Portlet.QNAME_JSR168)
-    private String description1;
-
-	/** The description list. */
-	@XmlElement(name = "descriptions")
-    private List<String> descriptions;
-	
-	/** The description list. */
-	@XmlElement(name = "descriptions", namespace = Portlet.QNAME_JSR168)
-    private List descriptions1;
-
-	/** The name of the parameter. */
-	@XmlElement(name = "name")
-    private String paramName;
-	
-	/** The name of the parameter. */
-	@XmlElement(name = "name", namespace = Portlet.QNAME_JSR168)
-    private String paramName1;
-
-    /** The value of the parameter. */
-	@XmlElement(name = "value")
-    private String paramValue;
-	
-	/** The value of the parameter. */
-	@XmlElement(name = "value", namespace = Portlet.QNAME_JSR168)
-    private String paramValue1;
-
-    
-
-    /**
-     * Default Constructor.
-     */
-    public InitParamDD() {
-
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.pluto.descriptors.common.InitParam#getParamName()
-	 */
-    public String getParamName() {
-    	if (paramName!= null)
-    		return paramName;
-    	return paramName1;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.pluto.descriptors.common.InitParam#setParamName(java.lang.String)
-	 */
-    public void setParamName(String paramName) {
-    	this.paramName = paramName;
-    	this.paramName1 = paramName;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.pluto.descriptors.common.InitParam#getParamValue()
-	 */
-    public String getParamValue() {
-    	if (paramValue != null)
-    		return paramValue;
-    	return paramValue1;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.pluto.descriptors.common.InitParam#setParamValue(java.lang.String)
-	 */
-    public void setParamValue(String paramValue) {
-    	this.paramValue = paramValue;
-    	this.paramValue1 = paramValue;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.pluto.descriptors.common.InitParam#getDescription()
-	 */
-    public String getDescription() {
-    	if (description != null)
-    		return description;
-    	return description1;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.pluto.descriptors.common.InitParam#setDescription(java.lang.String)
-	 */
-    public void setDescription(String description) {
-    	this.description = description;
-    	this.description1 = description;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.pluto.descriptors.common.InitParam#getDescriptions()
-	 */
-    public List getDescriptions() {
-    	if (descriptions != null)
-    		return descriptions;
-    	return descriptions1;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.pluto.descriptors.common.InitParam#setDescriptions(java.util.List)
-	 */
-    public void setDescriptions(List<String> descriptions) {
-    	this.descriptions = descriptions;
-    	this.descriptions1 = descriptions;
+@XmlType(name = "init-paramType", propOrder = { "description", "name", "value" })
+public class InitParamType implements InitParam
+{
+    @XmlElement(name = "description", type=DescriptionType.class)
+    protected List<Description> description;
+    @XmlElement(required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String name;
+    @XmlElement(required = true)
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String value;
+    @XmlAttribute
+    protected String id;
+
+    public ElementFactoryList<Description> getDescriptions()
+    {
+        if (description == null || !(description instanceof ElementFactoryList))
+        {
+            ElementFactoryList<Description> lf = 
+                new ElementFactoryList<Description>( new ElementFactoryList.Factory<Description>()
+                {
+                    public Class<? extends Description> getElementClass()
+                    {
+                        return DescriptionType.class;
+                    }
+
+                    public Description newElement()
+                    {
+                        return new DescriptionType();
+                    }
+                }); 
+            if (description != null)
+            {
+                lf.addAll(description);
+            }
+            description = lf;
+        }
+        return (ElementFactoryList<Description>)description;
+    }
+
+    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;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId(String value)
+    {
+        id = value;
     }
 }
-

Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/InitParamType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ListenerType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ListenerType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ListenerType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ListenerType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,139 @@
+/*
+ * 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.descriptors.portlet20;
+
+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.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.pluto.om.ElementFactoryList;
+import org.apache.pluto.om.common.Description;
+import org.apache.pluto.om.common.DisplayName;
+import org.apache.pluto.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", type=DescriptionType.class)
+    protected List<Description> description;
+    @XmlElement(name = "display-name", type=DisplayNameType.class)
+    protected List<DisplayName> displayName;
+    @XmlElement(name = "listener-class", required = true)
+    protected String listenerClass;
+    @XmlAttribute
+    protected String id;
+
+    public ElementFactoryList<Description> getDescriptions()
+    {
+        if (description == null || !(description instanceof ElementFactoryList))
+        {
+            ElementFactoryList<Description> lf = 
+                new ElementFactoryList<Description>( new ElementFactoryList.Factory<Description>()
+                {
+                    public Class<? extends Description> getElementClass()
+                    {
+                        return DescriptionType.class;
+                    }
+
+                    public Description newElement()
+                    {
+                        return new DescriptionType();
+                    }
+                }); 
+            if (description != null)
+            {
+                lf.addAll(description);
+            }
+            description = lf;
+        }
+        return (ElementFactoryList<Description>)description;
+    }
+
+    public ElementFactoryList<DisplayName> getDisplayNames()
+    {
+        if (displayName == null || !(displayName instanceof ElementFactoryList))
+        {
+            ElementFactoryList<DisplayName> lf = 
+                new ElementFactoryList<DisplayName>( new ElementFactoryList.Factory<DisplayName>()
+                {
+                    public Class<? extends DisplayName> getElementClass()
+                    {
+                        return DisplayNameType.class;
+                    }
+
+                    public DisplayName newElement()
+                    {
+                        return new DisplayNameType();
+                    }
+                }); 
+            if (displayName != null)
+            {
+                lf.addAll(displayName);
+            }
+            displayName = lf;
+        }
+        return (ElementFactoryList<DisplayName>)displayName;
+    }
+
+    public String getListenerClass()
+    {
+        return listenerClass;
+    }
+
+    public void setListenerClass(String value)
+    {
+        listenerClass = value;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId(String value)
+    {
+        id = value;
+    }
+}

Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ListenerType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ObjectFactory.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ObjectFactory.java?rev=704743&r1=702850&r2=704743&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ObjectFactory.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ObjectFactory.java Tue Oct 14 17:01:07 2008
@@ -1,479 +1,53 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.2-b01-fcs 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2006.12.18 at 11:28:54 AM CET 
-//
-
-
-package org.apache.pluto.descriptors.portlet;
+/*
+ * 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.descriptors.portlet20;
 
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.annotation.XmlElementDecl;
 import javax.xml.bind.annotation.XmlRegistry;
 import javax.xml.namespace.QName;
 
-import org.apache.pluto.descriptors.common.DescriptionDD;
-
-
 /**
- * This object contains factory methods for each 
- * Java content interface and Java element interface 
- * generated in the com.sun.java.xml.ns.portlet.portlet_app_2_0 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 
- * DD definitions, element declarations and model 
- * groups.  Factory methods for each of these are 
- * provided in this class.
+ * 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 _PortletDDPortletPreferences_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "portlet-preferences");
-    private final static QName _PortletDDSupportedPublishingEvent_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "supported-publishing-event");
-    private final static QName _PortletDDExpirationCache_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "expiration-cache");
-    private final static QName _PortletDDSupportedProcessingEvent_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "supported-processing-event");
-    private final static QName _PortletDDDescription_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "description");
-    private final static QName _PortletDDResourceBundle_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "resource-bundle");
-    private final static QName _PortletDDDisplayName_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "display-name");
-    private final static QName _PortletDDPortletClass_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "portlet-class");
-    private final static QName _PortletDDSupportedPublicRenderParameter_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "supported-public-render-parameter");
-    private final static QName _PortletDDPortletInfo_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "portlet-info");
-    private final static QName _PortletDDPortletName_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "portlet-name");
-    private final static QName _PortletDDSupports_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "supports");
-    private final static QName _PortletDDSupportedLocale_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "supported-locale");
-    private final static QName _PortletApp_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "portlet-app");
-    private final static QName _PortletApp1_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd", "portlet-app");
-    private final static QName _Portlet1DD_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd", "portlet");
-    private final static QName _PortletDD_QNAME = new QName("http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", "portlet");
-  
-    /**
-     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.sun.java.xml.ns.portlet.portlet_app_2_0
-     * 
-     */
-    public ObjectFactory() {
-    }
-
-    /**
-     * Create an instance of {@link PortletDD }
-     * 
-     */
-    public PortletDD createPortletDD() {
-        return new PortletDD();
-    }
-
-//    /**
-//     * Create an instance of {@link PortletCollectionDD }
-//     * 
-//     */
-//    public PortletCollectionDD createPortletCollectionDD() {
-//        return new PortletCollectionDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link PreferenceDD }
-//     * 
-//     */
-//    public PreferenceDD createPreferenceDD() {
-//        return new PreferenceDD();
-//    }
-
-    /**
-     * Create an instance of {@link PortletInfoDD }
-     * 
-     */
-    public PortletInfoDD createPortletInfoDD() {
-        return new PortletInfoDD();
-    }
-
-    /**
-     * Create an instance of {@link EventDefinitionDD }
-     * 
-     */
-    public EventDefinitionDD createEventDefinitionDD() {
-        return new EventDefinitionDD();
-    }
-
-//    /**
-//     * Create an instance of {@link SecurityConstraintDD }
-//     * 
-//     */
-//    public SecurityConstraintDD createSecurityConstraintDD() {
-//        return new SecurityConstraintDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link ShortTitleDD }
-//     * 
-//     */
-//    public ShortTitleDD createShortTitleDD() {
-//        return new ShortTitleDD();
-//    }
-
-//    /**
-//     * Create an instance of {@link DescriptionDD }
-//     * 
-//     */
-//    public DescriptionDD createDescriptionDD() {
-//        return new DescriptionDD();
-//    }
-
-    /**
-     * Create an instance of {@link ExpirationCacheDD }
-     * 
-     */
-    public ExpirationCacheDD createExpirationCacheDD() {
-        return new ExpirationCacheDD();
-    }
-//
-//    /**
-//     * Create an instance of {@link DisplayNameDD }
-//     * 
-//     */
-//    public DisplayNameDD createDisplayNameDD() {
-//        return new DisplayNameDD();
-//    }
-
-//    /**
-//     * Create an instance of {@link SupportedLocaleDD }
-//     * 
-//     */
-//    public SupportedLocaleDD createSupportedLocaleDD() {
-//        return new SupportedLocaleDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link UserDataConstraintDD }
-//     * 
-//     */
-//    public UserDataConstraintDD createUserDataConstraintDD() {
-//        return new UserDataConstraintDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link TitleDD }
-//     * 
-//     */
-//    public TitleDD createTitleDD() {
-//        return new TitleDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link KeywordsDD }
-//     * 
-//     */
-//    public KeywordsDD createKeywordsDD() {
-//        return new KeywordsDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link FilterDD }
-//     * 
-//     */
-//    public FilterDD createFilterDD() {
-//        return new FilterDD();
-//    }
-
-    /**
-     * Create an instance of {@link PortletAppDD }
-     * 
-     */
-    public PortletAppDD createPortletAppDD() {
-        return new PortletAppDD();
-    }
-
-//    /**
-//     * Create an instance of {@link RoleLinkDD }
-//     * 
-//     */
-//    public RoleLinkDD createRoleLinkDD() {
-//        return new RoleLinkDD();
-//    }
-
-    /**
-     * Create an instance of {@link SupportsDD }
-     * 
-     */
-    public SupportsDD createSupportsDD() {
-        return new SupportsDD();
+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()
+    {
     }
 
-    /**
-     * Create an instance of {@link PortletPreferencesDD }
-     * 
-     */
-    public PortletPreferencesDD createPortletPreferencesDD() {
-        return new PortletPreferencesDD();
+    public PortletAppType createPortletApp()
+    {
+        return new PortletAppType();
     }
 
-//    /**
-//     * Create an instance of {@link CacheScopeDD }
-//     * 
-//     */
-//    public CacheScopeDD createCacheScopeDD() {
-//        return new CacheScopeDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link PortletModeDD }
-//     * 
-//     */
-//    public PortletModeDD createPortletModeDD() {
-//        return new PortletModeDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link CustomWindowStateDD }
-//     * 
-//     */
-//    public CustomWindowStateDD createCustomWindowStateDD() {
-//        return new CustomWindowStateDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link PortletNameDD }
-//     * 
-//     */
-//    public PortletNameDD createPortletNameDD() {
-//        return new PortletNameDD();
-//    }
-
-//    /**
-//     * Create an instance of {@link WindowStateDD }
-//     * 
-//     */
-//    public WindowStateDD createWindowStateDD() {
-//        return new WindowStateDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link ExpirationTimeDD }
-//     * 
-//     */
-//    public ExpirationTimeDD createExpirationTimeDD() {
-//        return new ExpirationTimeDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link ValueDD }
-//     * 
-//     */
-//    public ValueDD createValueDD() {
-//        return new ValueDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link CustomPortletModeDD }
-//     * 
-//     */
-//    public CustomPortletModeDD createCustomPortletModeDD() {
-//        return new CustomPortletModeDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link ResourceBundleDD }
-//     * 
-//     */
-//    public ResourceBundleDD createResourceBundleDD() {
-//        return new ResourceBundleDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link UserAttributeDD }
-//     * 
-//     */
-//    public UserAttributeDD createUserAttributeDD() {
-//        return new UserAttributeDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link MimeDDDD }
-//     * 
-//     */
-//    public MimeDDDD createMimeDDDD() {
-//        return new MimeDDDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link PublicRenderParameterDD }
-//     * 
-//     */
-//    public PublicRenderParameterDD createPublicRenderParameterDD() {
-//        return new PublicRenderParameterDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link FilterMappingDD }
-//     * 
-//     */
-//    public FilterMappingDD createFilterMappingDD() {
-//        return new FilterMappingDD();
-//    }
-//
-//    /**
-//     * Create an instance of {@link NameDD }
-//     * 
-//     */
-//    public NameDD createNameDD() {
-//        return new NameDD();
-//    }
-    
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link PortletDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd", name = "portlet", scope = PortletAppDD.class)
-    public JAXBElement<PortletDD> createPortlet1DD(PortletDD value) {
-        return new JAXBElement<PortletDD>(_Portlet1DD_QNAME, PortletDD.class, PortletAppDD.class, value);
-    }
-    
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link PortletDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "portlet", scope = PortletAppDD.class)
-    public JAXBElement<PortletDD> createPortletDD(PortletDD value) {
-        return new JAXBElement<PortletDD>(_PortletDD_QNAME, PortletDD.class, PortletAppDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link PortletPreferencesDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "portlet-preferences", scope = PortletDD.class)
-    public JAXBElement<PortletPreferencesDD> createPortletDDPortletPreferences(PortletPreferencesDD value) {
-        return new JAXBElement<PortletPreferencesDD>(_PortletDDPortletPreferences_QNAME, PortletPreferencesDD.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link EventDefinitionReferenceDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "supported-publishing-event", scope = PortletDD.class)
-    public JAXBElement<EventDefinitionReferenceDD> createPortletDDSupportedPublishingEvent(EventDefinitionReferenceDD value) {
-        return new JAXBElement<EventDefinitionReferenceDD>(_PortletDDSupportedPublishingEvent_QNAME, EventDefinitionReferenceDD.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ExpirationCacheDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "expiration-cache", scope = PortletDD.class)
-    public JAXBElement<ExpirationCacheDD> createPortletDDExpirationCache(ExpirationCacheDD value) {
-        return new JAXBElement<ExpirationCacheDD>(_PortletDDExpirationCache_QNAME, ExpirationCacheDD.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link EventDefinitionReferenceDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "supported-processing-event", scope = PortletDD.class)
-    public JAXBElement<EventDefinitionReferenceDD> createPortletDDSupportedProcessingEvent(EventDefinitionReferenceDD value) {
-        return new JAXBElement<EventDefinitionReferenceDD>(_PortletDDSupportedProcessingEvent_QNAME, EventDefinitionReferenceDD.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link DescriptionDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "description", scope = PortletDD.class)
-    public JAXBElement<String> createPortletDDDescription(String value) {
-        return new JAXBElement<String>(_PortletDDDescription_QNAME, String.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ResourceBundleDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "resource-bundle", scope = PortletDD.class)
-    public JAXBElement<String> createPortletDDResourceBundle(String value) {
-        return new JAXBElement<String>(_PortletDDResourceBundle_QNAME, String.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "display-name", scope = PortletDD.class)
-    public JAXBElement<String> createPortletDDDisplayName(String value) {
-        return new JAXBElement<String>(_PortletDDDisplayName_QNAME, String.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "portlet-class", scope = PortletDD.class)
-    public JAXBElement<String> createPortletDDPortletClass(String value) {
-        return new JAXBElement<String>(_PortletDDPortletClass_QNAME, String.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "supported-public-render-parameter", scope = PortletDD.class)
-    public JAXBElement<String> createPortletDDSupportedPublicRenderParameter(String value) {
-        return new JAXBElement<String>(_PortletDDSupportedPublicRenderParameter_QNAME, String.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link PortletInfoDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "portlet-info", scope = PortletDD.class)
-    public JAXBElement<PortletInfoDD> createPortletDDPortletInfo(PortletInfoDD value) {
-        return new JAXBElement<PortletInfoDD>(_PortletDDPortletInfo_QNAME, PortletInfoDD.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "portlet-name", scope = PortletDD.class)
-    public JAXBElement<String> createPortletDDPortletName(String value) {
-        return new JAXBElement<String>(_PortletDDPortletName_QNAME, String.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link SupportsDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "supports", scope = PortletDD.class)
-    public JAXBElement<SupportsDD> createPortletDDSupports(SupportsDD value) {
-        return new JAXBElement<SupportsDD>(_PortletDDSupports_QNAME, SupportsDD.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link SupportedLocaleDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "supported-locale", scope = PortletDD.class)
-    public JAXBElement<String> createPortletDDSupportedLocale(String value) {
-        return new JAXBElement<String>(_PortletDDSupportedLocale_QNAME, String.class, PortletDD.class, value);
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link PortletAppDD }{@code >}}
-     * 
-     */
     @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", name = "portlet-app")
-    public JAXBElement<PortletAppDD> createPortletApp(PortletAppDD value) {
-        return new JAXBElement<PortletAppDD>(_PortletApp_QNAME, PortletAppDD.class, null, value);
-    }
-    
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link PortletAppDD }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd", name = "portlet-app")
-    public JAXBElement<PortletAppDD> createPortletApp1(PortletAppDD value) {
-        return new JAXBElement<PortletAppDD>(_PortletApp1_QNAME, PortletAppDD.class, null, value);
+    public JAXBElement<PortletAppType> createPortletApp(PortletAppType value)
+    {
+        return new JAXBElement<PortletAppType>(_PortletApp_QNAME, PortletAppType.class, null, value);
     }
-
-    
 }

Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletAppType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletAppType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletAppType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletAppType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,458 @@
+/*
+ * 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.descriptors.portlet20;
+
+import java.util.List;
+
+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 org.apache.pluto.om.ElementFactoryList;
+import org.apache.pluto.om.portlet.ContainerRuntimeOption;
+import org.apache.pluto.om.portlet.CustomPortletMode;
+import org.apache.pluto.om.portlet.CustomWindowState;
+import org.apache.pluto.om.portlet.EventDefinition;
+import org.apache.pluto.om.portlet.Filter;
+import org.apache.pluto.om.portlet.FilterMapping;
+import org.apache.pluto.om.portlet.Listener;
+import org.apache.pluto.om.portlet.Portlet;
+import org.apache.pluto.om.portlet.PortletApp;
+import org.apache.pluto.om.portlet.PublicRenderParameter;
+import org.apache.pluto.om.portlet.SecurityConstraint;
+import org.apache.pluto.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 PortletApp
+{
+    @XmlElement(name = "portlet", type=PortletType.class)
+    protected List<Portlet> portlet;
+    @XmlElement(name = "custom-portlet-mode", type=CustomPortletModeType.class)
+    protected List<CustomPortletMode> customPortletMode;
+    @XmlElement(name = "custom-window-state", type=CustomWindowStateType.class)
+    protected List<CustomWindowState> customWindowState;
+    @XmlElement(name = "user-attribute", type=UserAttributeType.class)
+    protected List<UserAttribute> userAttribute;
+    @XmlElement(name = "security-constraint", type=SecurityConstraintType.class)
+    protected List<SecurityConstraint> securityConstraint;
+    @XmlElement(name = "resource-bundle")
+    @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+    protected String resourceBundle;
+    @XmlElement(name = "filter", type=FilterType.class)
+    protected List<Filter> filter;
+    @XmlElement(name = "filter-mapping", type=FilterMappingType.class)
+    protected List<FilterMapping> filterMapping;
+    @XmlElement(name = "default-namespace")
+    @XmlSchemaType(name = "anyURI")
+    protected String defaultNamespace;
+    @XmlElement(name = "event-definition", type=EventDefinitionType.class)
+    protected List<EventDefinition> eventDefinition;
+    @XmlElement(name = "public-render-parameter", type=PublicRenderParameterType.class)
+    protected List<PublicRenderParameter> publicRenderParameter;
+    @XmlElement(name = "listener", type=ListenerType.class)
+    protected List<Listener> listener;
+    @XmlElement(name = "container-runtime-option", type=ContainerRuntimeOptionType.class)
+    protected List<ContainerRuntimeOption> containerRuntimeOption;
+    @XmlAttribute(required = true)
+    protected String version;
+    @XmlAttribute
+    protected String id;
+    
+    @XmlTransient
+    protected String name;
+    
+    public String getName()
+    {
+        return name;
+    }
+    
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public ElementFactoryList<Portlet> getPortlets()
+    {
+        if (portlet == null || !(portlet instanceof ElementFactoryList))
+        {
+            ElementFactoryList<Portlet> lf = 
+                new ElementFactoryList<Portlet>( new ElementFactoryList.Factory<Portlet>()
+                {
+                    public Class<? extends Portlet> getElementClass()
+                    {
+                        return PortletType.class;
+                    }
+
+                    public Portlet newElement()
+                    {
+                        return new PortletType();
+                    }
+                }); 
+            if (portlet != null)
+            {
+                lf.addAll(portlet);
+            }
+            portlet = lf;
+        }
+        return (ElementFactoryList<Portlet>)portlet;
+    }
+
+    public ElementFactoryList<CustomPortletMode> getCustomPortletModes()
+    {
+        if (customPortletMode == null || !(customPortletMode instanceof ElementFactoryList))
+        {
+            ElementFactoryList<CustomPortletMode> lf = 
+                new ElementFactoryList<CustomPortletMode>( new ElementFactoryList.Factory<CustomPortletMode>()
+                {
+                    public Class<? extends CustomPortletMode> getElementClass()
+                    {
+                        return CustomPortletModeType.class;
+                    }
+
+                    public CustomPortletMode newElement()
+                    {
+                        return new CustomPortletModeType();
+                    }
+                }); 
+            if (customPortletMode != null)
+            {
+                lf.addAll(customPortletMode);
+            }
+            customPortletMode = lf;
+        }
+        return (ElementFactoryList<CustomPortletMode>)customPortletMode;
+    }
+
+    public ElementFactoryList<CustomWindowState> getCustomWindowStates()
+    {
+        if (customWindowState == null || !(customWindowState instanceof ElementFactoryList))
+        {
+            ElementFactoryList<CustomWindowState> lf = 
+                new ElementFactoryList<CustomWindowState>( new ElementFactoryList.Factory<CustomWindowState>()
+                {
+                    public Class<? extends CustomWindowState> getElementClass()
+                    {
+                        return CustomWindowStateType.class;
+                    }
+
+                    public CustomWindowState newElement()
+                    {
+                        return new CustomWindowStateType();
+                    }
+                }); 
+            if (customWindowState != null)
+            {
+                lf.addAll(customWindowState);
+            }
+            customWindowState = lf;
+        }
+        return (ElementFactoryList<CustomWindowState>)customWindowState;
+    }
+
+    public ElementFactoryList<UserAttribute> getUserAttributes()
+    {
+        if (userAttribute == null || !(userAttribute instanceof ElementFactoryList))
+        {
+            ElementFactoryList<UserAttribute> lf = 
+                new ElementFactoryList<UserAttribute>( new ElementFactoryList.Factory<UserAttribute>()
+                {
+                    public Class<? extends UserAttribute> getElementClass()
+                    {
+                        return UserAttributeType.class;
+                    }
+
+                    public UserAttribute newElement()
+                    {
+                        return new UserAttributeType();
+                    }
+                }); 
+            if (userAttribute != null)
+            {
+                lf.addAll(userAttribute);
+            }
+            userAttribute = lf;
+        }
+        return (ElementFactoryList<UserAttribute>)userAttribute;
+    }
+
+    public ElementFactoryList<SecurityConstraint> getSecurityConstraints()
+    {
+        if (securityConstraint == null || !(securityConstraint instanceof ElementFactoryList))
+        {
+            ElementFactoryList<SecurityConstraint> lf = 
+                new ElementFactoryList<SecurityConstraint>( new ElementFactoryList.Factory<SecurityConstraint>()
+                {
+                    public Class<? extends SecurityConstraint> getElementClass()
+                    {
+                        return SecurityConstraintType.class;
+                    }
+
+                    public SecurityConstraint newElement()
+                    {
+                        return new SecurityConstraintType();
+                    }
+                }); 
+            if (securityConstraint != null)
+            {
+                lf.addAll(securityConstraint);
+            }
+            securityConstraint = lf;
+        }
+        return (ElementFactoryList<SecurityConstraint>)securityConstraint;
+    }
+
+    public String getResourceBundle()
+    {
+        return resourceBundle;
+    }
+
+    public void setResourceBundle(String value)
+    {
+        resourceBundle = value;
+    }
+
+    public ElementFactoryList<Filter> getFilters()
+    {
+        if (filter == null || !(filter instanceof ElementFactoryList))
+        {
+            ElementFactoryList<Filter> lf = 
+                new ElementFactoryList<Filter>( new ElementFactoryList.Factory<Filter>()
+                {
+                    public Class<? extends Filter> getElementClass()
+                    {
+                        return FilterType.class;
+                    }
+
+                    public Filter newElement()
+                    {
+                        return new FilterType();
+                    }
+                }); 
+            if (filter != null)
+            {
+                lf.addAll(filter);
+            }
+            filter = lf;
+        }
+        return (ElementFactoryList<Filter>)filter;
+    }
+
+    public ElementFactoryList<FilterMapping> getFilterMappings()
+    {
+        if (filterMapping == null || !(filterMapping instanceof ElementFactoryList))
+        {
+            ElementFactoryList<FilterMapping> lf = 
+                new ElementFactoryList<FilterMapping>( new ElementFactoryList.Factory<FilterMapping>()
+                {
+                    public Class<? extends FilterMapping> getElementClass()
+                    {
+                        return FilterMappingType.class;
+                    }
+
+                    public FilterMapping newElement()
+                    {
+                        return new FilterMappingType();
+                    }
+                }); 
+            if (filterMapping != null)
+            {
+                lf.addAll(filterMapping);
+            }
+            filterMapping = lf;
+        }
+        return (ElementFactoryList<FilterMapping>)filterMapping;
+    }
+
+    public String getDefaultNamespace()
+    {
+        return defaultNamespace != null ? defaultNamespace : XMLConstants.NULL_NS_URI;
+    }
+
+    public void setDefaultNamespace(String value)
+    {
+        defaultNamespace = value;
+    }
+
+    public ElementFactoryList<EventDefinition> getEventDefinitions()
+    {
+        if (eventDefinition == null || !(eventDefinition instanceof ElementFactoryList))
+        {
+            ElementFactoryList<EventDefinition> lf = 
+                new ElementFactoryList<EventDefinition>( new ElementFactoryList.Factory<EventDefinition>()
+                {
+                    public Class<? extends EventDefinition> getElementClass()
+                    {
+                        return EventDefinitionType.class;
+                    }
+
+                    public EventDefinition newElement()
+                    {
+                        return new EventDefinitionType();
+                    }
+                }); 
+            if (eventDefinition != null)
+            {
+                lf.addAll(eventDefinition);
+            }
+            eventDefinition = lf;
+        }
+        return (ElementFactoryList<EventDefinition>)eventDefinition;
+    }
+
+    public ElementFactoryList<PublicRenderParameter> getPublicRenderParameters()
+    {
+        if (publicRenderParameter == null || !(publicRenderParameter instanceof ElementFactoryList))
+        {
+            ElementFactoryList<PublicRenderParameter> lf = 
+                new ElementFactoryList<PublicRenderParameter>( new ElementFactoryList.Factory<PublicRenderParameter>()
+                {
+                    public Class<? extends PublicRenderParameter> getElementClass()
+                    {
+                        return PublicRenderParameterType.class;
+                    }
+
+                    public PublicRenderParameter newElement()
+                    {
+                        return new PublicRenderParameterType();
+                    }
+                }); 
+            if (publicRenderParameter != null)
+            {
+                lf.addAll(publicRenderParameter);
+            }
+            publicRenderParameter = lf;
+        }
+        return (ElementFactoryList<PublicRenderParameter>)publicRenderParameter;
+    }
+
+    public ElementFactoryList<Listener> getListeners()
+    {
+        if (listener == null || !(listener instanceof ElementFactoryList))
+        {
+            ElementFactoryList<Listener> lf = 
+                new ElementFactoryList<Listener>( new ElementFactoryList.Factory<Listener>()
+                {
+                    public Class<? extends Listener> getElementClass()
+                    {
+                        return ListenerType.class;
+                    }
+
+                    public Listener newElement()
+                    {
+                        return new ListenerType();
+                    }
+                }); 
+            if (listener != null)
+            {
+                lf.addAll(listener);
+            }
+            listener = lf;
+        }
+        return (ElementFactoryList<Listener>)listener;
+    }
+
+    public ElementFactoryList<ContainerRuntimeOption> getContainerRuntimeOptions()
+    {
+        if (containerRuntimeOption == null || !(containerRuntimeOption instanceof ElementFactoryList))
+        {
+            ElementFactoryList<ContainerRuntimeOption> lf = 
+                new ElementFactoryList<ContainerRuntimeOption>( new ElementFactoryList.Factory<ContainerRuntimeOption>()
+                {
+                    public Class<? extends ContainerRuntimeOption> getElementClass()
+                    {
+                        return ContainerRuntimeOptionType.class;
+                    }
+
+                    public ContainerRuntimeOption newElement()
+                    {
+                        return new ContainerRuntimeOptionType();
+                    }
+                }); 
+            if (containerRuntimeOption != null)
+            {
+                lf.addAll(containerRuntimeOption);
+            }
+            containerRuntimeOption = lf;
+        }
+        return (ElementFactoryList<ContainerRuntimeOption>)containerRuntimeOption;
+    }
+
+    public String getVersion()
+    {
+        return version;
+    }
+
+    public void setVersion(String value)
+    {
+        version = value;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId(String value)
+    {
+        id = value;
+    }
+}

Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletAppType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletCollectionType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletCollectionType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletCollectionType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletCollectionType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,71 @@
+/*
+ * 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.descriptors.portlet20;
+
+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.om.portlet.PortletCollection;
+
+/**
+ * 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 implements PortletCollection
+{
+    @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;
+    }
+
+    public void setPortletNames(List<String> portletName)
+    {
+        this.portletName = portletName;
+    }
+}

Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletCollectionType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletInfoType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletInfoType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletInfoType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletInfoType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,105 @@
+/*
+ * 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.descriptors.portlet20;
+
+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.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.apache.pluto.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;
+    @XmlAttribute
+    protected String id;
+
+    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;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId(String value)
+    {
+        id = value;
+    }
+}

Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/PortletInfoType.java
------------------------------------------------------------------------------
    svn:eol-style = native