JBoss Portal SVN: r12267 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-07 04:41:06 -0500 (Fri, 07 Nov 2008)
New Revision: 12267
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
dashboard config very slow speed3
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 09:19:13 UTC (rev 12266)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 09:41:06 UTC (rev 12267)
@@ -58,6 +58,7 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateTheme() {
+ selenium.setSpeed("10");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CONFIGURE_DASHBOARD);
@@ -91,6 +92,7 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateLayout() {
+ selenium.setSpeed("10");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CONFIGURE_DASHBOARD);
@@ -125,7 +127,7 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testAddPortlet() {
- //selenium.setSpeed("3000");
+ selenium.setSpeed("10");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
15 years, 6 months
JBoss Portal SVN: r12266 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-07 04:19:13 -0500 (Fri, 07 Nov 2008)
New Revision: 12266
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
dashboard config very slow speed2
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 08:46:07 UTC (rev 12265)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 09:19:13 UTC (rev 12266)
@@ -36,9 +36,10 @@
public void logoutAfterTest() {
logout();
}
-/*
+
@Test(enabled = true)
public void testCreatePage() {
+ selenium.setSpeed("0");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CONFIGURE_DASHBOARD);
@@ -54,7 +55,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Powered by JBoss Portal"));
}
-*/
+
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateTheme() {
selenium.click(LNK_DASHBOARD);
15 years, 6 months
JBoss Portal SVN: r12265 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-07 03:46:07 -0500 (Fri, 07 Nov 2008)
New Revision: 12265
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
dashboard config very slow speed
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-06 22:31:02 UTC (rev 12264)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 08:46:07 UTC (rev 12265)
@@ -29,13 +29,14 @@
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
login("admin", "admin");
+ selenium.setSpeed("10");
}
@AfterMethod(groups = { "log" })
public void logoutAfterTest() {
logout();
}
-
+/*
@Test(enabled = true)
public void testCreatePage() {
selenium.click(LNK_DASHBOARD);
@@ -53,7 +54,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Powered by JBoss Portal"));
}
-
+*/
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateTheme() {
selenium.click(LNK_DASHBOARD);
@@ -161,7 +162,7 @@
Assert.assertTrue(selenium.isTextPresent("[admin]"));
//selenium.setSpeed("0");
}
-
+/*
@Test(enabled = true, dependsOnMethods = { "testCreatePage","testAddPortlet" })
public void testMovePortlet() {
final String pageName = "DashMovePage";
@@ -333,5 +334,5 @@
public void testReorder() {
}
-
+*/
}
15 years, 6 months
JBoss Portal SVN: r12261 - branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-11-06 15:40:38 -0500 (Thu, 06 Nov 2008)
New Revision: 12261
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
Log:
JBPORTAL-2228: Portlet instances not showing in page layout under "some ciscumstances"
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-11-06 19:13:49 UTC (rev 12260)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-11-06 20:40:38 UTC (rev 12261)
@@ -185,7 +185,7 @@
private String getIcon(PortletInfo info)
{
String iconLocation = PortletContentEditorPortlet.DEFAULT_PORTLET_ICON;
- PortletInfoInfo portletInfo = info.getAttachment(PortletInfoInfo.class);
+ PortletInfoInfo portletInfo = (PortletInfoInfo)info.getAttachment(PortletInfoInfo.class);
if (portletInfo != null)
{
15 years, 6 months
JBoss Portal SVN: r12260 - in modules: metadata and 29 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-11-06 14:13:49 -0500 (Thu, 06 Nov 2008)
New Revision: 12260
Added:
modules/metadata/
modules/metadata/trunk/
modules/metadata/trunk/.classpath
modules/metadata/trunk/.project
modules/metadata/trunk/.settings/
modules/metadata/trunk/.settings/org.eclipse.jdt.core.prefs
modules/metadata/trunk/.settings/org.eclipse.jdt.ui.prefs
modules/metadata/trunk/.settings/org.maven.ide.eclipse.prefs
modules/metadata/trunk/build/
modules/metadata/trunk/build/pom.xml
modules/metadata/trunk/metadata/
modules/metadata/trunk/metadata/pom.xml
modules/metadata/trunk/metadata/src/
modules/metadata/trunk/metadata/src/main/
modules/metadata/trunk/metadata/src/main/java/
modules/metadata/trunk/metadata/src/main/java/org/
modules/metadata/trunk/metadata/src/main/java/org/jboss/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/CacheInfo.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/LifeCyclePhase.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/TransportGuarantee.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java
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/JBossApplicationMetaData.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/PolicyPermissionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication10MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication20MetaData.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/ValidationErrorHandler.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/EventListAdapter.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/LocalizedStringAdapter.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/PortletModeAdapter.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/adapter/WindowStateAdapter.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/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
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/.PortalAppObjectModelFactory.java.swp
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/PortalAppObjectModelFactory.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/JBossApplicationMetaDataFactory.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/CacheInfoImpl.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/LocalizedStringBuilder.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/PortletApplicationModelFactory.java
modules/metadata/trunk/metadata/src/test/
modules/metadata/trunk/pom.xml
Log:
Initial metadata module creation
Added: modules/metadata/trunk/.classpath
===================================================================
--- modules/metadata/trunk/.classpath (rev 0)
+++ modules/metadata/trunk/.classpath 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target-eclipse/classes" path="metadata/src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target-eclipse/classes"/>
+</classpath>
Added: modules/metadata/trunk/.project
===================================================================
--- modules/metadata/trunk/.project (rev 0)
+++ modules/metadata/trunk/.project 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>module-metadata</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: modules/metadata/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- modules/metadata/trunk/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ modules/metadata/trunk/.settings/org.eclipse.jdt.core.prefs 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,8 @@
+#Thu Oct 16 11:58:15 EDT 2008
+eclipse.preferences.version=1
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: modules/metadata/trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- modules/metadata/trunk/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ modules/metadata/trunk/.settings/org.eclipse.jdt.ui.prefs 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,3 @@
+#Thu Oct 16 11:49:13 EDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
Added: modules/metadata/trunk/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- modules/metadata/trunk/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ modules/metadata/trunk/.settings/org.maven.ide.eclipse.prefs 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,9 @@
+#Thu Oct 16 11:55:23 EDT 2008
+activeProfiles=
+eclipse.preferences.version=1
+filterResources=false
+includeModules=true
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+useMavenFolders=false
+version=1
Added: modules/metadata/trunk/build/pom.xml
===================================================================
--- modules/metadata/trunk/build/pom.xml (rev 0)
+++ modules/metadata/trunk/build/pom.xml 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,99 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal</groupId>
+ <artifactId>jboss-portal-parent</artifactId>
+ <version>1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>module-parent</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Portal Metadata</name>
+ <version>trunk-SNAPSHOT</version>
+ <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-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>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <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>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <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>
+
+
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Added: modules/metadata/trunk/metadata/pom.xml
===================================================================
--- modules/metadata/trunk/metadata/pom.xml (rev 0)
+++ modules/metadata/trunk/metadata/pom.xml 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,65 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>metadata-metadata</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Portal Modules Deployer</name>
+
+ <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>
+ </dependency> -->
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <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>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <encoding>iso-8859-1</encoding>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties/>
+</project>
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/CacheInfo.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/CacheInfo.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/CacheInfo.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * 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.figureoutlocationlater;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public interface CacheInfo
+{
+
+ /**
+ * The expiration in seconds.
+ *
+ * @return the expiration in seconds
+ */
+ int getExpirationSecs();
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/LifeCyclePhase.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/LifeCyclePhase.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/LifeCyclePhase.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * 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.figureoutlocationlater;
+
+import javax.xml.bind.annotation.XmlEnumValue;
+
+/**
+ * Enumerate the life cycle phase of a Portlet.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public enum LifeCyclePhase
+{
+ @XmlEnumValue("ACTION_PHASE") ACTION,
+ @XmlEnumValue("EVENT_PHASE") EVENT,
+ @XmlEnumValue("RENDER_PHASE") RENDER,
+ @XmlEnumValue("RESOURCE_PHASE") RESOURCE
+}
\ No newline at end of file
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/TransportGuarantee.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/TransportGuarantee.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/figureoutlocationlater/TransportGuarantee.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * 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.figureoutlocationlater;
+
+/**
+ * Type safe enumeration class for transport guarantee.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public enum TransportGuarantee
+{
+ NONE, INTEGRAL, CONFIDENTIAL
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,20 @@
+package org.jboss.portal.metadata.jboss.app;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+public class PortalAppMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ private String appName;
+
+ public void setAppName(String appname)
+ {
+ this.appName = appname;
+ }
+
+ public String getAppName()
+ {
+ return appName;
+ }
+
+}
Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/app/PortalAppMetaData.java
___________________________________________________________________
Name: svn:executable
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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.jboss.portlet;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class JBossApplicationMetaData
+{
+
+ /** . */
+ protected Boolean remotable;
+
+ /** The application id that overrides the context path. */
+ protected String id;
+
+ /** . */
+ protected Map<String, JBossPortletMetaData> portlets;
+
+ public JBossApplicationMetaData()
+ {
+ portlets = new LinkedHashMap<String, JBossPortletMetaData>();
+ }
+
+ public Map<String, JBossPortletMetaData> getPortlets()
+ {
+ return portlets;
+ }
+
+ public Boolean getRemotable()
+ {
+ return remotable;
+ }
+
+ public void setRemotable(Boolean remotable)
+ {
+ this.remotable = remotable;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+}
Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossApplicationMetaData.java
___________________________________________________________________
Name: svn:executable
+
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,163 @@
+/******************************************************************************
+ * 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;
+
+import org.jboss.portal.common.transaction.Transactions;
+
+/**
+ * Specific metadata specified to jboss portlet container.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 7226 $
+ */
+public class JBossPortletMetaData implements Cloneable
+{
+
+ /** . */
+ private String name;
+
+ /** . */
+ private Boolean remotable;
+
+ /** . */
+ private SecurityConstraintMetaData securityConstraint;
+
+ /** . */
+ private Integer cacheRefType;
+
+ /** . */
+ private Transactions.Type txType;
+
+ /** . */
+ private Boolean distributed;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Boolean getRemotable()
+ {
+ return remotable;
+ }
+
+ public void setRemotable(Boolean remotable)
+ {
+ this.remotable = remotable;
+ }
+
+ public Boolean getDistributed()
+ {
+ return distributed;
+ }
+
+ public void setDistributed(Boolean distributed)
+ {
+ this.distributed = distributed;
+ }
+
+ public SecurityConstraintMetaData getSecurityConstraint()
+ {
+ return securityConstraint;
+ }
+
+ public void setSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+ {
+ this.securityConstraint = securityConstraint;
+ }
+
+ public Integer getCacheRefType()
+ {
+ return cacheRefType;
+ }
+
+ public void setCacheRefType(Integer cacheRefType)
+ {
+ this.cacheRefType = cacheRefType;
+ }
+
+ public Transactions.Type getTxType()
+ {
+ return txType;
+ }
+
+ public void setTxType(Transactions.Type txType)
+ {
+ this.txType = txType;
+ }
+
+ /**
+ * Merge the current meta data with portlet application.
+ */
+ public void merge(JBossApplicationMetaData application)
+ {
+ if (remotable == null)
+ {
+ remotable = application.getRemotable();
+ }
+ }
+
+ /**
+ * Merge the current meta data with a specified one.
+ */
+ public void merge(JBossPortletMetaData portlet)
+ {
+ if (remotable == null)
+ {
+ remotable = portlet.getRemotable();
+ }
+ if (txType == null)
+ {
+ txType = portlet.getTxType();
+ }
+ if (cacheRefType == null)
+ {
+ cacheRefType = portlet.getCacheRefType();
+ }
+ if (securityConstraint == null)
+ {
+ securityConstraint = portlet.getSecurityConstraint();
+ }
+ if (distributed == null)
+ {
+ distributed = portlet.getDistributed();
+ }
+ }
+
+ public Object clone()
+ {
+ try
+ {
+ return super.clone();
+ }
+ catch (CloneNotSupportedException e)
+ {
+ throw new Error(e);
+ }
+ }
+}
Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
___________________________________________________________________
Name: svn:executable
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * 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;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class PolicyPermissionMetaData
+{
+
+ private String roleName;
+ private Set actions;
+
+ public PolicyPermissionMetaData()
+ {
+ actions = new HashSet();
+ }
+
+ public String getRoleName()
+ {
+ return roleName;
+ }
+
+ public void setRoleName(String roleName)
+ {
+ this.roleName = roleName;
+ }
+
+ public Set getActions()
+ {
+ return actions;
+ }
+
+ public void setActions(Set actions)
+ {
+ this.actions = actions;
+ }
+}
Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PolicyPermissionMetaData.java
___________________________________________________________________
Name: svn:executable
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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.jboss.portlet;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class SecurityConstraintMetaData
+{
+
+ private Map policyPermissions;
+
+ public SecurityConstraintMetaData()
+ {
+ policyPermissions = new LinkedHashMap();
+ }
+
+ public Map getPolicyPermissions()
+ {
+ return policyPermissions;
+ }
+
+ public void setPolicyPermissions(Map policyPermissions)
+ {
+ this.policyPermissions = policyPermissions;
+ }
+}
Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SecurityConstraintMetaData.java
___________________________________________________________________
Name: svn:executable
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication10MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication10MetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication10MetaData.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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;
+
+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/AnnotationPortletApplication20MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication20MetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/AnnotationPortletApplication20MetaData.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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;
+
+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/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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * 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-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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 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.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+
+/**
+ * @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 LocalizedString 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")
+ @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+ public LocalizedString getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(LocalizedString displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "listener-class")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getListenerClass()
+ {
+ return listenerClass;
+ }
+
+ public void setListenerClass(String listenerClass)
+ {
+ this.listenerClass = listenerClass;
+ }
+
+}
+
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,217 @@
+/******************************************************************************
+ * 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.portlet.PortletMetaData;
+import org.jboss.portal.metadata.portlet.security.SecurityConstraintMetaData;
+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;
+
+/**
+ * @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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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.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;
+import org.jboss.portal.metadata.portlet.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.FilterAdapter;
+
+/**
+ * @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);
+ }
+}
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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";
+}
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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);
+ }
+
+}
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 = "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/ValidationErrorHandler.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ValidationErrorHandler.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ValidationErrorHandler.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * 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 org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ValidationErrorHandler implements ErrorHandler
+{
+
+ public void error(SAXParseException e) throws SAXException
+ {
+ throw new SAXException("Syntax error on line: " + e.getLineNumber() + ", column: " + e.getColumnNumber() + "\n"
+ + e.getMessage());
+ }
+
+ public void fatalError(SAXParseException e) throws SAXException
+ {
+ throw new SAXException("Fatal syntax error on line: " + e.getLineNumber() + ", column: " + e.getColumnNumber()
+ + "\n" + e.getMessage());
+ }
+
+ public void warning(SAXParseException e) throws SAXException
+ {
+ // TODO - maybe logging or similar stuff
+ }
+
+}
\ No newline at end of file
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * 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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * 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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * 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/EventListAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/EventListAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/EventListAdapter.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.event.EventDefinitionMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class EventListAdapter
+ extends XmlAdapter<EventDefinitionMetaData[], Map<String, EventDefinitionMetaData>>
+{
+
+ @Override
+ public EventDefinitionMetaData[] marshal(Map<String, EventDefinitionMetaData> eventMap) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, EventDefinitionMetaData> unmarshal(EventDefinitionMetaData[] eventList) throws Exception
+ {
+ Map<String, EventDefinitionMetaData> eventMap = new HashMap<String, EventDefinitionMetaData>();
+ for (EventDefinitionMetaData eventDef : eventList)
+ {
+ eventMap.put(eventDef.getQname().getLocalPart(), eventDef);
+ }
+ return eventMap;
+ }
+
+}
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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.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/LocalizedStringAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/LocalizedStringAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/LocalizedStringAdapter.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * 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.Locale;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.common.i18n.LocaleFormat;
+import org.jboss.portal.common.i18n.LocalizedString;
+import static org.jboss.portal.metadata.portlet.PortletMetaDataConstants.*;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class LocalizedStringAdapter
+ extends XmlAdapter<List<LocalizedDescriptionMetaData>, LocalizedString>
+{
+
+ @Override
+ public List<LocalizedDescriptionMetaData> marshal(LocalizedString arg0) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public LocalizedString unmarshal(List<LocalizedDescriptionMetaData> descriptionList) throws Exception
+ {
+ Map<Locale, String> map = new LinkedHashMap<Locale, String>();
+ for (LocalizedDescriptionMetaData d : descriptionList)
+ {
+ Locale locale = LocaleFormat.DEFAULT.getLocale(d.getLang());
+ map.put(locale, d.getDescription());
+ }
+ return new LocalizedString(map, new Locale(DEFAULT_LOCALE));
+ }
+
+}
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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/PortletModeAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletModeAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletModeAdapter.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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.adapter;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.Mode;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletModeAdapter extends XmlAdapter<String, Mode>
+{
+
+ @Override
+ public String marshal(Mode mode) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Mode unmarshal(String name) throws Exception
+ {
+ return Mode.create(name);
+ }
+
+}
+
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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/adapter/WindowStateAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/WindowStateAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/WindowStateAdapter.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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.adapter;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.WindowState;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class WindowStateAdapter extends XmlAdapter<String, WindowState>
+{
+
+ @Override
+ public String marshal(WindowState arg0) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public WindowState unmarshal(String name) throws Exception
+ {
+ return WindowState.create(name);
+ }
+
+}
+
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * 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.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public abstract class DescribableMetaData
+{
+
+ /** The description */
+ private LocalizedString description;
+
+ @XmlElement(name = "description")
+ @XmlJavaTypeAdapter(value= LocalizedStringAdapter.class, type=LocalizedString.class)
+ public LocalizedString getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(LocalizedString 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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * 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.common.i18n.LocalizedString;
+import org.jboss.portal.figureoutlocationlater.LifeCyclePhase;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.InitParamMetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+
+/**
+ * @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<LifeCyclePhase> lifecycle;
+
+ /** The filter display name */
+ private LocalizedString 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<LifeCyclePhase> getLifecycle()
+ {
+ return lifecycle;
+ }
+
+ public void setLifecycle(List<LifeCyclePhase> lifecycle)
+ {
+ this.lifecycle = lifecycle;
+ }
+
+ public void addLifecycle(LifeCyclePhase lifecycle)
+ {
+ if( this.lifecycle == null)
+ {
+ this.lifecycle = new ArrayList<LifeCyclePhase>();
+ }
+ this.lifecycle.add(lifecycle);
+ }
+
+ @XmlElement(name = "display-name")
+ @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+ public LocalizedString getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(LocalizedString displayNames)
+ {
+ this.displayName = displayNames;
+ }
+
+ @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
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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,402 @@
+/******************************************************************************
+ * 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.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+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.event.EventDefinitionReferenceMetaData;
+import org.jboss.portal.metadata.portlet.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+
+/**
+ * @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 LocalizedString 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")
+ @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+ public LocalizedString getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(LocalizedString displayNames)
+ {
+ this.displayName = displayNames;
+ }
+
+ @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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.metadata.portlet.adapter.PortletModeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "portlet-modeType")
+public class PortletModeMetaData
+{
+
+ /** The portlet mode */
+ private Mode portletMode;
+
+ @XmlValue
+ @XmlJavaTypeAdapter(PortletModeAdapter.class)
+ public Mode getPortletMode()
+ {
+ return portletMode;
+ }
+
+ public void setPortletMode(Mode 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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,125 @@
+/******************************************************************************
+ * 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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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;
+
+import org.jboss.portal.WindowState;
+import org.jboss.portal.metadata.portlet.adapter.WindowStateAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "window-stateType")
+public class WindowStateMetaData
+{
+
+ /** The window state */
+ private WindowState windowState;
+
+ @XmlValue
+ @XmlJavaTypeAdapter(WindowStateAdapter.class)
+ public WindowState getWindowState()
+ {
+ return windowState;
+ }
+
+ public void setWindowState(WindowState 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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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 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.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+
+/**
+ * @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 LocalizedString 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")
+ @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+ public LocalizedString getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(LocalizedString 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 2008-11-06 19:13:49 UTC (rev 12260)
@@ -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.security;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.figureoutlocationlater.TransportGuarantee;
+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 TransportGuarantee 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 TransportGuarantee getTransportQuarantee()
+ {
+ return transportQuarantee;
+ }
+
+ public void setTransportQuarantee(TransportGuarantee transportQuarantee)
+ {
+ this.transportQuarantee = transportQuarantee;
+ }
+}
\ No newline at end of file
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/.PortalAppObjectModelFactory.java.swp
===================================================================
(Binary files differ)
Property changes on: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/.PortalAppObjectModelFactory.java.swp
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/PortalAppObjectModelFactory.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/PortalAppObjectModelFactory.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/app/PortalAppObjectModelFactory.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,57 @@
+package org.jboss.portal.metamodel.jboss.app;
+
+import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+public class PortalAppObjectModelFactory implements GenericObjectModelFactory
+{
+
+
+ public void addChild(Object parent, Object child, UnmarshallingContext ctx,
+ String namespaceURI, String localName)
+ {
+ //intentionally left empty
+ }
+
+ public Object newChild(Object parent, UnmarshallingContext ctx,
+ String namespaceURI, String localName, Attributes attrs)
+ {
+ return null;
+ }
+
+ public void setValue(Object o, UnmarshallingContext ctx,
+ String namespaceURI, String localName, String value)
+ {
+ if (o instanceof PortalAppMetaData)
+ {
+ PortalAppMetaData app = (PortalAppMetaData)o;
+ if ("app-name".equals(localName))
+ {
+ app.setAppName(value);
+ }
+ else
+ {
+ throw new RuntimeException("[" + localName + "] is an unknown element for jboss-portal-app.xml");
+ }
+ }
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx,
+ String namespaceURI, String localName)
+ {
+ return root;
+ }
+
+ public Object newRoot(Object root, UnmarshallingContext ctx,
+ String namespaceURI, String localName, Attributes attrs)
+ {
+ if (root == null)
+ {
+ root = new PortalAppMetaData();
+ }
+ return root;
+ }
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/JBossApplicationMetaDataFactory.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/JBossApplicationMetaDataFactory.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/JBossApplicationMetaDataFactory.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,267 @@
+/******************************************************************************
+ * 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.metamodel.jboss.portlet;
+
+import org.jboss.portal.common.transaction.Transactions;
+import org.jboss.portal.metadata.jboss.portlet.JBossApplicationMetaData;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
+import org.jboss.portal.metadata.jboss.portlet.PolicyPermissionMetaData;
+import org.jboss.portal.metamodel.jboss.portlet.info.impl.CacheInfoImpl;
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 10557 $
+ */
+public class JBossApplicationMetaDataFactory implements GenericObjectModelFactory
+{
+
+ public Object newRoot(Object root,
+ UnmarshallingContext nav,
+ String nsURI,
+ String localName,
+ Attributes attrs)
+ {
+ if (root == null)
+ {
+ root = new JBossApplicationMetaData();
+ }
+ return root;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext nav, String uri, String name)
+ {
+ return root;
+ }
+
+ public Object newChild(Object object, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+ {
+ if (object instanceof JBossApplicationMetaData)
+ {
+ if ("portlet".equals(localName))
+ {
+ return createJBossPortlet();
+ }
+ }
+// else if (object instanceof JBossPortletMetaData)
+// {
+// if ("security-constraint".equals(localName))
+// {
+// return new SecurityConstraintMetaData();
+// }
+// }
+// else if (object instanceof SecurityConstraintMetaData)
+// {
+// if ("policy-permission".equals(localName))
+// {
+// return new PolicyPermissionMetaData();
+// }
+// }
+ else if (object instanceof PolicyPermissionMetaData)
+ {
+ if ("unchecked".equals(localName))
+ {
+ return "unchecked";
+ }
+ }
+ return null;
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext nav, String nsURI, String localName)
+ {
+ if (parent instanceof JBossApplicationMetaData)
+ {
+ JBossApplicationMetaData app = (JBossApplicationMetaData)parent;
+ if (child instanceof JBossPortletMetaData)
+ {
+ JBossPortletMetaData portlet = (JBossPortletMetaData)child;
+ app.getPortlets().put(portlet.getName(), portlet);
+ portlet.merge(app);
+ }
+ }
+// else if (parent instanceof JBossPortletMetaData)
+// {
+// JBossPortletMetaData portlet = (JBossPortletMetaData)parent;
+// if (child instanceof SecurityConstraintMetaData)
+// {
+// portlet.setSecurityConstraint((SecurityConstraintMetaData)child);
+// }
+// }
+// else if (parent instanceof SecurityConstraintMetaData)
+// {
+// SecurityConstraintMetaData securityConstraint = (SecurityConstraintMetaData)parent;
+// if (child instanceof PolicyPermissionMetaData)
+// {
+// PolicyPermissionMetaData policyPermission = (PolicyPermissionMetaData)child;
+// PolicyPermissionMetaData other = (PolicyPermissionMetaData)securityConstraint.getPolicyPermissions().get(policyPermission.getRoleName());
+// if (other != null)
+// {
+// other.getActions().addAll(policyPermission.getActions());
+// }
+// else
+// {
+// securityConstraint.getPolicyPermissions().put(policyPermission.getRoleName(), policyPermission);
+// }
+// }
+// }
+// else if (parent instanceof PolicyPermissionMetaData)
+// {
+// PolicyPermissionMetaData policyPermission = (PolicyPermissionMetaData)parent;
+// if ("unchecked".equals(child))
+// {
+// policyPermission.setRoleName(SecurityConstants.UNCHECKED_ROLE_NAME);
+// }
+// }
+ }
+
+ public void setValue(Object object, UnmarshallingContext nav, String nsURI, String localName, String value)
+ {
+ if (object instanceof JBossApplicationMetaData)
+ {
+ JBossApplicationMetaData app = (JBossApplicationMetaData)object;
+ if ("app-id".equals(localName))
+ {
+ app.setId(value);
+ }
+ else if ("remotable".equals(localName))
+ {
+ if ("true".equalsIgnoreCase(value))
+ {
+ app.setRemotable(Boolean.TRUE);
+ }
+ else if ("false".equalsIgnoreCase(value))
+ {
+ app.setRemotable(Boolean.FALSE);
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+ }
+ }
+ else if (object instanceof JBossPortletMetaData)
+ {
+ JBossPortletMetaData portlet = (JBossPortletMetaData)object;
+ if ("portlet-name".equals(localName))
+ {
+ portlet.setName(value);
+ }
+ else if ("remotable".equals(localName))
+ {
+ if ("true".equalsIgnoreCase(value))
+ {
+ portlet.setRemotable(Boolean.TRUE);
+ }
+ else if ("false".equalsIgnoreCase(value))
+ {
+ portlet.setRemotable(Boolean.FALSE);
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+ }
+ else if ("distributed".equals(localName))
+ {
+ if ("true".equalsIgnoreCase(value))
+ {
+ portlet.setDistributed(Boolean.TRUE);
+ }
+ else if ("false".equalsIgnoreCase(value))
+ {
+ portlet.setDistributed(Boolean.FALSE);
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+ }
+ else if ("ref-type".equals(localName))
+ {
+ if ("strong".equals(localName))
+ {
+ portlet.setCacheRefType(new Integer(CacheInfoImpl.REF_STRONG));
+ }
+ else if ("soft".equals(localName))
+ {
+ portlet.setCacheRefType(new Integer(CacheInfoImpl.REF_SOFT));
+ }
+ else
+ {
+ // log.warn("Unrecognized reference type " + refType);
+ }
+ }
+ else if ("trans-attribute".equals(localName))
+ {
+ if ("Required".equalsIgnoreCase(value))
+ {
+ portlet.setTxType(Transactions.TYPE_REQUIRED);
+ }
+ else if ("Mandatory".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_MANDATORY);
+ }
+ else if ("Never".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_NEVER);
+ }
+ else if ("Supports".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_SUPPORTS);
+ }
+ else if ("NotSupported".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_NOT_SUPPORTED);
+ }
+ else if ("RequiresNew".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_REQUIRES_NEW);
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+ }
+ }
+ else if (object instanceof PolicyPermissionMetaData)
+ {
+ PolicyPermissionMetaData policyPermission = (PolicyPermissionMetaData)object;
+ if ("role-name".equals(localName))
+ {
+ policyPermission.setRoleName(value);
+ }
+ else if ("action-name".equals(localName))
+ {
+ policyPermission.getActions().add(value);
+ }
+ }
+ }
+
+ /** Can be subclasses to allow sub class. */
+ protected JBossPortletMetaData createJBossPortlet()
+ {
+ return new JBossPortletMetaData();
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/CacheInfoImpl.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/CacheInfoImpl.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/jboss/portlet/info/impl/CacheInfoImpl.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * 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.metamodel.jboss.portlet.info.impl;
+
+import org.apache.log4j.Logger;
+//import org.jboss.portal.portlet.info.CacheInfo;
+import org.jboss.portal.figureoutlocationlater.CacheInfo;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6697 $
+ */
+public class CacheInfoImpl implements CacheInfo
+{
+
+ /** Cache uses strong references. */
+ public static int REF_STRONG = 0;
+
+ /** Cache uses soft references. */
+ public static int REF_SOFT = 1;
+
+ /** . */
+ private static Logger log = Logger.getLogger(CacheInfoImpl.class);
+
+ /** . */
+ private int expirationTimeSecs;
+
+ /** . */
+ private int referenceType;
+
+ public CacheInfoImpl(PortletMetaData portletMD, JBossPortletMetaData jbossPortletMD)
+ {
+ expirationTimeSecs = portletMD.getExpirationCache();
+ if (expirationTimeSecs < 0 && expirationTimeSecs != -1)
+ {
+ log.warn("Seen bad caching expiration value " + expirationTimeSecs + " disable caching instead");
+ expirationTimeSecs = 0;
+ }
+
+ referenceType = REF_STRONG;
+ if (jbossPortletMD != null)
+ {
+ referenceType = jbossPortletMD.getCacheRefType() == null ? REF_STRONG : jbossPortletMD.getCacheRefType().intValue();
+ }
+ }
+
+ public int getExpirationSecs()
+ {
+ return expirationTimeSecs;
+ }
+
+ public int getReferenceType()
+ {
+ return referenceType;
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/LocalizedStringBuilder.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/LocalizedStringBuilder.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/LocalizedStringBuilder.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * 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.metamodel.portlet;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.adapter.LocalizedStringAdapter;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class LocalizedStringBuilder
+{
+
+ /** The object to localized meta data. */
+ private Map<Object, LocalizedMetaDataContainer> map = new LinkedHashMap<Object, LocalizedMetaDataContainer>();
+
+ /** The logger. */
+ private static final Logger log = Logger.getLogger(LocalizedStringBuilder.class);
+
+ public void put(Object object, LocalizedDescriptionMetaData description)
+ {
+ LocalizedMetaDataContainer container = map.get(object);
+ if (container == null)
+ {
+ container = new LocalizedMetaDataContainer();
+ map.put(object, container);
+ }
+ container.addLocalizedDescription(description);
+ }
+
+ public LocalizedString getLocalizedString(Object key)
+ {
+ try
+ {
+ return this.map.get(key) != null ? this.map.get(key).getLocalizedString() : null;
+ }
+ catch (Exception e)
+ {
+ log.error("could not generate localized string.", e);
+ return null;
+ }
+ }
+
+ private static class LocalizedMetaDataContainer
+ {
+ /** The list of localiezd meta data */
+ private List<LocalizedDescriptionMetaData> list = new ArrayList<LocalizedDescriptionMetaData>();
+
+ public void addLocalizedDescription(LocalizedDescriptionMetaData description)
+ {
+ this.list.add(description);
+ }
+
+ public LocalizedString getLocalizedString() throws Exception
+ {
+ LocalizedStringAdapter adapter = new LocalizedStringAdapter();
+ return adapter.unmarshal(list);
+ }
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/PortletApplicationModelFactory.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/PortletApplicationModelFactory.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metamodel/portlet/PortletApplicationModelFactory.java 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,852 @@
+/******************************************************************************
+ * 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.metamodel.portlet;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.metadata.portlet.AnnotationPortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.AnnotationPortletApplication20MetaData;
+import org.jboss.portal.metadata.portlet.CustomPortletModeMetaData;
+import org.jboss.portal.metadata.portlet.CustomWindowStateMetaData;
+import org.jboss.portal.metadata.portlet.ListenerMetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication20MetaData;
+import org.jboss.portal.metadata.portlet.PublicRenderParameterMetaData;
+import org.jboss.portal.metadata.portlet.UserAttributeMetaData;
+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.EventDefinitionMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionReferenceMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMappingMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletInfoMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletModeMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletPreferenceMetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletPreferencesMetaData;
+import org.jboss.portal.metadata.portlet.portlet.SecurityRoleRefMetaData;
+import org.jboss.portal.metadata.portlet.portlet.SupportedLocaleMetaData;
+import org.jboss.portal.metadata.portlet.portlet.SupportsMetaData;
+import org.jboss.portal.metadata.portlet.portlet.WindowStateMetaData;
+import org.jboss.portal.metadata.portlet.security.PortletCollectionMetaData;
+import org.jboss.portal.metadata.portlet.security.SecurityConstraintMetaData;
+import org.jboss.portal.metadata.portlet.security.UserDataConstraintMetaData;
+import static org.jboss.portal.metadata.portlet.PortletMetaDataConstants.DEFAULT_LOCALE;
+import static org.jboss.portal.metadata.portlet.PortletMetaDataConstants.PORTLET_JSR_286_NS;
+import org.jboss.portal.figureoutlocationlater.LifeCyclePhase;
+import org.jboss.portal.figureoutlocationlater.TransportGuarantee;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletCacheScopeEnum;
+
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletApplicationModelFactory implements GenericObjectModelFactory
+{
+
+ /** LocalizedDescriptionMetaData container for descriptions */
+ private LocalizedStringBuilder descriptions = new LocalizedStringBuilder();
+
+ /** LocalizedDescriptionMetaData container for displayNames */
+ private LocalizedStringBuilder displayNames = new LocalizedStringBuilder();
+
+ /** Guess what? The logger. */
+ private static final Logger log = Logger.getLogger(PortletApplicationModelFactory.class);
+
+ public Object newRoot(Object root, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+ {
+
+ String version = attrs.getValue("version");
+ String id = attrs.getValue("id");
+
+ // portlet-app 2.0 or 1.0
+ PortletApplication10MetaData md = PORTLET_JSR_286_NS.equals(nsURI)
+ ? new AnnotationPortletApplication20MetaData()
+ : new AnnotationPortletApplication10MetaData();
+
+ // Set portlet-app id
+ md.setId(id);
+ // Set portlet-app version
+ md.setVersion(version);
+ // return
+ return md;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String nsURI, String name)
+ {
+ return root;
+ }
+
+ public Object newChild(Object object, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+ {
+ String id = attrs.getValue("id");
+ if (object instanceof DescribableMetaData)
+ {
+
+ if ("description".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.descriptions.put(object, localized);
+ return localized;
+ }
+ }
+
+ // portlet-app
+ if (object instanceof PortletApplication10MetaData)
+ {
+ if ("portlet".equals(localName))
+ {
+ return new PortletMetaData(id);
+ }
+ else if ("custom-portlet-mode".equals(localName))
+ {
+ return new CustomPortletModeMetaData(id);
+ }
+ else if ("custom-window-state".equals(localName))
+ {
+ return new CustomWindowStateMetaData(id);
+ }
+ else if ("user-attribute".equals(localName))
+ {
+ return new UserAttributeMetaData(id);
+ }
+ else if ("security-constraint".equals(localName))
+ {
+ return new SecurityConstraintMetaData(id);
+ }
+ }
+
+ // portlet-app 2.0
+ if (object instanceof PortletApplication20MetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ if ("public-render-parameter".equals(localName))
+ {
+ return new PublicRenderParameterMetaData(id);
+ }
+ else if ("event-definition".equals(localName))
+ {
+ return new EventDefinitionMetaData(id);
+ }
+ else if ("filter".equals(localName))
+ {
+ return new FilterMetaData();
+ }
+ else if ("filter-mapping".equals(localName))
+ {
+ return new FilterMappingMetaData();
+ }
+ else if ("listener".equals(localName))
+ {
+ return new ListenerMetaData(id);
+ }
+ else if ("container-runtime-option".equals(localName))
+ {
+ return new ContainerRuntimeMetaData();
+ }
+ }
+
+ // portlet
+ if (object instanceof PortletMetaData)
+ {
+ if ("init-param".equals(localName))
+ {
+ return new InitParamMetaData(id);
+ }
+ else if ("display-name".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.displayNames.put(object, localized);
+ return localized;
+ }
+ else if ("supports".equals(localName))
+ {
+ return new SupportsMetaData(id);
+ }
+ else if ("supported-locale".equals(localName))
+ {
+ return new SupportedLocaleMetaData();
+ }
+ else if ("portlet-info".equals(localName))
+ {
+ return new PortletInfoMetaData(id);
+ }
+ else if ("portlet-preferences".equals(localName))
+ {
+ return new PortletPreferencesMetaData(id);
+ }
+ else if ("security-role-ref".equals(localName))
+ {
+ return new SecurityRoleRefMetaData(id);
+ }
+ else if ("supported-processing-event".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ return new EventDefinitionReferenceMetaData(id);
+ }
+ else if ("supported-publishing-event".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ return new EventDefinitionReferenceMetaData(id);
+ }
+ else if ("container-runtime-option".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ return new ContainerRuntimeMetaData();
+ }
+ }
+
+ // security-constraint
+ if (object instanceof SecurityConstraintMetaData)
+ {
+ if ("portlet-collection".equals(localName))
+ {
+ return new PortletCollectionMetaData();
+ }
+ else if ("user-data-constraint".equals(localName))
+ {
+ return new UserDataConstraintMetaData(id);
+ }
+ else if ("display-name".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.displayNames.put(object, localized);
+ return localized;
+ }
+ }
+
+ // supports
+ if (object instanceof SupportsMetaData)
+ {
+ if ("portlet-mode".equals(localName))
+ {
+ return new PortletModeMetaData();
+ }
+ else if ("window-state".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ return new WindowStateMetaData();
+ }
+ }
+
+ // preference (in portlet-preferences)
+ if (object instanceof PortletPreferencesMetaData)
+ {
+ if ("preference".equals(localName))
+ {
+ return new PortletPreferenceMetaData(id);
+ }
+ }
+
+ // filter
+ if (object instanceof FilterMetaData)
+ {
+ if ("init-param".equals(localName))
+ {
+ return new InitParamMetaData(id);
+ }
+ else if ("display-name".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.displayNames.put(object, localized);
+ return localized;
+ }
+ }
+
+ // listener
+ if (object instanceof ListenerMetaData)
+ {
+ if ("display-name".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.displayNames.put(object, localized);
+ return localized;
+ }
+ }
+
+ return null;
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext nav, String nsURI, String localName)
+ {
+
+ if (child instanceof DescribableMetaData)
+ {
+ DescribableMetaData md = (DescribableMetaData)child;
+ LocalizedString d = this.descriptions.getLocalizedString(md);
+ md.setDescription(d);
+ }
+
+ // portlet app
+ if (parent instanceof PortletApplication10MetaData)
+ {
+ PortletApplication10MetaData md = (PortletApplication10MetaData)parent;
+ // add portlet
+ if (child instanceof PortletMetaData)
+ {
+ PortletMetaData portlet = (PortletMetaData)child;
+ portlet.setDisplayName(this.displayNames.getLocalizedString(portlet));
+ md.addPortlet(portlet);
+ }
+ // add custom-portlet-mode
+ else if (child instanceof CustomPortletModeMetaData)
+ {
+ md.addCustomPortletMode((CustomPortletModeMetaData)child);
+ }
+ // add custom window state
+ else if (child instanceof CustomWindowStateMetaData)
+ {
+ md.addCustomWindowState((CustomWindowStateMetaData)child);
+ }
+ // add user-attribute
+ else if (child instanceof UserAttributeMetaData)
+ {
+ md.addUserAttribute((UserAttributeMetaData)child);
+ }
+ // add security-constraint
+ else if (child instanceof SecurityConstraintMetaData)
+ {
+ SecurityConstraintMetaData security = (SecurityConstraintMetaData)child;
+ // display-name
+ security.setDisplayName(this.displayNames.getLocalizedString(security));
+ md.addSecurityConstraint(security);
+ }
+ }
+
+ // portlet-app 2.0
+ if (parent instanceof PortletApplication20MetaData)
+ {
+ PortletApplication20MetaData md = (PortletApplication20MetaData)parent;
+ // add public-render-parameter
+ if (child instanceof PublicRenderParameterMetaData)
+ {
+ md.addPublicRenderParameter((PublicRenderParameterMetaData)child);
+ }
+ // add event-defintion
+ else if (child instanceof EventDefinitionMetaData)
+ {
+ md.addEventDefinition((EventDefinitionMetaData)child);
+ }
+ // add filter
+ else if (child instanceof FilterMetaData)
+ {
+ FilterMetaData filter = (FilterMetaData)child;
+ filter.setDisplayName(this.displayNames.getLocalizedString(filter));
+ md.addFilter(filter);
+ }
+ // add filter-mapping
+ else if (child instanceof FilterMappingMetaData)
+ {
+ md.addFilterMapping((FilterMappingMetaData)child);
+ }
+ // add container-runtime-option
+ else if (child instanceof ContainerRuntimeMetaData)
+ {
+ md.addContainerRuntime((ContainerRuntimeMetaData)child);
+ }
+ // add listener
+ else if (child instanceof ListenerMetaData)
+ {
+ ListenerMetaData listener = (ListenerMetaData)child;
+ listener.setDisplayName(this.displayNames.getLocalizedString(listener));
+ md.addListener(listener);
+ }
+ }
+
+ // portlet
+ if (parent instanceof PortletMetaData)
+ {
+ PortletMetaData md = (PortletMetaData)parent;
+ // init-param
+ if (child instanceof InitParamMetaData)
+ {
+ md.addInitParam((InitParamMetaData)child);
+ }
+ // supports
+ else if (child instanceof SupportsMetaData)
+ {
+ md.addSupport((SupportsMetaData)child);
+ }
+ // supported-locale
+ else if (child instanceof SupportedLocaleMetaData)
+ {
+ md.addSupportedLocale((SupportedLocaleMetaData)child);
+ }
+ // portlet-info
+ else if (child instanceof PortletInfoMetaData)
+ {
+ md.setPortletInfo((PortletInfoMetaData)child);
+ }
+ // portlet-preferences
+ else if (child instanceof PortletPreferencesMetaData)
+ {
+ md.setPortletPreferences((PortletPreferencesMetaData)child);
+ }
+ // security-role-ref
+ else if (child instanceof SecurityRoleRefMetaData)
+ {
+ md.addSecurityRoleRef((SecurityRoleRefMetaData)child);
+ }
+ // supported-events
+ else if (child instanceof EventDefinitionReferenceMetaData)
+ {
+ if ("supported-processing-event".equals(localName))
+ {
+ md.addSupportedProcessingEvent((EventDefinitionReferenceMetaData)child);
+ }
+ else if ("supported-publishing-event".equals(localName))
+ {
+ md.addSupportedPublishingEvent((EventDefinitionReferenceMetaData)child);
+ }
+ }
+ // container-runtime-option
+ else if (child instanceof ContainerRuntimeMetaData)
+ {
+ md.addContainerRuntime((ContainerRuntimeMetaData)child);
+ }
+ }
+
+ // adding user-data-constraint and portlet-name(s) to security-constraint
+ if (parent instanceof SecurityConstraintMetaData)
+ {
+ SecurityConstraintMetaData md = (SecurityConstraintMetaData)parent;
+ // add user-data-constraint
+ if (child instanceof UserDataConstraintMetaData)
+ {
+ md.setUserDataConstraint((UserDataConstraintMetaData)child);
+ }
+ // add portlet-collection
+ else if (child instanceof PortletCollectionMetaData)
+ {
+ md.setPortletList((PortletCollectionMetaData)child);
+ }
+ }
+
+ // filter
+ if (parent instanceof FilterMetaData)
+ {
+ FilterMetaData md = (FilterMetaData)parent;
+ // add init-param
+ if (child instanceof InitParamMetaData)
+ {
+ md.addInitParam((InitParamMetaData)child);
+ }
+ }
+
+ // add portlet-mode and window-state
+ if (parent instanceof SupportsMetaData)
+ {
+ SupportsMetaData md = (SupportsMetaData)parent;
+ if (child instanceof PortletModeMetaData)
+ {
+ md.addPortletMode((PortletModeMetaData)child);
+ }
+ else if (child instanceof WindowStateMetaData)
+ {
+ md.addWindowState((WindowStateMetaData)child);
+ }
+ }
+
+ // add preference
+ if (parent instanceof PortletPreferencesMetaData)
+ {
+ PortletPreferencesMetaData md = (PortletPreferencesMetaData)parent;
+ if (child instanceof PortletPreferenceMetaData)
+ {
+ md.addPortletPreference((PortletPreferenceMetaData)child);
+ }
+ }
+ }
+
+ public void setValue(Object object, UnmarshallingContext nav, String nsURI, String localName, String value)
+ {
+
+ // JSR 286 portlet-app attributes - default-namespace and resource-bundle.
+ if (object instanceof PortletApplication20MetaData)
+ {
+ PortletApplication20MetaData md = (PortletApplication20MetaData)object;
+ if ("resource-bundle".equals(localName))
+ {
+ md.setResourceBundle(value);
+ }
+ else if ("default-namespace".equals(localName))
+ {
+ try
+ {
+ md.setDefaultNamespace(new URI(value));
+ }
+ catch (URISyntaxException e)
+ {
+ log.error("Invalid syntax for default-namespace: " + value);
+ }
+ }
+ }
+
+ // portlet
+ if (object instanceof PortletMetaData)
+ {
+ PortletMetaData md = (PortletMetaData)object;
+ if ("portlet-name".equals(localName))
+ {
+ md.setPortletName(value);
+ }
+ else if ("portlet-class".equals(localName))
+ {
+ md.setPortletClass(value);
+ }
+ else if ("cache-scope".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ md.setCacheScope(PortletCacheScopeEnum.valueOf(value));
+ }
+ else if ("expiration-cache".equals(localName))
+ {
+ md.setExpirationCache(Integer.valueOf(value));
+ }
+ else if ("resource-bundle".equals(localName))
+ {
+ md.setResourceBundle(value);
+ }
+ else if ("supported-public-render-parameter".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ md.addSupportedPublicRenderParameter(value);
+ }
+ }
+
+ if (object instanceof LocalizedDescriptionMetaData)
+ {
+ LocalizedDescriptionMetaData localized = (LocalizedDescriptionMetaData)object;
+ if ("description".equals(localName))
+ {
+ localized.setDescription(value);
+ }
+ else if ("display-name".equals(localName))
+ {
+ localized.setDescription(value);
+ }
+ }
+
+ // init-param
+ if (object instanceof InitParamMetaData)
+ {
+ InitParamMetaData md = (InitParamMetaData)object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ md.setValue(value);
+ }
+ }
+
+ // supports
+ if (object instanceof SupportsMetaData)
+ {
+ SupportsMetaData md = (SupportsMetaData)object;
+ if ("mime-type".equals(localName))
+ {
+ md.setMimeType(value);
+ }
+ }
+
+ // supports --- portlet-mode
+ if (object instanceof PortletModeMetaData)
+ {
+ PortletModeMetaData md = (PortletModeMetaData)object;
+ if ("portlet-mode".equals(localName))
+ {
+ md.setPortletMode(Mode.create(value));
+ }
+ }
+
+ // supports --- window-state
+ if (object instanceof WindowStateMetaData)
+ {
+ WindowStateMetaData md = (WindowStateMetaData)object;
+ if ("window-state".equals(localName))
+ {
+ md.setWindowState(WindowState.create(value));
+ }
+ }
+
+ // supported-locale
+ if (object instanceof SupportedLocaleMetaData)
+ {
+ SupportedLocaleMetaData md = (SupportedLocaleMetaData)object;
+ if ("supported-locale".equals(localName))
+ {
+ md.setLocale(value);
+ }
+ }
+
+ // portlet-info
+ if (object instanceof PortletInfoMetaData)
+ {
+ PortletInfoMetaData md = (PortletInfoMetaData)object;
+ if ("title".equals(localName))
+ {
+ md.setTitle(value);
+ }
+ else if ("short-title".equals(localName))
+ {
+ md.setShortTitle(value);
+ }
+ else if ("keywords".equals(localName))
+ {
+ md.setKeywords(value);
+ }
+ }
+
+ // portlet-preferences
+ if (object instanceof PortletPreferencesMetaData)
+ {
+ PortletPreferencesMetaData md = (PortletPreferencesMetaData)object;
+ if ("preferences-validator".equals(localName))
+ {
+ md.setPreferenceValidator(value);
+ }
+ }
+
+ // preference
+ if (object instanceof PortletPreferenceMetaData)
+ {
+ PortletPreferenceMetaData md = (PortletPreferenceMetaData)object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ md.addValue(value);
+ }
+ else if ("read-only".equals(localName))
+ {
+ md.setReadOnly(Boolean.valueOf(value));
+ }
+ }
+
+ // security-role-ref
+ if (object instanceof SecurityRoleRefMetaData)
+ {
+ SecurityRoleRefMetaData md = (SecurityRoleRefMetaData)object;
+ if ("role-name".equals(localName))
+ {
+ md.setRoleName(value);
+ }
+ else if ("role-link".equals(localName))
+ {
+ md.setRoleLink(value);
+ }
+ }
+
+ // supported events
+ if (object instanceof EventDefinitionReferenceMetaData)
+ {
+ EventDefinitionReferenceMetaData md = (EventDefinitionReferenceMetaData)object;
+ if ("qname".equals(localName))
+ {
+ md.setQname(nav.resolveQName(value));
+ }
+ else if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ }
+
+ // custom-portlet-mode
+ if (object instanceof CustomPortletModeMetaData)
+ {
+ CustomPortletModeMetaData mode = (CustomPortletModeMetaData)object;
+ if ("portlet-mode".equals(localName))
+ {
+ mode.setPortletMode(value);
+ }
+ else if ("portal-managed".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ mode.setPortalManaged(Boolean.parseBoolean(value));
+ }
+ }
+
+ // custom-window-state
+ if (object instanceof CustomWindowStateMetaData)
+ {
+ CustomWindowStateMetaData md = (CustomWindowStateMetaData)object;
+ if ("window-state".equals(localName))
+ {
+ md.setWindowState(value);
+ }
+ }
+
+ // user-attribute
+ if (object instanceof UserAttributeMetaData)
+ {
+ UserAttributeMetaData md = (UserAttributeMetaData)object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ }
+
+ // user-data-constraint
+ if (object instanceof UserDataConstraintMetaData)
+ {
+ UserDataConstraintMetaData md = (UserDataConstraintMetaData)object;
+ if ("transport-guarantee".equals(localName))
+ {
+ md.setTransportQuarantee(TransportGuarantee.valueOf(value));
+ }
+ }
+
+ // portlet-collection in security-constraint
+ if (object instanceof PortletCollectionMetaData)
+ {
+ PortletCollectionMetaData md = (PortletCollectionMetaData)object;
+ if ("portlet-name".equals(localName))
+ {
+ md.addPortletname(value);
+ }
+ }
+
+ // filter
+ if (object instanceof FilterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ FilterMetaData md = (FilterMetaData)object;
+ if ("filter-class".equals(localName))
+ {
+ md.setFilterClass(value);
+ }
+ else if ("filter-name".equals(localName))
+ {
+ md.setFilterName(value);
+ }
+ else if ("lifecycle".equals(localName))
+ {
+ int end = value.length() - "_PHASE".length();
+ String lifeCycle = value.substring(0, end > 0 ? end : 0);
+ try
+ {
+ md.addLifecycle(LifeCyclePhase.valueOf(lifeCycle));
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new IllegalArgumentException("Invalid value for lifecycle. Valid values are [RENDER_PHASE, RESOURCE_PHASE, ACTION_PHASE, EVENT_PHASE]");
+ }
+ }
+ }
+
+ // filter-mapping
+ if (object instanceof FilterMappingMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ FilterMappingMetaData md = (FilterMappingMetaData)object;
+ if ("filter-name".equals(localName))
+ {
+ md.setName(value);
+ }
+ if ("portlet-name".equals(localName))
+ {
+ md.addPortletName(value);
+ }
+ }
+
+ // event-defintion
+ if (object instanceof EventDefinitionMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ EventDefinitionMetaData md = (EventDefinitionMetaData)object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("qname".equals(localName))
+ {
+ md.setQname(nav.resolveQName(value));
+ }
+ else if ("value-type".equals(localName))
+ {
+ md.setValueType(value);
+ }
+ else if ("alias".equals(localName))
+ {
+ md.addAlias(nav.resolveQName(value));
+ }
+ }
+
+ // public-render-parameter
+ if (object instanceof PublicRenderParameterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ PublicRenderParameterMetaData md = (PublicRenderParameterMetaData)object;
+ if ("identifier".equals(localName))
+ {
+ md.setIdentifier(value);
+ }
+ else if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("qname".equals(localName))
+ {
+ md.setQname(nav.resolveQName(value));
+ }
+ else if ("alias".equals(localName))
+ {
+ md.addAlias(nav.resolveQName(value));
+ }
+ }
+
+ // container-runtime-option
+ if (object instanceof ContainerRuntimeMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ ContainerRuntimeMetaData md = (ContainerRuntimeMetaData)object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ md.addValue(value);
+ }
+ }
+
+ // listener
+ if (object instanceof ListenerMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ ListenerMetaData md = (ListenerMetaData)object;
+ if ("listener-class".equals(localName))
+ {
+ md.setListenerClass(value);
+ }
+ }
+ }
+}
Added: modules/metadata/trunk/pom.xml
===================================================================
--- modules/metadata/trunk/pom.xml (rev 0)
+++ modules/metadata/trunk/pom.xml 2008-11-06 19:13:49 UTC (rev 12260)
@@ -0,0 +1,41 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>module-aggregator</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Portal Metadata</name>
+ <version>trunk-SNAPSHOT</version>
+
+ <distributionManagement>
+ <repository>
+ <!--Copy the distribution jar file to a local checkout of the maven repository
+ - This variable can be set in $MAVEN_HOME/conf/settings.xml-->
+ <id>repository.jboss.org</id>
+ <url>file://${jboss.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ <uniqueVersion>true</uniqueVersion>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <modules>
+ <module>build</module>
+ <module>metadata</module>
+ </modules>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
15 years, 6 months
JBoss Portal SVN: r12259 - modules/deployer/trunk.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-11-06 14:11:03 -0500 (Thu, 06 Nov 2008)
New Revision: 12259
Removed:
modules/deployer/trunk/bin/
Log:
Remove binary files that shouldn't have been committed to the repo.
15 years, 6 months
JBoss Portal SVN: r12258 - modules/deployer/trunk/deployer.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-11-06 14:10:16 -0500 (Thu, 06 Nov 2008)
New Revision: 12258
Removed:
modules/deployer/trunk/deployer/target/
Log:
Remove binary files that shouldn't have been committed to the repo.
15 years, 6 months
JBoss Portal SVN: r12257 - in modules: deployer and 44 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-11-06 14:05:26 -0500 (Thu, 06 Nov 2008)
New Revision: 12257
Added:
modules/deployer/
modules/deployer/trunk/
modules/deployer/trunk/.classpath
modules/deployer/trunk/.project
modules/deployer/trunk/.settings/
modules/deployer/trunk/.settings/org.eclipse.jdt.core.prefs
modules/deployer/trunk/.settings/org.maven.ide.eclipse.prefs
modules/deployer/trunk/bin/
modules/deployer/trunk/bin/org/
modules/deployer/trunk/bin/org/jboss/
modules/deployer/trunk/bin/org/jboss/portal/
modules/deployer/trunk/bin/org/jboss/portal/deployer/
modules/deployer/trunk/bin/org/jboss/portal/deployer/PortalDeployerPre.class
modules/deployer/trunk/build/
modules/deployer/trunk/build/.cvsignore
modules/deployer/trunk/build/.project
modules/deployer/trunk/build/pom.xml
modules/deployer/trunk/deployer/
modules/deployer/trunk/deployer/.classpath
modules/deployer/trunk/deployer/.cvsignore
modules/deployer/trunk/deployer/.project
modules/deployer/trunk/deployer/pom.xml
modules/deployer/trunk/deployer/src/
modules/deployer/trunk/deployer/src/assemble/
modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer-components.xml
modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer.xml
modules/deployer/trunk/deployer/src/main/
modules/deployer/trunk/deployer/src/main/deployer/
modules/deployer/trunk/deployer/src/main/deployer/META-INF/
modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml
modules/deployer/trunk/deployer/src/main/deployer/dtd/
modules/deployer/trunk/deployer/src/main/deployer/dtd/jboss-portal-app_2_6.dtd
modules/deployer/trunk/deployer/src/main/deployer/dtd/jboss-portlet_2_6.dtd
modules/deployer/trunk/deployer/src/main/java/
modules/deployer/trunk/deployer/src/main/java/org/
modules/deployer/trunk/deployer/src/main/java/org/jboss/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/Deployment.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/jboss/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/jboss/portlet/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/jboss/portlet/parsing/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/jboss/portlet/parsing/JBossPortletParsingDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/WebDeploymentListener.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletModule.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletModuleMBean.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletWarDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/PortalAppParsingDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/PortletParsingDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/structure/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/structure/PortletStructure.java
modules/deployer/trunk/deployer/src/main/resources/
modules/deployer/trunk/deployer/src/test/
modules/deployer/trunk/deployer/target/
modules/deployer/trunk/deployer/target/archive-tmp/
modules/deployer/trunk/deployer/target/classes/
modules/deployer/trunk/deployer/target/classes/org/
modules/deployer/trunk/deployer/target/classes/org/jboss/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/Deployment.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/PortalEntityResolver.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/jboss/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/jboss/portlet/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/jboss/portlet/parsing/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/jboss/portlet/parsing/JBossPortletParsingDeployer.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/LibDirectoryStructure.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/PortalPostWebDeployer.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/WebDeploymentListener.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletDeployer.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletModule.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletModuleMBean.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletWarDeployer.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/parsing/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/parsing/PortalAppParsingDeployer.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/parsing/PortletParsingDeployer.class
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/structure/
modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/structure/PortletStructure.class
modules/deployer/trunk/deployer/target/deployer-deployer-trunk-SNAPSHOT-sources.jar
modules/deployer/trunk/deployer/target/deployer-deployer-trunk-SNAPSHOT.jar
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/META-INF/
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/META-INF/.deployer-jboss-beans.xml.swp
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/META-INF/deployer-jboss-beans.xml
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/deployer-deployer-trunk-SNAPSHOT.jar
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/jboss-portal-app_2_6.dtd
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/jboss-portlet_2_6.dtd
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/metadata-metadata-trunk-SNAPSHOT.jar
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-lib.jar
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-portal-lib.jar
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-portlet-lib.jar
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-web-lib.jar
modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portlet-mc-2.1.0-SNAPSHOT.jar
modules/deployer/trunk/pom.xml
Log:
Initial deployer module creation
Added: modules/deployer/trunk/.classpath
===================================================================
--- modules/deployer/trunk/.classpath (rev 0)
+++ modules/deployer/trunk/.classpath 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target-eclipse/classes" path="deployer/src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="deployer/src/main/resources" path="deployer/src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target-eclipse/classes"/>
+</classpath>
Added: modules/deployer/trunk/.project
===================================================================
--- modules/deployer/trunk/.project (rev 0)
+++ modules/deployer/trunk/.project 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>module-deployer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: modules/deployer/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- modules/deployer/trunk/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ modules/deployer/trunk/.settings/org.eclipse.jdt.core.prefs 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,13 @@
+#Mon Sep 29 16:30:59 EDT 2008
+eclipse.preferences.version=1
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: modules/deployer/trunk/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- modules/deployer/trunk/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ modules/deployer/trunk/.settings/org.maven.ide.eclipse.prefs 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,10 @@
+#Mon Sep 29 16:00:35 EDT 2008
+activeProfiles=
+eclipse.preferences.version=1
+filterResources=false
+includeModules=true
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+useMavenFolders=false
+version=1
Added: modules/deployer/trunk/bin/org/jboss/portal/deployer/PortalDeployerPre.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/bin/org/jboss/portal/deployer/PortalDeployerPre.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/build/.cvsignore
===================================================================
--- modules/deployer/trunk/build/.cvsignore (rev 0)
+++ modules/deployer/trunk/build/.cvsignore 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,3 @@
+build.log
+local.properties
+build.iml
Property changes on: modules/deployer/trunk/build/.cvsignore
___________________________________________________________________
Name: svn:executable
+
Added: modules/deployer/trunk/build/.project
===================================================================
--- modules/deployer/trunk/build/.project (rev 0)
+++ modules/deployer/trunk/build/.project 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>build</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Property changes on: modules/deployer/trunk/build/.project
___________________________________________________________________
Name: svn:executable
+
Added: modules/deployer/trunk/build/pom.xml
===================================================================
--- modules/deployer/trunk/build/pom.xml (rev 0)
+++ modules/deployer/trunk/build/pom.xml 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,110 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal</groupId>
+ <artifactId>jboss-portal-parent</artifactId>
+ <version>1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>module-parent</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Portal Deployer</name>
+ <version>trunk-SNAPSHOT</version>
+ <url>http://labs.jboss.com/jbossportal</url>
+
+ <properties>
+ <version.assembly>2.2-beta-2</version.assembly>
+ <version.jboss-deployers>2.0.0.CR1</version.jboss-deployers>
+ <version.jboss-metadata>1.0.0.CR1</version.jboss-metadata>
+ <version.jboss.portal.metadata>trunk-SNAPSHOT</version.jboss.portal.metadata>
+ <version.jboss.portal.web>1.2.0-SNAPSHOT</version.jboss.portal.web>
+ <version.jboss.portal.portlet>2.1.0-SNAPSHOT</version.jboss.portal.portlet>
+ <version.jboss-as>5.0.0.CR2</version.jboss-as>
+ <version.saxon>6.5.3</version.saxon>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <version>${version.jboss-deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <version>${version.jboss-deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <version>${version.jboss-metadata}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <version>${version.jboss-as}</version>
+ </dependency>
+ <dependency>
+ <groupId>saxon</groupId>
+ <artifactId>saxon</artifactId>
+ <version>${version.saxon}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-metadata</artifactId>
+ <version>${version.jboss.portal.metadata}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.web</groupId>
+ <artifactId>web-web</artifactId>
+ <version>${version.jboss.portal.web}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-portlet</artifactId>
+ <version>${version.jboss.portal.portlet}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-mc</artifactId>
+ <version>${version.jboss.portal.portlet}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Added: modules/deployer/trunk/deployer/.classpath
===================================================================
--- modules/deployer/trunk/deployer/.classpath (rev 0)
+++ modules/deployer/trunk/deployer/.classpath 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-ant/lib/ant.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
+ <classpathentry kind="lib" path="/tools/lib/xalan.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jaf/lib/activation.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-j2ee.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
+ <classpathentry kind="lib" path="/tools/lib/cargo-core-uberjar-0.8.jar"/>
+ <classpathentry kind="lib" path="/tools/lib/ant-junit.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: modules/deployer/trunk/deployer/.classpath
___________________________________________________________________
Name: svn:executable
+
Added: modules/deployer/trunk/deployer/.cvsignore
===================================================================
--- modules/deployer/trunk/deployer/.cvsignore (rev 0)
+++ modules/deployer/trunk/deployer/.cvsignore 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,2 @@
+output
+bin
Property changes on: modules/deployer/trunk/deployer/.cvsignore
___________________________________________________________________
Name: svn:executable
+
Added: modules/deployer/trunk/deployer/.project
===================================================================
--- modules/deployer/trunk/deployer/.project (rev 0)
+++ modules/deployer/trunk/deployer/.project 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: modules/deployer/trunk/deployer/.project
___________________________________________________________________
Name: svn:executable
+
Added: modules/deployer/trunk/deployer/pom.xml
===================================================================
--- modules/deployer/trunk/deployer/pom.xml (rev 0)
+++ modules/deployer/trunk/deployer/pom.xml 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,98 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>deployer-deployer</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Portal Modules Deployer</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>saxon</groupId>
+ <artifactId>saxon</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-metadata</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.web</groupId>
+ <artifactId>web-web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-portlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-mc</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <encoding>iso-8859-1</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>${version.assembly}</version>
+ <configuration>
+ <finalName>jboss-portal.deployer</finalName>
+ <descriptors>
+ <descriptor>src/assemble/jboss-portal-deployer.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+
+
+ </plugins>
+
+
+ </build>
+
+ <properties/>
+</project>
Added: modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer-components.xml
===================================================================
--- modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer-components.xml (rev 0)
+++ modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer-components.xml 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,13 @@
+<component>
+
+ <fileSets>
+
+ <fileSet>
+ <directory>src/main/deployer</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+
+ </fileSets>
+
+</component>
+
Added: modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer.xml
===================================================================
--- modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer.xml (rev 0)
+++ modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer.xml 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,39 @@
+<assembly>
+ <id>jboss50</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <baseDirectory>jboss-portal.deployer</baseDirectory>
+
+ <componentDescriptors>
+ <componentDescriptor>src/assemble/jboss-portal-deployer-components.xml</componentDescriptor>
+ </componentDescriptors>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/</outputDirectory>
+ <useProjectArtifact>true</useProjectArtifact>
+ <includes>
+ <include>org.jboss.portal.deployer:deployer-deployer</include>
+ <include>org.jboss.portal.metadata:metadata-metadata</include>
+ <include>org.jboss.portal.common:common-common</include>
+ <include>org.jboss.portal.common:common-portal</include>
+ <include>org.jboss.portal.web:web-web</include>
+ <include>org.jboss.portal.portlet:portlet-portlet</include>
+ <include>org.jboss.portal.portlet:portlet-mc</include>
+
+ <include>javax.ccpp:ccpp</include>
+ <include>javax.portlet:portlet-api</include>
+
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include></include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+
+</assembly>
+
Added: modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml
===================================================================
--- modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml (rev 0)
+++ modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+ *********************************************************************************************************************
+ Portal deployment
+
+ ********************************************************************************************************************* -->
+
+ <!-- portal custom dtd's -->
+ <bean name="PortalEntityResolver" class="org.jboss.portal.deployer.PortalEntityResolver">
+ <property name="DTDMapping">
+ <map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>-//JBoss Portal//DTD JBoss Portlet 2.6//EN</key>
+ <value>dtd/jboss-portlet_2_6.dtd</value>
+ </entry>
+ <entry>
+ <key>-//JBoss Portal//DTD JBoss Portal Application 2.6//EN</key>
+ <value>dtd/jboss-portal-app_2_6.dtd</value>
+ </entry>
+ <entry>
+ <key>-//JBoss Portal//DTD Portal Object 2.6//EN</key>
+ <value>dtd/portal-object_2_6.dtd</value>
+ </entry>
+ <entry>
+ <key>-//JBoss Portal//DTD Portlet Instances 2.6//EN</key>
+ <value>dtd/portlet-instances_2_6.dtd</value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+
+<!-- initial fake deployer only used to get JBoss AS 5 working with Portal 2.7 -->
+ <bean name="PortalPostWebDeployer" class="org.jboss.portal.deployer.portal.PortalPostWebDeployer">
+ <property name="warDeployerOrder"><inject bean="WarDeployer" property="relativeOrder"/></property>
+ <property name="warDeployer"><inject bean="WarDeployer"/></property>
+ <depends>WarDeployer</depends>
+ </bean>
+<!-- end fake deployer -->
+
+
+ <!-- Portal Deployer -->
+ <bean name="LibDirectoryStructure" class="org.jboss.portal.deployer.portal.LibDirectoryStructure">
+ </bean>
+
+
+ <!-- Portlet Deployer -->
+<!-- <bean name="PortletStructure" class="org.jboss.portal.deployer.portlet.structure.PortletStructure">
+ </bean> -->
+
+ <bean name="PortalAppParsingDeployer" class="org.jboss.portal.deployer.portlet.parsing.PortalAppParsingDeployer">
+ <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
+ </bean>
+
+ <bean name="PortletParsingDeployer" class="org.jboss.portal.deployer.portlet.parsing.PortletParsingDeployer">
+ <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
+ </bean>
+
+ <bean name="JBossPortletParsingDeployer" class="org.jboss.portal.deployer.jboss.portlet.parsing.JBossPortletParsingDeployer">
+ <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
+ </bean>
+
+<!-- <bean name="PortletWarDeployer" class="org.jboss.portal.deployer.portlet.PortletWarDeployer"/> -->
+
+ <bean name="PortletDeployer" class="org.jboss.portal.deployer.portlet.PortletDeployer">
+ <property name="warDeployerOrder"><inject bean="WarDeployer" property="relativeOrder"/></property>
+ </bean>
+
+</deployment>
Added: modules/deployer/trunk/deployer/src/main/deployer/dtd/jboss-portal-app_2_6.dtd
===================================================================
--- modules/deployer/trunk/deployer/src/main/deployer/dtd/jboss-portal-app_2_6.dtd (rev 0)
+++ modules/deployer/trunk/deployer/src/main/deployer/dtd/jboss-portal-app_2_6.dtd 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--
+<!DOCTYPE jboss-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Web Application 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-app_2_6.dtd">
+-->
+
+<!ELEMENT jboss-portal-app (app-name?)>
+
+<!--
+When a web application is deployed, the context path under wich it is deployed
+is taken as application name. The application name value in this descriptor is
+used to override it. When a component references a references a portlet, it needs to
+reference the application too and if the portlet application war file is renammed
+the reference is not valid anymore. Therefore this tag is used to have an application
+name that does not depend upon the context path under which the application is deployed.
+-->
+<!ELEMENT app-name (#PCDATA)>
Added: modules/deployer/trunk/deployer/src/main/deployer/dtd/jboss-portlet_2_6.dtd
===================================================================
--- modules/deployer/trunk/deployer/src/main/deployer/dtd/jboss-portlet_2_6.dtd (rev 0)
+++ modules/deployer/trunk/deployer/src/main/deployer/dtd/jboss-portlet_2_6.dtd 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!-- The additional configuration elements of the JBoss portlet container.
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+-->
+
+<!--
+The remotable element is used to configure the default behavior of the portlets with
+respect to WSRP exposure.
+
+For each portlet defined in portlet.xml, it is possible to configure specific
+settings of the portlet container.
+
+It is also possible to inject services in the portlet context of the application
+using the service elements.
+-->
+<!ELEMENT portlet-app (app-id?, remotable?,portlet*,service*)>
+
+<!--
+The portlet application id that will be used by the portlet container instead of the context path.
+-->
+<!ELEMENT app-id (#PCDATA)>
+
+<!--
+Additional configuration for a portlet.
+
+The portlet-name defines the name of the portlet. It must match a portlet defined already
+in portlet.xml of the same web application.
+
+The remotable element configures the portlet exposure to WSRP. If no value is present
+then the value considered is either the value defined globally at the portlet
+application level or false.
+
+The trans-attribute value specifies the behavior of the portlet when it is invoked at
+runtime with respect to the transactionnal context. According to how the portlet is
+invoked a transaction may exist or not before the portlet is invoked. Usually in the
+local context the portal transaction could be present. By default the value considered is
+ NotSupported which means that the portal transaction will be suspended for the duration
+ of the portlet invocation.
+
+Example:
+
+<portlet>
+ <portlet-name>MyPortlet</portlet-name>
+ <remotable>true</remotable>
+ <trans-attribute>Required</trans-attribute>
+</portlet>
+
+-->
+<!ELEMENT portlet (portlet-name,remotable?,ajax?,session-config?,transaction?,
+ header-content?,portlet-info?)>
+
+<!--
+The portlet name.
+-->
+<!ELEMENT portlet-name (#PCDATA)>
+
+<!--
+The remotable value is used for WSRP exposure. The accepted values are the
+litterals true of false.
+-->
+<!ELEMENT remotable (#PCDATA)>
+
+<!--
+The ajax tag allows to configure the ajax capabilities of the portlet. If
+the portlet is tagged as partial-refresh then the portal may use partial page
+refreshing and render only that portlet. If the portlet partial-refresh value
+is false, then the portal will perform a full page refresh when the portlet is refreshed.
+-->
+<!ELEMENT ajax (partial-refresh)>
+
+<!--
+The authorized values for the partial-refresh element are true or false.
+-->
+<!ELEMENT partial-refresh (#PCDATA)>
+
+<!--
+Additional portlet information
+-->
+<!ELEMENT portlet-info (icon?)>
+
+<!--
+Defines icons for the portlet, they can be used by the administration portlet
+to represent a particular portlet.
+-->
+<!ELEMENT icon (small-icon?, large-icon?)>
+
+<!--
+A small icon image, usually 16x16, gif, jpg and png are usually supported.
+An absolute URL or a URL starting with a '/' in the context of the webapp are accepted:
+eg. http://www.example.com/images/smallIcon.png
+eg. /images/smallIcon.png
+-->
+<!ELEMENT small-icon (#PCDATA)>
+
+<!--
+A large icon image, usually 32x32, gif, jpg and png are usually supported.
+An absolute URL or a URL starting with a '/' in the context of the webapp are accepted:
+eg. http://www.example.com/images/smallIcon.png
+eg. /images/smallIcon.png
+-->
+<!ELEMENT large-icon (#PCDATA)>
+
+<!--
+This element configure the portlet session of the portlet.
+
+The distributed element instructs the container to distribute the session attributes
+using the portal session replication. It applies only to local portlets are not to
+remote portlets. The default value is false.
+
+Example:
+
+<session-config>
+ <distributed>true</distributed>
+</session-config>
+
+-->
+<!ELEMENT session-config (distributed)>
+
+<!--
+The authorized values for the distributed element are true or false.
+-->
+<!ELEMENT distributed (#PCDATA)>
+
+<!--
+Defines how the portlet behaves with the transactionnal context. The default value
+is Never.
+
+Example:
+
+<transaction>
+ <trans-attribute>Required</transaction>
+<transaction>
+-->
+<!ELEMENT transaction (trans-attribute)>
+
+<!--
+The trans-attribute value defines the transactionnal behavior. The accepted values
+are Required, Mandatory, Never, Supports, NotSupported and RequiresNew.
+-->
+<!ELEMENT trans-attribute (#PCDATA)>
+
+<!--
+Specify content which should be included in the portal aggregated page when the portlet
+is present on that page. This setting only applies when the portlet is used in the local mode.
+-->
+<!ELEMENT header-content (link|script|meta)*>
+
+<!--
+Creates a header markup element for linked resources,
+see http://www.w3.org/TR/html401/struct/links.html#h-12.3
+
+At runtime the href attribute value will be prefixed with the context path
+of the web application.
+
+Example:
+
+<link rel="stylesheet" type="text/css" href="/style.css" media="screen"/>
+
+will produce at runtime the following markup
+
+<link rel="stylesheet" type="text/css" href="/my-web-application/style.css" media="screen"/>
+-->
+<!ATTLIST link
+ href CDATA #IMPLIED
+ rel CDATA #IMPLIED
+ type CDATA #IMPLIED
+ media CDATA #IMPLIED
+ title CDATA #IMPLIED>
+
+<!--
+No content is allowed inside an link element.
+-->
+<!ELEMENT link EMPTY>
+
+<!--
+Creates a header markup for scripting,
+see http://www.w3.org/TR/html401/interact/scripts.html
+
+At runtime the src attribute value will be prefixed with the context path
+of the web application.
+
+Example 1:
+
+<script type="text/javascript" src="/myscript.js"></script>
+
+will produce at runtime the following markup
+
+<script type="text/javascript" src="/my-web-application/myscript.js"></script>
+
+Example 2:
+
+<script type="text/javascript">
+ function hello() {
+ alert('Hello');
+ }
+</script>
+-->
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ language CDATA #IMPLIED>
+
+<!--
+The script header element can contain inline script definitions.
+-->
+<!ELEMENT script (#PCDATA)>
+
+<!--
+Creates a header markup for adding meta data to a page,
+see http://www.w3.org/TR/html401/struct/global.html#h-7.4.4
+
+Example:
+
+<meta name="keywords" content="jboss, portal, redhat"/>
+-->
+<!ATTLIST meta
+ name CDATA #REQUIRED
+ content CDATA #REQUIRED>
+
+<!--
+No content is allowed for meta element.
+-->
+<!ELEMENT meta EMPTY>
+
+<!--
+Declare a service that will be injected by the portlet container as an
+attribute of the portlet context.
+
+Example:
+
+<service>
+ <service-name>UserModule</service-name>
+ <service-class>org.jboss.portal.identity.UserModule</service-class>
+ <service-ref>:service=Module,type=User</service-ref>
+</service>
+
+In the portlet it is then possible to use it by doing a lookup on the service
+name, for example in the init() lifecycle method :
+
+public void init()
+{
+ UserModule userModule = (UserModule)getPortletContext().getAttribute("UserModule");
+}
+
+-->
+<!ELEMENT service (service-name,service-class,service-ref)>
+
+<!--
+The service name that will be used to bind the service as a portlet context attribute.
+-->
+<!ELEMENT service-name (#PCDATA)>
+
+<!--
+The full qualified name of the interface that the service implements.
+-->
+<!ELEMENT service-class (#PCDATA)>
+
+<!--
+The reference to the service. In the JMX Microkernel environment it consist of the JMX
+name of the service MBean. For an MBean reference if the domain is left out, then the
+current domain of the portal will be used.
+-->
+<!ELEMENT service-ref (#PCDATA)>
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/Deployment.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/Deployment.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/Deployment.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,139 @@
+/******************************************************************************
+ * 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.deployer;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.logging.Logger;
+import org.jboss.mx.loading.RepositoryClassLoader;
+
+import javax.management.MBeanServer;
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8784 $
+ */
+public class Deployment
+{
+
+ /** The logger. */
+ protected final Logger log = Logger.getLogger(getClass());
+
+ /** The deployment URL. */
+ protected final URL url;
+
+ /** The optional web app abstraction. */
+ // protected final PortalWebApp pwa;
+
+ /** The JMX server. */
+ protected final MBeanServer mbeanServer;
+
+ /**
+ * Create a deployment that is not nested within a web application archive.
+ *
+ * @param url the deployment URL
+ * @param mbeanServer the JMX mbean server
+ */
+ public Deployment(URL url, MBeanServer mbeanServer)
+ {
+ this.url = url;
+// this.pwa = null;
+ this.mbeanServer = mbeanServer;
+ }
+
+ /**
+ * Create a deployment nested within a web application archive
+ *
+ * @param url the deployment URL
+ * @param pwa the web application
+ * @param mbeanServer the JMX mbean server
+ */
+// public Deployment(URL url, PortalWebApp pwa, MBeanServer mbeanServer)
+// {
+// this.url = url;
+// this.pwa = pwa;
+// this.mbeanServer = mbeanServer;
+// }
+
+ public void create() throws DeploymentException
+ {
+ }
+
+ public void start() throws DeploymentException
+ {
+ }
+
+ public void stop() throws DeploymentException
+ {
+ }
+
+ public void destroy() throws DeploymentException
+ {
+ }
+
+ /** Find the URL of the WEB-INF directory in the war file. */
+ public static URL findWEBINFURL(URL warURL) throws DeploymentException
+ {
+ try
+ {
+ if ("file".equals(warURL.getProtocol()))
+ {
+ File f = new File(warURL.getFile());
+ f = new File(f, "WEB-INF");
+ // this dir doesn't exist on exploded deployments and would miss the trailing slash then [JBPORTAL-1648]
+ if (f.exists())
+ {
+ return f.toURL();
+ }
+ else
+ {
+ return new URL(warURL + "WEB-INF/");
+ }
+ }
+ else
+ {
+ throw new DeploymentException("Deployment URL not found " + warURL);
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ throw new DeploymentException(e);
+ }
+ }
+
+ /** Find the repository classloader reltated to the argument classloader. */
+ public static RepositoryClassLoader findRepositoryClassLoader(ClassLoader loader) throws DeploymentException
+ {
+ while (loader != null)
+ {
+ if (loader instanceof RepositoryClassLoader)
+ {
+ return (RepositoryClassLoader)loader;
+ }
+ loader = loader.getParent();
+ }
+ throw new DeploymentException("No repository class loader found");
+ }
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * 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.deployer;
+
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class PortalEntityResolver implements org.xml.sax.EntityResolver
+{
+
+ /** . */
+ private Properties dtdMapping;
+
+ public Properties getDTDMapping()
+ {
+ return dtdMapping;
+ }
+
+ public void setDTDMapping(Properties dtdMapping)
+ {
+ this.dtdMapping = dtdMapping;
+ }
+
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
+ {
+
+ // Let the parser open a regular URI connection to systemId
+ if (publicId == null)
+ {
+ return null;
+ }
+
+ //
+ String dtdResourceName = (String)dtdMapping.get(publicId);
+ if (dtdResourceName != null)
+ {
+
+ //log.debug("Looking up resource " + dtdResourceName + " for dtd publicId=" + publicId + ", systemId=" + systemId);
+ InputStream dtdStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(dtdResourceName);
+ if (dtdStream != null)
+ {
+ return new InputSource(dtdStream);
+ }
+ else
+ {
+ //log.debug("No resource found for dtd publicId=" + publicId + ", systemId=" + systemId);
+ }
+ }
+ else
+ {
+ //log.debug("No resource name found for dtd publicId=" + publicId + ", systemId=" + systemId);
+ }
+
+ //
+ return null;
+ }
+
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/jboss/portlet/parsing/JBossPortletParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/jboss/portlet/parsing/JBossPortletParsingDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/jboss/portlet/parsing/JBossPortletParsingDeployer.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,61 @@
+package org.jboss.portal.deployer.jboss.portlet.parsing;
+
+import java.io.InputStream;
+
+import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
+import org.jboss.deployers.vfs.spi.deployer.SecurityActions;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.portal.deployer.PortalEntityResolver;
+import org.jboss.portal.metadata.jboss.portlet.JBossApplicationMetaData;
+import org.jboss.portal.metamodel.jboss.portlet.JBossApplicationMetaDataFactory;
+//import org.jboss.portal.metadata.jboss.portlet.JBossApplicationMetaData;
+//import org.jboss.portal.metamodel.jboss.portlet.JBossApplicationMetaDataFactory;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+import org.xml.sax.InputSource;
+
+public class JBossPortletParsingDeployer extends SchemaResolverDeployer<JBossApplicationMetaData>
+{
+
+ private PortalEntityResolver entityResolver;
+
+ public void setEntityResolver (PortalEntityResolver entityResolver)
+ {
+ this.entityResolver = entityResolver;
+ }
+
+ public JBossPortletParsingDeployer()
+ {
+ super(JBossApplicationMetaData.class);
+ setName("jboss-portlet.xml");
+ }
+
+ public void setXmlPath(String xmlPath)
+ {
+ this.setName(xmlPath);
+ }
+
+ public String getXmlPath()
+ {
+ return getName();
+ }
+
+ protected JBossApplicationMetaData parse(VFSDeploymentUnit unit, VirtualFile file, JBossApplicationMetaData root) throws Exception
+ {
+ InputStream stream = file.openStream();
+
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setEntityResolver(this.entityResolver);
+
+ JBossApplicationMetaData jbossPortletMetaData = (JBossApplicationMetaData)unmarshaller.unmarshal(stream, new JBossApplicationMetaDataFactory(), root );
+
+ System.out.println("JBOSSPORTLETS : " + jbossPortletMetaData.getPortlets());
+
+ return jbossPortletMetaData;
+ }
+
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,63 @@
+package org.jboss.portal.deployer.portal;
+
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.deployers.vfs.spi.structure.VFSStructuralDeployers;
+import org.jboss.virtual.VirtualFile;
+
+public class LibDirectoryStructure extends AbstractVFSStructureDeployer
+{
+
+ public LibDirectoryStructure()
+ {
+ setRelativeOrder(Integer.MAX_VALUE);
+ }
+
+ /**
+ * Add jars from with a lib subdirectory.
+ *
+ * @param context The StrucutureContext to use
+ * @return Always returns false
+ */
+ public boolean determineStructure(StructureContext context)
+ throws DeploymentException
+ {
+ try
+ {
+ VirtualFile file = context.getFile();
+ if (context.isTopLevel() == false && isLeaf(file) == false
+ && context.getName().equals("lib"))
+ {
+ try
+ {
+ List<VirtualFile> children = context.getFile().getChildren();
+ if (children != null && children.isEmpty() == false)
+ {
+ for (int i = 0; i < children.size(); i++)
+ {
+ VFSStructuralDeployers structuralDeployers = context.getDeployers();
+
+ structuralDeployers.determineStructure(children.get(i), context.getParentContext());
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+ }
+ catch (Exception e)
+ {
+ throw DeploymentException.rethrowAsDeploymentException(
+ "Error determining Structure", e);
+ }
+ // always return false
+ return false;
+ }
+
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalDeployer.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,61 @@
+//package org.jboss.portal.deployer.portal;
+//
+//import java.util.ArrayList;
+//import java.util.Iterator;
+//
+//import org.jboss.deployers.spi.DeploymentException;
+//import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+//import org.jboss.deployers.structure.spi.DeploymentUnit;
+//import org.jboss.portal.metadata.portlet.PortalAppMetaData;
+//import org.jboss.web.WebApplication;
+//import org.jboss.web.deployers.AbstractWarDeployer;
+//
+//public class PortalDeployer extends AbstractComponentDeployer
+//{
+//
+// //the relative order of the war deployer in the main deployer.
+// private int warDeployerOrder;
+//
+// private AbstractWarDeployer warDeployer;
+//
+//
+// private ArrayList listeners = new ArrayList();
+//
+// public PortalDeployer()
+// {
+// addInput(PortalAppMetaData.class);
+// System.out.println("CREATE PORTALDEPLOYER");
+// }
+//
+// public void setWarDeployer(AbstractWarDeployer warDeployer)
+// {
+// this.warDeployer = warDeployer;
+// }
+//
+// public void setWarDeployerOrder(int order)
+// {
+// System.out.println("WARDEPLOYERORDER : " + order);
+// this.warDeployerOrder = order;
+// }
+//
+// public int getRelativeOrder()
+// {
+// return warDeployerOrder + 1;
+// }
+//
+// @Override
+// public void internalDeploy(DeploymentUnit unit) throws DeploymentException
+// {
+// System.out.println("PORTALDEPLOYER : " + unit);
+// PortalAppMetaData metaData = unit.getAttachment(PortalAppMetaData.class);
+// if (metaData != null)
+// {
+// System.out.println("INTERNALDEPLOYAPPNAME : " + metaData.getAppName());
+// }
+// }
+//
+// @Override
+// public void internalUndeploy(DeploymentUnit unit)
+// {
+// }
+//}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,91 @@
+package org.jboss.portal.deployer.portal;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.web.WebApplication;
+import org.jboss.web.deployers.AbstractWarDeployer;
+
+/*
+ * Initial testing deployer used to get JBoss 2.7 working on JBoss AS 5
+ * This should be replaced with a full deployer.
+ *
+ * TODO: remove this file once full deployment has been done.
+ */
+public class PortalPostWebDeployer extends AbstractComponentDeployer
+{
+
+ //the relative order of the war deployer in the main deployer.
+ private int warDeployerOrder;
+
+ private AbstractWarDeployer warDeployer;
+
+
+ private ArrayList listeners = new ArrayList();
+
+ public PortalPostWebDeployer()
+ {
+ //addInput(PortalMetaData.class);
+ }
+
+ public void setWarDeployer(AbstractWarDeployer warDeployer)
+ {
+ this.warDeployer = warDeployer;
+ }
+
+ public void setWarDeployerOrder(int order)
+ {
+ this.warDeployerOrder = order;
+ }
+
+ public int getRelativeOrder()
+ {
+ //return the order just after the war deployer
+ //note: should really be +1 but other portal deployer is getting in the way right now
+ return warDeployerOrder + 2;
+ }
+
+ @Override
+ public void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ WebApplication webapp = warDeployer.getDeployedApp(unit.getName());
+
+ if (webapp != null)
+ {
+ Iterator<WebDeploymentListener> iter = listeners.listIterator();
+ while (iter.hasNext())
+ {
+ iter.next().portalDeployed(webapp);
+ }
+ }
+ }
+
+ @Override
+ public void internalUndeploy(DeploymentUnit unit)
+ {
+ WebApplication webapp = warDeployer.getDeployedApp(unit.getName());
+
+ if (webapp != null)
+ {
+ Iterator<WebDeploymentListener> iter = listeners.listIterator();
+ while (iter.hasNext())
+ {
+ iter.next().portalUndeployed(webapp);
+ }
+ }
+ }
+
+ public void addDeploymentListener (WebDeploymentListener deploymentListener)
+ {
+ listeners.add(deploymentListener);
+ }
+
+ public void removeDeploymentListener (WebDeploymentListener deploymentListener)
+ {
+ listeners.remove(deploymentListener);
+ }
+
+}
\ No newline at end of file
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/WebDeploymentListener.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/WebDeploymentListener.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/WebDeploymentListener.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,15 @@
+package org.jboss.portal.deployer.portal;
+
+import org.jboss.web.WebApplication;
+
+/*
+ * This is only to get portal 2.7 working with JBoss AS 5 intially, should be replaced with a
+ * full deployment implementation.
+ *
+ * TODO: remove this file once full deployment has been done.
+ */
+public interface WebDeploymentListener
+{
+ public void portalDeployed(WebApplication webapp);
+ public void portalUndeployed(WebApplication webapp);
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,131 @@
+package org.jboss.portal.deployer.portlet;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.management.ObjectName;
+
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
+import org.jboss.portal.metadata.jboss.portlet.JBossApplicationMetaData;
+//import org.jboss.portal.metadata.jboss.portlet.JBossApplicationMetaData;
+//import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+//import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
+import org.jboss.system.metadata.ServiceConstructorMetaData;
+import org.jboss.system.metadata.ServiceMetaData;
+import org.jboss.web.WebApplication;
+import org.jboss.web.deployers.AbstractWarDeployer;
+
+public class PortletDeployer extends AbstractComponentDeployer
+{
+
+ //the relative order of the war deployer in the main deployer.
+ private int warDeployerOrder;
+
+ private AbstractWarDeployer warDeployer;
+
+
+ private ArrayList listeners = new ArrayList();
+
+ public PortletDeployer()
+ {
+ setAllInputs(false);
+ setInput(PortalAppMetaData.class);
+ addInput(PortalAppMetaData.class);
+ addInput(PortletApplication10MetaData.class);
+ addInput(JBossApplicationMetaData.class);
+ setOutput(ServiceMetaData.class);
+ }
+
+ public void setWarDeployerOrder(int order)
+ {
+ this.warDeployerOrder = order;
+ }
+
+ public int getRelativeOrder()
+ {
+ return warDeployerOrder + 1;
+ }
+
+ @Override
+ public void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ //super.internalDeploy(unit);
+ MainDeployer md = unit.getMainDeployer();
+
+ PortalAppMetaData metaData = unit.getAttachment(PortalAppMetaData.class);
+ if (metaData != null)
+ {
+ System.out.println("INTERNALDEPLOYAPPNAME : " + metaData.getAppName());
+ }
+ else
+ {
+ System.out.println("NO PORTAL-APP.XML FILE");
+ }
+
+ PortletApplication10MetaData portletMetaData = unit.getAttachment(PortletApplication10MetaData.class);
+ if (portletMetaData != null)
+ {
+ System.out.println("INTERNALDEPLOYPORTLETS : " + portletMetaData.getPortlets());
+ }
+ else
+ {
+ System.out.println("NO PORTLET.XML FILE");
+ }
+
+ JBossApplicationMetaData jbossPortletMetaData = unit.getAttachment(JBossApplicationMetaData.class);
+ if (portletMetaData != null)
+ {
+ System.out.println("INTERNALDEPLOYJBOSSPORTLETS : " + jbossPortletMetaData.getPortlets());
+ }
+ else
+ {
+ System.out.println("NO JBOSS-PORTLET.XML FILE");
+ }
+
+
+ if (portletMetaData != null)
+ {
+ try
+ {
+ ServiceMetaData portletModule = new ServiceMetaData();
+
+ JBossWebMetaData jbosswebMD = unit.getAttachment(JBossWebMetaData.class);
+
+ //todo: fix situation for empty context root (ie for the ROOT war)
+ String name = "jboss.portal.deployment:war="
+ + jbosswebMD.getContextRoot();
+ ObjectName objectName = new ObjectName(name);
+
+ portletModule.setObjectName(objectName);
+
+ portletModule.setCode(PortletModule.class.getName());
+ ServiceConstructorMetaData scMD = new ServiceConstructorMetaData();
+ //scMD.setSignature(new String[] {String.class.getName()});
+ //scMD.setParameters(new Object[] {"Hello"});
+
+ scMD.setSignature(new String[] {});
+ scMD.setParameters(new Object[] {});
+ portletModule.setConstructor(scMD);
+
+ unit.addAttachment("PortletModule", portletModule,
+ ServiceMetaData.class);
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ @Override
+ public void internalUndeploy(DeploymentUnit unit)
+ {
+ }
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletModule.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletModule.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletModule.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,56 @@
+package org.jboss.portal.deployer.portlet;
+
+import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
+import org.jboss.portal.metadata.jboss.portlet.JBossApplicationMetaData;
+import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
+
+public class PortletModule implements PortletModuleMBean
+{
+
+ protected PortalAppMetaData portalAppMetaData;
+ protected PortletApplication10MetaData portletAppMetaData;
+ protected JBossApplicationMetaData jbossAppMetaData;
+
+ public PortletModule(PortalAppMetaData portalAppMetaData, PortletApplication10MetaData portletAppMetaData, JBossApplicationMetaData jbossAppMetaData)
+ {
+ this.portalAppMetaData = portalAppMetaData;
+ this.portletAppMetaData = portletAppMetaData;
+ this.jbossAppMetaData = jbossAppMetaData;
+ }
+
+ public void create() throws Exception
+ {
+ /*
+ * import tld (should probably be done in some sort of deployer, but I don't know exactly how. VFSDeployer + VFS file.getRoot.getChildren().add(vfsfile);
+ *
+ * merge and manipulate metadata stuff (should be done in a merged metadata deployer and this class should use that data)
+ * create default metadata values if needed (also should be done in the merged metadata deployer class).
+ *
+ */
+ }
+
+ public void destroy() throws Exception
+ {
+ /*
+ *
+ */
+
+ }
+
+ public void start() throws Exception
+ {
+ /*
+ * inject services
+ * - add attibutes to the servlet context of the portalwebapp
+ * - should be done in a separate deployer? can a deployer manipulate the servlet context?
+ *
+ *
+ */
+
+ }
+
+ public void stop() throws Exception
+ {
+
+ }
+}
\ No newline at end of file
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletModuleMBean.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletModuleMBean.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletModuleMBean.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,9 @@
+package org.jboss.portal.deployer.portlet;
+
+public interface PortletModuleMBean
+{
+ public void create() throws Exception;
+ public void start() throws Exception;
+ public void stop() throws Exception;
+ public void destroy() throws Exception;
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletWarDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletWarDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletWarDeployer.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,70 @@
+package org.jboss.portal.deployer.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStage;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.portal.web.command.CommandServlet;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.spi.VirtualFileHandler;
+
+public class PortletWarDeployer extends AbstractSimpleVFSRealDeployer<JBossWebMetaData>
+{
+
+ public PortletWarDeployer()
+ {
+ super(JBossWebMetaData.class);
+ setStage(DeploymentStages.POST_PARSE);
+ }
+
+ @Override
+ public void deploy(VFSDeploymentUnit unit, JBossWebMetaData metadata)
+ throws DeploymentException
+ {
+
+ addCommandServlet(metadata);
+
+ CommandServlet cs = new CommandServlet();
+ try
+ {
+ //Thread.currentThread().getContextClassLoader().getSystemClassLoader().loadClass(this.getClass().toString());
+ //Thread.currentThread().getContextClassLoader().loadClass(this.getClass().toString());
+ Thread.currentThread().getContextClassLoader().loadClass(CommandServlet.class.toString());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ protected void addCommandServlet(JBossWebMetaData webmetadata)
+ {
+ JBossServletMetaData servletMD = new JBossServletMetaData();
+ servletMD.setServletName("CommandServlet");
+ servletMD.setServletClass(CommandServlet.class.toString());
+ servletMD.setLoadOnStartup(0);
+
+ ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
+ servletMappingMD.setServletName("CommandServlet");
+ List<String> urlPatterns = new ArrayList();
+ urlPatterns.add("/jbossportal");
+ servletMappingMD.setUrlPatterns(urlPatterns);
+
+ webmetadata.getServlets().add(servletMD);
+ webmetadata.getServletMappings();
+ }
+
+ protected void setCookiepath(String path)
+ {
+
+ }
+
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/PortalAppParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/PortalAppParsingDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/PortalAppParsingDeployer.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,59 @@
+package org.jboss.portal.deployer.portlet.parsing;
+
+import java.io.InputStream;
+
+import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
+import org.jboss.deployers.vfs.spi.deployer.SecurityActions;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.portal.deployer.PortalEntityResolver;
+import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
+import org.jboss.portal.metamodel.jboss.app.PortalAppObjectModelFactory;
+//import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
+//import org.jboss.portal.metamodel.jboss.app.PortalAppObjectModelFactory;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+import org.xml.sax.InputSource;
+
+public class PortalAppParsingDeployer extends SchemaResolverDeployer<PortalAppMetaData>
+{
+
+ private PortalEntityResolver entityResolver;
+
+ public void setEntityResolver (PortalEntityResolver entityResolver)
+ {
+ this.entityResolver = entityResolver;
+ }
+
+ public PortalAppParsingDeployer()
+ {
+ super(PortalAppMetaData.class);
+ setName("jboss-portal-app.xml");
+ }
+
+ public void setXmlPath(String xmlPath)
+ {
+ this.setName(xmlPath);
+ }
+
+ public String getXmlPath()
+ {
+ return getName();
+ }
+
+ protected PortalAppMetaData parse(VFSDeploymentUnit unit, VirtualFile file, PortalAppMetaData root) throws Exception
+ {
+ InputStream stream = file.openStream();
+
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setEntityResolver(this.entityResolver);
+
+ PortalAppMetaData portalMetaData = (PortalAppMetaData)unmarshaller.unmarshal(stream, new PortalAppObjectModelFactory(), root );
+
+ return portalMetaData;
+ }
+
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/PortletParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/PortletParsingDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/parsing/PortletParsingDeployer.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,61 @@
+package org.jboss.portal.deployer.portlet.parsing;
+
+import java.io.InputStream;
+
+import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.portal.deployer.PortalEntityResolver;
+import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
+import org.jboss.portal.portlet.mc.metadata.factory.PortletApplicationModelFactory;
+// note: these are the metadata from the metadata model
+//import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+//import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+//import org.jboss.portal.metamodel.portlet.PortletApplicationModelFactory;
+//import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
+//import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+
+public class PortletParsingDeployer extends SchemaResolverDeployer<PortletApplication10MetaData>
+{
+
+ private PortalEntityResolver entityResolver;
+
+ public void setEntityResolver (PortalEntityResolver entityResolver)
+ {
+ this.entityResolver = entityResolver;
+ }
+
+ public PortletParsingDeployer()
+ {
+ super(PortletApplication10MetaData.class);
+ setName("portlet.xml");
+ }
+
+ public void setXmlPath(String xmlPath)
+ {
+ this.setName(xmlPath);
+ }
+
+ public String getXmlPath()
+ {
+ return getName();
+ }
+
+ protected PortletApplication10MetaData parse(VFSDeploymentUnit unit, VirtualFile file, PortletApplication10MetaData root) throws Exception
+ {
+ //super.parse(unit, file, root);
+ InputStream stream = file.openStream();
+
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setEntityResolver(this.entityResolver);
+
+ PortletApplication10MetaData portletMetaData = (PortletApplication10MetaData)unmarshaller.unmarshal(stream, new PortletApplicationModelFactory(), root );
+
+ System.out.println("PORTLETS : " + portletMetaData.getPortlets());
+
+ return portletMetaData;
+ }
+
+}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/structure/PortletStructure.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/structure/PortletStructure.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/structure/PortletStructure.java 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,54 @@
+package org.jboss.portal.deployer.portlet.structure;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.virtual.VirtualFile;
+
+public class PortletStructure extends AbstractVFSStructureDeployer
+{
+
+ @Override
+ public void setRelativeOrder(int order)
+ {
+ super.setRelativeOrder(order);
+ }
+
+ @Override
+ public int getRelativeOrder()
+ {
+ // TODO Auto-generated method stub
+ //return super.getRelativeOrder();
+ return 0;
+ }
+
+ public boolean determineStructure(StructureContext context)
+ throws DeploymentException
+ {
+ try
+ {
+ VirtualFile file = context.getFile();
+ if (file.isLeaf() == false)
+ {
+ if (file.getName().endsWith(".war"))
+ {
+ if (file.getChild("WEB-INF/portlet.xml")!= null || file.getChild("WEB-INF/jboss-portlet,xml")!= null)
+ {
+ return false;
+ }
+ else
+ {
+ System.out.println ("MISSING A PORTLET.XML OR A JBOSS-PORTLET.XML");
+ }
+ }
+
+ }
+ }
+ catch (Exception e)
+ {
+
+ }
+ return false;
+ }
+
+}
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/Deployment.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/Deployment.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/PortalEntityResolver.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/PortalEntityResolver.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/jboss/portlet/parsing/JBossPortletParsingDeployer.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/jboss/portlet/parsing/JBossPortletParsingDeployer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/LibDirectoryStructure.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/LibDirectoryStructure.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/PortalPostWebDeployer.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/PortalPostWebDeployer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/WebDeploymentListener.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portal/WebDeploymentListener.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletDeployer.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletDeployer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletModule.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletModule.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletModuleMBean.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletModuleMBean.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletWarDeployer.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/PortletWarDeployer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/parsing/PortalAppParsingDeployer.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/parsing/PortalAppParsingDeployer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/parsing/PortletParsingDeployer.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/parsing/PortletParsingDeployer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/structure/PortletStructure.class
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/classes/org/jboss/portal/deployer/portlet/structure/PortletStructure.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/deployer-deployer-trunk-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/deployer-deployer-trunk-SNAPSHOT-sources.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/deployer-deployer-trunk-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/deployer-deployer-trunk-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/META-INF/.deployer-jboss-beans.xml.swp
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/META-INF/.deployer-jboss-beans.xml.swp
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/META-INF/deployer-jboss-beans.xml
===================================================================
--- modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/META-INF/deployer-jboss-beans.xml (rev 0)
+++ modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/META-INF/deployer-jboss-beans.xml 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+ *********************************************************************************************************************
+ Portal deployment
+
+ ********************************************************************************************************************* -->
+
+ <!-- portal custom dtd's -->
+ <bean name="PortalEntityResolver" class="org.jboss.portal.deployer.PortalEntityResolver">
+ <property name="DTDMapping">
+ <map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>-//JBoss Portal//DTD JBoss Portlet 2.6//EN</key>
+ <value>dtd/jboss-portlet_2_6.dtd</value>
+ </entry>
+ <entry>
+ <key>-//JBoss Portal//DTD JBoss Portal Application 2.6//EN</key>
+ <value>dtd/jboss-portal-app_2_6.dtd</value>
+ </entry>
+ <entry>
+ <key>-//JBoss Portal//DTD Portal Object 2.6//EN</key>
+ <value>dtd/portal-object_2_6.dtd</value>
+ </entry>
+ <entry>
+ <key>-//JBoss Portal//DTD Portlet Instances 2.6//EN</key>
+ <value>dtd/portlet-instances_2_6.dtd</value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+
+<!-- initial fake deployer only used to get JBoss AS 5 working with Portal 2.7 -->
+ <bean name="PortalPostWebDeployer" class="org.jboss.portal.deployer.portal.PortalPostWebDeployer">
+ <property name="warDeployerOrder"><inject bean="WarDeployer" property="relativeOrder"/></property>
+ <property name="warDeployer"><inject bean="WarDeployer"/></property>
+ <depends>WarDeployer</depends>
+ </bean>
+<!-- end fake deployer -->
+
+
+ <!-- Portal Deployer -->
+ <bean name="LibDirectoryStructure" class="org.jboss.portal.deployer.portal.LibDirectoryStructure">
+ </bean>
+
+
+ <!-- Portlet Deployer -->
+<!-- <bean name="PortletStructure" class="org.jboss.portal.deployer.portlet.structure.PortletStructure">
+ </bean> -->
+
+ <bean name="PortalAppParsingDeployer" class="org.jboss.portal.deployer.portlet.parsing.PortalAppParsingDeployer">
+ <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
+ </bean>
+
+ <bean name="PortletParsingDeployer" class="org.jboss.portal.deployer.portlet.parsing.PortletParsingDeployer">
+ <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
+ </bean>
+
+ <bean name="JBossPortletParsingDeployer" class="org.jboss.portal.deployer.jboss.portlet.parsing.JBossPortletParsingDeployer">
+ <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
+ </bean>
+
+<!-- <bean name="PortletWarDeployer" class="org.jboss.portal.deployer.portlet.PortletWarDeployer"/> -->
+
+ <bean name="PortletDeployer" class="org.jboss.portal.deployer.portlet.PortletDeployer">
+ <property name="warDeployerOrder"><inject bean="WarDeployer" property="relativeOrder"/></property>
+ </bean>
+
+</deployment>
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/deployer-deployer-trunk-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/deployer-deployer-trunk-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/jboss-portal-app_2_6.dtd
===================================================================
--- modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/jboss-portal-app_2_6.dtd (rev 0)
+++ modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/jboss-portal-app_2_6.dtd 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--
+<!DOCTYPE jboss-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Web Application 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-app_2_6.dtd">
+-->
+
+<!ELEMENT jboss-portal-app (app-name?)>
+
+<!--
+When a web application is deployed, the context path under wich it is deployed
+is taken as application name. The application name value in this descriptor is
+used to override it. When a component references a references a portlet, it needs to
+reference the application too and if the portlet application war file is renammed
+the reference is not valid anymore. Therefore this tag is used to have an application
+name that does not depend upon the context path under which the application is deployed.
+-->
+<!ELEMENT app-name (#PCDATA)>
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/jboss-portlet_2_6.dtd
===================================================================
--- modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/jboss-portlet_2_6.dtd (rev 0)
+++ modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/dtd/jboss-portlet_2_6.dtd 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!-- The additional configuration elements of the JBoss portlet container.
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+-->
+
+<!--
+The remotable element is used to configure the default behavior of the portlets with
+respect to WSRP exposure.
+
+For each portlet defined in portlet.xml, it is possible to configure specific
+settings of the portlet container.
+
+It is also possible to inject services in the portlet context of the application
+using the service elements.
+-->
+<!ELEMENT portlet-app (app-id?, remotable?,portlet*,service*)>
+
+<!--
+The portlet application id that will be used by the portlet container instead of the context path.
+-->
+<!ELEMENT app-id (#PCDATA)>
+
+<!--
+Additional configuration for a portlet.
+
+The portlet-name defines the name of the portlet. It must match a portlet defined already
+in portlet.xml of the same web application.
+
+The remotable element configures the portlet exposure to WSRP. If no value is present
+then the value considered is either the value defined globally at the portlet
+application level or false.
+
+The trans-attribute value specifies the behavior of the portlet when it is invoked at
+runtime with respect to the transactionnal context. According to how the portlet is
+invoked a transaction may exist or not before the portlet is invoked. Usually in the
+local context the portal transaction could be present. By default the value considered is
+ NotSupported which means that the portal transaction will be suspended for the duration
+ of the portlet invocation.
+
+Example:
+
+<portlet>
+ <portlet-name>MyPortlet</portlet-name>
+ <remotable>true</remotable>
+ <trans-attribute>Required</trans-attribute>
+</portlet>
+
+-->
+<!ELEMENT portlet (portlet-name,remotable?,ajax?,session-config?,transaction?,
+ header-content?,portlet-info?)>
+
+<!--
+The portlet name.
+-->
+<!ELEMENT portlet-name (#PCDATA)>
+
+<!--
+The remotable value is used for WSRP exposure. The accepted values are the
+litterals true of false.
+-->
+<!ELEMENT remotable (#PCDATA)>
+
+<!--
+The ajax tag allows to configure the ajax capabilities of the portlet. If
+the portlet is tagged as partial-refresh then the portal may use partial page
+refreshing and render only that portlet. If the portlet partial-refresh value
+is false, then the portal will perform a full page refresh when the portlet is refreshed.
+-->
+<!ELEMENT ajax (partial-refresh)>
+
+<!--
+The authorized values for the partial-refresh element are true or false.
+-->
+<!ELEMENT partial-refresh (#PCDATA)>
+
+<!--
+Additional portlet information
+-->
+<!ELEMENT portlet-info (icon?)>
+
+<!--
+Defines icons for the portlet, they can be used by the administration portlet
+to represent a particular portlet.
+-->
+<!ELEMENT icon (small-icon?, large-icon?)>
+
+<!--
+A small icon image, usually 16x16, gif, jpg and png are usually supported.
+An absolute URL or a URL starting with a '/' in the context of the webapp are accepted:
+eg. http://www.example.com/images/smallIcon.png
+eg. /images/smallIcon.png
+-->
+<!ELEMENT small-icon (#PCDATA)>
+
+<!--
+A large icon image, usually 32x32, gif, jpg and png are usually supported.
+An absolute URL or a URL starting with a '/' in the context of the webapp are accepted:
+eg. http://www.example.com/images/smallIcon.png
+eg. /images/smallIcon.png
+-->
+<!ELEMENT large-icon (#PCDATA)>
+
+<!--
+This element configure the portlet session of the portlet.
+
+The distributed element instructs the container to distribute the session attributes
+using the portal session replication. It applies only to local portlets are not to
+remote portlets. The default value is false.
+
+Example:
+
+<session-config>
+ <distributed>true</distributed>
+</session-config>
+
+-->
+<!ELEMENT session-config (distributed)>
+
+<!--
+The authorized values for the distributed element are true or false.
+-->
+<!ELEMENT distributed (#PCDATA)>
+
+<!--
+Defines how the portlet behaves with the transactionnal context. The default value
+is Never.
+
+Example:
+
+<transaction>
+ <trans-attribute>Required</transaction>
+<transaction>
+-->
+<!ELEMENT transaction (trans-attribute)>
+
+<!--
+The trans-attribute value defines the transactionnal behavior. The accepted values
+are Required, Mandatory, Never, Supports, NotSupported and RequiresNew.
+-->
+<!ELEMENT trans-attribute (#PCDATA)>
+
+<!--
+Specify content which should be included in the portal aggregated page when the portlet
+is present on that page. This setting only applies when the portlet is used in the local mode.
+-->
+<!ELEMENT header-content (link|script|meta)*>
+
+<!--
+Creates a header markup element for linked resources,
+see http://www.w3.org/TR/html401/struct/links.html#h-12.3
+
+At runtime the href attribute value will be prefixed with the context path
+of the web application.
+
+Example:
+
+<link rel="stylesheet" type="text/css" href="/style.css" media="screen"/>
+
+will produce at runtime the following markup
+
+<link rel="stylesheet" type="text/css" href="/my-web-application/style.css" media="screen"/>
+-->
+<!ATTLIST link
+ href CDATA #IMPLIED
+ rel CDATA #IMPLIED
+ type CDATA #IMPLIED
+ media CDATA #IMPLIED
+ title CDATA #IMPLIED>
+
+<!--
+No content is allowed inside an link element.
+-->
+<!ELEMENT link EMPTY>
+
+<!--
+Creates a header markup for scripting,
+see http://www.w3.org/TR/html401/interact/scripts.html
+
+At runtime the src attribute value will be prefixed with the context path
+of the web application.
+
+Example 1:
+
+<script type="text/javascript" src="/myscript.js"></script>
+
+will produce at runtime the following markup
+
+<script type="text/javascript" src="/my-web-application/myscript.js"></script>
+
+Example 2:
+
+<script type="text/javascript">
+ function hello() {
+ alert('Hello');
+ }
+</script>
+-->
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ language CDATA #IMPLIED>
+
+<!--
+The script header element can contain inline script definitions.
+-->
+<!ELEMENT script (#PCDATA)>
+
+<!--
+Creates a header markup for adding meta data to a page,
+see http://www.w3.org/TR/html401/struct/global.html#h-7.4.4
+
+Example:
+
+<meta name="keywords" content="jboss, portal, redhat"/>
+-->
+<!ATTLIST meta
+ name CDATA #REQUIRED
+ content CDATA #REQUIRED>
+
+<!--
+No content is allowed for meta element.
+-->
+<!ELEMENT meta EMPTY>
+
+<!--
+Declare a service that will be injected by the portlet container as an
+attribute of the portlet context.
+
+Example:
+
+<service>
+ <service-name>UserModule</service-name>
+ <service-class>org.jboss.portal.identity.UserModule</service-class>
+ <service-ref>:service=Module,type=User</service-ref>
+</service>
+
+In the portlet it is then possible to use it by doing a lookup on the service
+name, for example in the init() lifecycle method :
+
+public void init()
+{
+ UserModule userModule = (UserModule)getPortletContext().getAttribute("UserModule");
+}
+
+-->
+<!ELEMENT service (service-name,service-class,service-ref)>
+
+<!--
+The service name that will be used to bind the service as a portlet context attribute.
+-->
+<!ELEMENT service-name (#PCDATA)>
+
+<!--
+The full qualified name of the interface that the service implements.
+-->
+<!ELEMENT service-class (#PCDATA)>
+
+<!--
+The reference to the service. In the JMX Microkernel environment it consist of the JMX
+name of the service MBean. For an MBean reference if the domain is left out, then the
+current domain of the portal will be used.
+-->
+<!ELEMENT service-ref (#PCDATA)>
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/metadata-metadata-trunk-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/metadata-metadata-trunk-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-lib.jar
===================================================================
--- modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-lib.jar (rev 0)
+++ modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-lib.jar 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1 @@
+link /home/mwringe/Projects/workspaces/workspace-portal-deployer/portal-2-7-branch/core/output/resources/jboss-portal.sar/lib/portal-common-lib.jar
\ No newline at end of file
Property changes on: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-lib.jar
___________________________________________________________________
Name: svn:special
+ *
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-portal-lib.jar
===================================================================
--- modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-portal-lib.jar (rev 0)
+++ modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-portal-lib.jar 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1 @@
+link /home/mwringe/Projects/workspaces/workspace-portal-deployer/portal-2-7-branch/core/output/resources/jboss-portal.sar/lib/portal-common-portal-lib.jar
\ No newline at end of file
Property changes on: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-common-portal-lib.jar
___________________________________________________________________
Name: svn:special
+ *
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-portlet-lib.jar
===================================================================
--- modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-portlet-lib.jar (rev 0)
+++ modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-portlet-lib.jar 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1 @@
+link /home/mwringe/Projects/workspaces/workspace-portal-deployer/portal-2-7-branch-test/core/output/resources/jboss-portal.sar/lib/portal-portlet-lib.jar
\ No newline at end of file
Property changes on: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-portlet-lib.jar
___________________________________________________________________
Name: svn:special
+ *
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-web-lib.jar
===================================================================
--- modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-web-lib.jar (rev 0)
+++ modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-web-lib.jar 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1 @@
+link /home/mwringe/Projects/workspaces/workspace-portal-deployer/portal-2-7-branch/core/output/resources/jboss-portal.sar/lib/portal-web-lib.jar
\ No newline at end of file
Property changes on: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portal-web-lib.jar
___________________________________________________________________
Name: svn:special
+ *
Added: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portlet-mc-2.1.0-SNAPSHOT.jar
===================================================================
--- modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portlet-mc-2.1.0-SNAPSHOT.jar (rev 0)
+++ modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portlet-mc-2.1.0-SNAPSHOT.jar 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1 @@
+link /home/mwringe/.m2/repository/org/jboss/portal/portlet/portlet-mc/2.1.0-SNAPSHOT/portlet-mc-2.1.0-SNAPSHOT.jar
\ No newline at end of file
Property changes on: modules/deployer/trunk/deployer/target/jboss-portal.deployer-jboss50.dir/jboss-portal.deployer/portlet-mc-2.1.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:special
+ *
Added: modules/deployer/trunk/pom.xml
===================================================================
--- modules/deployer/trunk/pom.xml (rev 0)
+++ modules/deployer/trunk/pom.xml 2008-11-06 19:05:26 UTC (rev 12257)
@@ -0,0 +1,41 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>module-aggregator</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Portal Deployer</name>
+ <version>trunk-SNAPSHOT</version>
+
+ <distributionManagement>
+ <repository>
+ <!--Copy the distribution jar file to a local checkout of the maven repository
+ - This variable can be set in $MAVEN_HOME/conf/settings.xml-->
+ <id>repository.jboss.org</id>
+ <url>file://${jboss.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ <uniqueVersion>true</uniqueVersion>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <modules>
+ <module>build</module>
+ <module>deployer</module>
+ </modules>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
15 years, 6 months
JBoss Portal SVN: r12256 - in branches/JBoss_Portal_AS5_Deployer: core/src/resources/portal-core-sar and 12 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-11-06 12:07:57 -0500 (Thu, 06 Nov 2008)
New Revision: 12256
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/instance/hibernate.cfg.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/portal/hibernate.cfg.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/portlet/hibernate.cfg.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/user/hibernate.cfg.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/portal-aop.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/jboss-web.xml
branches/JBoss_Portal_AS5_Deployer/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java
branches/JBoss_Portal_AS5_Deployer/server/build.xml
branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebApp.java
branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebAppFactory.java
branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat6App.java
branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/WebAppIntercepter.java
branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/jboss/Deployment.java
branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/jboss/ServerDeployer.java
branches/JBoss_Portal_AS5_Deployer/theme/src/main/org/jboss/portal/test/theme/tmp/TestHelper.java
Log:
initial check-in of changes to the branch.
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -87,6 +87,8 @@
public void start() throws DeploymentException
{
+ //disable since we want to use the one from the deployer module
+ if (true) return;
// Inject services if needed
injectServices();
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -41,6 +41,7 @@
<entry key="-//JBoss Portal//DTD JBoss App 2.6//EN">dtd/jboss-app_2_6.dtd</entry>
<entry key="-//JBoss Portal//DTD Portal Object 2.6//EN">dtd/portal-object_2_6.dtd</entry>
<entry key="-//JBoss Portal//DTD Portlet Instances 2.6//EN">dtd/portlet-instances_2_6.dtd</entry>
+ <entry key="-//JBoss Portal//DTD JBoss Portal Application 2.6//EN">dtd/jboss-portal-app_2_6.dtd</entry>
</properties>
</attribute>
</mbean>
@@ -1176,7 +1177,9 @@
<mbean code="org.jboss.portal.server.deployment.WebAppAdapter" name="portal:deployer=Adapter" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends optional-attribute-name="InterceptedDeployer">jboss.web:service=WebServer</depends>
+ <attribute name="PortalDeployer">
+ <inject bean="PortalPostWebDeployer"/>
+ </attribute>
<depends optional-attribute-name="Deployer" proxy-type="attribute">portal:deployer=PortalWebApp</depends>
<depends optional-attribute-name="JBossAppEntityResolver" proxy-type="attribute">portal:service=EntityResolver
</depends>
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/instance/hibernate.cfg.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/instance/hibernate.cfg.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/instance/hibernate.cfg.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -29,7 +29,9 @@
<session-factory>
<property name="connection.datasource">java:@portal.datasource.name@</property>
<property name="show_sql">@portal.sql.show@</property>
- <property name="cache.use_second_level_cache">true</property>
+ <!-- todo: renamble second level cache
+ <property name="cache.use_second_level_cache">true</property> -->
+ <property name="cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<property name="hibernate.hbm2ddl.auto">update</property>
@@ -57,4 +59,4 @@
<!-- Mapping files -->
<mapping resource="conf/hibernate/instance/domain.hbm.xml"/>
</session-factory>
-</hibernate-configuration>
\ No newline at end of file
+</hibernate-configuration>
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/portal/hibernate.cfg.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/portal/hibernate.cfg.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/portal/hibernate.cfg.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -29,7 +29,9 @@
<session-factory>
<property name="connection.datasource">java:@portal.datasource.name@</property>
<property name="show_sql">@portal.sql.show@</property>
- <property name="cache.use_second_level_cache">true</property>
+ <!-- todo: renable second level cache
+ <property name="cache.use_second_level_cache">true</property> -->
+ <property name="cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!--
@@ -56,4 +58,4 @@
<!-- Mapping files -->
<mapping resource="conf/hibernate/portal/domain.hbm.xml"/>
</session-factory>
-</hibernate-configuration>
\ No newline at end of file
+</hibernate-configuration>
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/portlet/hibernate.cfg.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/portlet/hibernate.cfg.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/portlet/hibernate.cfg.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -29,7 +29,9 @@
<session-factory>
<property name="connection.datasource">java:@portal.datasource.name@</property>
<property name="show_sql">@portal.sql.show@</property>
- <property name="cache.use_second_level_cache">true</property>
+ <!-- todo: renable second level cache
+ <property name="cache.use_second_level_cache">true</property> -->
+ <property name="cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<!--
@@ -56,4 +58,4 @@
<!-- Mapping files -->
<mapping resource="conf/hibernate/portlet/domain.hbm.xml"/>
</session-factory>
-</hibernate-configuration>
\ No newline at end of file
+</hibernate-configuration>
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/user/hibernate.cfg.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/user/hibernate.cfg.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/user/hibernate.cfg.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -29,7 +29,9 @@
<session-factory>
<property name="connection.datasource">java:@portal.datasource.name@</property>
<property name="show_sql">@portal.sql.show@</property>
- <property name="cache.use_second_level_cache">true</property>
+ <!-- todo: renable second level cache
+ <property name="cache.use_second_level_cache">true</property> -->
+ <property name="cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<!--
@@ -56,4 +58,4 @@
<!-- Mapping files -->
<mapping resource="conf/hibernate/user/domain.hbm.xml"/>
</session-factory>
-</hibernate-configuration>
\ No newline at end of file
+</hibernate-configuration>
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -15,10 +15,11 @@
<property name="hibernate.use_sql_comments">true</property>
<!-- caching properties -->
+ <!-- todo: renable second level cache
<property name="cache.use_second_level_cache">true</property>
<property name="cache.use_query_cache">true</property>
<property name="cache.provider_configuration_file_resource_path">conf/hibernate/workflow/ehcache.xml</property>
- <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
+ <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property> -->
<!-- managed environment transaction configuration -->
<property
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/portal-aop.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/portal-aop.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/portal-aop.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -21,7 +21,7 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<aop>
+<aop xmlns="urn:jboss:aop-beans:1.0">
<metadata tag="transaction" class="org.jboss.portal.core.aspects.server.TransactionInterceptor">
<method name="invoke">
<trans-attribute>RequiresNew</trans-attribute>
@@ -110,4 +110,4 @@
<application-exceptions>org.jboss.portal.portlet.InvalidPortletIdException</application-exceptions>
</method>
</metadata>
-</aop>
\ No newline at end of file
+</aop>
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/jboss-web.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/jboss-web.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/jboss-web.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -23,7 +23,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<jboss-web>
- <security-domain>java:jaas/portal</security-domain>
+ <security-domain>java:/jaas/portal</security-domain>
<context-root>@portal.web.context-root@</context-root>
<replication-config>
<replication-trigger>SET</replication-trigger>
Modified: branches/JBoss_Portal_AS5_Deployer/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -100,6 +100,9 @@
public void create() throws DeploymentException
{
+ //disable for now so we can use the new deployer
+ if (true) return;
+
importTLD();
//
@@ -111,7 +114,7 @@
//
if (jbossAppMD.getId() == null)
{
- log.debug("The portlet application does not have an explicit id value, will use the value provided by the jboss-app.xml instead");
+ log.debug("The portlet application does not have an explicit id value, will use the value provided by the jboss-portal-app.xml instead");
jbossAppMD.setId(pwa.getId());
}
@@ -159,7 +162,9 @@
public void start() throws DeploymentException
{
-
+ //disable for now to use new deployer
+ if (true) return;
+
log.debug("Starting installation");
//
@@ -330,6 +335,9 @@
public void destroy() throws DeploymentException
{
+ //disable for now to use new deployer
+ if (true) return;
+
portletApplicationLifeCycle.destroy();
// portletApplicationContext.stopPortletApplication();
Modified: branches/JBoss_Portal_AS5_Deployer/server/build.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/server/build.xml 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/server/build.xml 2008-11-06 17:07:57 UTC (rev 12256)
@@ -94,6 +94,7 @@
<path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jboss.portal/modules/web.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
+ <path refid="jboss.portal/modules/deployer.classpath"/>
<pathelement location="${jboss.portal/modules/test.lib}/portal-test-jboss-lib.jar"/>
<path refid="dom4j.dom4j.classpath"/>
<path refid="oswego.concurrent.classpath"/>
@@ -107,6 +108,7 @@
<path refid="junit.junit.classpath"/>
<path refid="jboss.test.classpath"/>
<path refid="sun.servlet.classpath"/>
+ <path refid="jboss.web.classpath"/>
<pathelement location="jboss-bean-deployer.jar"/>
<pathelement location="jboss-container.jar"/>
<pathelement location="jboss-dependency.jar"/>
@@ -201,6 +203,7 @@
<fileset dir="${jboss.portal/modules/common.lib}" includes="portal-common-lib.jar"/>
<fileset dir="${jboss.portal-jems.root}/lib" includes="portal-jems-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}" includes="portal-web-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/deployer.lib}" includes="deployer-deployer-trunk-SNAPSHOT.jar"/>
<fileset dir="${build.lib}" includes="test-agent.war"/>
<fileset dir="${build.lib}" includes="portal-server-lib.jar"/>
<fileset dir="${build.lib}" includes="portal-server-test-lib.jar"/>
@@ -222,6 +225,7 @@
<fileset dir="${jboss.portal/modules/test.lib}" includes="portal-test-lib.jar"/>
<fileset dir="${jboss.portal/modules/common.lib}" includes="portal-common-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}" includes="portal-web-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/deployer.lib}" includes="deployer-deployer-trunk-SNAPSHOT.jar"/>
<fileset dir="${jboss.portal-jems.root}/lib" includes="portal-jems-lib.jar"/>
<fileset dir="${build.lib}" includes="test-agent.war"/>
<fileset dir="${build.lib}" includes="portal-server-lib.jar"/>
@@ -238,6 +242,7 @@
<fileset dir="${jboss.portal/modules/test.lib}" includes="portal-test-lib.jar"/>
<fileset dir="${jboss.portal/modules/common.lib}" includes="portal-common-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}" includes="portal-web-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/deployer.lib}" includes="deployer-deployer-trunk-SNAPSHOT.jar"/>
<fileset dir="${jboss.portal-jems.root}/lib" includes="portal-jems-lib.jar"/>
<fileset dir="${build.lib}" includes="test-agent.war"/>
<fileset dir="${build.lib}" includes="portal-server-lib.jar"/>
@@ -252,6 +257,7 @@
<fileset dir="${jboss.portal/modules/common.lib}" includes="portal-common-lib.jar"/>
<fileset dir="${jboss.portal-jems.root}/lib" includes="portal-jems-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}" includes="portal-web-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/deployer.lib}" includes="deployer-deployer-trunk-SNAPSHOT.jar"/>
<fileset dir="${build.lib}" includes="test-agent.war"/>
<fileset dir="${build.lib}" includes="portal-server-lib.jar"/>
<fileset dir="${build.lib}" includes="portal-server-test-lib.jar"/>
Modified: branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebApp.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebApp.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebApp.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -204,7 +204,7 @@
}
/**
- * Read jboss-app.xml deployment and fetch the overriden id if it exists.
+ * Read jboss-portal-app.xml deployment and fetch the overriden id if it exists.
*
* @return the app id or null if it does not exists
*/
@@ -214,18 +214,18 @@
InputStream in = null;
try
{
- in = IOTools.safeBufferedWrapper(getServletContext().getResourceAsStream("/WEB-INF/jboss-app.xml"));
+ in = IOTools.safeBufferedWrapper(getServletContext().getResourceAsStream("/WEB-INF/jboss-portal-app.xml"));
if (in != null)
{
DocumentBuilder builder = XMLTools.getDocumentBuilderFactory().newDocumentBuilder();
if (jbossAppEntityResolver == null)
{
- log.debug("Coult not obtain entity resolver for jboss-app.xml");
+ log.debug("Coult not obtain entity resolver for jboss-portal-app.xml");
jbossAppEntityResolver = new NullEntityResolver();
}
else
{
- log.debug("Obtained entity resolver " + jbossAppEntityResolver + " for jboss-app.xml");
+ log.debug("Obtained entity resolver " + jbossAppEntityResolver + " for jboss-portal-app.xml");
}
builder.setEntityResolver(jbossAppEntityResolver);
descriptor = builder.parse(in);
@@ -233,15 +233,15 @@
}
catch (IOException e)
{
- log.debug("Cannot read jboss-app.xml", e);
+ log.debug("Cannot read jboss-portal-app.xml", e);
}
catch (ParserConfigurationException e)
{
- log.debug("Cannot read jboss-app.xml", e);
+ log.debug("Cannot read jboss-portal-app.xml", e);
}
catch (SAXException e)
{
- log.debug("Cannot read jboss-app.xml", e);
+ log.debug("Cannot read jboss-portal-app.xml", e);
}
finally
{
Modified: branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebAppFactory.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebAppFactory.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebAppFactory.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -112,6 +112,10 @@
{
return TOMCAT6;
}
+ else if (result.startsWith("JBoss Web/2"))
+ {
+ return TOMCAT6;
+ }
else
{
log.error("Cannot handle tomcat version: " + result);
Modified: branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat6App.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat6App.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat6App.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.server.deployment;
+import org.apache.catalina.deploy.SessionCookie;
import org.jboss.portal.web.command.CommandServlet;
import org.jboss.web.WebApplication;
import org.xml.sax.EntityResolver;
@@ -159,6 +160,10 @@
Method addChildMethod = containerBaseClass.getMethod("addChild", new Class[]{containerItf});
addChildMethod.invoke(standardContext, new Object[]{wrapper});
+ Method getSessionCookie = contextItf.getMethod("getSessionCookie", new Class[]{});
+ SessionCookie cookie = (SessionCookie) getSessionCookie.invoke(standardContext, new Object[]{});
+ cookie.setPath("/");
+
Method addServletMapping = contextItf.getMethod("addServletMapping", new Class[]{String.class, String.class});
addServletMapping.invoke(standardContext, new Object[]{"/jbossportlet", "CommandServlet"});
Modified: branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/WebAppIntercepter.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/WebAppIntercepter.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/WebAppIntercepter.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -24,6 +24,8 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.SubDeployer;
+import org.jboss.portal.deployer.portal.PortalPostWebDeployer;
+import org.jboss.portal.deployer.portal.WebDeploymentListener;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.web.WebApplication;
import org.xml.sax.EntityResolver;
@@ -52,15 +54,12 @@
*/
public abstract class WebAppIntercepter
extends AbstractJBossService
- implements NotificationListener
+ implements WebDeploymentListener
+ //implements NotificationListener
{
/** WARDeployer. */
- private ObjectName interceptedDeployer;
- /** A copy of the WARDeployer used for notification subscription removal. */
- private ObjectName currentInterceptedDeployer;
-
/** The current deployements. */
private Map deployments;
@@ -73,6 +72,8 @@
/** The entity resolver for jboss-app.xml. */
private EntityResolver jbossAppEntityResolver;
+ private PortalPostWebDeployer portalDeployer;
+
public WebAppIntercepter()
{
deployments = Collections.synchronizedMap(new HashMap());
@@ -89,144 +90,82 @@
this.jbossAppEntityResolver = jbossAppEntityResolver;
}
- /** Set the deployer on this service. */
- public void setInterceptedDeployer(ObjectName interceptedDeployer)
+ public void setPortalDeployer(PortalPostWebDeployer portalDeployer)
{
- this.interceptedDeployer = interceptedDeployer;
+ this.portalDeployer = portalDeployer;
}
+ /** Set the deployer on this service. */
+ public void portalDeployed(WebApplication webapp)
+ {
+ ClassLoader previousLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+
+ PortalWebApp pwa = factory.create(webapp, jbossAppEntityResolver);
+ deployments.put(webapp.getURL(), pwa);
+ log.debug("Seen URL " + webapp.getURL() + " about to deploy");
+ deploy(pwa);
+ } catch (Exception e){
+ e.printStackTrace();
+ } finally
+ {
+ Thread.currentThread().setContextClassLoader(previousLoader);
+ }
/** Return the intercepted deployer. */
- public ObjectName getInterceptedDeployer()
+ }
+
+ public void portalUndeployed(WebApplication webapp)
{
- return interceptedDeployer;
+
+ PortalWebApp pwa = (PortalWebApp)deployments.remove(webapp.getURL());
+ if (pwa != null)
+ {
+ log.debug("Undeploying URL " + webapp.getURL());
+ undeploy(pwa);
+ }
}
+
+// /** Set the deployer on this service. */
+// public void setInterceptedDeployer(ObjectName interceptedDeployer)
+// {
+// this.interceptedDeployer = interceptedDeployer;
+// }
+ /** Return the intercepted deployer. */
+ //public ObjectName getInterceptedDeployer()
+ //{
+ //return interceptedDeployer;
+ //}
+
/** Clone and return the deployed URLs. */
public Collection getDeployedURLs()
{
return new ArrayList(deployments.keySet());
}
- private WebApplication findWebApp(DeploymentInfo info) throws Exception
- {
- // Get all the deployed web applications, our must be among these
- Iterator iterator = (Iterator)server.getAttribute(interceptedDeployer, "DeployedApplications");
- while (iterator.hasNext())
- {
- WebApplication webApp = (WebApplication)iterator.next();
- if (info == webApp.getDeploymentInfo())
- {
- return webApp;
- }
- }
- // Not found
- return null;
- }
-
- /** Only take care of start notifications. */
- public void handleNotification(Notification notification, Object handback)
- {
- String type = notification.getType();
- boolean start = SubDeployer.START_NOTIFICATION.equals(type);
- boolean stop = SubDeployer.STOP_NOTIFICATION.equals(type);
-
- // Do we do something ?
- if (start || stop)
- {
- // The previous loader
- ClassLoader previousLoader = Thread.currentThread().getContextClassLoader();
-
- try
- {
- // This call is coming with the MainDeployer classloader as context loader
- // For this call we change the context loader to the container one.
- Thread.currentThread().setContextClassLoader(classLoader);
-
- // Create the portal web app
- DeploymentInfo info = (DeploymentInfo)notification.getUserData();
-
- //
- URL keyURL = info.url;
-
- //
- if (start)
- {
- WebApplication webApp = findWebApp(info);
- PortalWebApp pwa = factory.create(webApp, jbossAppEntityResolver);
- deployments.put(keyURL, pwa);
- log.debug("Seen URL " + keyURL + " about to deploy");
- deploy(pwa);
- }
- if (stop)
- {
- // Look if we have something for that url
- PortalWebApp pwa = (PortalWebApp)deployments.remove(keyURL);
-
- // Notify
- if (pwa != null)
- {
- log.debug("Undeploying URL " + keyURL);
- undeploy(pwa);
- }
- }
- }
- catch (Exception e)
- {
- log.error("Cannot handle the intercepted deployment", e);
- }
- finally
- {
- // Put previous context loader back
- Thread.currentThread().setContextClassLoader(previousLoader);
- }
- }
- }
-
/** Start listening to the deployer notifications. */
protected void startService() throws Exception
{
- if (interceptedDeployer != null)
+ if (portalDeployer != null)
{
// Create factory
factory = new PortalWebAppFactory(server);
-
- // Copy the name for the stop phase
- currentInterceptedDeployer = interceptedDeployer;
-
- // Register to notifications
- log.debug("Start listening notifications from intercepted deployer" + currentInterceptedDeployer);
- server.addNotificationListener(currentInterceptedDeployer, this, null, null);
-
- // Scans all the previously deployed applications
- Iterator iterator = (Iterator)server.getAttribute(currentInterceptedDeployer, "DeployedApplications");
- log.debug("Scan previously deployed web applications");
- while (iterator.hasNext())
- {
- WebApplication webApp = (WebApplication)iterator.next();
- URL keyURL = webApp.getDeploymentInfo().url;
- if (!deployments.containsKey(keyURL))
- {
- PortalWebApp pwa = factory.create(webApp, jbossAppEntityResolver);
- deployments.put(keyURL, pwa);
- log.debug("Seen URL " + keyURL + " about to deploy");
- deploy(pwa);
- }
- }
-
+ portalDeployer.addDeploymentListener(this);
}
else
{
- throw new Exception("No intercepted deployer name present");
+ throw new Exception ("PortalDeployer not present");
}
}
/** Stop listening to the deployer notifications. */
protected void stopService() throws Exception
{
- if (currentInterceptedDeployer != null)
- {
- // Remove all previously deployed applications
+ if (portalDeployer != null)
+ {
for (Iterator i = deployments.entrySet().iterator(); i.hasNext();)
{
Map.Entry entry = (Map.Entry)i.next();
@@ -236,17 +175,9 @@
log.debug("Removing web application with URL " + keyURL);
undeploy(pwa);
}
-
- // Do not listen notifications anymore
- log.debug("Stop listening notifications from intercepted deployer" + currentInterceptedDeployer);
- server.removeNotificationListener(currentInterceptedDeployer, this);
-
- // Remove factory
- factory = null;
-
- //
- currentInterceptedDeployer = null;
- }
+ portalDeployer.removeDeploymentListener(this);
+ factory = null;
+ }
}
/** Perform the deploy notification. */
Modified: branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/jboss/Deployment.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/jboss/Deployment.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/jboss/Deployment.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -99,7 +99,7 @@
{
try
{
- if ("file".equals(warURL.getProtocol()))
+ if ("file".equals(warURL.getProtocol()) || "vfsfile".equals(warURL.getProtocol()))
{
File f = new File(warURL.getFile());
f = new File(f, "WEB-INF");
Modified: branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/jboss/ServerDeployer.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/jboss/ServerDeployer.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/server/src/main/org/jboss/portal/server/deployment/jboss/ServerDeployer.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -40,6 +40,8 @@
import java.util.Map;
import java.util.Set;
+import javax.management.ObjectName;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
@@ -116,6 +118,13 @@
PortalDeploymentInfo pdi = new PortalDeploymentInfo(setupURL, server);
pdi.deployer = this;
infoContexts.put(pdi.url, new PortalDeploymentInfoContext(pdi));
+ // TODO: figure out proper place to put this
+ try{
+ mainDeployer.setServiceController(new ObjectName("jboss.system:service=ServiceController"));
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
mainDeployer.deploy(pdi);
}
catch (DeploymentException e)
@@ -244,12 +253,18 @@
instrument(pwa);
// Create the deployment object
- RepositoryClassLoader rcl = Deployment.findRepositoryClassLoader(pwa.getClassLoader());
+
+ //TODO: figure out why exactly this is needed and why it fails on JBoss AS5
+ //RepositoryClassLoader rcl = Deployment.findRepositoryClassLoader(pwa.getClassLoader());
+
URL url = Deployment.findWEBINFURL(pwa.getURL());
// Create our deployment info object and pass it to main deployer
PortalDeploymentInfo pdi = new PortalDeploymentInfo(url, null, pwa, server);
- pdi.ucl = rcl;
+
+ //renable when/if rcl is figured out above.
+ //pdi.ucl = rcl;
+
pdi.deployer = this;
// Put it in the map
Modified: branches/JBoss_Portal_AS5_Deployer/theme/src/main/org/jboss/portal/test/theme/tmp/TestHelper.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/theme/src/main/org/jboss/portal/test/theme/tmp/TestHelper.java 2008-11-06 16:10:39 UTC (rev 12255)
+++ branches/JBoss_Portal_AS5_Deployer/theme/src/main/org/jboss/portal/test/theme/tmp/TestHelper.java 2008-11-06 17:07:57 UTC (rev 12256)
@@ -326,6 +326,11 @@
{
return null; //To change body of implemented methods use File | Settings | File Templates.
}
+
+ public String getContextPath()
+ {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
}
15 years, 6 months
JBoss Portal SVN: r12255 - branches.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2008-11-06 11:10:39 -0500 (Thu, 06 Nov 2008)
New Revision: 12255
Added:
branches/JBoss_Portal_AS5_Deployer/
Log:
Create new branch for JBoss AS5 support and the new deployer
Copied: branches/JBoss_Portal_AS5_Deployer (from rev 12254, branches/JBoss_Portal_Branch_2_7)
15 years, 6 months