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 [3/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/portlet10/PortletType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,390 @@
+/*
+ * 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.portlet10;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.Unmarshaller;
+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.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.common.Description;
+import org.apache.pluto.om.common.DisplayName;
+import org.apache.pluto.om.common.InitParam;
+import org.apache.pluto.om.common.SecurityRoleRef;
+import org.apache.pluto.om.portlet.ContainerRuntimeOption;
+import org.apache.pluto.om.portlet.EventDefinitionReference;
+import org.apache.pluto.om.portlet.Portlet;
+import org.apache.pluto.om.portlet.PortletApp;
+import org.apache.pluto.om.portlet.PortletInfo;
+import org.apache.pluto.om.portlet.PortletPreferences;
+import org.apache.pluto.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>
+ * <complexType name="portletType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}descriptionType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="portlet-name" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-nameType"/>
+ * <element name="display-name" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}display-nameType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="portlet-class" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-classType"/>
+ * <element name="init-param" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}init-paramType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="expiration-cache" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}expiration-cacheType" minOccurs="0"/>
+ * <element name="supports" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}supportsType" maxOccurs="unbounded"/>
+ * <element name="supported-locale" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}supported-localeType" maxOccurs="unbounded" minOccurs="0"/>
+ * <choice>
+ * <sequence>
+ * <element name="resource-bundle" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}resource-bundleType"/>
+ * <element name="portlet-info" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-infoType" minOccurs="0"/>
+ * </sequence>
+ * <element name="portlet-info" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-infoType"/>
+ * </choice>
+ * <element name="portlet-preferences" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-preferencesType" minOccurs="0"/>
+ * <element name="security-role-ref" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}security-role-refType" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "portletType", propOrder = { "description", "portletName", "displayName", "portletClass", "initParam",
+ "expirationCache", "supports", "supportedLocale", "resourceBundle",
+ "portletInfo", "portletPreferences", "securityRoleRef" })
+public class PortletType implements Portlet
+{
+ @XmlElement(name = "description", type = DescriptionType.class)
+ protected List<Description> description;
+ @XmlElement(name = "portlet-name", required = true)
+ @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
+ protected String portletName;
+ @XmlElement(name = "display-name", type = DisplayNameType.class)
+ protected List<DisplayName> displayName;
+ @XmlElement(name = "portlet-class", required = true)
+ @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
+ protected String portletClass;
+ @XmlElement(name = "init-param", type = InitParamType.class)
+ protected List<InitParam> initParam;
+ @XmlElement(name = "expiration-cache")
+ protected Integer expirationCache;
+ @XmlElement(required = true, type = SupportsType.class)
+ protected List<Supports> 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", type = SecurityRoleRefType.class)
+ protected List<SecurityRoleRef> securityRoleRef;
+ @XmlAttribute
+ protected String id;
+ @XmlTransient
+ private PortletApp application;
+
+ public PortletType()
+ {
+ }
+
+ public PortletType(PortletApp application)
+ {
+ this.application = application;
+ }
+
+ public PortletApp getApplication()
+ {
+ return application;
+ }
+
+ 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 getPortletName()
+ {
+ return portletName;
+ }
+
+ public void setPortletName(String value)
+ {
+ portletName = value;
+ }
+
+ 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 getPortletClass()
+ {
+ return portletClass;
+ }
+
+ public void setPortletClass(String value)
+ {
+ portletClass = value;
+ }
+
+ 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 int getExpirationCache()
+ {
+ return expirationCache != null ? expirationCache.intValue() : 0;
+ }
+
+ public void setExpirationCache(int value)
+ {
+ expirationCache = new Integer(value);
+ }
+
+ public String getCacheScope()
+ {
+ return null;
+ }
+
+ public void setCacheScope(String cacheScope)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public ElementFactoryList<Supports> getSupports()
+ {
+ if (supports == null || !(supports instanceof ElementFactoryList))
+ {
+ ElementFactoryList<Supports> lf = new ElementFactoryList<Supports>(new ElementFactoryList.Factory<Supports>()
+ {
+ public Class<? extends Supports> getElementClass()
+ {
+ return SupportsType.class;
+ }
+
+ public Supports newElement()
+ {
+ return new SupportsType();
+ }
+ });
+ if (supports != null)
+ {
+ lf.addAll(supports);
+ }
+ supports = lf;
+ }
+ return (ElementFactoryList<Supports>) supports;
+ }
+
+ public List<String> getSupportedLocales()
+ {
+ if (supportedLocale == null)
+ {
+ supportedLocale = new ArrayList<String>();
+ }
+ return supportedLocale;
+ }
+
+ public String getResourceBundle()
+ {
+ return resourceBundle;
+ }
+
+ public void setResourceBundle(String value)
+ {
+ resourceBundle = value;
+ }
+
+ public PortletInfo getPortletInfo()
+ {
+ return getPortletInfo(false);
+ }
+
+ public PortletInfo getPortletInfo(boolean create)
+ {
+ if (create && portletInfo == null)
+ {
+ portletInfo = new PortletInfoType();
+ }
+ return portletInfo;
+ }
+
+ public PortletPreferences getPortletPreferences()
+ {
+ return getPortletPreferences(false);
+ }
+
+ public PortletPreferences getPortletPreferences(boolean create)
+ {
+ if (create && portletPreferences == null)
+ {
+ portletPreferences = new PortletPreferencesType();
+ }
+ return portletPreferences;
+ }
+
+ public ElementFactoryList<SecurityRoleRef> getSecurityRoleRefs()
+ {
+ if (securityRoleRef == null || !(securityRoleRef instanceof ElementFactoryList))
+ {
+ ElementFactoryList<SecurityRoleRef> lf = new ElementFactoryList<SecurityRoleRef>(
+ new ElementFactoryList.Factory<SecurityRoleRef>()
+ {
+ public Class<? extends SecurityRoleRef> getElementClass()
+ {
+ return SecurityRoleRefType.class;
+ }
+
+ public SecurityRoleRef newElement()
+ {
+ return new SecurityRoleRefType();
+ }
+ });
+ if (securityRoleRef != null)
+ {
+ lf.addAll(securityRoleRef);
+ }
+ securityRoleRef = lf;
+ }
+ return (ElementFactoryList<SecurityRoleRef>) securityRoleRef;
+ }
+
+ public ElementFactoryList<EventDefinitionReference> getSupportedProcessingEvents()
+ {
+ return null;
+ }
+
+ public ElementFactoryList<EventDefinitionReference> getSupportedPublishingEvents()
+ {
+ return null;
+ }
+
+ public List<String> getSupportedPublicRenderParameters()
+ {
+ return null;
+ }
+
+ public ElementFactoryList<ContainerRuntimeOption> getContainerRuntimeOptions()
+ {
+ return null;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String value)
+ {
+ id = value;
+ }
+
+ public void setSupportedLocales(List<String> supportedLocales)
+ {
+ this.supportedLocale = supportedLocales;
+ }
+
+ public void setSupportedPublicRenderParameters(List<String> supportedPublicRenderParameters)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void afterUnmarshal(Unmarshaller u, Object parent)
+ {
+ application = (PortletApp) parent;
+ }
+}
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,111 @@
+/*
+ * 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.portlet10;
+
+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 javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.apache.pluto.om.portlet.PortletPreference;
+
+/**
+ * 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>
+ * <complexType name="preferenceType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="name" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}nameType"/>
+ * <element name="value" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}valueType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="read-only" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}read-onlyType" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "preferenceType", propOrder = { "name", "value", "readOnly" })
+public class PreferenceType implements PortletPreference
+{
+ @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;
+ @XmlAttribute
+ protected String id;
+
+ 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 boolean isReadOnly()
+ {
+ return readOnly != null ? readOnly.booleanValue() : false;
+ }
+
+ public void setReadOnly(boolean value)
+ {
+ readOnly = value ? Boolean.TRUE : Boolean.FALSE;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String value)
+ {
+ id = value;
+ }
+
+ public void setValues(List<String> value)
+ {
+ this.value = value;
+ }
+}
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java Tue Oct 14 17:01:07 2008
@@ -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.descriptors.portlet10;
+
+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.DisplayName;
+import org.apache.pluto.om.common.UserDataConstraint;
+import org.apache.pluto.om.portlet.PortletCollection;
+import org.apache.pluto.om.portlet.SecurityConstraint;
+
+/**
+ * The security-constraintType is used to associate intended security constraints with one or more portlets. Used in:
+ * portlet-app <p>Java class for security-constraintType complex type. <p>The following schema fragment specifies the
+ * expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="security-constraintType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="display-name" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}display-nameType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="portlet-collection" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-collectionType"/>
+ * <element name="user-data-constraint" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}user-data-constraintType"/>
+ * </sequence>
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "security-constraintType", propOrder = { "displayName", "portletCollection", "userDataConstraint" })
+public class SecurityConstraintType implements SecurityConstraint
+{
+ @XmlElement(name = "display-name", type=DisplayNameType.class)
+ protected List<DisplayName> displayName;
+ @XmlElement(name = "portlet-collection", required = true)
+ protected PortletCollectionType portletCollection;
+ @XmlElement(name = "user-data-constraint", required = true)
+ protected UserDataConstraintType userDataConstraint;
+ @XmlAttribute
+ protected String id;
+
+ 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 PortletCollection getPortletCollection()
+ {
+ if (portletCollection == null)
+ {
+ portletCollection = new PortletCollectionType();
+ }
+ return portletCollection;
+ }
+
+ public UserDataConstraint getUserDataConstraint()
+ {
+ if (userDataConstraint == null)
+ {
+ userDataConstraint = new UserDataConstraintType();
+ }
+ return userDataConstraint;
+ }
+
+ 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/portlet10/SecurityConstraintType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,129 @@
+/*
+ * 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.portlet10;
+
+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.SecurityRoleRef;
+
+/**
+ * The security-role-ref element contains the declaration of a security role reference in the code of the web
+ * application. The declaration consists of an optional description, the security role name used in the code, and an
+ * optional link to a security role. If the security role is not specified, the Deployer must choose an appropriate
+ * security role. The value of the role name element must be the String used as the parameter to the
+ * EJBContext.isCallerInRole(String roleName) method or the HttpServletRequest.isUserInRole(String role) method. Used
+ * in: portlet <p>Java class for security-role-refType complex type. <p>The following schema fragment specifies the
+ * expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="security-role-refType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}descriptionType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="role-name" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}role-nameType"/>
+ * <element name="role-link" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}role-linkType" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+*/
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "security-role-refType", propOrder = { "description", "roleName", "roleLink" })
+public class SecurityRoleRefType implements SecurityRoleRef
+{
+ @XmlElement(name = "description", type=DescriptionType.class)
+ protected List<Description> description;
+ @XmlElement(name = "role-name", required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ protected String roleName;
+ @XmlElement(name = "role-link")
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String roleLink;
+ @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 getRoleName()
+ {
+ return roleName;
+ }
+
+ public void setRoleName(String value)
+ {
+ roleName = value;
+ }
+
+ public String getRoleLink()
+ {
+ return roleLink;
+ }
+
+ public void setRoleLink(String value)
+ {
+ roleLink = 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/portlet10/SecurityRoleRefType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,109 @@
+/*
+ * 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.portlet10;
+
+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 javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.apache.pluto.om.portlet.Supports;
+
+/**
+ * Supports indicates the portlet modes a portlet supports for a specific content type. All portlets must support the
+ * view mode. Used in: portlet <p>Java class for supportsType complex type. <p>The following schema fragment specifies
+ * the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="supportsType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="mime-type" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}mime-typeType"/>
+ * <element name="portlet-mode" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-modeType" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "supportsType", propOrder = { "mimeType", "portletMode" })
+public class SupportsType implements Supports
+{
+ @XmlElement(name = "mime-type", required = true)
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String mimeType;
+ @XmlElement(name = "portlet-mode")
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected List<String> portletMode;
+ @XmlAttribute
+ protected String id;
+
+ public String getMimeType()
+ {
+ return mimeType;
+ }
+
+ public void setMimeType(String value)
+ {
+ mimeType = value;
+ }
+
+ public List<String> getPortletModes()
+ {
+ if (portletMode == null)
+ {
+ portletMode = new ArrayList<String>();
+ }
+ return portletMode;
+ }
+
+ public List<String> getWindowState()
+ {
+ return null;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String value)
+ {
+ id = value;
+ }
+
+ public void setPortletModes(List<String> portletModes)
+ {
+ this.portletMode = portletModes;
+ }
+
+ public void setWindowStates(List<String> windowStates)
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,112 @@
+/*
+ * 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.portlet10;
+
+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.portlet.UserAttribute;
+
+/**
+ * User attribute defines a user specific attribute that the portlet application needs. The portlet within this
+ * application can access this attribute via the request parameter USER_INFO map. Used in: portlet-app <p>Java class
+ * for user-attributeType complex type. <p>The following schema fragment specifies the expected content contained
+ * within this class.
+ *
+ * <pre>
+ * <complexType name="user-attributeType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}descriptionType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="name" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}nameType"/>
+ * </sequence>
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "user-attributeType", propOrder = { "description", "name" })
+public class UserAttributeType implements UserAttribute
+{
+ @XmlElement(name = "description", type=DescriptionType.class)
+ protected List<Description> description;
+ @XmlElement(required = true)
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String name;
+ @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 getName()
+ {
+ return name;
+ }
+
+ public void setName(String value)
+ {
+ name = 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/portlet10/UserAttributeType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,111 @@
+/*
+ * 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.portlet10;
+
+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.UserDataConstraint;
+
+/**
+ * The user-data-constraintType is used to indicate how data communicated between the client and portlet should be
+ * protected. Used in: security-constraint <p>Java class for user-data-constraintType complex type. <p>The following
+ * schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="user-data-constraintType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}descriptionType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="transport-guarantee" type="{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}transport-guaranteeType"/>
+ * </sequence>
+ * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "user-data-constraintType", propOrder = { "description", "transportGuarantee" })
+public class UserDataConstraintType implements UserDataConstraint
+{
+ @XmlElement(name = "description", type=DescriptionType.class)
+ protected List<Description> description;
+ @XmlElement(name = "transport-guarantee", required = true)
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String transportGuarantee;
+ @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 getTransportGuarantee()
+ {
+ return transportGuarantee;
+ }
+
+ public void setTransportGuarantee(String value)
+ {
+ transportGuarantee = 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/portlet10/UserDataConstraintType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/package-info.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/package-info.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/package-info.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/package-info.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ *
+ * @version $Id$
+ */
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.pluto.descriptors.portlet10;
+
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/package-info.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet10/package-info.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ContainerRuntimeOptionType.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/ContainerRuntimeOptionType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ContainerRuntimeOptionType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ContainerRuntimeOptionType.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.ContainerRuntimeOption;
+
+/**
+ * The container-runtime-option element contains settings for the portlet container that the portlet expects to be
+ * honored at runtime. These settings may re-define default portlet container behavior, like the javax.portlet.escapeXml
+ * setting that disables XML encoding of URLs produced by the portlet tag library as default. Names with the
+ * javax.portlet prefix are reserved for the Java Portlet Specification. Used in: portlet-app, portlet <p>Java class
+ * for container-runtime-optionType complex type. <p>The following schema fragment specifies the expected content
+ * contained within this class.
+ *
+ * <pre>
+ * <complexType name="container-runtime-optionType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="name" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}nameType"/>
+ * <element name="value" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}valueType" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "container-runtime-optionType", propOrder = { "name", "value" })
+public class ContainerRuntimeOptionType implements ContainerRuntimeOption
+{
+ @XmlElement(required = true)
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String name;
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected List<String> value;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String value)
+ {
+ name = value;
+ }
+
+ public List<String> getValues()
+ {
+ if (value == null)
+ {
+ value = new ArrayList<String>();
+ }
+ return value;
+ }
+
+ public void setValues(List<String> values)
+ {
+ this.value = values;
+ }
+}
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/ContainerRuntimeOptionType.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/CustomPortletModeType.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/CustomPortletModeType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/CustomPortletModeType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/CustomPortletModeType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,125 @@
+/*
+ * 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.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.portlet.CustomPortletMode;
+
+/**
+ * A custom portlet mode that one or more portlets in this portlet application supports. If the portal does not need to
+ * provide some management functionality for this portlet mode, the portal-managed element needs to be set to "false",
+ * otherwise to "true". Default is "true". Used in: portlet-app <p>Java class for custom-portlet-modeType complex type.
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="custom-portlet-modeType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="portlet-mode" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-modeType"/>
+ * <element name="portal-managed" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portal-managedType" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="id" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "custom-portlet-modeType", propOrder = { "description", "portletMode", "portalManaged" })
+public class CustomPortletModeType implements CustomPortletMode
+{
+ @XmlElement(name = "description", type=DescriptionType.class)
+ protected List<Description> description;
+ @XmlElement(name = "portlet-mode", required = true)
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String portletMode;
+ @XmlElement(name = "portal-managed")
+ protected Boolean portalManaged;
+ @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 getPortletMode()
+ {
+ return portletMode;
+ }
+
+ public void setPortletMode(String value)
+ {
+ portletMode = value;
+ }
+
+ public boolean isPortalManaged()
+ {
+ return portalManaged != null ? portalManaged.booleanValue() : true;
+ }
+
+ public void setPortalManaged(boolean value)
+ {
+ portalManaged = value ? Boolean.TRUE : Boolean.FALSE;
+ }
+
+ 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/CustomPortletModeType.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/CustomWindowStateType.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/CustomWindowStateType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/CustomWindowStateType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/CustomWindowStateType.java Tue Oct 14 17:01:07 2008
@@ -0,0 +1,111 @@
+/*
+ * 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.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.portlet.CustomWindowState;
+
+/**
+ * A custom window state that one or more portlets in this portlet application supports. Used in: portlet-app <p>Java
+ * class for custom-window-stateType complex type. <p>The following schema fragment specifies the expected content
+ * contained within this class.
+ *
+ * <pre>
+ * <complexType name="custom-window-stateType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}descriptionType" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="window-state" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}window-stateType"/>
+ * </sequence>
+ * <attribute name="id" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "custom-window-stateType", propOrder = { "description", "windowState" })
+public class CustomWindowStateType implements CustomWindowState
+{
+ @XmlElement(name = "description", type=DescriptionType.class)
+ protected List<Description> description;
+ @XmlElement(name = "window-state", required = true)
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String windowState;
+ @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 getWindowState()
+ {
+ return windowState;
+ }
+
+ public void setWindowState(String value)
+ {
+ windowState = 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/CustomWindowStateType.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DescriptionType.java (from r702850, portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/DescriptionDD.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/DescriptionType.java?p2=portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DescriptionType.java&p1=portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/DescriptionDD.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/DescriptionDD.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DescriptionType.java Tue Oct 14 17:01:07 2008
@@ -14,43 +14,69 @@
* 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.Locale;
-import org.apache.pluto.om.common.Description;
-
-public class DescriptionDD implements Description {
-
- private String description;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
- private String lang = Locale.ENGLISH.toString();
+import org.apache.pluto.om.common.Description;
- /* (non-Javadoc)
- * @see org.apache.pluto.descriptors.common.Description#getDescription()
- */
- public String getDescription() {
- return description;
+/**
+ * The description element is used to provide text describing the parent element. The description element should include
+ * any information that the portlet application war file producer wants to provide to the consumer of the portlet
+ * application war file (i.e., to the Deployer). Typically, the tools used by the portlet application war file consumer
+ * will display the description when processing the parent element that contains the description. It has an optional
+ * attribute xml:lang to indicate which language is used in the description according to RFC 1766
+ * (http://www.ietf.org/rfc/rfc1766.txt). The default value of this attribute is English(âenâ). Used in: init-param,
+ * portlet, portlet-app, security-role <p>Java class for descriptionType complex type. <p>The following schema
+ * fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="descriptionType">
+ * <simpleContent>
+ * <extension base="<http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd>string">
+ * <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>
+ * </extension>
+ * </simpleContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "descriptionType", propOrder = { "value" })
+public class DescriptionType implements Description
+{
+ @XmlValue
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String value;
+ @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
+ protected String lang = null;
+
+ public String getDescription()
+ {
+ return value;
}
- /* (non-Javadoc)
- * @see org.apache.pluto.descriptors.common.Description#setDescription(java.lang.String)
- */
- public void setDescription(String description) {
- this.description = description;
+ public void setDescription(String value)
+ {
+ this.value = value;
}
- /* (non-Javadoc)
- * @see org.apache.pluto.descriptors.common.Description#getLang()
- */
- public String getLang() {
- return lang;
+ public String getLang()
+ {
+ return lang == null ? Locale.ENGLISH.toString() : lang;
}
- /* (non-Javadoc)
- * @see org.apache.pluto.descriptors.common.Description#setLang(java.lang.String)
- */
- public void setLang(String lang) {
- this.lang = lang;
+ public void setLang(String value)
+ {
+ lang = value;
}
}
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DescriptionType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DescriptionType.java
------------------------------------------------------------------------------
svn:keywords = Id Author Date Rev
Copied: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DisplayNameType.java (from r702850, portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/DisplayNameDD.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/DisplayNameType.java?p2=portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DisplayNameType.java&p1=portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/DisplayNameDD.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/DisplayNameDD.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DisplayNameType.java Tue Oct 14 17:01:07 2008
@@ -14,46 +14,70 @@
* 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.Locale;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.apache.pluto.om.common.DisplayName;
/**
- *
- * @since 1.1.0
+ * The display-name type contains a short name that is intended to be displayed by tools. It is used by display-name
+ * elements. The display name need not be unique. Example: ...
+ *
+ * <pre>
+ * <?xml version="1.0" encoding="UTF-8"?><display-name xmlns="http://www.w3.org/2001/XMLSchema" xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">Employee Self Service</display-name>
+ * </pre>
+ *
+ * It has an optional attribute xml:lang to indicate which language is used in the description according to RFC 1766
+ * (http://www.ietf.org/rfc/rfc1766.txt). The default value of this attribute is English(âenâ). <p>Java class for
+ * display-nameType complex type. <p>The following schema fragment specifies the expected content contained within this
+ * class.
+ *
+ * <pre>
+ * <complexType name="display-nameType">
+ * <simpleContent>
+ * <extension base="<http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd>string">
+ * <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>
+ * </extension>
+ * </simpleContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
*/
-public class DisplayNameDD implements DisplayName {
-
- private String displayName;
- private String lang = Locale.ENGLISH.toString();
-
- /* (non-Javadoc)
- * @see org.apache.pluto.descriptors.common.DisplayName#getDisplayName()
- */
- public String getDisplayName() {
- return displayName;
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "display-nameType", propOrder = { "value" })
+public class DisplayNameType implements DisplayName
+{
+ @XmlValue
+ @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
+ protected String value;
+ @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
+ protected String lang;
+
+ public String getDisplayName()
+ {
+ return value;
}
- /* (non-Javadoc)
- * @see org.apache.pluto.descriptors.common.DisplayName#setDisplayName(java.lang.String)
- */
- public void setDisplayName(String displayName) {
- this.displayName = displayName;
+ public void setDisplayName(String value)
+ {
+ this.value = value;
}
- /* (non-Javadoc)
- * @see org.apache.pluto.descriptors.common.DisplayName#getLang()
- */
- public String getLang() {
+ public String getLang()
+ {
return lang;
}
- /* (non-Javadoc)
- * @see org.apache.pluto.descriptors.common.DisplayName#setLang(java.lang.String)
- */
- public void setLang(String lang) {
- this.lang = lang;
+ public void setLang(String value)
+ {
+ lang = value;
}
}
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DisplayNameType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/DisplayNameType.java
------------------------------------------------------------------------------
svn:keywords = Id Author Date Rev
Added: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/EventDefinitionReferenceType.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/EventDefinitionReferenceType.java?rev=704743&view=auto
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/EventDefinitionReferenceType.java (added)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet20/EventDefinitionReferenceType.java Tue Oct 14 17:01:07 2008
@@ -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.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.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.portlet.EventDefinitionReference;
+
+/**
+ * The event-definition-referenceType is used to reference events declared with the event-definition element at
+ * application level. Used in: portlet <p>Java class for event-definition-referenceType complex type. <p>The following
+ * schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="event-definition-referenceType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <choice>
+ * <element name="qname" type="{http://www.w3.org/2001/XMLSchema}QName"/>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}NCName"/>
+ * </choice>
+ * <attribute name="id" type="{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ * @version $Id$
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "event-definition-referenceType", propOrder = { "qname", "name" })
+public class EventDefinitionReferenceType implements EventDefinitionReference
+{
+ protected QName qname;
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ @XmlSchemaType(name = "NCName")
+ protected String name;
+ @XmlAttribute
+ protected String id;
+
+ 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 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/EventDefinitionReferenceType.java
------------------------------------------------------------------------------
svn:eol-style = native