Author: mwringe
Date: 2009-03-02 14:52:00 -0500 (Mon, 02 Mar 2009)
New Revision: 12924
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/AjaxMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/HeaderContentMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletAppMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/LinkMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/MetaMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletIconMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletInfoMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ScriptMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ServiceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SessionConfigMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/TransactionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/JBossPortletListAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/CommonPortalObject.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeploymentMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/DisplayNameMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/EmptyMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/InstanceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PolicyPermissionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstanceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstancesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferenceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferencesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/SecurityConstraintMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication10MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication20MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java
Removed:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/SecurityConstrainMetaData.java
Modified:
modules/metadata/trunk/
modules/metadata/trunk/build/pom.xml
modules/metadata/trunk/metadata/pom.xml
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/AliasBindingMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ContextMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/EventWiringMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ModeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PageMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ParameterBindingMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowCoordinationMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowMetaData.java
Log:
Update metadata classes to include portlet.xml metadata.
Fix bugs with metadata classes defining information incorrectly.
Property changes on: modules/metadata/trunk
___________________________________________________________________
Name: svn:ignore
+ target-eclipse
Modified: modules/metadata/trunk/build/pom.xml
===================================================================
--- modules/metadata/trunk/build/pom.xml 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/build/pom.xml 2009-03-02 19:52:00 UTC (rev 12924)
@@ -14,12 +14,8 @@
<
url>http://labs.jboss.com/jbossportal</url>
<properties>
- <version.jboss.portal.common>1.2.0</version.jboss.portal.common>
-
<version.jboss.portal.portlet>2.1.0-SNAPSHOT</version.jboss.portal.portlet>
- <version.jboss.portal.server>2.7.0.GA</version.jboss.portal.server>
<version.jboss-metadata>1.0.0.CR1</version.jboss-metadata>
<version.jboss.jbossxb>2.0.0.CR15</version.jboss.jbossxb>
- <version.saxon>6.5.3</version.saxon>
<version.jaxb>2.1</version.jaxb>
</properties>
@@ -58,21 +54,6 @@
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
- <version>${version.jboss.portal.common}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-portal</artifactId>
- <version>${version.jboss.portal.common}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-portlet</artifactId>
- <version>${version.jboss.portal.portlet}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata</artifactId>
<version>${version.jboss-metadata}</version>
@@ -83,20 +64,10 @@
<version>${version.jboss.jbossxb}</version>
</dependency>
<dependency>
- <groupId>saxon</groupId>
- <artifactId>saxon</artifactId>
- <version>${version.saxon}</version>
- </dependency>
- <dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${version.jaxb}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>core</artifactId>
- <version>${version.jboss.portal.server}</version>
- </dependency>
</dependencies>
</dependencyManagement>
Modified: modules/metadata/trunk/metadata/pom.xml
===================================================================
--- modules/metadata/trunk/metadata/pom.xml 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/pom.xml 2009-03-02 19:52:00 UTC (rev 12924)
@@ -13,21 +13,6 @@
<dependencies>
- <dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
-<!-- <scope>provided</scope> -->
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-portal</artifactId>
-<!-- <scope>provided</scope> -->
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-portlet</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata</artifactId>
@@ -38,20 +23,11 @@
<artifactId>jbossxb</artifactId>
<scope>provided</scope>
</dependency>
-<!-- <dependency>
- <groupId>saxon</groupId>
- <artifactId>saxon</artifactId>
- <scope>provided</scope>
- </dependency> -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>core</artifactId>
- </dependency>
</dependencies>
<build>
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/AjaxMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/AjaxMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/AjaxMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class AjaxMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected Boolean partialRefresh;
+
+ @XmlElement(name = "partial-refresh")
+ public void setPartialRefresh (Boolean partialRefresh)
+ {
+ this.partialRefresh = partialRefresh;
+ }
+
+ public Boolean isPartialRefresh ()
+ {
+ return partialRefresh;
+ }
+
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/HeaderContentMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/HeaderContentMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/HeaderContentMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class HeaderContentMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected List<LinkMetaData> links;
+ protected List<ScriptMetaData> scripts;
+ protected List<MetaMetaData> metas;
+
+ @XmlElement (name = "link")
+ public void setLink (List<LinkMetaData> links)
+ {
+ this.links = links;
+ }
+
+ @XmlElement (name="script")
+ public void setScript (List<ScriptMetaData> scripts)
+ {
+ this.scripts = scripts;
+ }
+
+ @XmlElement (name="meta")
+ public void setMeta (List<MetaMetaData> metas)
+ {
+ this.metas = metas;
+ }
+
+ public List<LinkMetaData> getLinks()
+ {
+ return links;
+ }
+
+ public List<ScriptMetaData> getScripts()
+ {
+ return scripts;
+ }
+
+ public List<MetaMetaData> getMetas()
+ {
+ return metas;
+ }
+
+
+}
+
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletAppMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletAppMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletAppMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+import org.jboss.portal.metadata.jboss.portlet.adapter.JBossPortletListAdapter;
+import org.jboss.portal.metadata.portlet.adapter.PortletListAdapter;
+
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+@XmlRootElement(name = "portlet-app", namespace = "")
+public class JBossPortletAppMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String appId;
+ protected boolean remotable;
+ protected Map<String, JBossPortletMetaData> portlets;
+ protected List<ServiceMetaData> services;
+
+
+ @XmlElement(name ="app-id")
+ public void setAppId(String appId)
+ {
+ this.appId = appId;
+ }
+
+ @XmlElement(name = "remotable")
+ public void setRemotable(String remotable)
+ {
+ this.remotable = Boolean.valueOf(remotable);
+ }
+
+ @XmlElement(name = "portlet")
+ public void setPortlets(Map<String, JBossPortletMetaData> portlets)
+ {
+ this.portlets = portlets;
+ }
+
+ @XmlElement(name = "service")
+ public void setService(List<ServiceMetaData> services)
+ {
+ this.services = services;
+ }
+
+ public String getAppId()
+ {
+ return appId;
+ }
+
+ public boolean isRemotable()
+ {
+ return remotable;
+ }
+
+ @XmlElement(name="portlet")
+ @XmlJavaTypeAdapter(JBossPortletListAdapter.class)
+ public Map<String, JBossPortletMetaData> getPortlets()
+ {
+ return portlets;
+ }
+
+ public List<ServiceMetaData> getServices()
+ {
+ return services;
+ }
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,133 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class JBossPortletMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String portletName;
+ protected Boolean remotable;
+ protected AjaxMetaData ajax;
+ protected SessionConfigMetaData sessionConfig;
+ protected TransactionMetaData transaction;
+ protected HeaderContentMetaData headerContent;
+ protected PortletInfoMetaData portletInfo;
+
+ @XmlElement (name = "portlet-name")
+ public void setPortletName(String portletName)
+ {
+ this.portletName = portletName;
+ }
+
+ @XmlElement (name = "remotable")
+ public void setRemotable (String remotable)
+ {
+ this.remotable = Boolean.valueOf(remotable);
+ }
+
+ @XmlElement (name = "ajax")
+ public void setAjax (AjaxMetaData ajax)
+ {
+ this.ajax = ajax;
+ }
+
+ @XmlElement (name = "transaction")
+ public void setTransaction (TransactionMetaData transaction)
+ {
+ this.transaction = transaction;
+ }
+
+ @XmlElement (name = "header-content")
+ public void setHeaderContent(HeaderContentMetaData headerContent)
+ {
+ this.headerContent = headerContent;
+ }
+
+ @XmlElement (name = "portlet-info")
+ public void setPortletInfo (PortletInfoMetaData portletInfo)
+ {
+ this.portletInfo = portletInfo;
+ }
+
+ public TransactionMetaData getTransaction()
+ {
+ return transaction;
+ }
+
+ public String getPortletName()
+ {
+ return portletName;
+ }
+
+ public Boolean isRemotable()
+ {
+ return remotable;
+ }
+
+ public SessionConfigMetaData getSessionConfig()
+ {
+ return sessionConfig;
+ }
+
+ public AjaxMetaData getAjax()
+ {
+ return ajax;
+ }
+
+ public HeaderContentMetaData getHeaderContent()
+ {
+ return headerContent;
+ }
+
+ public PortletInfoMetaData getPortletInfo()
+ {
+ return portletInfo;
+ }
+
+ public void merge(JBossPortletMetaData portlet)
+ {
+ if (remotable == null)
+ {
+ remotable = portlet.isRemotable();
+ }
+ if (transaction == null && portlet.getTransaction().getTransAttribute() !=
null)
+ {
+ transaction = new TransactionMetaData();
+ transaction.setTransAttribute(portlet.getTransaction().getTransAttribute());
+ }
+ if (sessionConfig == null && portlet.getSessionConfig() != null)
+ {
+ sessionConfig = new SessionConfigMetaData();
+ sessionConfig.setDistributed(portlet.getSessionConfig().isDistributed());
+ }
+ }
+
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/LinkMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/LinkMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/LinkMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class LinkMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String href;
+ protected String rel;
+ protected String type;
+ protected String media;
+ protected String title;
+
+ public String getHref()
+ {
+ return href;
+ }
+
+ @XmlAttribute (name = "href")
+ public void setHref(String href)
+ {
+ this.href = href;
+ }
+
+ public String getRel()
+ {
+ return rel;
+ }
+
+ @XmlAttribute (name = "rel")
+ public void setRel(String rel)
+ {
+ this.rel = rel;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ @XmlAttribute (name = "type")
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getMedia()
+ {
+ return media;
+ }
+
+ @XmlAttribute (name = "media")
+ public void setMedia(String media)
+ {
+ this.media = media;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/MetaMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/MetaMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/MetaMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class MetaMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String name;
+ protected String content;
+
+ @XmlAttribute (name = "name")
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlAttribute (name = "content")
+ public void setContent (String content)
+ {
+ this.content = content;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getContent()
+ {
+ return content;
+ }
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletIconMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletIconMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletIconMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletIconMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ //location for the small icon
+ protected String smallIcon;
+ //location for the large icon
+ protected String largeIcon;
+
+ @XmlElement (name = "small-icon")
+ public void setSmallIcon(String smallIcon)
+ {
+ this.smallIcon = smallIcon;
+ }
+
+ @XmlElement (name = "large-icon")
+ public void setLargeIcon (String largeIcon)
+ {
+ this.largeIcon = largeIcon;
+ }
+
+ public String getSmallIcon()
+ {
+ return smallIcon;
+ }
+
+ public String getLargeIcon()
+ {
+ return largeIcon;
+ }
+
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletInfoMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletInfoMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletInfoMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletInfoMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected PortletIconMetaData icon;
+
+ @XmlElement (name = "icon")
+ public void setPortletIcon (PortletIconMetaData icon)
+ {
+ this.icon = icon;
+ }
+
+ public PortletIconMetaData getPortletIcon()
+ {
+ return icon;
+ }
+
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ScriptMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ScriptMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ScriptMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class ScriptMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String src;
+ protected String type;
+ protected String language;
+ protected String script;
+
+ @XmlAttribute (name = "src")
+ public void setSrc(String src)
+ {
+ this.src = src;
+ }
+
+ @XmlAttribute (name = "type")
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ @XmlAttribute (name ="language")
+ public void setLanguage(String language)
+ {
+ this.language = language;
+ }
+
+ @XmlValue
+ public void setScript (String script)
+ {
+ this.script = script;
+ }
+
+ public String getSrc()
+ {
+ return src;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public String getLanguage()
+ {
+ return language;
+ }
+
+ public String getScript()
+ {
+ return script;
+ }
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ServiceMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ServiceMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ServiceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,72 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class ServiceMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String serviceName;
+ protected String serviceClass;
+ protected String serviceRef;
+
+ @XmlElement (name = "service-name")
+ public void setServiceName(String serviceName)
+ {
+ this.serviceName = serviceName;
+ }
+
+ @XmlElement (name = "service-class")
+ public void setServiceClass(String serviceClass)
+ {
+ this.serviceClass = serviceClass;
+ }
+
+ @XmlElement (name = "service-ref")
+ public void setServiceRef(String serviceRef)
+ {
+ this.serviceRef = serviceRef;
+ }
+
+ public String getServiceName()
+ {
+ return serviceName;
+ }
+
+ public String getServiceClass()
+ {
+ return serviceClass;
+ }
+
+ public String getServiceRef()
+ {
+ return serviceRef;
+ }
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SessionConfigMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SessionConfigMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SessionConfigMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class SessionConfigMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected Boolean distributed;
+
+ @XmlElement (name = "distributed")
+ public void setDistributed(Boolean distributed)
+ {
+ this.distributed = distributed;
+ }
+
+ public Boolean isDistributed ()
+ {
+ return distributed;
+ }
+
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/TransactionMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/TransactionMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/TransactionMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class TransactionMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected static final String REQUIRED = "Required";
+ protected static final String MANDATORY = "Manadatory";
+ protected static final String NEVER = "Never";
+ protected static final String SUPPORTS = "Supports";
+ protected static final String NOTSUPPORTED = "NotSupported";
+ protected static final String REQUIRESNEW = "RequiresNew";
+
+ protected String[] validTransAttributes = new String[]{REQUIRED, MANDATORY, NEVER,
SUPPORTS, NOTSUPPORTED, REQUIRESNEW};
+
+ protected String transAttribute;
+
+ @XmlElement (name = "trans-attribute")
+ public void setTransAttribute (String transAttribute)
+ {
+ boolean found = false;
+ for (String value : validTransAttributes)
+ {
+ if (transAttribute.equalsIgnoreCase(value))
+ {
+ this.transAttribute = value;
+ found = true;
+ }
+ }
+ if (found == false)
+ {
+ throw new IllegalArgumentException("The trans-attribute " +
transAttribute
+ + " is not a valid trans-attribute value. Valid trans-attributes are
"
+ + validTransAttributes.toString());
+ }
+ }
+
+ public String getTransAttribute()
+ {
+ return transAttribute;
+ }
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/JBossPortletListAdapter.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/JBossPortletListAdapter.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/JBossPortletListAdapter.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class JBossPortletListAdapter
+ extends XmlAdapter<List<JBossPortletMetaData>, Map<String,
JBossPortletMetaData>>
+{
+
+ @Override
+ public List<JBossPortletMetaData> marshal(Map<String,
JBossPortletMetaData> portletMap) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, JBossPortletMetaData>
unmarshal(List<JBossPortletMetaData> portletList) throws Exception
+ {
+ Map<String, JBossPortletMetaData> portletMap = new LinkedHashMap<String,
JBossPortletMetaData>();
+ for (JBossPortletMetaData portlet : portletList)
+ {
+ if (!portletMap.containsKey(portlet.getPortletName()))
+ {
+ portletMap.put(portlet.getPortletName(), portlet);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Portlet name '" +
portlet.getPortletName() + "' already defined.");
+ }
+ }
+ return portletMap;
+ }
+
+}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/AliasBindingMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/AliasBindingMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/AliasBindingMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
@@ -35,7 +37,7 @@
protected String id;
- protected String qName;
+ protected List<String> qNames;
@XmlElement(name = "id")
public void setId(String id)
@@ -44,9 +46,9 @@
}
@XmlElement(name = "qname")
- public void setQName(String qName)
+ public void setQNames(List<String> qNames)
{
- this.qName = qName;
+ this.qNames = qNames;
}
public String getId()
@@ -54,8 +56,8 @@
return id;
}
- public String getQName()
+ public List<String> getQNames()
{
- return qName;
+ return qNames;
}
}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/CommonPortalObject.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/CommonPortalObject.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/CommonPortalObject.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,125 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portal.object;
+
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.SecurityConstraintMetaData;
+
+/**
+ * Common elements between context, portal, window and page deployment metadata.
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public abstract class CommonPortalObject extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String name;
+ protected String listener;
+ protected PropertiesMetaData properties;
+ protected String resourceBundle;
+ protected List<Locale> supportedLocales;
+ protected SecurityConstraintMetaData securityConstraint;
+ protected List<DisplayNameMetaData> displayNames;
+
+ abstract public void setName(String name);
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @XmlElement(name = "display-name")
+ public void SetDisplayNames(List<DisplayNameMetaData> displayNames)
+ {
+ this.displayNames = displayNames;
+ }
+
+ public List<DisplayNameMetaData> getDisplayNames()
+ {
+ return displayNames;
+ }
+
+ @XmlElement(name = "listener")
+ public void setListener(String listener)
+ {
+ this.listener = listener;
+ }
+
+ public String getListener()
+ {
+ return listener;
+ }
+
+ @XmlElement(name = "properties")
+ public void setProperties(PropertiesMetaData properties)
+ {
+ this.properties = properties;
+ }
+
+ public PropertiesMetaData getProperties()
+ {
+ return properties;
+ }
+
+ @XmlElement(name = "resource-bundle")
+ public void setResourceBundle(String resourceBundle)
+ {
+ this.resourceBundle = resourceBundle;
+ }
+
+ public String getResourceBundle()
+ {
+ return resourceBundle;
+ }
+
+ @XmlElement(name = "supported-locale")
+ public void setSupportedLocales(List<Locale> supportedLocales)
+ {
+ this.supportedLocales = supportedLocales;
+ }
+
+ public List<Locale> getSupportedLocales()
+ {
+ return supportedLocales;
+ }
+
+ //abstract public void setChildren(List<?> children);
+ abstract public List<CommonPortalObject> getChildren();
+
+ @XmlElement(name = "security-constraint")
+ public void setSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+ {
+ this.securityConstraint = securityConstraint;
+ }
+
+ public SecurityConstraintMetaData getSecurityConstraint()
+ {
+ return securityConstraint;
+ }
+}
+
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ContextMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ContextMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ContextMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,123 +22,49 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-import org.jboss.portal.metadata.portlet.DisplayNameMetaData;
-import org.jboss.portal.metadata.portlet.SecurityConstrainMetaData;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.SecurityConstraintMetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class ContextMetaData extends IdMetaDataImplWithDescriptionGroup
+public class ContextMetaData extends CommonPortalObject
{
-
- protected String contextName;
-
- protected PropertiesMetaData properties;
-
- protected String listener;
-
- protected SecurityConstrainMetaData securityConstraint;
-
- protected List<DisplayNameMetaData> displayName;
-
- protected String resourceBundle;
-
- protected List<String> supportedLocales;
-
protected List<PortalMetaData> portals;
@XmlElement(name = "context-name")
- public void setContextName(String contextName)
+ public void setName(String name)
{
- this.contextName = contextName;
+ this.name = name;
}
- @XmlElement(name = "properties")
- public void setProperties(PropertiesMetaData properties)
- {
- this.properties = properties;
- }
-
- @XmlElement(name = "listener")
- public void setListener(String listener)
- {
- this.listener = listener;
- }
-
- @XmlElement(name = "security-constraint")
- public void setSecurityConstraint(SecurityConstrainMetaData securityConstraint)
- {
- this.securityConstraint = securityConstraint;
- }
-
@XmlElement(name = "portal")
public void setPortal(List<PortalMetaData> portals)
{
this.portals = portals;
}
- @XmlElement(name = "display-name")
- public void setDisplayName(List<DisplayNameMetaData> displayName)
+ public List<PortalMetaData> getPortals()
{
- this.displayName = displayName;
+ return portals;
}
- @XmlElement(name = "resource-bundle")
- public void setResourceBundle(String resourceBundle)
+ @Override
+ public List<CommonPortalObject> getChildren()
{
- this.resourceBundle = resourceBundle;
+ List<CommonPortalObject> children = new
ArrayList<CommonPortalObject>();
+ if (portals != null)
+ {
+ children.addAll(portals);
+ }
+ return children;
}
- @XmlElement(name = "supported-locale")
- public void setSupportedLocales(List<String> supportedLocales)
- {
- this.supportedLocales = supportedLocales;
- }
-
- public String getContextName()
- {
- return contextName;
- }
-
- public PropertiesMetaData getProperties()
- {
- return properties;
- }
-
- public String getListener()
- {
- return listener;
- }
-
- public SecurityConstrainMetaData getSecurityConstraint()
- {
- return securityConstraint;
- }
-
- public List<DisplayNameMetaData> getDisplayName()
- {
- return displayName;
- }
-
- public String getResourceBundle()
- {
- return resourceBundle;
- }
-
- public List<String> getSupportedLocales()
- {
- return supportedLocales;
- }
-
- public List<PortalMetaData> getPortals()
- {
- return portals;
- }
-
}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/EventWiringMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/EventWiringMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/EventWiringMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
@@ -35,9 +37,9 @@
protected String name;
- protected WindowCoordinationMetaData sources;
+ protected List<WindowCoordinationMetaData> sources;
- protected WindowCoordinationMetaData destinations;
+ protected List<WindowCoordinationMetaData> destinations;
@XmlElement(name = "name")
public void setName(String name)
@@ -46,13 +48,13 @@
}
@XmlElement(name = "sources")
- public void setSources(WindowCoordinationMetaData sources)
+ public void setSources(List<WindowCoordinationMetaData> sources)
{
this.sources = sources;
}
@XmlElement(name = "destinations")
- public void setDestination(WindowCoordinationMetaData destination)
+ public void setDestination(List<WindowCoordinationMetaData> destination)
{
this.destinations = destination;
}
@@ -62,12 +64,12 @@
return name;
}
- public WindowCoordinationMetaData getSources()
+ public List<WindowCoordinationMetaData> getSources()
{
return sources;
}
- public WindowCoordinationMetaData getDestinations()
+ public List<WindowCoordinationMetaData> getDestinations()
{
return destinations;
}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ModeMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ModeMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ModeMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -35,17 +35,17 @@
public class ModeMetaData extends IdMetaDataImplWithDescriptionGroup
{
- protected List<String> mode;
+ protected List<String> modes;
@XmlElement(name = "mode")
public void setMode(List<String> mode)
{
- this.mode = mode;
+ this.modes = modes;
}
- public List<String> getMode()
+ public List<String> getModes()
{
- return mode;
+ return modes;
}
}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PageMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PageMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PageMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,65 +22,45 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-import org.jboss.portal.metadata.portlet.DisplayNameMetaData;
-import org.jboss.portal.metadata.portlet.SecurityConstrainMetaData;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.SecurityConstraintMetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class PageMetaData extends IdMetaDataImplWithDescriptionGroup
+public class PageMetaData extends CommonPortalObject
{
- protected String pageName;
-
protected PropertiesMetaData properties;
protected String listener;
- protected SecurityConstrainMetaData securityConstraint;
+ protected SecurityConstraintMetaData securityConstraint;
protected List<PageMetaData> pages;
protected List<WindowMetaData> windows;
- protected List<DisplayNameMetaData> displayNames;
-
protected String resourceBundle;
protected List<String> supportedLocales;
protected CoordinationMetaData coordination;
- @XmlElement(name = "page-name")
- public void setPageName(String pageName)
- {
- this.pageName = pageName;
- }
- @XmlElement(name = "properties")
- public void setProperties(PropertiesMetaData properties)
+ @XmlElement (name="page-name")
+ public void setName(String name)
{
- this.properties = properties;
+ this.name = name;
}
-
- @XmlElement(name = "listener")
- public void setListener(String listener)
- {
- this.listener = listener;
- }
-
- @XmlElement(name = "security-constraint")
- public void setSecurityConstraint(SecurityConstrainMetaData securityConstraint)
- {
- this.securityConstraint = securityConstraint;
- }
-
+
@XmlElement(name = "page")
public void setPages(List<PageMetaData> pages)
{
@@ -92,51 +72,13 @@
{
this.windows = windows;
}
-
- @XmlElement(name = "display-name")
- public void setDisplayNames(List<DisplayNameMetaData> displayNames)
- {
- this.displayNames = displayNames;
- }
-
- @XmlElement(name = "resource-bundle")
- public void setResourceBundle(String resourceBundle)
- {
- this.resourceBundle = resourceBundle;
- }
-
- @XmlElement(name = "supported-locale")
- public void setSupportedLocales(List<String> supportedLocales)
- {
- this.supportedLocales = supportedLocales;
- }
-
+
@XmlElement(name = "coodination")
public void setCoordination(CoordinationMetaData coordination)
{
this.coordination = coordination;
}
- public String getPageName()
- {
- return pageName;
- }
-
- public PropertiesMetaData getProperties()
- {
- return properties;
- }
-
- public String getListener()
- {
- return listener;
- }
-
- public SecurityConstrainMetaData getSecurityConstraint()
- {
- return securityConstraint;
- }
-
public List<PageMetaData> getPages()
{
return pages;
@@ -147,24 +89,23 @@
return windows;
}
- public List<DisplayNameMetaData> getDisplayNames()
- {
- return displayNames;
- }
-
- public String getResourceBundle()
- {
- return resourceBundle;
- }
-
- public List<String> getSupportedLocales()
- {
- return supportedLocales;
- }
-
public CoordinationMetaData getCoordination()
{
return coordination;
}
-
+
+ @Override
+ public List<CommonPortalObject> getChildren()
+ {
+ List<CommonPortalObject> children = new
ArrayList<CommonPortalObject>();
+ if (this.getPages() != null)
+ {
+ children.addAll(this.getPages());
+ }
+ if (this.getWindows() != null)
+ {
+ children.addAll(this.getWindows());
+ }
+ return children;
+ }
}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ParameterBindingMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ParameterBindingMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ParameterBindingMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
@@ -34,7 +36,7 @@
{
protected String id;
- protected WindowCoordinationMetaData windowCoordination;
+ protected List<WindowCoordinationMetaData> windowCoordinations;
@XmlElement(name = "id")
public void setId(String id)
@@ -43,9 +45,9 @@
}
@XmlElement(name = "window-coordination")
- public void setWindowCoordintationMetaData(WindowCoordinationMetaData
windowCoordination)
+ public void setWindowCoordintation(List<WindowCoordinationMetaData>
windowCoordinations)
{
- this.windowCoordination = windowCoordination;
+ this.windowCoordinations = windowCoordinations;
}
public String getId()
@@ -53,9 +55,9 @@
return id;
}
- public WindowCoordinationMetaData getWindowCoordination()
+ public List<WindowCoordinationMetaData> getWindowCoordination()
{
- return windowCoordination;
+ return windowCoordinations;
}
}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,47 +22,34 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-import org.jboss.portal.metadata.portlet.DisplayNameMetaData;
-import org.jboss.portal.metadata.portlet.SecurityConstrainMetaData;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.SecurityConstraintMetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class PortalMetaData extends IdMetaDataImplWithDescriptionGroup
+public class PortalMetaData extends CommonPortalObject
{
- protected String portalName;
-
protected ModeMetaData modes;
protected WindowStatesMetaData windowStates;
- protected PropertiesMetaData properties;
-
- protected String listener;
-
- protected SecurityConstrainMetaData securityConstraint;
-
protected List<PageMetaData> pages;
- protected List<DisplayNameMetaData> displayName;
-
- protected String resourceBundle;
-
- protected List<String> supportedLocales;
-
protected CoordinationMetaData coordination;
@XmlElement(name = "portal-name")
- public void setPortalName(String portalName)
+ public void setName(String portalName)
{
- this.portalName = portalName;
+ this.name = portalName;
}
@XmlElement(name = "supported-modes")
@@ -72,112 +59,52 @@
}
@XmlElement(name = "supported-window-states")
- public void setWindowStates(WindowStatesMetaData windowStates)
+ public void setSupportedWindowStates(WindowStatesMetaData windowStates)
{
this.windowStates = windowStates;
}
- @XmlElement(name = "properties")
- public void setProperties(PropertiesMetaData properties)
- {
- this.properties = properties;
- }
-
- @XmlElement(name = "listener")
- public void setListener(String listener)
- {
- this.listener = listener;
- }
-
- @XmlElement(name = "security-constraint")
- public void setSecurityConstraint(SecurityConstrainMetaData securityConstraint)
- {
- this.securityConstraint = securityConstraint;
- }
-
@XmlElement(name = "page")
public void setPages(List<PageMetaData> pages)
{
this.pages = pages;
}
- @XmlElement(name = "display-name")
- public void setDisplayName(List<DisplayNameMetaData> displayName)
- {
- this.displayName = displayName;
- }
-
- @XmlElement(name = "resource-bundle")
- public void setResourceBundle(String resourceBundle)
- {
- this.resourceBundle = resourceBundle;
- }
-
- @XmlElement(name = "supported-locale")
- public void setSupportedLocales(List<String> supportedLocales)
- {
- this.supportedLocales = supportedLocales;
- }
-
- @XmlElement(name = "coodination")
+ @XmlElement(name = "coordination")
public void setCoordination(CoordinationMetaData coordination)
{
this.coordination = coordination;
}
- public String getPortalName()
- {
- return portalName;
- }
-
public ModeMetaData getModes()
{
return modes;
}
- public WindowStatesMetaData getWindowStates()
+ public WindowStatesMetaData getSupportedWindowStates()
{
return windowStates;
}
- public PropertiesMetaData getProperties()
- {
- return properties;
- }
-
- public String getListener()
- {
- return listener;
- }
-
- public SecurityConstrainMetaData getSecurityConstraint()
- {
- return securityConstraint;
- }
-
public List<PageMetaData> getPages()
{
return pages;
}
- public List<DisplayNameMetaData> getDisplayName()
+ public CoordinationMetaData getCoordination()
{
- return displayName;
+ return coordination;
}
- public String getResourceBundle()
+ @Override
+ public List<CommonPortalObject> getChildren()
{
- return resourceBundle;
+ List<CommonPortalObject> children = new
ArrayList<CommonPortalObject>();
+ if (this.getPages() != null)
+ {
+ children.addAll(this.getPages());
+ }
+ return children;
}
- public List<String> getSupportedLocales()
- {
- return supportedLocales;
- }
-
- public CoordinationMetaData getCoordination()
- {
- return coordination;
- }
-
}
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,114 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portal.object;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortalObjectDeployment extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected String parentRef;
-
- protected String ifExists;
-
- protected ContextMetaData context;
-
- protected PortalMetaData portal;
-
- protected PageMetaData page;
-
- protected WindowMetaData window;
-
- @XmlElement(name = "parent-ref")
- public void setParentRef(String parentRef)
- {
- this.parentRef = parentRef;
- }
-
- @XmlElement(name = "if-exists")
- public void setIfExists(String ifExists)
- {
- this.ifExists = ifExists;
- }
-
- @XmlElement(name = "context")
- public void setContext(ContextMetaData context)
- {
- this.context = context;
- }
-
- @XmlElement(name = "portal")
- public void setPortal(PortalMetaData portal)
- {
- this.portal = portal;
- }
-
- @XmlElement(name = "page")
- public void setPage(PageMetaData page)
- {
- this.page = page;
- }
-
- @XmlElement(name = "window")
- public void setWindow(WindowMetaData window)
- {
- this.window = window;
- }
-
- public String getParentRef()
- {
- return parentRef;
- }
-
- public String getIfExists()
- {
- return ifExists;
- }
-
- public ContextMetaData getContext()
- {
- return context;
- }
-
- public PortalMetaData getPortal()
- {
- return portal;
- }
-
- public PageMetaData getPage()
- {
- return page;
- }
-
- public WindowMetaData getWindow()
- {
- return window;
- }
-
-}
Copied:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeploymentMetaData.java
(from rev 12389,
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java)
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeploymentMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeploymentMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,125 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portal.object;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortalObjectDeploymentMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected String parentRef;
+
+ protected boolean overwrite;
+
+ @XmlElement (name = "context")
+ protected ContextMetaData context;
+
+ @XmlElement (name = "portal")
+ protected PortalMetaData portal;
+
+ @XmlElement (name = "page")
+ protected PageMetaData page;
+
+ @XmlElement (name = "window")
+ protected WindowMetaData window;
+
+ @XmlElement(name = "parent-ref")
+ public void setParentRef(String parentRef)
+ {
+ this.parentRef = parentRef;
+ }
+
+ @XmlElement(name = "if-exists")
+ public void setIfExists(String ifExists)
+ {
+ if (ifExists.equalsIgnoreCase("overwrite"))
+ {
+ this.overwrite = true;
+ }
+ else
+ {
+ this.overwrite = false;
+ }
+ }
+
+ @XmlElement(name = "context")
+ public void setContext(ContextMetaData context)
+ {
+ this.context = context;
+ }
+
+ @XmlElement(name = "portal")
+ public void setPortal(PortalMetaData portal)
+ {
+ this.portal = portal;
+ }
+
+ @XmlElement(name = "page")
+ public void setPage(PageMetaData page)
+ {
+ this.page = page;
+ }
+
+ @XmlElement(name = "window")
+ public void setWindow(WindowMetaData window)
+ {
+ this.window = window;
+ }
+
+ public String getParentRef()
+ {
+ return parentRef;
+ }
+
+ public boolean isOverwrite()
+ {
+ return overwrite;
+ }
+
+ public ContextMetaData getContext()
+ {
+ return context;
+ }
+
+ public PortalMetaData getPortal()
+ {
+ return portal;
+ }
+
+ public PageMetaData getPage()
+ {
+ return page;
+ }
+
+ public WindowMetaData getWindow()
+ {
+ return window;
+ }
+
+}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,11 +22,13 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
/**
@@ -36,18 +38,18 @@
@XmlRootElement(name = "deployments")
public class PortalObjectMetaData extends IdMetaDataImplWithDescriptionGroup
{
-
- List<PortalObjectDeployment> deployments;
-
+
+ List<PortalObjectDeploymentMetaData> deployment;
+
@XmlElement(name = "deployment")
- public void setPortalObjectDeployments(List<PortalObjectDeployment>
deployments)
+ public void setDeployments(List<PortalObjectDeploymentMetaData> deployment)
{
- this.deployments = deployments;
+ this.deployment = deployment;
}
- public List<PortalObjectDeployment> getDeployments()
+ public List<PortalObjectDeploymentMetaData> getDeployments()
{
- return deployments;
+ return deployment;
}
-
+
}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowCoordinationMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowCoordinationMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowCoordinationMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
@@ -36,6 +38,8 @@
protected String windowName;
protected String qName;
+
+ protected List<String> qNames;
@XmlElement(name = "window-name")
public void setWindowName(String windowName)
@@ -49,6 +53,12 @@
this.qName = qName;
}
+ @XmlElement(name="qname")
+ public void setQNames(List<String> qNames)
+ {
+ this.qNames = qNames;
+ }
+
public String getWindowName()
{
return windowName;
@@ -58,5 +68,10 @@
{
return qName;
}
+
+ public List<String> getQNames()
+ {
+ return qNames;
+ }
}
Modified:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -22,53 +22,46 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-import org.jboss.portal.metadata.portlet.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class WindowMetaData extends IdMetaDataImplWithDescriptionGroup
+public class WindowMetaData extends CommonPortalObject
{
- protected String windowName;
-
protected String instanceRef;
protected ContentMetaData content;
protected String region;
- protected String height;
+ protected int height;
protected String initialWindowState;
protected String initialMode;
- protected PropertiesMetaData properties;
-
- protected String listener;
-
- protected List<DisplayNameMetaData> displayNames;
-
- protected String resourceBundle;
-
- protected List<String> supportedLocales;
-
@XmlElement(name = "window-name")
- public void setWindowName(String windowName)
+ public void setName(String name)
{
- this.windowName = windowName;
+ this.name = name;
}
@XmlElement(name = "instance-ref")
public void setInstanceRef(String instanceRef)
{
this.instanceRef = instanceRef;
+ ContentMetaData content = new ContentMetaData();
+ content.setContentType("portlet");
+ content.setContentURI(instanceRef);
+ this.content = content;
}
@XmlElement(name = "content")
@@ -84,11 +77,11 @@
}
@XmlElement(name = "height")
- public void setHeight(String height)
+ public void setHeight(int height)
{
this.height = height;
}
-
+
@XmlElement(name = "initial-window-state")
public void setInitialWindowState(String initialWindowState)
{
@@ -101,41 +94,6 @@
this.initialMode = initialMode;
}
- @XmlElement(name = "properties")
- public void setProperties(PropertiesMetaData properties)
- {
- this.properties = properties;
- }
-
- @XmlElement(name = "listener")
- public void setListener(String listener)
- {
- this.listener = listener;
- }
-
- @XmlElement(name = "display-name")
- public void setDisplayNames(List<DisplayNameMetaData> displayNames)
- {
- this.displayNames = displayNames;
- }
-
- @XmlElement(name = "resource-bundle")
- public void setResourceBundle(String resourceBundle)
- {
- this.resourceBundle = resourceBundle;
- }
-
- @XmlElement(name = "supported-locale")
- public void setSupportedLocales(List<String> supportedLocales)
- {
- this.supportedLocales = supportedLocales;
- }
-
- public String getWindowName()
- {
- return windowName;
- }
-
public String getInstanceRef()
{
return instanceRef;
@@ -151,7 +109,7 @@
return region;
}
- public String getHeight()
+ public int getHeight()
{
return height;
}
@@ -166,29 +124,12 @@
return initialMode;
}
- public PropertiesMetaData getProperties()
+ @Override
+ public List<CommonPortalObject> getChildren()
{
- return properties;
+ // Windows don't have any child objects so always return an empty List
+ List<CommonPortalObject> children = new
ArrayList<CommonPortalObject>();
+ return children;
}
- public String getListener()
- {
- return listener;
- }
-
- public List<DisplayNameMetaData> getDisplayNames()
- {
- return displayNames;
- }
-
- public String getResourceBundle()
- {
- return resourceBundle;
- }
-
- public List<String> getSupportedLocales()
- {
- return supportedLocales;
- }
-
}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "custom-portlet-modeType")
+public class CustomPortletModeMetaData extends DescribableMetaData
+{
+
+ /** The custom portlet mode id*/
+ private String id;
+
+ /** The portlet mode */
+ private String portletMode;
+
+ /** Is portal managed */
+ private boolean portalManaged = true;
+
+ public CustomPortletModeMetaData() {}
+
+ public CustomPortletModeMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "portlet-mode")
+ public String getPortletMode()
+ {
+ return portletMode;
+ }
+
+ public void setPortletMode(String portletMode)
+ {
+ this.portletMode = portletMode;
+ }
+
+ @XmlElement(name = "portal-managed", namespace =
PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public boolean isPortalManaged()
+ {
+ return portalManaged;
+ }
+
+ public void setPortalManaged(boolean portalManaged)
+ {
+ this.portalManaged = portalManaged;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "custom-window-stateType")
+public class CustomWindowStateMetaData extends DescribableMetaData
+{
+
+ /** The window state id */
+ private String id;
+
+ /** The window state */
+ private String windowState;
+
+ public CustomWindowStateMetaData() {}
+
+ public CustomWindowStateMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "window-state")
+ public String getWindowState()
+ {
+ return windowState;
+ }
+
+ public void setWindowState(String windowState)
+ {
+ this.windowState = windowState;
+ }
+
+}
\ No newline at end of file
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,63 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class DisplayNameMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected String lang;
-
- protected String displayName;
-
- @XmlAttribute(name = "xml:lang")
- public void setLang(String lang)
- {
- this.lang = lang;
- }
-
- @XmlElement(name = "display-name")
- public void setDisplayName(String displayName)
- {
- this.displayName = displayName;
- }
-
- public String getLang()
- {
- return lang;
- }
-
- public String getDisplayName()
- {
- return displayName;
- }
-
-}
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,104 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.apache.log4j.Logger;
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class InstanceMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected String instanceId;
-
- protected String portletRef;
-
- protected List<DisplayNameMetaData> displayNames;
-
- protected PortletPreferencesMetaData portletPreferences;
-
- protected SecurityConstrainMetaData securityContraint;
-
- @XmlElement(name = "instance-id")
- public void setInstanceId(String instanceId)
- {
- this.instanceId = instanceId;
- }
-
- @XmlElement(name = "portlet-ref")
- public void setPortletRef(String portletRef)
- {
- this.portletRef = portletRef;
- }
-
- @XmlElement(name = "display-name")
- public void setDisplayName(List<DisplayNameMetaData> displayNames)
- {
- this.displayNames = displayNames;
- }
-
- @XmlElement(name = "perferences")
- public void setPreferences(PortletPreferencesMetaData preferences)
- {
- this.portletPreferences = preferences;
- }
-
- @XmlElement(name = "security-constraint")
- public void setSecurityConstraint(SecurityConstrainMetaData securityConstraint)
- {
- this.securityContraint = securityConstraint;
- }
-
- public String getInstanceId()
- {
- return instanceId;
- }
-
- public String getPortletRef()
- {
- return portletRef;
- }
-
- public List<DisplayNameMetaData> getDisplayNames()
- {
- return displayNames;
- }
-
- public PortletPreferencesMetaData getPortletPreferences()
- {
- return portletPreferences;
- }
-
- public SecurityConstrainMetaData getSecurityContraint()
- {
- return securityContraint;
- }
-
-}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,95 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "listenerType")
+public class ListenerMetaData extends DescribableMetaData
+{
+
+ /** The id */
+ private String id;
+
+ /** The display name */
+ private List<LocalizedDescriptionMetaData> displayName;
+
+ /** The listener class */
+ private String listenerClass;
+
+ public ListenerMetaData() {}
+
+ public ListenerMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "display-name")
+ public List<LocalizedDescriptionMetaData> getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(List<LocalizedDescriptionMetaData> displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "listener-class")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getListenerClass()
+ {
+ return listenerClass;
+ }
+
+ public void setListenerClass(String listenerClass)
+ {
+ this.listenerClass = listenerClass;
+ }
+
+}
+
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,74 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PolicyPermissionMetaData extends IdMetaDataImplWithDescriptionGroup
-{
- protected String actionName;
-
- protected String roleName;
-
- protected boolean unchecked = false;
-
- @XmlElement(name = "action-name")
- public void setActionName(String actionName)
- {
- this.actionName = actionName;
- }
-
- @XmlElement(name = "role-name")
- public void setRoleName(String roleName)
- {
- this.roleName = roleName;
- }
-
- @XmlElement(name = "unchecked")
- public void setUnchecked()
- {
- this.unchecked = true;
- }
-
- public String getActionName()
- {
- return actionName;
- }
-
- public String getRoleName()
- {
- return roleName;
- }
-
- public boolean isUnchecked()
- {
- return unchecked;
- }
-
-}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,220 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.CustomPortletModeMetaData;
+import org.jboss.portal.metadata.portlet.CustomWindowStateMetaData;
+import org.jboss.portal.metadata.portlet.UserAttributeMetaData;
+import org.jboss.portal.metadata.portlet.adapter.CustomPortletModeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.CustomWindowStateAdapter;
+import org.jboss.portal.metadata.portlet.adapter.PortletListAdapter;
+import org.jboss.portal.metadata.portlet.adapter.UserAttributeAdapter;
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+import org.jboss.portal.metadata.portlet.security.SecurityConstraintMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlRootElement(name = "portlet-app")
+@XmlType(name = "portlet-appType")
+public class PortletApplication10MetaData
+{
+ /** The portlet application id. */
+ private String id;
+
+ /** The portlet application version. */
+ private String version;
+
+ /** A bunch of portlets. */
+ private Map<String, PortletMetaData> portlets;
+
+ /** The user attributes. */
+ private Map<String, UserAttributeMetaData> userAttributes;
+
+ /** The custom portlet mode. */
+ private Map<String, CustomPortletModeMetaData> customPortletModes;
+
+ /** The custom window states. */
+ private Map<String, CustomWindowStateMetaData> customWindowStates;
+
+ /** The security constraints */
+ private List<SecurityConstraintMetaData> securityConstraints;
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "version")
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public void setVersion(String version)
+ {
+ this.version = version;
+ }
+
+ @XmlElement(name = "portlet")
+ @XmlJavaTypeAdapter(PortletListAdapter.class)
+ public Map<String, PortletMetaData> getPortlets()
+ {
+ return portlets;
+ }
+
+ public void setPortlets(Map<String, PortletMetaData> portlets)
+ {
+ // Adding reference to the portlet application metadata
+ for( PortletMetaData p : portlets.values())
+ {
+ p.setPortletApplication(this);
+ }
+ this.portlets = portlets;
+ }
+
+ public Collection<PortletMetaData> getPortletCollection()
+ {
+ return portlets != null ? portlets.values() : null;
+ }
+
+ public PortletMetaData getPortlet(String portletName)
+ {
+ return portlets.get(portletName);
+ }
+
+ public void addPortlet(PortletMetaData portlet)
+ {
+ if(this.portlets == null)
+ {
+ this.portlets = new LinkedHashMap<String, PortletMetaData>();
+ }
+ // Adding reference to the portlet application metadata
+ portlet.setPortletApplication(this);
+ this.portlets.put(portlet.getPortletName(), portlet);
+ }
+
+ @XmlElement(name = "user-attribute")
+ @XmlJavaTypeAdapter(UserAttributeAdapter.class)
+ public Map<String, UserAttributeMetaData> getUserAttributes()
+ {
+ return userAttributes;
+ }
+
+ public void setUserAttributes(Map<String, UserAttributeMetaData>
userAttributes)
+ {
+ this.userAttributes = userAttributes;
+ }
+
+ public void addUserAttribute(UserAttributeMetaData userAttribute)
+ {
+ if( this.userAttributes == null )
+ {
+ this.userAttributes = new HashMap<String, UserAttributeMetaData>();
+ }
+ this.userAttributes.put(userAttribute.getName(), userAttribute);
+ }
+
+ @XmlElement(name = "custom-portlet-mode")
+ @XmlJavaTypeAdapter(CustomPortletModeAdapter.class)
+ public Map<String, CustomPortletModeMetaData> getCustomPortletModes()
+ {
+ return customPortletModes;
+ }
+
+ public void setCustomPortletModes(Map<String, CustomPortletModeMetaData>
customPortletMode)
+ {
+ this.customPortletModes = customPortletMode;
+ }
+
+ public void addCustomPortletMode(CustomPortletModeMetaData portletMode)
+ {
+ if ( this.customPortletModes == null)
+ {
+ this.customPortletModes = new HashMap<String,
CustomPortletModeMetaData>();
+ }
+ this.customPortletModes.put(portletMode.getPortletMode(), portletMode);
+ }
+
+ @XmlElement(name = "custom-window-state")
+ @XmlJavaTypeAdapter(CustomWindowStateAdapter.class)
+ public Map<String, CustomWindowStateMetaData> getCustomWindowStates()
+ {
+ return customWindowStates;
+ }
+
+ public void setCustomWindowStates(Map<String, CustomWindowStateMetaData>
customWindowState)
+ {
+ this.customWindowStates = customWindowState;
+ }
+
+ public void addCustomWindowState(CustomWindowStateMetaData windowState)
+ {
+ if( this.customWindowStates == null )
+ {
+ this.customWindowStates = new HashMap<String,
CustomWindowStateMetaData>();
+ }
+ this.customWindowStates.put(windowState.getWindowState(), windowState);
+ }
+
+ @XmlElement(name = "security-constraint")
+ public List<SecurityConstraintMetaData> getSecurityConstraints()
+ {
+ return securityConstraints;
+ }
+
+ public void setSecurityConstraints(List<SecurityConstraintMetaData>
securityConstraints)
+ {
+ this.securityConstraints = securityConstraints;
+ }
+
+ public void addSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+ {
+ if(this.securityConstraints == null)
+ {
+ this.securityConstraints = new ArrayList<SecurityConstraintMetaData>();
+ }
+ this.securityConstraints.add(securityConstraint);
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,238 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.FilterAdapter;
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMappingMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletApplication20MetaData extends PortletApplication10MetaData
+{
+ /** The resource bundle (JSR 286) */
+ private String resourceBundle;
+
+ /** The default namespace URI (JSR 286) */
+ private URI defaultNamespace;
+
+ /** The filters (JSR 286) */
+ private Map<String, FilterMetaData> filters;
+
+ /** The filter mapping (JSR 286) */
+ private List<FilterMappingMetaData> filterMapping;
+
+ /** The events (JSR 286) */
+ private List<EventDefinitionMetaData> events;
+
+ /** The public render parameters */
+ private List<PublicRenderParameterMetaData> publicRenderParameters;
+
+ /** The url generation listener */
+ private List<ListenerMetaData> listeners;
+
+ /** The container runtime options */
+ private Map<String, ContainerRuntimeMetaData> containerRuntimeOptions;
+
+ @XmlElement(name = "resource-bundle", namespace =
PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public String getResourceBundle()
+ {
+ return resourceBundle;
+ }
+
+ public void setResourceBundle(String resourceBundle)
+ {
+ this.resourceBundle = resourceBundle;
+ }
+
+ @XmlElement(name = "default-namespace")
+ public URI getDefaultNamespace()
+ {
+ return defaultNamespace;
+ }
+
+ public void setDefaultNamespace(URI defaultNamespace)
+ {
+ this.defaultNamespace = defaultNamespace;
+ }
+
+ @XmlElement(name = "filter", namespace =
PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ @XmlJavaTypeAdapter(FilterAdapter.class)
+ public Map<String, FilterMetaData> getFilters()
+ {
+ return this.filters;
+ }
+
+ public void setFilters(Map<String, FilterMetaData> filters)
+ {
+ this.filters = filters;
+ }
+
+ public Collection<FilterMetaData> getFilterCollection()
+ {
+ return this.filters != null ? this.filters.values() : null;
+ }
+
+ public FilterMetaData getFilter(String filterName)
+ {
+ return this.filters.get(filterName);
+ }
+
+ public void addFilter(FilterMetaData filter)
+ {
+ if ( this.filters == null)
+ {
+ this.filters = new LinkedHashMap<String, FilterMetaData>();
+ }
+ this.filters.put(filter.getFilterName(), filter);
+ }
+
+ @XmlElement(name = "filter-mapping", namespace =
PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<FilterMappingMetaData> getFilterMapping()
+ {
+ return filterMapping;
+ }
+
+ public void setFilterMapping(List<FilterMappingMetaData> filterMapping)
+ {
+ this.filterMapping = filterMapping;
+ }
+
+ public void addFilterMapping(FilterMappingMetaData filterMapping)
+ {
+ if(this.filterMapping == null)
+ {
+ this.filterMapping = new ArrayList<FilterMappingMetaData>();
+ }
+ this.filterMapping.add(filterMapping);
+ }
+
+ @XmlElement(name = "event-definition", namespace =
PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<EventDefinitionMetaData> getEvents()
+ {
+ return events;
+ }
+
+ public void setEvents(List<EventDefinitionMetaData> events)
+ {
+ this.events = events;
+ }
+
+ public void addEventDefinition(EventDefinitionMetaData eventDefinition)
+ {
+ if(this.events == null)
+ {
+ this.events = new ArrayList<EventDefinitionMetaData>();
+ }
+ this.events.add(eventDefinition);
+ }
+
+ @XmlElement(name = "public-render-parameter", namespace =
PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<PublicRenderParameterMetaData> getPublicRenderParameters()
+ {
+ return publicRenderParameters;
+ }
+
+ public void setPublicRenderParameters(List<PublicRenderParameterMetaData>
publicRenderParameters)
+ {
+ this.publicRenderParameters = publicRenderParameters;
+ }
+
+ public void addPublicRenderParameter(PublicRenderParameterMetaData renderParameter)
+ {
+ if( this.publicRenderParameters == null)
+ {
+ this.publicRenderParameters = new
ArrayList<PublicRenderParameterMetaData>();
+ }
+ this.publicRenderParameters.add(renderParameter);
+ }
+
+ @XmlElement(name = "listener", namespace =
PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<ListenerMetaData> getListeners()
+ {
+ return listeners;
+ }
+
+ public void setListeners(List<ListenerMetaData> listeners)
+ {
+ this.listeners = listeners;
+ }
+
+ public void addListener(ListenerMetaData listener)
+ {
+ if (this.listeners == null)
+ {
+ this.listeners = new ArrayList<ListenerMetaData>();
+ }
+ this.listeners.add(listener);
+ }
+
+ @XmlElement(name = "container-runtime-option",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ @XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
+ public Map<String, ContainerRuntimeMetaData> getContainerRuntimeOptions()
+ {
+ return containerRuntimeOptions;
+ }
+
+ public void setContainerRuntimeOptions(Map<String, ContainerRuntimeMetaData>
containerRuntimeOptions)
+ {
+ this.containerRuntimeOptions = containerRuntimeOptions;
+ }
+
+ public ContainerRuntimeMetaData getContainerRuntimeOption(String option)
+ {
+ return this.containerRuntimeOptions.get(option);
+ }
+
+ public Set<String> getContainerRuntimeOptionSet()
+ {
+ return this.containerRuntimeOptions != null ? this.containerRuntimeOptions.keySet()
: null;
+ }
+
+ public void addContainerRuntime(ContainerRuntimeMetaData option)
+ {
+ if (this.containerRuntimeOptions == null)
+ {
+ this.containerRuntimeOptions = new HashMap<String,
ContainerRuntimeMetaData>();
+ }
+ this.containerRuntimeOptions.put(option.getName(), option);
+ }
+}
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,69 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.logging.Logger;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortletDeploymentInstanceMetaData
-{
- private static final Logger log =
Logger.getLogger(PortletDeploymentInstanceMetaData.class);
-
- protected InstanceMetaData instance;
-
- protected boolean overwrite;
-
- public void setInstance(InstanceMetaData instance)
- {
- this.instance = instance;
- }
-
- public InstanceMetaData getInstance()
- {
- return this.instance;
- }
-
- @XmlElement(name = "if-exists")
- public void setIfExists(String ifExists)
- {
- if (ifExists.equals("overwrite"))
- {
- this.overwrite = true;
- }
- else if (!ifExists.equals("keep"))
- {
- log.warn("Unknow value for if-exists, expecting overwrite or keep");
- }
- }
-
- public boolean getOverwrite()
- {
- return this.overwrite;
- }
-
-}
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,53 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-@XmlRootElement(name = "deployments", namespace = "")
-public class PortletDeploymentInstancesMetaData extends
IdMetaDataImplWithDescriptionGroup
-{
-
- protected List<PortletDeploymentInstanceMetaData> deploymentInstances;
-
- public List<PortletDeploymentInstanceMetaData> getDeploymentInstances()
- {
- return deploymentInstances;
- }
-
- @XmlElement(name = "deployment")
- public void setDeploymentInstances(List<PortletDeploymentInstanceMetaData>
deploymentInstances)
- {
- this.deploymentInstances = deploymentInstances;
- }
-
-}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import static javax.xml.XMLConstants.XML_NS_URI;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class PortletMetaDataConstants
+{
+
+ /** The portlet version 1.0 namespace */
+ public final static String PORTLET_JSR_168_NS =
"http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";
+
+ /** The portlet version 2.0 namespace */
+ public final static String PORTLET_JSR_286_NS =
"http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd";
+
+ /** The xml namespace */
+ public final static String NS_XML_NAMESPACE = XML_NS_URI;
+
+ /** The default locale */
+ public final static String DEFAULT_LOCALE = "en";
+}
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,62 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortletPreferenceMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected String name;
-
- protected String value;
-
- @XmlElement
- public void setName(String name)
- {
- this.name = name;
- }
-
- @XmlElement
- public void setValue(String value)
- {
- this.value = value;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getValue()
- {
- return value;
- }
-
-}
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,51 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortletPreferencesMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected List<PortletPreferenceMetaData> preferences;
-
- @XmlElement(name = "preference")
- public void setPreference(List<PortletPreferenceMetaData> preferences)
- {
- this.preferences = preferences;
- }
-
- public List<PortletPreferenceMetaData> getPreferences()
- {
- return preferences;
- }
-
-}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,129 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "public-render-parameterType")
+public class PublicRenderParameterMetaData extends DescribableMetaData
+{
+
+ /** The public render parameter id */
+ private String id;
+
+ /** The public render parameter identifier */
+ private String identifier;
+
+ /** The QName */
+ private QName qname;
+
+ /** The name */
+ private String name;
+
+ /** The public render parameter alias */
+ private List<QName> alias;
+
+ public PublicRenderParameterMetaData() {}
+
+ public PublicRenderParameterMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "identifier")
+ public String getIdentifier()
+ {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier)
+ {
+ this.identifier = identifier;
+ }
+
+ @XmlElement(name = "qname")
+ public QName getQname()
+ {
+ return qname;
+ }
+
+ public void setQname(QName qname)
+ {
+ this.qname = qname;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "alias")
+ public List<QName> getAlias()
+ {
+ return alias;
+ }
+
+ public void setAlias(List<QName> alias)
+ {
+ this.alias = alias;
+ }
+
+ public void addAlias(QName alias)
+ {
+ if(this.alias == null)
+ {
+ this.alias = new ArrayList<QName>();
+ }
+ this.alias.add(alias);
+ }
+
+}
Deleted:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/SecurityConstrainMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/SecurityConstrainMetaData.java 2009-03-02
19:41:16 UTC (rev 12923)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/SecurityConstrainMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -1,50 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class SecurityConstrainMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected List<PolicyPermissionMetaData> policyPermission;
-
- @XmlElement(name = "policy-permission")
- public void setPolicyPermission(List<PolicyPermissionMetaData>
policyPermission)
- {
- this.policyPermission = policyPermission;
- }
-
- public List<PolicyPermissionMetaData> getPolicyPermission()
- {
- return policyPermission;
- }
-}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "user-attributeType")
+public class UserAttributeMetaData extends DescribableMetaData
+{
+
+ /** The id */
+ private String id;
+
+ /** The name */
+ private String name;
+
+ public UserAttributeMetaData() {}
+
+ public UserAttributeMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ContainerRuntimeAdapter
+ extends XmlAdapter<List<ContainerRuntimeMetaData>,
java.util.Map<String, ContainerRuntimeMetaData>>
+{
+
+ @Override
+ public List<ContainerRuntimeMetaData> marshal(Map<String,
ContainerRuntimeMetaData> map) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, ContainerRuntimeMetaData>
unmarshal(List<ContainerRuntimeMetaData> list) throws Exception
+ {
+ Map<String, ContainerRuntimeMetaData> map = new HashMap<String,
ContainerRuntimeMetaData>();
+ for (ContainerRuntimeMetaData c : list)
+ {
+ map.put(c.getName(), c);
+ }
+ return map;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.CustomPortletModeMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CustomPortletModeAdapter extends
XmlAdapter<List<CustomPortletModeMetaData>, Map<String,
CustomPortletModeMetaData>>
+{
+
+ @Override
+ public List<CustomPortletModeMetaData> marshal(Map<String,
CustomPortletModeMetaData> map) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, CustomPortletModeMetaData>
unmarshal(List<CustomPortletModeMetaData> list) throws Exception
+ {
+ Map<String, CustomPortletModeMetaData> map = new LinkedHashMap<String,
CustomPortletModeMetaData>();
+ for (CustomPortletModeMetaData md : list)
+ {
+ map.put(md.getPortletMode(), md);
+ }
+ return map;
+ }
+
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.CustomWindowStateMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CustomWindowStateAdapter extends
XmlAdapter<List<CustomWindowStateMetaData>, Map<String,
CustomWindowStateMetaData>>
+{
+
+ @Override
+ public List<CustomWindowStateMetaData> marshal(Map<String,
CustomWindowStateMetaData> map) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, CustomWindowStateMetaData>
unmarshal(List<CustomWindowStateMetaData> list) throws Exception
+ {
+ Map<String, CustomWindowStateMetaData> map = new LinkedHashMap<String,
CustomWindowStateMetaData>();
+ for(CustomWindowStateMetaData md : list)
+ {
+ map.put(md.getWindowState(), md);
+ }
+ return map;
+ }
+
+}
+
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.filter.FilterMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class FilterAdapter
+ extends XmlAdapter<List<FilterMetaData>, Map<String,
FilterMetaData>>
+{
+
+ @Override
+ public List<FilterMetaData> marshal(Map<String, FilterMetaData> map)
throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, FilterMetaData> unmarshal(List<FilterMetaData> list)
throws Exception
+ {
+ Map<String, FilterMetaData> map = new LinkedHashMap<String,
FilterMetaData>();
+ for (FilterMetaData f : list)
+ {
+ String filterName = f.getFilterName();
+ if (!map.containsKey(filterName))
+ {
+ map.put(filterName, f);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Duplicate filter: " +
filterName);
+ }
+ }
+ return map;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class PortletListAdapter
+ extends XmlAdapter<List<PortletMetaData>, Map<String,
PortletMetaData>>
+{
+
+ @Override
+ public List<PortletMetaData> marshal(Map<String, PortletMetaData>
portletMap) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, PortletMetaData> unmarshal(List<PortletMetaData>
portletList) throws Exception
+ {
+ Map<String, PortletMetaData> portletMap = new LinkedHashMap<String,
PortletMetaData>();
+ for (PortletMetaData portlet : portletList)
+ {
+ if (!portletMap.containsKey(portlet.getPortletName()))
+ {
+ portletMap.put(portlet.getPortletName(), portlet);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Portlet name '" +
portlet.getPortletName() + "' already defined.");
+ }
+ }
+ return portletMap;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletPreferenceMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletPreferencesListAdapter
+ extends XmlAdapter<List<PortletPreferenceMetaData>, Map<String,
PortletPreferenceMetaData>>
+{
+
+ @Override
+ public List<PortletPreferenceMetaData> marshal(Map<String,
PortletPreferenceMetaData> arg0) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, PortletPreferenceMetaData>
unmarshal(List<PortletPreferenceMetaData> list) throws Exception
+ {
+ Map<String, PortletPreferenceMetaData> map = new LinkedHashMap<String,
PortletPreferenceMetaData>();
+ for (PortletPreferenceMetaData p : list)
+ {
+ map.put(p.getName(), p);
+ }
+ return map;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.UserAttributeMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+
+public class UserAttributeAdapter
+ extends XmlAdapter<List<UserAttributeMetaData>, Map<String,
UserAttributeMetaData>>
+{
+
+ @Override
+ public List<UserAttributeMetaData> marshal(Map<String,
UserAttributeMetaData> arg0) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, UserAttributeMetaData>
unmarshal(List<UserAttributeMetaData> list) throws Exception
+ {
+ HashMap<String, UserAttributeMetaData> m = new HashMap<String,
UserAttributeMetaData>();
+ for (UserAttributeMetaData a : list)
+ {
+ String userAttributeName = a.getName();
+ if (!m.containsKey(userAttributeName))
+ {
+ m.put(a.getName(), a);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Duplicate user-attribute: " +
userAttributeName);
+ }
+ }
+ return m;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "container-runtime-optionType")
+public class ContainerRuntimeMetaData
+{
+
+ /** The name */
+ private String name;
+
+ /** The value list */
+ private List<String> values;
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "value")
+ public List<String> getValues()
+ {
+ return values;
+ }
+
+ public void setValues(List<String> values)
+ {
+ this.values = values;
+ }
+
+ public void addValue(String value)
+ {
+ if( this.values == null)
+ {
+ this.values = new ArrayList<String>();
+ }
+ this.values.add(value);
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.common;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public abstract class DescribableMetaData
+{
+
+ /** The description */
+ private List<LocalizedDescriptionMetaData> description;
+
+ public List<LocalizedDescriptionMetaData> getDescription()
+ {
+ return description;
+ }
+
+ @XmlElement(name = "description")
+ public void setDescription(List<LocalizedDescriptionMetaData> description)
+ {
+ this.description = description;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "init-paramType")
+public class InitParamMetaData extends DescribableMetaData
+{
+
+ /** The init param id */
+ private String id;
+
+ /** The init param name */
+ private String name;
+
+ /** The init param value */
+ private String value;
+
+ public InitParamMetaData() {}
+
+ public InitParamMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "value")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+
+/**
+ *
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "descriptionType")
+public class LocalizedDescriptionMetaData
+{
+
+ /** The lang */
+ private String lang = "en";
+
+ /** The description */
+ private String description;
+
+ public LocalizedDescriptionMetaData() {}
+
+ public LocalizedDescriptionMetaData(String lang)
+ {
+ this.lang = lang;
+ }
+
+ @XmlAttribute(name = "lang",
+ namespace = PortletMetaDataConstants.NS_XML_NAMESPACE)
+ public String getLang()
+ {
+ return this.lang;
+ }
+
+ public void setLang(String lang)
+ {
+ this.lang = lang;
+ }
+
+ @XmlValue
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,130 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.event;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.namespace.QName;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "event-definitionType")
+public class EventDefinitionMetaData extends DescribableMetaData
+{
+ /** The event definition id */
+ private String id;
+
+ /** The QName */
+ private QName qname;
+
+ /** The name */
+ private String name;
+
+ /** The value-type */
+ private String valueType;
+
+ /** The alias */
+ private List<QName> alias;
+
+ public EventDefinitionMetaData() {}
+
+ public EventDefinitionMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "qname")
+ public QName getQname()
+ {
+ return qname;
+ }
+
+ public void setQname(QName qname)
+ {
+ this.qname = qname;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "value-type")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getValueType()
+ {
+ return valueType;
+ }
+
+ public void setValueType(String valueType)
+ {
+ this.valueType = valueType;
+ }
+
+ @XmlElement(name = "alias")
+ public List<QName> getAlias()
+ {
+ return alias;
+ }
+
+ public void setAlias(List<QName> alias)
+ {
+ this.alias = alias;
+ }
+
+ public void addAlias(QName alias)
+ {
+ if (this.alias == null)
+ {
+ this.alias = new ArrayList<QName>();
+ }
+ this.alias.add(alias);
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.event;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "event-definition-referenceType")
+public class EventDefinitionReferenceMetaData
+{
+
+ /** The reference id */
+ private String id;
+
+ /** The qname */
+ private QName qname;
+
+ /** The name */
+ private String name;
+
+ public EventDefinitionReferenceMetaData() {}
+
+ public EventDefinitionReferenceMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "qname")
+ public QName getQname()
+ {
+ return qname;
+ }
+
+ public void setQname(QName qname)
+ {
+ this.qname = qname;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "filter-mappingType")
+public class FilterMappingMetaData
+{
+
+ /** The filter name */
+ private String name;
+
+ /** The mapped portlet names */
+ private List<String> portletNames;
+
+ @XmlElement(name = "filter-name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "portlet-name")
+ public List<String> getPortletNames()
+ {
+ return portletNames;
+ }
+
+ public void setPortletNames(List<String> portletNames)
+ {
+ this.portletNames = portletNames;
+ }
+
+ public void addPortletName(String portletName)
+ {
+ if( this.portletNames == null)
+ {
+ this.portletNames = new ArrayList<String>();
+ }
+ this.portletNames.add(portletName);
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,137 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.InitParamMetaData;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "filterType", namespace =
PortletMetaDataConstants.PORTLET_JSR_286_NS,
+ propOrder = {"description", "displayName",
"filterName", "filterClass", "lifecycle",
"initParams"})
+public class FilterMetaData extends DescribableMetaData
+{
+ /** The filter name */
+ private String filterName;
+
+ /** The filter class */
+ private String filterClass;
+
+ /** The filter lifecycle */
+ private List<String> lifecycle;
+
+ /** The filter display name */
+ private List<LocalizedDescriptionMetaData> displayName;
+
+ /** The filter init parameters */
+ private List<InitParamMetaData> initParams;
+
+ @XmlElement(name = "filter-name", required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getFilterName()
+ {
+ return filterName;
+ }
+
+ public void setFilterName(String filterName)
+ {
+ this.filterName = filterName;
+ }
+
+ @XmlElement(name = "filter-class", required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getFilterClass()
+ {
+ return filterClass;
+ }
+
+ public void setFilterClass(String filterClass)
+ {
+ this.filterClass = filterClass;
+ }
+
+ @XmlElement(name = "lifecycle", required = true)
+ public List<String> getLifecycle()
+ {
+ return lifecycle;
+ }
+
+ public void setLifecycle(List<String> lifecycle)
+ {
+ this.lifecycle = lifecycle;
+ }
+
+ public void addLifecycle(String lifecycle)
+ {
+ if( this.lifecycle == null)
+ {
+ this.lifecycle = new ArrayList<String>();
+ }
+ this.lifecycle.add(lifecycle);
+ }
+
+ @XmlElement(name = "display-name")
+ public List<LocalizedDescriptionMetaData> getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(List<LocalizedDescriptionMetaData> displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "init-param")
+ public List<InitParamMetaData> getInitParams()
+ {
+ return initParams;
+ }
+
+ public void setInitParams(List<InitParamMetaData> initParams)
+ {
+ this.initParams = initParams;
+ }
+
+ public void addInitParam(InitParamMetaData initParam)
+ {
+ if(this.initParams == null)
+ {
+ this.initParams = new ArrayList<InitParamMetaData>();
+ }
+ this.initParams.add(initParam);
+ }
+
+}
\ No newline at end of file
Copied:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/DisplayNameMetaData.java
(from rev 12389,
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java)
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/DisplayNameMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/DisplayNameMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class DisplayNameMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected String lang;
+
+ protected String displayName;
+
+ @XmlAttribute(name = "xml:lang")
+ public void setLang(String lang)
+ {
+ this.lang = lang;
+ }
+
+ @XmlElement(name = "display-name")
+ public void setDisplayName(String displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ public String getLang()
+ {
+ return lang;
+ }
+
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/EmptyMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/EmptyMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/EmptyMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class EmptyMetaData extends IdMetaDataImpl
+{
+}
+
Copied:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/InstanceMetaData.java
(from rev 12389,
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java)
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/InstanceMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/InstanceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,103 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class InstanceMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected String instanceId;
+
+ protected String portletRef;
+
+ protected List<DisplayNameMetaData> displayNames;
+
+ protected PortletPreferencesMetaData portletPreferences;
+
+ protected SecurityConstraintMetaData securityContraint;
+
+ @XmlElement(name = "instance-id")
+ public void setInstanceId(String instanceId)
+ {
+ this.instanceId = instanceId;
+ }
+
+ @XmlElement(name = "portlet-ref")
+ public void setPortletRef(String portletRef)
+ {
+ this.portletRef = portletRef;
+ }
+
+ @XmlElement(name = "display-name")
+ public void setDisplayName(List<DisplayNameMetaData> displayNames)
+ {
+ this.displayNames = displayNames;
+ }
+
+ @XmlElement(name = "perferences")
+ public void setPreferences(PortletPreferencesMetaData preferences)
+ {
+ this.portletPreferences = preferences;
+ }
+
+ @XmlElement(name = "security-constraint")
+ public void setSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+ {
+ this.securityContraint = securityConstraint;
+ }
+
+ public String getInstanceId()
+ {
+ return instanceId;
+ }
+
+ public String getPortletRef()
+ {
+ return portletRef;
+ }
+
+ public List<DisplayNameMetaData> getDisplayNames()
+ {
+ return displayNames;
+ }
+
+ public PortletPreferencesMetaData getPortletPreferences()
+ {
+ return portletPreferences;
+ }
+
+ public SecurityConstraintMetaData getSecurityContraint()
+ {
+ return securityContraint;
+ }
+
+}
Copied:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PolicyPermissionMetaData.java
(from rev 12389,
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java)
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PolicyPermissionMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PolicyPermissionMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PolicyPermissionMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected Set<String> actionName;
+
+ protected String roleName;
+
+ protected EmptyMetaData unchecked;
+
+ @XmlElement(name = "action-name")
+ public void setActionNames(Set<String> actionName)
+ {
+ this.actionName = actionName;
+ }
+
+ @XmlElement(name = "role-name")
+ public void setRoleName(String roleName)
+ {
+ this.roleName = roleName;
+ }
+
+ @XmlElement(name = "unchecked")
+ public void setUnchecked(EmptyMetaData emptyMetaData)
+ {
+ this.unchecked = emptyMetaData;
+ }
+
+ public Set<String> getActionNames()
+ {
+ return actionName;
+ }
+
+ public String getRoleName()
+ {
+ return roleName;
+ }
+
+ public EmptyMetaData getUnchecked()
+ {
+ return unchecked;
+ }
+
+// public boolean isUnchecked()
+// {
+// if (unchecked == null)
+// {
+// return false;
+// }
+// else
+// {
+// return true;
+// }
+// }
+
+}
Copied:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstanceMetaData.java
(from rev 12389,
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java)
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstanceMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstanceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,69 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletDeploymentInstanceMetaData
+{
+ private static final Logger log =
Logger.getLogger(PortletDeploymentInstanceMetaData.class);
+
+ protected InstanceMetaData instance;
+
+ protected boolean overwrite;
+
+ public void setInstance(InstanceMetaData instance)
+ {
+ this.instance = instance;
+ }
+
+ public InstanceMetaData getInstance()
+ {
+ return this.instance;
+ }
+
+ @XmlElement(name = "if-exists")
+ public void setIfExists(String ifExists)
+ {
+ if (ifExists.equals("overwrite"))
+ {
+ this.overwrite = true;
+ }
+ else if (!ifExists.equals("keep"))
+ {
+ log.warn("Unknow value for if-exists, expecting overwrite or keep");
+ }
+ }
+
+ public boolean getOverwrite()
+ {
+ return this.overwrite;
+ }
+
+}
Copied:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstancesMetaData.java
(from rev 12389,
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java)
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstancesMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstancesMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+@XmlRootElement(name = "deployments", namespace = "")
+public class PortletDeploymentInstancesMetaData extends
IdMetaDataImplWithDescriptionGroup
+{
+
+ protected List<PortletDeploymentInstanceMetaData> deploymentInstances;
+
+ public List<PortletDeploymentInstanceMetaData> getDeploymentInstances()
+ {
+ return deploymentInstances;
+ }
+
+ @XmlElement(name = "deployment")
+ public void setDeploymentInstances(List<PortletDeploymentInstanceMetaData>
deploymentInstances)
+ {
+ this.deploymentInstances = deploymentInstances;
+ }
+
+}
Copied:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferenceMetaData.java
(from rev 12389,
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java)
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferenceMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferenceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletPreferenceMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected String name;
+
+ protected String value;
+
+ @XmlElement
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+}
Copied:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferencesMetaData.java
(from rev 12389,
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java)
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferencesMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferencesMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletPreferencesMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected List<PortletPreferenceMetaData> preferences;
+
+ @XmlElement(name = "preference")
+ public void setPreference(List<PortletPreferenceMetaData> preferences)
+ {
+ this.preferences = preferences;
+ }
+
+ public List<PortletPreferenceMetaData> getPreferences()
+ {
+ return preferences;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/SecurityConstraintMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/SecurityConstraintMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/SecurityConstraintMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class SecurityConstraintMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected List<PolicyPermissionMetaData> policyPermission;
+
+ @XmlElement(name = "policy-permission")
+ public void setPolicyPermission(List<PolicyPermissionMetaData>
policyPermission)
+ {
+ this.policyPermission = policyPermission;
+ }
+
+ public List<PolicyPermissionMetaData> getPolicyPermission()
+ {
+ return policyPermission;
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication10MetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication10MetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication10MetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.metadata.portlet.mc;
+
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlRootElement(name = "portlet-app")
+@XmlType(name = "portlet-appType")
+@JBossXmlSchema(xmlns = {@XmlNs(namespaceURI =
PortletMetaDataConstants.PORTLET_JSR_168_NS, prefix = "portlet")},
+ ignoreUnresolvedFieldOrClass = false,
+ namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS,
+ elementFormDefault = XmlNsForm.QUALIFIED)
+public class AnnotationPortletApplication10MetaData extends PortletApplication10MetaData
+{
+}
\ No newline at end of file
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication20MetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication20MetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication20MetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.metadata.portlet.mc;
+
+import org.jboss.portal.metadata.portlet.PortletApplication20MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlRootElement(name = "portlet-app")
+@XmlType(name = "portlet-appType")
+@JBossXmlSchema(xmlns = {@XmlNs(namespaceURI =
PortletMetaDataConstants.PORTLET_JSR_286_NS, prefix = "portlet")},
+ ignoreUnresolvedFieldOrClass = false,
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS,
+ elementFormDefault = XmlNsForm.QUALIFIED)
+public class AnnotationPortletApplication20MetaData extends PortletApplication20MetaData
+{
+}
\ No newline at end of file
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlEnum
+public enum PortletCacheScopeEnum {
+
+ /** The private cache scope */
+ PRIVATE,
+
+ /** The public cache scope */
+ PUBLIC
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,102 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portlet-infoType")
+public class PortletInfoMetaData
+{
+
+ /** The portlet info id */
+ private String id;
+
+ /** The portlet title */
+ private String title;
+
+ /** The portlet short-title */
+ private String shortTitle;
+
+ /* The portlet keywords*/
+ private String keywords;
+
+ public PortletInfoMetaData() {}
+
+ public PortletInfoMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "title")
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ @XmlElement(name = "short-title")
+ public String getShortTitle()
+ {
+ return shortTitle;
+ }
+
+ public void setShortTitle(String shortTitle)
+ {
+ this.shortTitle = shortTitle;
+ }
+
+ @XmlElement(name = "keywords")
+// @XmlJavaTypeAdapter(KeywordsAdapter.class)
+ public String getKeywords()
+ {
+ return keywords;
+ }
+
+ public void setKeywords(String keywords)
+ {
+ this.keywords = keywords;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,400 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.portal.metadata.portlet.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.InitParamMetaData;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionReferenceMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portletType",
+ propOrder = {"id", "description", "portletName",
"displayName", "portletClass", "initParams",
"expirationCache", "cacheScope",
+ "supports", "supportedLocale", "resourceBundle",
"portletInfo", "portletPreferences", "securityRoleRef",
+ "supportedProcessingEvent", "supportedPublishingEvent",
"supportedPublicRenderParameters",
+ "containerRuntimeOptions"})
+public class PortletMetaData extends DescribableMetaData
+{
+
+ /** The portlet id */
+ private String id;
+
+ /** The portlet name */
+ private String portletName;
+
+ /** The portlet class */
+ private String portletClass;
+
+ /** The portlet display name */
+ private List<LocalizedDescriptionMetaData> displayName;
+
+ /** The portlet init parameters */
+ private List<InitParamMetaData> initParams;
+
+ /** The portlet expiration cache */
+ private int expirationCache;
+
+ /** The cache scope */
+ private PortletCacheScopeEnum cacheScope = PortletCacheScopeEnum.PRIVATE;
+
+ /** The supports */
+ private List<SupportsMetaData> supports;
+
+ /** The supported locale */
+ private List<SupportedLocaleMetaData> supportedLocale;
+
+ /** The resource bundle */
+ private String resourceBundle;
+
+ /** The portlet info */
+ private PortletInfoMetaData portletInfo;
+
+ /** The portlet preferences */
+ private PortletPreferencesMetaData portletPreferences;
+
+ /** The portlet security role references */
+ private List<SecurityRoleRefMetaData> securityRoleRef;
+
+ /** The portlet event supported processing event */
+ private List<EventDefinitionReferenceMetaData> supportedProcessingEvent;
+
+ /** The portlet event supported publishing event */
+ private List<EventDefinitionReferenceMetaData> supportedPublishingEvent;
+
+ /** The portlet supported public render parameters */
+ private List<String> supportedPublicRenderParameters;
+
+ /** The portlet container runtime options */
+ private Map<String, ContainerRuntimeMetaData> containerRuntimeOptions;
+
+ /** Reference to the PortletApplicationMetaData */
+ private PortletApplication10MetaData portletApplication;
+
+ public PortletMetaData() {}
+
+ public PortletMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "portlet-name",
+ required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getPortletName()
+ {
+ return portletName;
+ }
+
+ public void setPortletName(String portletName)
+ {
+ this.portletName = portletName;
+ }
+
+ @XmlElement(name = "portlet-class",
+ required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getPortletClass()
+ {
+ return portletClass;
+ }
+
+ public void setPortletClass(String portletClass)
+ {
+ this.portletClass = portletClass;
+ }
+
+ @XmlElement(name = "display-name")
+ public List<LocalizedDescriptionMetaData> getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(List<LocalizedDescriptionMetaData> displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "init-param")
+ public List<InitParamMetaData> getInitParams()
+ {
+ return initParams;
+ }
+
+ public void setInitParams(List<InitParamMetaData> initParams)
+ {
+ this.initParams = initParams;
+ }
+
+ public void addInitParam(InitParamMetaData initParam)
+ {
+ if (this.initParams == null)
+ {
+ this.initParams = new ArrayList<InitParamMetaData>();
+ }
+ this.initParams.add(initParam);
+ }
+
+ @XmlElement(name = "expiration-cache")
+ public int getExpirationCache()
+ {
+ return expirationCache;
+ }
+
+ public void setExpirationCache(int expirationCache)
+ {
+ this.expirationCache = expirationCache;
+ }
+
+ @XmlElement(name = "cache-scope",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS, type =
PortletCacheScopeEnum.class)
+ public PortletCacheScopeEnum getCacheScope()
+ {
+ return cacheScope;
+ }
+
+ public void setCacheScope(PortletCacheScopeEnum cacheScope)
+ {
+ this.cacheScope = cacheScope;
+ }
+
+ @XmlElement(name = "supports",
+ required = true)
+ public List<SupportsMetaData> getSupports()
+ {
+ return supports;
+ }
+
+ public void setSupports(List<SupportsMetaData> supports)
+ {
+ this.supports = supports;
+ }
+
+ public void addSupport(SupportsMetaData support)
+ {
+ if (this.supports == null)
+ {
+ this.supports = new ArrayList<SupportsMetaData>();
+ }
+ this.supports.add(support);
+ }
+
+ @XmlElement(name = "supported-locale")
+// @XmlJavaTypeAdapter(SupportedLocaleAdapter.class)
+ public List<SupportedLocaleMetaData> getSupportedLocale()
+ {
+ return supportedLocale;
+ }
+
+ public void setSupportedLocale(List<SupportedLocaleMetaData> supportedLocale)
+ {
+ this.supportedLocale = supportedLocale;
+ }
+
+ public void addSupportedLocale(SupportedLocaleMetaData supportedLocale)
+ {
+ if(this.supportedLocale == null)
+ {
+ this.supportedLocale = new ArrayList<SupportedLocaleMetaData>();
+ }
+ this.supportedLocale.add(supportedLocale);
+ }
+
+ @XmlElement(name = "resource-bundle")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getResourceBundle()
+ {
+ return resourceBundle;
+ }
+
+ public void setResourceBundle(String resourceBundle)
+ {
+ this.resourceBundle = resourceBundle;
+ }
+
+ @XmlElement(name = "portlet-info")
+ public PortletInfoMetaData getPortletInfo()
+ {
+ return portletInfo;
+ }
+
+ public void setPortletInfo(PortletInfoMetaData portletInfo)
+ {
+ this.portletInfo = portletInfo;
+ }
+
+ @XmlElement(name = "portlet-preferences")
+ public PortletPreferencesMetaData getPortletPreferences()
+ {
+ return portletPreferences;
+ }
+
+ public void setPortletPreferences(PortletPreferencesMetaData portletPreferences)
+ {
+ this.portletPreferences = portletPreferences;
+ }
+
+ @XmlElement(name = "security-role-ref")
+ public List<SecurityRoleRefMetaData> getSecurityRoleRef()
+ {
+ return securityRoleRef;
+ }
+
+ public void setSecurityRoleRef(List<SecurityRoleRefMetaData> securityRoleRef)
+ {
+ this.securityRoleRef = securityRoleRef;
+ }
+
+ public void addSecurityRoleRef(SecurityRoleRefMetaData securityRoleRef)
+ {
+ if (this.securityRoleRef == null)
+ {
+ this.securityRoleRef = new ArrayList<SecurityRoleRefMetaData>();
+ }
+ this.securityRoleRef.add(securityRoleRef);
+ }
+
+ @XmlElement(name = "supported-processing-event",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<EventDefinitionReferenceMetaData> getSupportedProcessingEvent()
+ {
+ return supportedProcessingEvent;
+ }
+
+ public void setSupportedProcessingEvent(List<EventDefinitionReferenceMetaData>
supportedProcessingEvent)
+ {
+ this.supportedProcessingEvent = supportedProcessingEvent;
+ }
+
+ public void addSupportedProcessingEvent(EventDefinitionReferenceMetaData eventRef)
+ {
+ if (this.supportedProcessingEvent == null)
+ {
+ this.supportedProcessingEvent = new
ArrayList<EventDefinitionReferenceMetaData>();
+ }
+ this.supportedProcessingEvent.add(eventRef);
+ }
+
+ @XmlElement(name = "supported-publishing-event",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<EventDefinitionReferenceMetaData> getSupportedPublishingEvent()
+ {
+ return supportedPublishingEvent;
+ }
+
+ public void setSupportedPublishingEvent(List<EventDefinitionReferenceMetaData>
supportedPublishingEvent)
+ {
+ this.supportedPublishingEvent = supportedPublishingEvent;
+ }
+
+ public void addSupportedPublishingEvent(EventDefinitionReferenceMetaData eventRef)
+ {
+ if(this.supportedPublishingEvent == null)
+ {
+ this.supportedPublishingEvent = new
ArrayList<EventDefinitionReferenceMetaData>();
+ }
+ this.supportedPublishingEvent.add(eventRef);
+ }
+
+ @XmlElement(name = "supported-public-render-parameter",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<String> getSupportedPublicRenderParameters()
+ {
+ return supportedPublicRenderParameters;
+ }
+
+ public void setSupportedPublicRenderParameters(List<String>
supportedPublicRenderParameters)
+ {
+ this.supportedPublicRenderParameters = supportedPublicRenderParameters;
+ }
+
+ public void addSupportedPublicRenderParameter(String parameter)
+ {
+ if (this.supportedPublicRenderParameters == null)
+ {
+ this.supportedPublicRenderParameters = new ArrayList<String>();
+ }
+ this.supportedPublicRenderParameters.add(parameter);
+ }
+
+ @XmlElement(name = "container-runtime-option",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ @XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
+ public Map<String, ContainerRuntimeMetaData> getContainerRuntimeOptions()
+ {
+ return containerRuntimeOptions;
+ }
+
+ public void setContainerRuntimeOptions(Map<String, ContainerRuntimeMetaData>
containerRuntimeOptions)
+ {
+ this.containerRuntimeOptions = containerRuntimeOptions;
+ }
+
+ public void addContainerRuntime(ContainerRuntimeMetaData containerRuntimeOption)
+ {
+ if ( this.containerRuntimeOptions == null)
+ {
+ this.containerRuntimeOptions = new HashMap<String,
ContainerRuntimeMetaData>();
+ }
+ this.containerRuntimeOptions.put(containerRuntimeOption.getName(),
containerRuntimeOption);
+ }
+
+ /** . */
+ public PortletApplication10MetaData getPortletApplication()
+ {
+ return portletApplication;
+ }
+
+ public void setPortletApplication(PortletApplication10MetaData portletApplication)
+ {
+ this.portletApplication = portletApplication;
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "portlet-modeType")
+public class PortletModeMetaData
+{
+
+ /** The portlet mode */
+ private String portletMode;
+
+ @XmlValue
+ public String getPortletMode()
+ {
+ return portletMode;
+ }
+
+ public void setPortletMode(String portletMode)
+ {
+ this.portletMode = portletMode;
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,112 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portlet-preferenceType")
+public class PortletPreferenceMetaData
+{
+
+ /** The portlet preference id */
+ private String id;
+
+ /** The portlet preference name */
+ private String name;
+
+ /** The portlet preference value */
+ private List<String> value;
+
+ /** Is read only */
+ private boolean readOnly;
+
+ public PortletPreferenceMetaData() {}
+
+ public PortletPreferenceMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "value")
+ public List<String> getValue()
+ {
+ return value;
+ }
+
+ public void setValue(List<String> value)
+ {
+ this.value = value;
+ }
+
+ public void addValue(String value)
+ {
+ if (this.value == null)
+ {
+ this.value = new ArrayList<String>();
+ }
+ this.value.add(value);
+ }
+
+ @XmlElement(name = "read-only")
+ public boolean isReadOnly()
+ {
+ return readOnly;
+ }
+
+ public void setReadOnly(boolean readOnly)
+ {
+ this.readOnly = readOnly;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.adapter.PortletPreferencesListAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portlet-preferencesType")
+public class PortletPreferencesMetaData
+{
+
+ /** The portlet preferences id */
+ private String id;
+
+ /** The portlet preferences */
+ private Map<String, PortletPreferenceMetaData> portletPreferences;
+
+ /** The portlet preference validator */
+ private String preferenceValidator;
+
+ public PortletPreferencesMetaData() {}
+
+ public PortletPreferencesMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "preference")
+ @XmlJavaTypeAdapter(PortletPreferencesListAdapter.class)
+ public Map<String, PortletPreferenceMetaData> getPortletPreferences()
+ {
+ return portletPreferences;
+ }
+
+ public void setPortletPreferences(Map<String, PortletPreferenceMetaData>
portletPreferences)
+ {
+ this.portletPreferences = portletPreferences;
+ }
+
+ public void addPortletPreference(PortletPreferenceMetaData preference)
+ {
+ if(this.portletPreferences == null)
+ {
+ this.portletPreferences = new HashMap<String,
PortletPreferenceMetaData>();
+ }
+ this.portletPreferences.put(preference.getName(), preference);
+ }
+
+ @XmlElement(name = "preferences-validator")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getPreferenceValidator()
+ {
+ return preferenceValidator;
+ }
+
+ public void setPreferenceValidator(String preferenceValidator)
+ {
+ this.preferenceValidator = preferenceValidator;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "security-role-refType")
+public class SecurityRoleRefMetaData extends DescribableMetaData
+{
+
+ /** The security role ref id */
+ private String id;
+
+ /** The role name */
+ private String roleName;
+
+ /** The role link */
+ private String roleLink;
+
+ public SecurityRoleRefMetaData() {}
+
+ public SecurityRoleRefMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "role-name")
+ public String getRoleName()
+ {
+ return roleName;
+ }
+
+ public void setRoleName(String roleName)
+ {
+ this.roleName = roleName;
+ }
+
+ @XmlElement(name = "role-link")
+ public String getRoleLink()
+ {
+ return roleLink;
+ }
+
+ public void setRoleLink(String roleLink)
+ {
+ this.roleLink = roleLink;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "supported-localeType")
+public class SupportedLocaleMetaData
+{
+
+ /** The supported locale */
+ private String locale;
+
+ @XmlValue
+ public String getLocale()
+ {
+ return locale;
+ }
+
+ public void setLocale(String locale)
+ {
+ this.locale = locale;
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,123 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "supportsType")
+public class SupportsMetaData
+{
+
+ /** The supports id */
+ @XmlAttribute(name = "id")
+ private String id;
+
+ /** The mime type */
+ private String mimeType;
+
+ /** The portletModes */
+ private List<PortletModeMetaData> portletModes;
+
+ /** The window states */
+ private List<WindowStateMetaData> windowStates;
+
+ public SupportsMetaData() {}
+
+ public SupportsMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "mime-type")
+ public String getMimeType()
+ {
+ return mimeType;
+ }
+
+ public void setMimeType(String mimeType)
+ {
+ this.mimeType = mimeType;
+ }
+
+ @XmlElement(name = "portlet-mode")
+ public List<PortletModeMetaData> getPortletModes()
+ {
+ return this.portletModes;
+ }
+
+ public void setPortletModes(List<PortletModeMetaData> portletModes)
+ {
+ this.portletModes = portletModes;
+ }
+
+ public void addPortletMode(PortletModeMetaData portletMode)
+ {
+ if (this.portletModes == null)
+ {
+ this.portletModes = new ArrayList<PortletModeMetaData>();
+ }
+ this.portletModes.add(portletMode);
+ }
+
+ @XmlElement(name = "window-state",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<WindowStateMetaData> getWindowStates()
+ {
+ return this.windowStates;
+ }
+
+ public void setWindowStates(List<WindowStateMetaData> windowStates)
+ {
+ this.windowStates = windowStates;
+ }
+
+ public void addWindowState(WindowStateMetaData windowState)
+ {
+ if (this.windowStates == null)
+ {
+ this.windowStates = new ArrayList<WindowStateMetaData>();
+ }
+ this.windowStates.add(windowState);
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "window-stateType")
+public class WindowStateMetaData
+{
+
+ /** The window state */
+ private String windowState;
+
+ @XmlValue
+ public String getWindowState()
+ {
+ return windowState;
+ }
+
+ public void setWindowState(String windowState)
+ {
+ this.windowState = windowState;
+ }
+
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.security;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portlet-collectionType")
+public class PortletCollectionMetaData
+{
+ /** The portlet name List */
+ private List<String> portletNames;
+
+ @XmlElement(name = "portlet-name")
+ public List<String> getPortletNames()
+ {
+ return portletNames;
+ }
+
+ public void setPortletNames(List<String> portletNames)
+ {
+ this.portletNames = portletNames;
+ }
+
+ public void addPortletname(String portletName)
+ {
+ if( this.portletNames == null )
+ {
+ this.portletNames = new ArrayList<String>();
+ }
+ this.portletNames.add(portletName);
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.security;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "security-constraintType")
+public class SecurityConstraintMetaData
+{
+
+ /** The security constraint id */
+ private String id;
+
+ /** The security constraint display name */
+ private List<LocalizedDescriptionMetaData> displayName;
+
+ /** The portlet collection */
+ private PortletCollectionMetaData portletList;
+
+ /** The user data constraints */
+ private UserDataConstraintMetaData userDataConstraint;
+
+ public SecurityConstraintMetaData() {}
+
+ public SecurityConstraintMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "display-name")
+ public List<LocalizedDescriptionMetaData> getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(List<LocalizedDescriptionMetaData> displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "portlet-collection")
+ public PortletCollectionMetaData getPortletList()
+ {
+ return portletList;
+ }
+
+ public void setPortletList(PortletCollectionMetaData portletList)
+ {
+ this.portletList = portletList;
+ }
+
+ @XmlElement(name = "user-data-constraint")
+ public UserDataConstraintMetaData getUserDataConstraint()
+ {
+ return userDataConstraint;
+ }
+
+ public void setUserDataConstraint(UserDataConstraintMetaData userDataConstraint)
+ {
+ this.userDataConstraint = userDataConstraint;
+ }
+}
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java
===================================================================
---
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java
(rev 0)
+++
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java 2009-03-02
19:52:00 UTC (rev 12924)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.security;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "user-data-constraint")
+public class UserDataConstraintMetaData extends DescribableMetaData
+{
+
+ /** The user data constraint id */
+ private String id;
+
+ /** The user transport quarantee */
+ private String transportQuarantee;
+
+ public UserDataConstraintMetaData() {}
+
+ public UserDataConstraintMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "transport-guarantee")
+ public String getTransportQuarantee()
+ {
+ return transportQuarantee;
+ }
+
+ public void setTransportQuarantee(String transportQuarantee)
+ {
+ this.transportQuarantee = transportQuarantee;
+ }
+}
\ No newline at end of file