JBoss Portal SVN: r12930 - in branches/JBoss_Portal_Branch_2_6/theme/src: main/org/jboss/portal/theme/impl/render/dynamic and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-03-03 08:00:30 -0500 (Tue, 03 Mar 2009)
New Revision: 12930
Modified:
branches/JBoss_Portal_Branch_2_6/theme/src/bin/portal-ajax-war/dyna/style.css
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
Log:
- JBPORTAL-2226: hackish fix...
Modified: branches/JBoss_Portal_Branch_2_6/theme/src/bin/portal-ajax-war/dyna/style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-03 12:48:16 UTC (rev 12929)
+++ branches/JBoss_Portal_Branch_2_6/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-03 13:00:30 UTC (rev 12930)
@@ -8,18 +8,24 @@
}
/*
-Add height to handle div so that we can drag from the whole bar instead of just the title. Should work in IE as well,
-though it hasn't been tested.
+Add height to handle div so that we can drag from the whole bar instead of just the title.
*/
.dnd-handle {
cursor: move;
- position: relative;
- min-height: 1.2em;
+ min-height: 21px;
+ position: absolute;
+ top: 10px;
+ width: 70%;
+ z-index: 1;
height: auto !important;
- height: 1.2em;
+ height: 21px;
}
+.dyna-decoration {
+ position: relative;
+}
+
.dnd-droppable {
- border: red 1px dashed;
+ border: green 1px dashed;
background-color: Transparent;
-}
+}
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2009-03-03 12:48:16 UTC (rev 12929)
+++ branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2009-03-03 13:00:30 UTC (rev 12930)
@@ -66,15 +66,13 @@
DynaWindowRenderer.handleProvided.set(Boolean.TRUE);
//
- markup.print("<div class=\"dnd-handle\">");
markup.print("<div class=\"dyna-decoration\">\n");
+ markup.print("<div class=\"dnd-handle\"></div>");
delegate.render(rendererContext, drc);
// Close dnd-decoration
markup.print("</div>");
- // Close dnd-handle
- markup.print("</div>");
}
else
17 years, 2 months
JBoss Portal SVN: r12929 - in tags/JBoss_Portal_2_7_2: theme/src/bin/portal-ajax-war/dyna and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-03-03 07:48:16 -0500 (Tue, 03 Mar 2009)
New Revision: 12929
Modified:
tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/themes/renewal/portal_style.css
tags/JBoss_Portal_2_7_2/theme/src/bin/portal-ajax-war/dyna/style.css
tags/JBoss_Portal_2_7_2/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
Log:
JBPORTAL-2226: hackish fix. Minor improvements to menus.
Modified: tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/themes/renewal/portal_style.css
===================================================================
--- tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-03 11:03:52 UTC (rev 12928)
+++ tags/JBoss_Portal_2_7_2/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-03 12:48:16 UTC (rev 12929)
@@ -237,7 +237,7 @@
bottom: 0px;
left: 0;
min-width: 550px;
- z-index: 1;
+ z-index: 10;
}
* html ul#tabsHeader {
@@ -271,7 +271,7 @@
ul#tabsHeader li a {
background-position: top left;
background-repeat: no-repeat;
- padding: 5px 15px 0 15px;
+ padding: 5px 10px 0 10px;
display: block;
height: 29px;
font-weight: bold;
@@ -321,6 +321,7 @@
margin: 0px;
padding: 0px;
margin-top: 28px;
+ z-index: 10;
}
ul#tabsHeader ul a {
@@ -356,8 +357,8 @@
ul#tabsHeader ul li {
background: #DFE8ED;
color: #5078aa;
- padding: 3px;
- width: 160px;
+ padding: 2px;
+ width: 180px;
list-style: none;
border: 1px solid #98b7c6;
border-width: 0px 1px 1px 1px;
@@ -481,6 +482,7 @@
.portlet-mode-container {
white-space: nowrap;
float: right;
+ padding: 2px 0 0 0;
}
.mode-button {
Modified: tags/JBoss_Portal_2_7_2/theme/src/bin/portal-ajax-war/dyna/style.css
===================================================================
--- tags/JBoss_Portal_2_7_2/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-03 11:03:52 UTC (rev 12928)
+++ tags/JBoss_Portal_2_7_2/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-03 12:48:16 UTC (rev 12929)
@@ -13,12 +13,19 @@
*/
.dnd-handle {
cursor: move;
- position: relative;
min-height: 1.2em;
+ position: absolute;
+ top: 10px;
+ width: 70%;
+ z-index: 1;
height: auto !important;
height: 1.2em;
}
+.dyna-decoration {
+ position: relative;
+}
+
.dnd-droppable {
border: red 1px dashed;
background-color: Transparent;
Modified: tags/JBoss_Portal_2_7_2/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
===================================================================
--- tags/JBoss_Portal_2_7_2/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2009-03-03 11:03:52 UTC (rev 12928)
+++ tags/JBoss_Portal_2_7_2/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2009-03-03 12:48:16 UTC (rev 12929)
@@ -66,15 +66,13 @@
DynaWindowRenderer.handleProvided.set(Boolean.TRUE);
//
- markup.print("<div class=\"dnd-handle\">");
markup.print("<div class=\"dyna-decoration\">\n");
+ markup.print("<div class=\"dnd-handle\"></div>");
delegate.render(rendererContext, drc);
// Close dnd-decoration
markup.print("</div>");
- // Close dnd-handle
- markup.print("</div>");
}
else
17 years, 2 months
JBoss Portal SVN: r12928 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-03-03 06:03:52 -0500 (Tue, 03 Mar 2009)
New Revision: 12928
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
Log:
lecator props fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-03-02 23:22:03 UTC (rev 12927)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-03-03 11:03:52 UTC (rev 12928)
@@ -130,7 +130,7 @@
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("1BeaPorWindow"));
+ //Assert.assertTrue(selenium.isTextPresent("1BeaPorWindow"));
Assert.assertTrue(selenium.isTextPresent("Welcome to WebLogic Portal WSRP Demo."));
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-03-02 23:22:03 UTC (rev 12927)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-03-03 11:03:52 UTC (rev 12928)
@@ -17,12 +17,12 @@
private final String ADR_PORTAL = getProp(casePfx+"adr.portal","/portal");
private final String FRM_MAIN = getProp(casePfx+"frm.main","relative=up");
private final String SUB_CANCEL = getProp(casePfx+"sub.portal","cancel");
- private final String LNK_LOGOUT = getProp(casePfx+"adr.portal","link=Logout");
- private final String SUB_LOGIN = getProp(casePfx+"adr.portal","login");
- private final String INP_PASSWORD = getProp(casePfx+"adr.portal","xpath=id('j_password')");
- private final String INP_USERNAME = getProp(casePfx+"adr.portal","xpath=id('j_username')");
- private final String FRM_LOGINFORM = getProp(casePfx+"adr.portal","login-content");
- private final String LNK_LOGIN = getProp(casePfx+"adr.portal","link=Login");
+ private final String LNK_LOGOUT = getProp(casePfx+"lnk.logout","link=Logout");
+ private final String SUB_LOGIN = getProp(casePfx+"sub.login","login");
+ private final String INP_PASSWORD = getProp(casePfx+"inp.password","xpath=id('j_password')");
+ private final String INP_USERNAME = getProp(casePfx+"inp.username","xpath=id('j_username')");
+ private final String FRM_LOGINFORM = getProp(casePfx+"frm.login","login-content");
+ private final String LNK_LOGIN = getProp(casePfx+"lnk.login","link=Login");
@AfterClass(enabled = true)
public void logoutIfNeeded()
@@ -54,8 +54,10 @@
waitForElement(INP_PASSWORD);
Assert.assertTrue(selenium.isElementPresent(INP_USERNAME), "Expected input DOM element for username doesn't exist.");
+
selenium.type(INP_USERNAME, loginName);
Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
+
selenium.type(INP_PASSWORD, loginPass);
selenium.click(SUB_LOGIN);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-03-02 23:22:03 UTC (rev 12927)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-03-03 11:03:52 UTC (rev 12928)
@@ -1,24 +1,24 @@
# JBossPortalSeleniumTestCase
-portal.link.logout=link=Logout
-portal.submit.login=login
-portal.addr.portal=/portal/
-portal.frame.login.content=login-content
-portal.link.login=link=Login
-portal.input.password=j_password
-portal.input.username=j_username
+portal.lnk.logout=link=Logout
+portal.sub.login=login
+portal.adr.portal=/portal/
+portal.frm.login.content=login-content
+portal.inp.password=//input[contains(@id,'j_password')]
+portal.inp.username=//input[contains(@id,'j_username')]
+portal.lnk.login=link=Login
# UserLoginTestCase
user.login.adr.portal=/portal
user.login.frm.main=relative=up
user.login.sub.portal=cancel
-user.login.adr.portal=link=Logout
-user.login.adr.portal=login
-user.login.adr.portal=xpath=id('j_password')
-user.login.adr.portal=xpath=id('j_username')
-user.login.adr.portal=login-content
-user.login.adr.portal=link=Login
+user.login.lnk.logout=link=Logout
+user.login.sub.login=login
+user.login.inp.password=//input[contains(@id,'j_password')]
+user.login.inp.username=//input[contains(@id,'j_username')]
+user.login.frm.login=login-content
+user.login.lnk.login=link=Login
# IdentityAdminTestCase
inp.user.search.prev=//input[contains(@id,'search-user-form1:prev-page')]
17 years, 2 months
JBoss Portal SVN: r12927 - in branches/JBoss_Portal_Branch_2_7/theme/src: main/org/jboss/portal/theme/impl/render/dynamic and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-03-02 18:22:03 -0500 (Mon, 02 Mar 2009)
New Revision: 12927
Modified:
branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
Log:
- JBPORTAL-2226: Yet another attempt to fix crappy IE rendering: instead of using enclosing dnd-handle, just overlay it...
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-02 22:17:40 UTC (rev 12926)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-02 23:22:03 UTC (rev 12927)
@@ -13,10 +13,18 @@
.dnd-handle {
cursor: move;
min-height: 21px;
+ position: absolute;
+ top: 10px;
+ width: 70%;
+ z-index: 1;
height: auto !important;
height: 21px;
}
+.dyna-decoration {
+ position: relative;
+}
+
.dnd-droppable {
border: green 1px dashed;
background-color: Transparent;
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2009-03-02 22:17:40 UTC (rev 12926)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2009-03-02 23:22:03 UTC (rev 12927)
@@ -66,15 +66,13 @@
DynaWindowRenderer.handleProvided.set(Boolean.TRUE);
//
- markup.print("<div class=\"dnd-handle\">");
markup.print("<div class=\"dyna-decoration\">\n");
+ markup.print("<div class=\"dnd-handle\"></div>");
delegate.render(rendererContext, drc);
// Close dnd-decoration
markup.print("</div>");
- // Close dnd-handle
- markup.print("</div>");
}
else
17 years, 2 months
JBoss Portal SVN: r12926 - in branches/JBoss_Portal_Branch_2_7: theme/src/bin/portal-ajax-war/dyna and 1 other directory.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-03-02 17:17:40 -0500 (Mon, 02 Mar 2009)
New Revision: 12926
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css
branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css
Log:
fix sub menus overlaying mode buttons, remove unneeded relative style
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-02 20:16:49 UTC (rev 12925)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-02 22:17:40 UTC (rev 12926)
@@ -321,6 +321,7 @@
margin: 0px;
padding: 0px;
margin-top: 28px;
+ z-index: 10;
}
ul#tabsHeader ul a {
@@ -482,8 +483,8 @@
white-space: nowrap;
float: right;
padding: 2px 0 0 0;
- position: relative;
- z-index: 1;
+ /*position: relative;*/
+ /*z-index: 1;*/
}
.mode-button {
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-02 20:16:49 UTC (rev 12925)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css 2009-03-02 22:17:40 UTC (rev 12926)
@@ -12,7 +12,6 @@
*/
.dnd-handle {
cursor: move;
- position: relative;
min-height: 21px;
height: auto !important;
height: 21px;
17 years, 2 months
JBoss Portal SVN: r12925 - branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-03-02 15:16:49 -0500 (Mon, 02 Mar 2009)
New Revision: 12925
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css
Log:
- Small adjustments to menu layouts.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-02 19:52:00 UTC (rev 12924)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-02 20:16:49 UTC (rev 12925)
@@ -237,7 +237,7 @@
bottom: 0px;
left: 0;
min-width: 550px;
- z-index: 1;
+ z-index: 10;
}
* html ul#tabsHeader {
@@ -271,7 +271,7 @@
ul#tabsHeader li a {
background-position: top left;
background-repeat: no-repeat;
- padding: 5px 15px 0 15px;
+ padding: 5px 10px 0 10px;
display: block;
height: 29px;
font-weight: bold;
@@ -356,8 +356,8 @@
ul#tabsHeader ul li {
background: #DFE8ED;
color: #5078aa;
- padding: 3px;
- width: 160px;
+ padding: 2px;
+ width: 180px;
list-style: none;
border: 1px solid #98b7c6;
border-width: 0px 1px 1px 1px;
17 years, 2 months
JBoss Portal SVN: r12924 - in modules/metadata/trunk: build and 14 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-02 14:52:00 -0500 (Mon, 02 Mar 2009)
New Revision: 12924
Added:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/AjaxMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/HeaderContentMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletAppMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/LinkMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/MetaMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletIconMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletInfoMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ScriptMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ServiceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SessionConfigMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/TransactionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/JBossPortletListAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/CommonPortalObject.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeploymentMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/DisplayNameMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/EmptyMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/InstanceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PolicyPermissionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstanceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstancesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferenceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferencesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/SecurityConstraintMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication10MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication20MetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java
Removed:
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/SecurityConstrainMetaData.java
Modified:
modules/metadata/trunk/
modules/metadata/trunk/build/pom.xml
modules/metadata/trunk/metadata/pom.xml
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/AliasBindingMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ContextMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/EventWiringMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ModeMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PageMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ParameterBindingMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowCoordinationMetaData.java
modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowMetaData.java
Log:
Update metadata classes to include portlet.xml metadata.
Fix bugs with metadata classes defining information incorrectly.
Property changes on: modules/metadata/trunk
___________________________________________________________________
Name: svn:ignore
+ target-eclipse
Modified: modules/metadata/trunk/build/pom.xml
===================================================================
--- modules/metadata/trunk/build/pom.xml 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/build/pom.xml 2009-03-02 19:52:00 UTC (rev 12924)
@@ -14,12 +14,8 @@
<url>http://labs.jboss.com/jbossportal</url>
<properties>
- <version.jboss.portal.common>1.2.0</version.jboss.portal.common>
- <version.jboss.portal.portlet>2.1.0-SNAPSHOT</version.jboss.portal.portlet>
- <version.jboss.portal.server>2.7.0.GA</version.jboss.portal.server>
<version.jboss-metadata>1.0.0.CR1</version.jboss-metadata>
<version.jboss.jbossxb>2.0.0.CR15</version.jboss.jbossxb>
- <version.saxon>6.5.3</version.saxon>
<version.jaxb>2.1</version.jaxb>
</properties>
@@ -58,21 +54,6 @@
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
- <version>${version.jboss.portal.common}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-portal</artifactId>
- <version>${version.jboss.portal.common}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-portlet</artifactId>
- <version>${version.jboss.portal.portlet}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata</artifactId>
<version>${version.jboss-metadata}</version>
@@ -83,20 +64,10 @@
<version>${version.jboss.jbossxb}</version>
</dependency>
<dependency>
- <groupId>saxon</groupId>
- <artifactId>saxon</artifactId>
- <version>${version.saxon}</version>
- </dependency>
- <dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${version.jaxb}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>core</artifactId>
- <version>${version.jboss.portal.server}</version>
- </dependency>
</dependencies>
</dependencyManagement>
Modified: modules/metadata/trunk/metadata/pom.xml
===================================================================
--- modules/metadata/trunk/metadata/pom.xml 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/pom.xml 2009-03-02 19:52:00 UTC (rev 12924)
@@ -13,21 +13,6 @@
<dependencies>
- <dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-common</artifactId>
-<!-- <scope>provided</scope> -->
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.common</groupId>
- <artifactId>common-portal</artifactId>
-<!-- <scope>provided</scope> -->
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-portlet</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata</artifactId>
@@ -38,20 +23,11 @@
<artifactId>jbossxb</artifactId>
<scope>provided</scope>
</dependency>
-<!-- <dependency>
- <groupId>saxon</groupId>
- <artifactId>saxon</artifactId>
- <scope>provided</scope>
- </dependency> -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>core</artifactId>
- </dependency>
</dependencies>
<build>
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/AjaxMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/AjaxMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/AjaxMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class AjaxMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected Boolean partialRefresh;
+
+ @XmlElement(name = "partial-refresh")
+ public void setPartialRefresh (Boolean partialRefresh)
+ {
+ this.partialRefresh = partialRefresh;
+ }
+
+ public Boolean isPartialRefresh ()
+ {
+ return partialRefresh;
+ }
+
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/HeaderContentMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/HeaderContentMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/HeaderContentMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class HeaderContentMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected List<LinkMetaData> links;
+ protected List<ScriptMetaData> scripts;
+ protected List<MetaMetaData> metas;
+
+ @XmlElement (name = "link")
+ public void setLink (List<LinkMetaData> links)
+ {
+ this.links = links;
+ }
+
+ @XmlElement (name="script")
+ public void setScript (List<ScriptMetaData> scripts)
+ {
+ this.scripts = scripts;
+ }
+
+ @XmlElement (name="meta")
+ public void setMeta (List<MetaMetaData> metas)
+ {
+ this.metas = metas;
+ }
+
+ public List<LinkMetaData> getLinks()
+ {
+ return links;
+ }
+
+ public List<ScriptMetaData> getScripts()
+ {
+ return scripts;
+ }
+
+ public List<MetaMetaData> getMetas()
+ {
+ return metas;
+ }
+
+
+}
+
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletAppMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletAppMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletAppMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+import org.jboss.portal.metadata.jboss.portlet.adapter.JBossPortletListAdapter;
+import org.jboss.portal.metadata.portlet.adapter.PortletListAdapter;
+
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+@XmlRootElement(name = "portlet-app", namespace = "")
+public class JBossPortletAppMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String appId;
+ protected boolean remotable;
+ protected Map<String, JBossPortletMetaData> portlets;
+ protected List<ServiceMetaData> services;
+
+
+ @XmlElement(name ="app-id")
+ public void setAppId(String appId)
+ {
+ this.appId = appId;
+ }
+
+ @XmlElement(name = "remotable")
+ public void setRemotable(String remotable)
+ {
+ this.remotable = Boolean.valueOf(remotable);
+ }
+
+ @XmlElement(name = "portlet")
+ public void setPortlets(Map<String, JBossPortletMetaData> portlets)
+ {
+ this.portlets = portlets;
+ }
+
+ @XmlElement(name = "service")
+ public void setService(List<ServiceMetaData> services)
+ {
+ this.services = services;
+ }
+
+ public String getAppId()
+ {
+ return appId;
+ }
+
+ public boolean isRemotable()
+ {
+ return remotable;
+ }
+
+ @XmlElement(name="portlet")
+ @XmlJavaTypeAdapter(JBossPortletListAdapter.class)
+ public Map<String, JBossPortletMetaData> getPortlets()
+ {
+ return portlets;
+ }
+
+ public List<ServiceMetaData> getServices()
+ {
+ return services;
+ }
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/JBossPortletMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,133 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class JBossPortletMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String portletName;
+ protected Boolean remotable;
+ protected AjaxMetaData ajax;
+ protected SessionConfigMetaData sessionConfig;
+ protected TransactionMetaData transaction;
+ protected HeaderContentMetaData headerContent;
+ protected PortletInfoMetaData portletInfo;
+
+ @XmlElement (name = "portlet-name")
+ public void setPortletName(String portletName)
+ {
+ this.portletName = portletName;
+ }
+
+ @XmlElement (name = "remotable")
+ public void setRemotable (String remotable)
+ {
+ this.remotable = Boolean.valueOf(remotable);
+ }
+
+ @XmlElement (name = "ajax")
+ public void setAjax (AjaxMetaData ajax)
+ {
+ this.ajax = ajax;
+ }
+
+ @XmlElement (name = "transaction")
+ public void setTransaction (TransactionMetaData transaction)
+ {
+ this.transaction = transaction;
+ }
+
+ @XmlElement (name = "header-content")
+ public void setHeaderContent(HeaderContentMetaData headerContent)
+ {
+ this.headerContent = headerContent;
+ }
+
+ @XmlElement (name = "portlet-info")
+ public void setPortletInfo (PortletInfoMetaData portletInfo)
+ {
+ this.portletInfo = portletInfo;
+ }
+
+ public TransactionMetaData getTransaction()
+ {
+ return transaction;
+ }
+
+ public String getPortletName()
+ {
+ return portletName;
+ }
+
+ public Boolean isRemotable()
+ {
+ return remotable;
+ }
+
+ public SessionConfigMetaData getSessionConfig()
+ {
+ return sessionConfig;
+ }
+
+ public AjaxMetaData getAjax()
+ {
+ return ajax;
+ }
+
+ public HeaderContentMetaData getHeaderContent()
+ {
+ return headerContent;
+ }
+
+ public PortletInfoMetaData getPortletInfo()
+ {
+ return portletInfo;
+ }
+
+ public void merge(JBossPortletMetaData portlet)
+ {
+ if (remotable == null)
+ {
+ remotable = portlet.isRemotable();
+ }
+ if (transaction == null && portlet.getTransaction().getTransAttribute() != null)
+ {
+ transaction = new TransactionMetaData();
+ transaction.setTransAttribute(portlet.getTransaction().getTransAttribute());
+ }
+ if (sessionConfig == null && portlet.getSessionConfig() != null)
+ {
+ sessionConfig = new SessionConfigMetaData();
+ sessionConfig.setDistributed(portlet.getSessionConfig().isDistributed());
+ }
+ }
+
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/LinkMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/LinkMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/LinkMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class LinkMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String href;
+ protected String rel;
+ protected String type;
+ protected String media;
+ protected String title;
+
+ public String getHref()
+ {
+ return href;
+ }
+
+ @XmlAttribute (name = "href")
+ public void setHref(String href)
+ {
+ this.href = href;
+ }
+
+ public String getRel()
+ {
+ return rel;
+ }
+
+ @XmlAttribute (name = "rel")
+ public void setRel(String rel)
+ {
+ this.rel = rel;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ @XmlAttribute (name = "type")
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getMedia()
+ {
+ return media;
+ }
+
+ @XmlAttribute (name = "media")
+ public void setMedia(String media)
+ {
+ this.media = media;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/MetaMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/MetaMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/MetaMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class MetaMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String name;
+ protected String content;
+
+ @XmlAttribute (name = "name")
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlAttribute (name = "content")
+ public void setContent (String content)
+ {
+ this.content = content;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getContent()
+ {
+ return content;
+ }
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletIconMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletIconMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletIconMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletIconMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ //location for the small icon
+ protected String smallIcon;
+ //location for the large icon
+ protected String largeIcon;
+
+ @XmlElement (name = "small-icon")
+ public void setSmallIcon(String smallIcon)
+ {
+ this.smallIcon = smallIcon;
+ }
+
+ @XmlElement (name = "large-icon")
+ public void setLargeIcon (String largeIcon)
+ {
+ this.largeIcon = largeIcon;
+ }
+
+ public String getSmallIcon()
+ {
+ return smallIcon;
+ }
+
+ public String getLargeIcon()
+ {
+ return largeIcon;
+ }
+
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletInfoMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletInfoMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/PortletInfoMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletInfoMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected PortletIconMetaData icon;
+
+ @XmlElement (name = "icon")
+ public void setPortletIcon (PortletIconMetaData icon)
+ {
+ this.icon = icon;
+ }
+
+ public PortletIconMetaData getPortletIcon()
+ {
+ return icon;
+ }
+
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ScriptMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ScriptMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ScriptMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class ScriptMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String src;
+ protected String type;
+ protected String language;
+ protected String script;
+
+ @XmlAttribute (name = "src")
+ public void setSrc(String src)
+ {
+ this.src = src;
+ }
+
+ @XmlAttribute (name = "type")
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ @XmlAttribute (name ="language")
+ public void setLanguage(String language)
+ {
+ this.language = language;
+ }
+
+ @XmlValue
+ public void setScript (String script)
+ {
+ this.script = script;
+ }
+
+ public String getSrc()
+ {
+ return src;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public String getLanguage()
+ {
+ return language;
+ }
+
+ public String getScript()
+ {
+ return script;
+ }
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ServiceMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ServiceMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/ServiceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,72 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class ServiceMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String serviceName;
+ protected String serviceClass;
+ protected String serviceRef;
+
+ @XmlElement (name = "service-name")
+ public void setServiceName(String serviceName)
+ {
+ this.serviceName = serviceName;
+ }
+
+ @XmlElement (name = "service-class")
+ public void setServiceClass(String serviceClass)
+ {
+ this.serviceClass = serviceClass;
+ }
+
+ @XmlElement (name = "service-ref")
+ public void setServiceRef(String serviceRef)
+ {
+ this.serviceRef = serviceRef;
+ }
+
+ public String getServiceName()
+ {
+ return serviceName;
+ }
+
+ public String getServiceClass()
+ {
+ return serviceClass;
+ }
+
+ public String getServiceRef()
+ {
+ return serviceRef;
+ }
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SessionConfigMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SessionConfigMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/SessionConfigMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class SessionConfigMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected Boolean distributed;
+
+ @XmlElement (name = "distributed")
+ public void setDistributed(Boolean distributed)
+ {
+ this.distributed = distributed;
+ }
+
+ public Boolean isDistributed ()
+ {
+ return distributed;
+ }
+
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/TransactionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/TransactionMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/TransactionMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class TransactionMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected static final String REQUIRED = "Required";
+ protected static final String MANDATORY = "Manadatory";
+ protected static final String NEVER = "Never";
+ protected static final String SUPPORTS = "Supports";
+ protected static final String NOTSUPPORTED = "NotSupported";
+ protected static final String REQUIRESNEW = "RequiresNew";
+
+ protected String[] validTransAttributes = new String[]{REQUIRED, MANDATORY, NEVER, SUPPORTS, NOTSUPPORTED, REQUIRESNEW};
+
+ protected String transAttribute;
+
+ @XmlElement (name = "trans-attribute")
+ public void setTransAttribute (String transAttribute)
+ {
+ boolean found = false;
+ for (String value : validTransAttributes)
+ {
+ if (transAttribute.equalsIgnoreCase(value))
+ {
+ this.transAttribute = value;
+ found = true;
+ }
+ }
+ if (found == false)
+ {
+ throw new IllegalArgumentException("The trans-attribute " + transAttribute
+ + " is not a valid trans-attribute value. Valid trans-attributes are "
+ + validTransAttributes.toString());
+ }
+ }
+
+ public String getTransAttribute()
+ {
+ return transAttribute;
+ }
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/JBossPortletListAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/JBossPortletListAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/jboss/portlet/adapter/JBossPortletListAdapter.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.jboss.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class JBossPortletListAdapter
+ extends XmlAdapter<List<JBossPortletMetaData>, Map<String, JBossPortletMetaData>>
+{
+
+ @Override
+ public List<JBossPortletMetaData> marshal(Map<String, JBossPortletMetaData> portletMap) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, JBossPortletMetaData> unmarshal(List<JBossPortletMetaData> portletList) throws Exception
+ {
+ Map<String, JBossPortletMetaData> portletMap = new LinkedHashMap<String, JBossPortletMetaData>();
+ for (JBossPortletMetaData portlet : portletList)
+ {
+ if (!portletMap.containsKey(portlet.getPortletName()))
+ {
+ portletMap.put(portlet.getPortletName(), portlet);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Portlet name '" + portlet.getPortletName() + "' already defined.");
+ }
+ }
+ return portletMap;
+ }
+
+}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/AliasBindingMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/AliasBindingMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/AliasBindingMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
@@ -35,7 +37,7 @@
protected String id;
- protected String qName;
+ protected List<String> qNames;
@XmlElement(name = "id")
public void setId(String id)
@@ -44,9 +46,9 @@
}
@XmlElement(name = "qname")
- public void setQName(String qName)
+ public void setQNames(List<String> qNames)
{
- this.qName = qName;
+ this.qNames = qNames;
}
public String getId()
@@ -54,8 +56,8 @@
return id;
}
- public String getQName()
+ public List<String> getQNames()
{
- return qName;
+ return qNames;
}
}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/CommonPortalObject.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/CommonPortalObject.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/CommonPortalObject.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,125 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portal.object;
+
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.SecurityConstraintMetaData;
+
+/**
+ * Common elements between context, portal, window and page deployment metadata.
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public abstract class CommonPortalObject extends IdMetaDataImplWithDescriptionGroup
+{
+ protected String name;
+ protected String listener;
+ protected PropertiesMetaData properties;
+ protected String resourceBundle;
+ protected List<Locale> supportedLocales;
+ protected SecurityConstraintMetaData securityConstraint;
+ protected List<DisplayNameMetaData> displayNames;
+
+ abstract public void setName(String name);
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @XmlElement(name = "display-name")
+ public void SetDisplayNames(List<DisplayNameMetaData> displayNames)
+ {
+ this.displayNames = displayNames;
+ }
+
+ public List<DisplayNameMetaData> getDisplayNames()
+ {
+ return displayNames;
+ }
+
+ @XmlElement(name = "listener")
+ public void setListener(String listener)
+ {
+ this.listener = listener;
+ }
+
+ public String getListener()
+ {
+ return listener;
+ }
+
+ @XmlElement(name = "properties")
+ public void setProperties(PropertiesMetaData properties)
+ {
+ this.properties = properties;
+ }
+
+ public PropertiesMetaData getProperties()
+ {
+ return properties;
+ }
+
+ @XmlElement(name = "resource-bundle")
+ public void setResourceBundle(String resourceBundle)
+ {
+ this.resourceBundle = resourceBundle;
+ }
+
+ public String getResourceBundle()
+ {
+ return resourceBundle;
+ }
+
+ @XmlElement(name = "supported-locale")
+ public void setSupportedLocales(List<Locale> supportedLocales)
+ {
+ this.supportedLocales = supportedLocales;
+ }
+
+ public List<Locale> getSupportedLocales()
+ {
+ return supportedLocales;
+ }
+
+ //abstract public void setChildren(List<?> children);
+ abstract public List<CommonPortalObject> getChildren();
+
+ @XmlElement(name = "security-constraint")
+ public void setSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+ {
+ this.securityConstraint = securityConstraint;
+ }
+
+ public SecurityConstraintMetaData getSecurityConstraint()
+ {
+ return securityConstraint;
+ }
+}
+
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ContextMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ContextMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ContextMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,123 +22,49 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-import org.jboss.portal.metadata.portlet.DisplayNameMetaData;
-import org.jboss.portal.metadata.portlet.SecurityConstrainMetaData;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.SecurityConstraintMetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class ContextMetaData extends IdMetaDataImplWithDescriptionGroup
+public class ContextMetaData extends CommonPortalObject
{
-
- protected String contextName;
-
- protected PropertiesMetaData properties;
-
- protected String listener;
-
- protected SecurityConstrainMetaData securityConstraint;
-
- protected List<DisplayNameMetaData> displayName;
-
- protected String resourceBundle;
-
- protected List<String> supportedLocales;
-
protected List<PortalMetaData> portals;
@XmlElement(name = "context-name")
- public void setContextName(String contextName)
+ public void setName(String name)
{
- this.contextName = contextName;
+ this.name = name;
}
- @XmlElement(name = "properties")
- public void setProperties(PropertiesMetaData properties)
- {
- this.properties = properties;
- }
-
- @XmlElement(name = "listener")
- public void setListener(String listener)
- {
- this.listener = listener;
- }
-
- @XmlElement(name = "security-constraint")
- public void setSecurityConstraint(SecurityConstrainMetaData securityConstraint)
- {
- this.securityConstraint = securityConstraint;
- }
-
@XmlElement(name = "portal")
public void setPortal(List<PortalMetaData> portals)
{
this.portals = portals;
}
- @XmlElement(name = "display-name")
- public void setDisplayName(List<DisplayNameMetaData> displayName)
+ public List<PortalMetaData> getPortals()
{
- this.displayName = displayName;
+ return portals;
}
- @XmlElement(name = "resource-bundle")
- public void setResourceBundle(String resourceBundle)
+ @Override
+ public List<CommonPortalObject> getChildren()
{
- this.resourceBundle = resourceBundle;
+ List<CommonPortalObject> children = new ArrayList<CommonPortalObject>();
+ if (portals != null)
+ {
+ children.addAll(portals);
+ }
+ return children;
}
- @XmlElement(name = "supported-locale")
- public void setSupportedLocales(List<String> supportedLocales)
- {
- this.supportedLocales = supportedLocales;
- }
-
- public String getContextName()
- {
- return contextName;
- }
-
- public PropertiesMetaData getProperties()
- {
- return properties;
- }
-
- public String getListener()
- {
- return listener;
- }
-
- public SecurityConstrainMetaData getSecurityConstraint()
- {
- return securityConstraint;
- }
-
- public List<DisplayNameMetaData> getDisplayName()
- {
- return displayName;
- }
-
- public String getResourceBundle()
- {
- return resourceBundle;
- }
-
- public List<String> getSupportedLocales()
- {
- return supportedLocales;
- }
-
- public List<PortalMetaData> getPortals()
- {
- return portals;
- }
-
}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/EventWiringMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/EventWiringMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/EventWiringMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
@@ -35,9 +37,9 @@
protected String name;
- protected WindowCoordinationMetaData sources;
+ protected List<WindowCoordinationMetaData> sources;
- protected WindowCoordinationMetaData destinations;
+ protected List<WindowCoordinationMetaData> destinations;
@XmlElement(name = "name")
public void setName(String name)
@@ -46,13 +48,13 @@
}
@XmlElement(name = "sources")
- public void setSources(WindowCoordinationMetaData sources)
+ public void setSources(List<WindowCoordinationMetaData> sources)
{
this.sources = sources;
}
@XmlElement(name = "destinations")
- public void setDestination(WindowCoordinationMetaData destination)
+ public void setDestination(List<WindowCoordinationMetaData> destination)
{
this.destinations = destination;
}
@@ -62,12 +64,12 @@
return name;
}
- public WindowCoordinationMetaData getSources()
+ public List<WindowCoordinationMetaData> getSources()
{
return sources;
}
- public WindowCoordinationMetaData getDestinations()
+ public List<WindowCoordinationMetaData> getDestinations()
{
return destinations;
}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ModeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ModeMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ModeMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -35,17 +35,17 @@
public class ModeMetaData extends IdMetaDataImplWithDescriptionGroup
{
- protected List<String> mode;
+ protected List<String> modes;
@XmlElement(name = "mode")
public void setMode(List<String> mode)
{
- this.mode = mode;
+ this.modes = modes;
}
- public List<String> getMode()
+ public List<String> getModes()
{
- return mode;
+ return modes;
}
}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PageMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PageMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PageMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,65 +22,45 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-import org.jboss.portal.metadata.portlet.DisplayNameMetaData;
-import org.jboss.portal.metadata.portlet.SecurityConstrainMetaData;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.SecurityConstraintMetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class PageMetaData extends IdMetaDataImplWithDescriptionGroup
+public class PageMetaData extends CommonPortalObject
{
- protected String pageName;
-
protected PropertiesMetaData properties;
protected String listener;
- protected SecurityConstrainMetaData securityConstraint;
+ protected SecurityConstraintMetaData securityConstraint;
protected List<PageMetaData> pages;
protected List<WindowMetaData> windows;
- protected List<DisplayNameMetaData> displayNames;
-
protected String resourceBundle;
protected List<String> supportedLocales;
protected CoordinationMetaData coordination;
- @XmlElement(name = "page-name")
- public void setPageName(String pageName)
- {
- this.pageName = pageName;
- }
- @XmlElement(name = "properties")
- public void setProperties(PropertiesMetaData properties)
+ @XmlElement (name="page-name")
+ public void setName(String name)
{
- this.properties = properties;
+ this.name = name;
}
-
- @XmlElement(name = "listener")
- public void setListener(String listener)
- {
- this.listener = listener;
- }
-
- @XmlElement(name = "security-constraint")
- public void setSecurityConstraint(SecurityConstrainMetaData securityConstraint)
- {
- this.securityConstraint = securityConstraint;
- }
-
+
@XmlElement(name = "page")
public void setPages(List<PageMetaData> pages)
{
@@ -92,51 +72,13 @@
{
this.windows = windows;
}
-
- @XmlElement(name = "display-name")
- public void setDisplayNames(List<DisplayNameMetaData> displayNames)
- {
- this.displayNames = displayNames;
- }
-
- @XmlElement(name = "resource-bundle")
- public void setResourceBundle(String resourceBundle)
- {
- this.resourceBundle = resourceBundle;
- }
-
- @XmlElement(name = "supported-locale")
- public void setSupportedLocales(List<String> supportedLocales)
- {
- this.supportedLocales = supportedLocales;
- }
-
+
@XmlElement(name = "coodination")
public void setCoordination(CoordinationMetaData coordination)
{
this.coordination = coordination;
}
- public String getPageName()
- {
- return pageName;
- }
-
- public PropertiesMetaData getProperties()
- {
- return properties;
- }
-
- public String getListener()
- {
- return listener;
- }
-
- public SecurityConstrainMetaData getSecurityConstraint()
- {
- return securityConstraint;
- }
-
public List<PageMetaData> getPages()
{
return pages;
@@ -147,24 +89,23 @@
return windows;
}
- public List<DisplayNameMetaData> getDisplayNames()
- {
- return displayNames;
- }
-
- public String getResourceBundle()
- {
- return resourceBundle;
- }
-
- public List<String> getSupportedLocales()
- {
- return supportedLocales;
- }
-
public CoordinationMetaData getCoordination()
{
return coordination;
}
-
+
+ @Override
+ public List<CommonPortalObject> getChildren()
+ {
+ List<CommonPortalObject> children = new ArrayList<CommonPortalObject>();
+ if (this.getPages() != null)
+ {
+ children.addAll(this.getPages());
+ }
+ if (this.getWindows() != null)
+ {
+ children.addAll(this.getWindows());
+ }
+ return children;
+ }
}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ParameterBindingMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ParameterBindingMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/ParameterBindingMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
@@ -34,7 +36,7 @@
{
protected String id;
- protected WindowCoordinationMetaData windowCoordination;
+ protected List<WindowCoordinationMetaData> windowCoordinations;
@XmlElement(name = "id")
public void setId(String id)
@@ -43,9 +45,9 @@
}
@XmlElement(name = "window-coordination")
- public void setWindowCoordintationMetaData(WindowCoordinationMetaData windowCoordination)
+ public void setWindowCoordintation(List<WindowCoordinationMetaData> windowCoordinations)
{
- this.windowCoordination = windowCoordination;
+ this.windowCoordinations = windowCoordinations;
}
public String getId()
@@ -53,9 +55,9 @@
return id;
}
- public WindowCoordinationMetaData getWindowCoordination()
+ public List<WindowCoordinationMetaData> getWindowCoordination()
{
- return windowCoordination;
+ return windowCoordinations;
}
}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,47 +22,34 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-import org.jboss.portal.metadata.portlet.DisplayNameMetaData;
-import org.jboss.portal.metadata.portlet.SecurityConstrainMetaData;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.SecurityConstraintMetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class PortalMetaData extends IdMetaDataImplWithDescriptionGroup
+public class PortalMetaData extends CommonPortalObject
{
- protected String portalName;
-
protected ModeMetaData modes;
protected WindowStatesMetaData windowStates;
- protected PropertiesMetaData properties;
-
- protected String listener;
-
- protected SecurityConstrainMetaData securityConstraint;
-
protected List<PageMetaData> pages;
- protected List<DisplayNameMetaData> displayName;
-
- protected String resourceBundle;
-
- protected List<String> supportedLocales;
-
protected CoordinationMetaData coordination;
@XmlElement(name = "portal-name")
- public void setPortalName(String portalName)
+ public void setName(String portalName)
{
- this.portalName = portalName;
+ this.name = portalName;
}
@XmlElement(name = "supported-modes")
@@ -72,112 +59,52 @@
}
@XmlElement(name = "supported-window-states")
- public void setWindowStates(WindowStatesMetaData windowStates)
+ public void setSupportedWindowStates(WindowStatesMetaData windowStates)
{
this.windowStates = windowStates;
}
- @XmlElement(name = "properties")
- public void setProperties(PropertiesMetaData properties)
- {
- this.properties = properties;
- }
-
- @XmlElement(name = "listener")
- public void setListener(String listener)
- {
- this.listener = listener;
- }
-
- @XmlElement(name = "security-constraint")
- public void setSecurityConstraint(SecurityConstrainMetaData securityConstraint)
- {
- this.securityConstraint = securityConstraint;
- }
-
@XmlElement(name = "page")
public void setPages(List<PageMetaData> pages)
{
this.pages = pages;
}
- @XmlElement(name = "display-name")
- public void setDisplayName(List<DisplayNameMetaData> displayName)
- {
- this.displayName = displayName;
- }
-
- @XmlElement(name = "resource-bundle")
- public void setResourceBundle(String resourceBundle)
- {
- this.resourceBundle = resourceBundle;
- }
-
- @XmlElement(name = "supported-locale")
- public void setSupportedLocales(List<String> supportedLocales)
- {
- this.supportedLocales = supportedLocales;
- }
-
- @XmlElement(name = "coodination")
+ @XmlElement(name = "coordination")
public void setCoordination(CoordinationMetaData coordination)
{
this.coordination = coordination;
}
- public String getPortalName()
- {
- return portalName;
- }
-
public ModeMetaData getModes()
{
return modes;
}
- public WindowStatesMetaData getWindowStates()
+ public WindowStatesMetaData getSupportedWindowStates()
{
return windowStates;
}
- public PropertiesMetaData getProperties()
- {
- return properties;
- }
-
- public String getListener()
- {
- return listener;
- }
-
- public SecurityConstrainMetaData getSecurityConstraint()
- {
- return securityConstraint;
- }
-
public List<PageMetaData> getPages()
{
return pages;
}
- public List<DisplayNameMetaData> getDisplayName()
+ public CoordinationMetaData getCoordination()
{
- return displayName;
+ return coordination;
}
- public String getResourceBundle()
+ @Override
+ public List<CommonPortalObject> getChildren()
{
- return resourceBundle;
+ List<CommonPortalObject> children = new ArrayList<CommonPortalObject>();
+ if (this.getPages() != null)
+ {
+ children.addAll(this.getPages());
+ }
+ return children;
}
- public List<String> getSupportedLocales()
- {
- return supportedLocales;
- }
-
- public CoordinationMetaData getCoordination()
- {
- return coordination;
- }
-
}
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,114 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portal.object;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortalObjectDeployment extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected String parentRef;
-
- protected String ifExists;
-
- protected ContextMetaData context;
-
- protected PortalMetaData portal;
-
- protected PageMetaData page;
-
- protected WindowMetaData window;
-
- @XmlElement(name = "parent-ref")
- public void setParentRef(String parentRef)
- {
- this.parentRef = parentRef;
- }
-
- @XmlElement(name = "if-exists")
- public void setIfExists(String ifExists)
- {
- this.ifExists = ifExists;
- }
-
- @XmlElement(name = "context")
- public void setContext(ContextMetaData context)
- {
- this.context = context;
- }
-
- @XmlElement(name = "portal")
- public void setPortal(PortalMetaData portal)
- {
- this.portal = portal;
- }
-
- @XmlElement(name = "page")
- public void setPage(PageMetaData page)
- {
- this.page = page;
- }
-
- @XmlElement(name = "window")
- public void setWindow(WindowMetaData window)
- {
- this.window = window;
- }
-
- public String getParentRef()
- {
- return parentRef;
- }
-
- public String getIfExists()
- {
- return ifExists;
- }
-
- public ContextMetaData getContext()
- {
- return context;
- }
-
- public PortalMetaData getPortal()
- {
- return portal;
- }
-
- public PageMetaData getPage()
- {
- return page;
- }
-
- public WindowMetaData getWindow()
- {
- return window;
- }
-
-}
Copied: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeploymentMetaData.java (from rev 12389, modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeployment.java)
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeploymentMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectDeploymentMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,125 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portal.object;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortalObjectDeploymentMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected String parentRef;
+
+ protected boolean overwrite;
+
+ @XmlElement (name = "context")
+ protected ContextMetaData context;
+
+ @XmlElement (name = "portal")
+ protected PortalMetaData portal;
+
+ @XmlElement (name = "page")
+ protected PageMetaData page;
+
+ @XmlElement (name = "window")
+ protected WindowMetaData window;
+
+ @XmlElement(name = "parent-ref")
+ public void setParentRef(String parentRef)
+ {
+ this.parentRef = parentRef;
+ }
+
+ @XmlElement(name = "if-exists")
+ public void setIfExists(String ifExists)
+ {
+ if (ifExists.equalsIgnoreCase("overwrite"))
+ {
+ this.overwrite = true;
+ }
+ else
+ {
+ this.overwrite = false;
+ }
+ }
+
+ @XmlElement(name = "context")
+ public void setContext(ContextMetaData context)
+ {
+ this.context = context;
+ }
+
+ @XmlElement(name = "portal")
+ public void setPortal(PortalMetaData portal)
+ {
+ this.portal = portal;
+ }
+
+ @XmlElement(name = "page")
+ public void setPage(PageMetaData page)
+ {
+ this.page = page;
+ }
+
+ @XmlElement(name = "window")
+ public void setWindow(WindowMetaData window)
+ {
+ this.window = window;
+ }
+
+ public String getParentRef()
+ {
+ return parentRef;
+ }
+
+ public boolean isOverwrite()
+ {
+ return overwrite;
+ }
+
+ public ContextMetaData getContext()
+ {
+ return context;
+ }
+
+ public PortalMetaData getPortal()
+ {
+ return portal;
+ }
+
+ public PageMetaData getPage()
+ {
+ return page;
+ }
+
+ public WindowMetaData getWindow()
+ {
+ return window;
+ }
+
+}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/PortalObjectMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,11 +22,13 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
/**
@@ -36,18 +38,18 @@
@XmlRootElement(name = "deployments")
public class PortalObjectMetaData extends IdMetaDataImplWithDescriptionGroup
{
-
- List<PortalObjectDeployment> deployments;
-
+
+ List<PortalObjectDeploymentMetaData> deployment;
+
@XmlElement(name = "deployment")
- public void setPortalObjectDeployments(List<PortalObjectDeployment> deployments)
+ public void setDeployments(List<PortalObjectDeploymentMetaData> deployment)
{
- this.deployments = deployments;
+ this.deployment = deployment;
}
- public List<PortalObjectDeployment> getDeployments()
+ public List<PortalObjectDeploymentMetaData> getDeployments()
{
- return deployments;
+ return deployment;
}
-
+
}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowCoordinationMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowCoordinationMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowCoordinationMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
@@ -36,6 +38,8 @@
protected String windowName;
protected String qName;
+
+ protected List<String> qNames;
@XmlElement(name = "window-name")
public void setWindowName(String windowName)
@@ -49,6 +53,12 @@
this.qName = qName;
}
+ @XmlElement(name="qname")
+ public void setQNames(List<String> qNames)
+ {
+ this.qNames = qNames;
+ }
+
public String getWindowName()
{
return windowName;
@@ -58,5 +68,10 @@
{
return qName;
}
+
+ public List<String> getQNames()
+ {
+ return qNames;
+ }
}
Modified: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portal/object/WindowMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -22,53 +22,46 @@
******************************************************************************/
package org.jboss.portal.metadata.portal.object;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-import org.jboss.portal.metadata.portlet.DisplayNameMetaData;
+import org.jboss.portal.metadata.portlet.instances.DisplayNameMetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class WindowMetaData extends IdMetaDataImplWithDescriptionGroup
+public class WindowMetaData extends CommonPortalObject
{
- protected String windowName;
-
protected String instanceRef;
protected ContentMetaData content;
protected String region;
- protected String height;
+ protected int height;
protected String initialWindowState;
protected String initialMode;
- protected PropertiesMetaData properties;
-
- protected String listener;
-
- protected List<DisplayNameMetaData> displayNames;
-
- protected String resourceBundle;
-
- protected List<String> supportedLocales;
-
@XmlElement(name = "window-name")
- public void setWindowName(String windowName)
+ public void setName(String name)
{
- this.windowName = windowName;
+ this.name = name;
}
@XmlElement(name = "instance-ref")
public void setInstanceRef(String instanceRef)
{
this.instanceRef = instanceRef;
+ ContentMetaData content = new ContentMetaData();
+ content.setContentType("portlet");
+ content.setContentURI(instanceRef);
+ this.content = content;
}
@XmlElement(name = "content")
@@ -84,11 +77,11 @@
}
@XmlElement(name = "height")
- public void setHeight(String height)
+ public void setHeight(int height)
{
this.height = height;
}
-
+
@XmlElement(name = "initial-window-state")
public void setInitialWindowState(String initialWindowState)
{
@@ -101,41 +94,6 @@
this.initialMode = initialMode;
}
- @XmlElement(name = "properties")
- public void setProperties(PropertiesMetaData properties)
- {
- this.properties = properties;
- }
-
- @XmlElement(name = "listener")
- public void setListener(String listener)
- {
- this.listener = listener;
- }
-
- @XmlElement(name = "display-name")
- public void setDisplayNames(List<DisplayNameMetaData> displayNames)
- {
- this.displayNames = displayNames;
- }
-
- @XmlElement(name = "resource-bundle")
- public void setResourceBundle(String resourceBundle)
- {
- this.resourceBundle = resourceBundle;
- }
-
- @XmlElement(name = "supported-locale")
- public void setSupportedLocales(List<String> supportedLocales)
- {
- this.supportedLocales = supportedLocales;
- }
-
- public String getWindowName()
- {
- return windowName;
- }
-
public String getInstanceRef()
{
return instanceRef;
@@ -151,7 +109,7 @@
return region;
}
- public String getHeight()
+ public int getHeight()
{
return height;
}
@@ -166,29 +124,12 @@
return initialMode;
}
- public PropertiesMetaData getProperties()
+ @Override
+ public List<CommonPortalObject> getChildren()
{
- return properties;
+ // Windows don't have any child objects so always return an empty List
+ List<CommonPortalObject> children = new ArrayList<CommonPortalObject>();
+ return children;
}
- public String getListener()
- {
- return listener;
- }
-
- public List<DisplayNameMetaData> getDisplayNames()
- {
- return displayNames;
- }
-
- public String getResourceBundle()
- {
- return resourceBundle;
- }
-
- public List<String> getSupportedLocales()
- {
- return supportedLocales;
- }
-
}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomPortletModeMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "custom-portlet-modeType")
+public class CustomPortletModeMetaData extends DescribableMetaData
+{
+
+ /** The custom portlet mode id*/
+ private String id;
+
+ /** The portlet mode */
+ private String portletMode;
+
+ /** Is portal managed */
+ private boolean portalManaged = true;
+
+ public CustomPortletModeMetaData() {}
+
+ public CustomPortletModeMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "portlet-mode")
+ public String getPortletMode()
+ {
+ return portletMode;
+ }
+
+ public void setPortletMode(String portletMode)
+ {
+ this.portletMode = portletMode;
+ }
+
+ @XmlElement(name = "portal-managed", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public boolean isPortalManaged()
+ {
+ return portalManaged;
+ }
+
+ public void setPortalManaged(boolean portalManaged)
+ {
+ this.portalManaged = portalManaged;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/CustomWindowStateMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "custom-window-stateType")
+public class CustomWindowStateMetaData extends DescribableMetaData
+{
+
+ /** The window state id */
+ private String id;
+
+ /** The window state */
+ private String windowState;
+
+ public CustomWindowStateMetaData() {}
+
+ public CustomWindowStateMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "window-state")
+ public String getWindowState()
+ {
+ return windowState;
+ }
+
+ public void setWindowState(String windowState)
+ {
+ this.windowState = windowState;
+ }
+
+}
\ No newline at end of file
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,63 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class DisplayNameMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected String lang;
-
- protected String displayName;
-
- @XmlAttribute(name = "xml:lang")
- public void setLang(String lang)
- {
- this.lang = lang;
- }
-
- @XmlElement(name = "display-name")
- public void setDisplayName(String displayName)
- {
- this.displayName = displayName;
- }
-
- public String getLang()
- {
- return lang;
- }
-
- public String getDisplayName()
- {
- return displayName;
- }
-
-}
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,104 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.apache.log4j.Logger;
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class InstanceMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected String instanceId;
-
- protected String portletRef;
-
- protected List<DisplayNameMetaData> displayNames;
-
- protected PortletPreferencesMetaData portletPreferences;
-
- protected SecurityConstrainMetaData securityContraint;
-
- @XmlElement(name = "instance-id")
- public void setInstanceId(String instanceId)
- {
- this.instanceId = instanceId;
- }
-
- @XmlElement(name = "portlet-ref")
- public void setPortletRef(String portletRef)
- {
- this.portletRef = portletRef;
- }
-
- @XmlElement(name = "display-name")
- public void setDisplayName(List<DisplayNameMetaData> displayNames)
- {
- this.displayNames = displayNames;
- }
-
- @XmlElement(name = "perferences")
- public void setPreferences(PortletPreferencesMetaData preferences)
- {
- this.portletPreferences = preferences;
- }
-
- @XmlElement(name = "security-constraint")
- public void setSecurityConstraint(SecurityConstrainMetaData securityConstraint)
- {
- this.securityContraint = securityConstraint;
- }
-
- public String getInstanceId()
- {
- return instanceId;
- }
-
- public String getPortletRef()
- {
- return portletRef;
- }
-
- public List<DisplayNameMetaData> getDisplayNames()
- {
- return displayNames;
- }
-
- public PortletPreferencesMetaData getPortletPreferences()
- {
- return portletPreferences;
- }
-
- public SecurityConstrainMetaData getSecurityContraint()
- {
- return securityContraint;
- }
-
-}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/ListenerMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,95 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "listenerType")
+public class ListenerMetaData extends DescribableMetaData
+{
+
+ /** The id */
+ private String id;
+
+ /** The display name */
+ private List<LocalizedDescriptionMetaData> displayName;
+
+ /** The listener class */
+ private String listenerClass;
+
+ public ListenerMetaData() {}
+
+ public ListenerMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "display-name")
+ public List<LocalizedDescriptionMetaData> getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(List<LocalizedDescriptionMetaData> displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "listener-class")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getListenerClass()
+ {
+ return listenerClass;
+ }
+
+ public void setListenerClass(String listenerClass)
+ {
+ this.listenerClass = listenerClass;
+ }
+
+}
+
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,74 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PolicyPermissionMetaData extends IdMetaDataImplWithDescriptionGroup
-{
- protected String actionName;
-
- protected String roleName;
-
- protected boolean unchecked = false;
-
- @XmlElement(name = "action-name")
- public void setActionName(String actionName)
- {
- this.actionName = actionName;
- }
-
- @XmlElement(name = "role-name")
- public void setRoleName(String roleName)
- {
- this.roleName = roleName;
- }
-
- @XmlElement(name = "unchecked")
- public void setUnchecked()
- {
- this.unchecked = true;
- }
-
- public String getActionName()
- {
- return actionName;
- }
-
- public String getRoleName()
- {
- return roleName;
- }
-
- public boolean isUnchecked()
- {
- return unchecked;
- }
-
-}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication10MetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,220 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.CustomPortletModeMetaData;
+import org.jboss.portal.metadata.portlet.CustomWindowStateMetaData;
+import org.jboss.portal.metadata.portlet.UserAttributeMetaData;
+import org.jboss.portal.metadata.portlet.adapter.CustomPortletModeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.CustomWindowStateAdapter;
+import org.jboss.portal.metadata.portlet.adapter.PortletListAdapter;
+import org.jboss.portal.metadata.portlet.adapter.UserAttributeAdapter;
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+import org.jboss.portal.metadata.portlet.security.SecurityConstraintMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlRootElement(name = "portlet-app")
+@XmlType(name = "portlet-appType")
+public class PortletApplication10MetaData
+{
+ /** The portlet application id. */
+ private String id;
+
+ /** The portlet application version. */
+ private String version;
+
+ /** A bunch of portlets. */
+ private Map<String, PortletMetaData> portlets;
+
+ /** The user attributes. */
+ private Map<String, UserAttributeMetaData> userAttributes;
+
+ /** The custom portlet mode. */
+ private Map<String, CustomPortletModeMetaData> customPortletModes;
+
+ /** The custom window states. */
+ private Map<String, CustomWindowStateMetaData> customWindowStates;
+
+ /** The security constraints */
+ private List<SecurityConstraintMetaData> securityConstraints;
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "version")
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public void setVersion(String version)
+ {
+ this.version = version;
+ }
+
+ @XmlElement(name = "portlet")
+ @XmlJavaTypeAdapter(PortletListAdapter.class)
+ public Map<String, PortletMetaData> getPortlets()
+ {
+ return portlets;
+ }
+
+ public void setPortlets(Map<String, PortletMetaData> portlets)
+ {
+ // Adding reference to the portlet application metadata
+ for( PortletMetaData p : portlets.values())
+ {
+ p.setPortletApplication(this);
+ }
+ this.portlets = portlets;
+ }
+
+ public Collection<PortletMetaData> getPortletCollection()
+ {
+ return portlets != null ? portlets.values() : null;
+ }
+
+ public PortletMetaData getPortlet(String portletName)
+ {
+ return portlets.get(portletName);
+ }
+
+ public void addPortlet(PortletMetaData portlet)
+ {
+ if(this.portlets == null)
+ {
+ this.portlets = new LinkedHashMap<String, PortletMetaData>();
+ }
+ // Adding reference to the portlet application metadata
+ portlet.setPortletApplication(this);
+ this.portlets.put(portlet.getPortletName(), portlet);
+ }
+
+ @XmlElement(name = "user-attribute")
+ @XmlJavaTypeAdapter(UserAttributeAdapter.class)
+ public Map<String, UserAttributeMetaData> getUserAttributes()
+ {
+ return userAttributes;
+ }
+
+ public void setUserAttributes(Map<String, UserAttributeMetaData> userAttributes)
+ {
+ this.userAttributes = userAttributes;
+ }
+
+ public void addUserAttribute(UserAttributeMetaData userAttribute)
+ {
+ if( this.userAttributes == null )
+ {
+ this.userAttributes = new HashMap<String, UserAttributeMetaData>();
+ }
+ this.userAttributes.put(userAttribute.getName(), userAttribute);
+ }
+
+ @XmlElement(name = "custom-portlet-mode")
+ @XmlJavaTypeAdapter(CustomPortletModeAdapter.class)
+ public Map<String, CustomPortletModeMetaData> getCustomPortletModes()
+ {
+ return customPortletModes;
+ }
+
+ public void setCustomPortletModes(Map<String, CustomPortletModeMetaData> customPortletMode)
+ {
+ this.customPortletModes = customPortletMode;
+ }
+
+ public void addCustomPortletMode(CustomPortletModeMetaData portletMode)
+ {
+ if ( this.customPortletModes == null)
+ {
+ this.customPortletModes = new HashMap<String, CustomPortletModeMetaData>();
+ }
+ this.customPortletModes.put(portletMode.getPortletMode(), portletMode);
+ }
+
+ @XmlElement(name = "custom-window-state")
+ @XmlJavaTypeAdapter(CustomWindowStateAdapter.class)
+ public Map<String, CustomWindowStateMetaData> getCustomWindowStates()
+ {
+ return customWindowStates;
+ }
+
+ public void setCustomWindowStates(Map<String, CustomWindowStateMetaData> customWindowState)
+ {
+ this.customWindowStates = customWindowState;
+ }
+
+ public void addCustomWindowState(CustomWindowStateMetaData windowState)
+ {
+ if( this.customWindowStates == null )
+ {
+ this.customWindowStates = new HashMap<String, CustomWindowStateMetaData>();
+ }
+ this.customWindowStates.put(windowState.getWindowState(), windowState);
+ }
+
+ @XmlElement(name = "security-constraint")
+ public List<SecurityConstraintMetaData> getSecurityConstraints()
+ {
+ return securityConstraints;
+ }
+
+ public void setSecurityConstraints(List<SecurityConstraintMetaData> securityConstraints)
+ {
+ this.securityConstraints = securityConstraints;
+ }
+
+ public void addSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+ {
+ if(this.securityConstraints == null)
+ {
+ this.securityConstraints = new ArrayList<SecurityConstraintMetaData>();
+ }
+ this.securityConstraints.add(securityConstraint);
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletApplication20MetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,238 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.metadata.portlet.adapter.FilterAdapter;
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMappingMetaData;
+import org.jboss.portal.metadata.portlet.filter.FilterMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletApplication20MetaData extends PortletApplication10MetaData
+{
+ /** The resource bundle (JSR 286) */
+ private String resourceBundle;
+
+ /** The default namespace URI (JSR 286) */
+ private URI defaultNamespace;
+
+ /** The filters (JSR 286) */
+ private Map<String, FilterMetaData> filters;
+
+ /** The filter mapping (JSR 286) */
+ private List<FilterMappingMetaData> filterMapping;
+
+ /** The events (JSR 286) */
+ private List<EventDefinitionMetaData> events;
+
+ /** The public render parameters */
+ private List<PublicRenderParameterMetaData> publicRenderParameters;
+
+ /** The url generation listener */
+ private List<ListenerMetaData> listeners;
+
+ /** The container runtime options */
+ private Map<String, ContainerRuntimeMetaData> containerRuntimeOptions;
+
+ @XmlElement(name = "resource-bundle", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public String getResourceBundle()
+ {
+ return resourceBundle;
+ }
+
+ public void setResourceBundle(String resourceBundle)
+ {
+ this.resourceBundle = resourceBundle;
+ }
+
+ @XmlElement(name = "default-namespace")
+ public URI getDefaultNamespace()
+ {
+ return defaultNamespace;
+ }
+
+ public void setDefaultNamespace(URI defaultNamespace)
+ {
+ this.defaultNamespace = defaultNamespace;
+ }
+
+ @XmlElement(name = "filter", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ @XmlJavaTypeAdapter(FilterAdapter.class)
+ public Map<String, FilterMetaData> getFilters()
+ {
+ return this.filters;
+ }
+
+ public void setFilters(Map<String, FilterMetaData> filters)
+ {
+ this.filters = filters;
+ }
+
+ public Collection<FilterMetaData> getFilterCollection()
+ {
+ return this.filters != null ? this.filters.values() : null;
+ }
+
+ public FilterMetaData getFilter(String filterName)
+ {
+ return this.filters.get(filterName);
+ }
+
+ public void addFilter(FilterMetaData filter)
+ {
+ if ( this.filters == null)
+ {
+ this.filters = new LinkedHashMap<String, FilterMetaData>();
+ }
+ this.filters.put(filter.getFilterName(), filter);
+ }
+
+ @XmlElement(name = "filter-mapping", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<FilterMappingMetaData> getFilterMapping()
+ {
+ return filterMapping;
+ }
+
+ public void setFilterMapping(List<FilterMappingMetaData> filterMapping)
+ {
+ this.filterMapping = filterMapping;
+ }
+
+ public void addFilterMapping(FilterMappingMetaData filterMapping)
+ {
+ if(this.filterMapping == null)
+ {
+ this.filterMapping = new ArrayList<FilterMappingMetaData>();
+ }
+ this.filterMapping.add(filterMapping);
+ }
+
+ @XmlElement(name = "event-definition", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<EventDefinitionMetaData> getEvents()
+ {
+ return events;
+ }
+
+ public void setEvents(List<EventDefinitionMetaData> events)
+ {
+ this.events = events;
+ }
+
+ public void addEventDefinition(EventDefinitionMetaData eventDefinition)
+ {
+ if(this.events == null)
+ {
+ this.events = new ArrayList<EventDefinitionMetaData>();
+ }
+ this.events.add(eventDefinition);
+ }
+
+ @XmlElement(name = "public-render-parameter", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<PublicRenderParameterMetaData> getPublicRenderParameters()
+ {
+ return publicRenderParameters;
+ }
+
+ public void setPublicRenderParameters(List<PublicRenderParameterMetaData> publicRenderParameters)
+ {
+ this.publicRenderParameters = publicRenderParameters;
+ }
+
+ public void addPublicRenderParameter(PublicRenderParameterMetaData renderParameter)
+ {
+ if( this.publicRenderParameters == null)
+ {
+ this.publicRenderParameters = new ArrayList<PublicRenderParameterMetaData>();
+ }
+ this.publicRenderParameters.add(renderParameter);
+ }
+
+ @XmlElement(name = "listener", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<ListenerMetaData> getListeners()
+ {
+ return listeners;
+ }
+
+ public void setListeners(List<ListenerMetaData> listeners)
+ {
+ this.listeners = listeners;
+ }
+
+ public void addListener(ListenerMetaData listener)
+ {
+ if (this.listeners == null)
+ {
+ this.listeners = new ArrayList<ListenerMetaData>();
+ }
+ this.listeners.add(listener);
+ }
+
+ @XmlElement(name = "container-runtime-option",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ @XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
+ public Map<String, ContainerRuntimeMetaData> getContainerRuntimeOptions()
+ {
+ return containerRuntimeOptions;
+ }
+
+ public void setContainerRuntimeOptions(Map<String, ContainerRuntimeMetaData> containerRuntimeOptions)
+ {
+ this.containerRuntimeOptions = containerRuntimeOptions;
+ }
+
+ public ContainerRuntimeMetaData getContainerRuntimeOption(String option)
+ {
+ return this.containerRuntimeOptions.get(option);
+ }
+
+ public Set<String> getContainerRuntimeOptionSet()
+ {
+ return this.containerRuntimeOptions != null ? this.containerRuntimeOptions.keySet() : null;
+ }
+
+ public void addContainerRuntime(ContainerRuntimeMetaData option)
+ {
+ if (this.containerRuntimeOptions == null)
+ {
+ this.containerRuntimeOptions = new HashMap<String, ContainerRuntimeMetaData>();
+ }
+ this.containerRuntimeOptions.put(option.getName(), option);
+ }
+}
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,69 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.logging.Logger;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortletDeploymentInstanceMetaData
-{
- private static final Logger log = Logger.getLogger(PortletDeploymentInstanceMetaData.class);
-
- protected InstanceMetaData instance;
-
- protected boolean overwrite;
-
- public void setInstance(InstanceMetaData instance)
- {
- this.instance = instance;
- }
-
- public InstanceMetaData getInstance()
- {
- return this.instance;
- }
-
- @XmlElement(name = "if-exists")
- public void setIfExists(String ifExists)
- {
- if (ifExists.equals("overwrite"))
- {
- this.overwrite = true;
- }
- else if (!ifExists.equals("keep"))
- {
- log.warn("Unknow value for if-exists, expecting overwrite or keep");
- }
- }
-
- public boolean getOverwrite()
- {
- return this.overwrite;
- }
-
-}
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,53 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-@XmlRootElement(name = "deployments", namespace = "")
-public class PortletDeploymentInstancesMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected List<PortletDeploymentInstanceMetaData> deploymentInstances;
-
- public List<PortletDeploymentInstanceMetaData> getDeploymentInstances()
- {
- return deploymentInstances;
- }
-
- @XmlElement(name = "deployment")
- public void setDeploymentInstances(List<PortletDeploymentInstanceMetaData> deploymentInstances)
- {
- this.deploymentInstances = deploymentInstances;
- }
-
-}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletMetaDataConstants.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import static javax.xml.XMLConstants.XML_NS_URI;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class PortletMetaDataConstants
+{
+
+ /** The portlet version 1.0 namespace */
+ public final static String PORTLET_JSR_168_NS = "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";
+
+ /** The portlet version 2.0 namespace */
+ public final static String PORTLET_JSR_286_NS = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd";
+
+ /** The xml namespace */
+ public final static String NS_XML_NAMESPACE = XML_NS_URI;
+
+ /** The default locale */
+ public final static String DEFAULT_LOCALE = "en";
+}
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,62 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortletPreferenceMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected String name;
-
- protected String value;
-
- @XmlElement
- public void setName(String name)
- {
- this.name = name;
- }
-
- @XmlElement
- public void setValue(String value)
- {
- this.value = value;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getValue()
- {
- return value;
- }
-
-}
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,51 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortletPreferencesMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected List<PortletPreferenceMetaData> preferences;
-
- @XmlElement(name = "preference")
- public void setPreference(List<PortletPreferenceMetaData> preferences)
- {
- this.preferences = preferences;
- }
-
- public List<PortletPreferenceMetaData> getPreferences()
- {
- return preferences;
- }
-
-}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PublicRenderParameterMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,129 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "public-render-parameterType")
+public class PublicRenderParameterMetaData extends DescribableMetaData
+{
+
+ /** The public render parameter id */
+ private String id;
+
+ /** The public render parameter identifier */
+ private String identifier;
+
+ /** The QName */
+ private QName qname;
+
+ /** The name */
+ private String name;
+
+ /** The public render parameter alias */
+ private List<QName> alias;
+
+ public PublicRenderParameterMetaData() {}
+
+ public PublicRenderParameterMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "identifier")
+ public String getIdentifier()
+ {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier)
+ {
+ this.identifier = identifier;
+ }
+
+ @XmlElement(name = "qname")
+ public QName getQname()
+ {
+ return qname;
+ }
+
+ public void setQname(QName qname)
+ {
+ this.qname = qname;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "alias")
+ public List<QName> getAlias()
+ {
+ return alias;
+ }
+
+ public void setAlias(List<QName> alias)
+ {
+ this.alias = alias;
+ }
+
+ public void addAlias(QName alias)
+ {
+ if(this.alias == null)
+ {
+ this.alias = new ArrayList<QName>();
+ }
+ this.alias.add(alias);
+ }
+
+}
Deleted: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/SecurityConstrainMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/SecurityConstrainMetaData.java 2009-03-02 19:41:16 UTC (rev 12923)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/SecurityConstrainMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -1,50 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.metadata.portlet;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class SecurityConstrainMetaData extends IdMetaDataImplWithDescriptionGroup
-{
-
- protected List<PolicyPermissionMetaData> policyPermission;
-
- @XmlElement(name = "policy-permission")
- public void setPolicyPermission(List<PolicyPermissionMetaData> policyPermission)
- {
- this.policyPermission = policyPermission;
- }
-
- public List<PolicyPermissionMetaData> getPolicyPermission()
- {
- return policyPermission;
- }
-}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/UserAttributeMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "user-attributeType")
+public class UserAttributeMetaData extends DescribableMetaData
+{
+
+ /** The id */
+ private String id;
+
+ /** The name */
+ private String name;
+
+ public UserAttributeMetaData() {}
+
+ public UserAttributeMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/ContainerRuntimeAdapter.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ContainerRuntimeAdapter
+ extends XmlAdapter<List<ContainerRuntimeMetaData>, java.util.Map<String, ContainerRuntimeMetaData>>
+{
+
+ @Override
+ public List<ContainerRuntimeMetaData> marshal(Map<String, ContainerRuntimeMetaData> map) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, ContainerRuntimeMetaData> unmarshal(List<ContainerRuntimeMetaData> list) throws Exception
+ {
+ Map<String, ContainerRuntimeMetaData> map = new HashMap<String, ContainerRuntimeMetaData>();
+ for (ContainerRuntimeMetaData c : list)
+ {
+ map.put(c.getName(), c);
+ }
+ return map;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomPortletModeAdapter.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.CustomPortletModeMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CustomPortletModeAdapter extends XmlAdapter<List<CustomPortletModeMetaData>, Map<String, CustomPortletModeMetaData>>
+{
+
+ @Override
+ public List<CustomPortletModeMetaData> marshal(Map<String, CustomPortletModeMetaData> map) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, CustomPortletModeMetaData> unmarshal(List<CustomPortletModeMetaData> list) throws Exception
+ {
+ Map<String, CustomPortletModeMetaData> map = new LinkedHashMap<String, CustomPortletModeMetaData>();
+ for (CustomPortletModeMetaData md : list)
+ {
+ map.put(md.getPortletMode(), md);
+ }
+ return map;
+ }
+
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/CustomWindowStateAdapter.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.CustomWindowStateMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CustomWindowStateAdapter extends XmlAdapter<List<CustomWindowStateMetaData>, Map<String, CustomWindowStateMetaData>>
+{
+
+ @Override
+ public List<CustomWindowStateMetaData> marshal(Map<String, CustomWindowStateMetaData> map) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, CustomWindowStateMetaData> unmarshal(List<CustomWindowStateMetaData> list) throws Exception
+ {
+ Map<String, CustomWindowStateMetaData> map = new LinkedHashMap<String, CustomWindowStateMetaData>();
+ for(CustomWindowStateMetaData md : list)
+ {
+ map.put(md.getWindowState(), md);
+ }
+ return map;
+ }
+
+}
+
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/FilterAdapter.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.filter.FilterMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class FilterAdapter
+ extends XmlAdapter<List<FilterMetaData>, Map<String, FilterMetaData>>
+{
+
+ @Override
+ public List<FilterMetaData> marshal(Map<String, FilterMetaData> map) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, FilterMetaData> unmarshal(List<FilterMetaData> list) throws Exception
+ {
+ Map<String, FilterMetaData> map = new LinkedHashMap<String, FilterMetaData>();
+ for (FilterMetaData f : list)
+ {
+ String filterName = f.getFilterName();
+ if (!map.containsKey(filterName))
+ {
+ map.put(filterName, f);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Duplicate filter: " + filterName);
+ }
+ }
+ return map;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletListAdapter.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public final class PortletListAdapter
+ extends XmlAdapter<List<PortletMetaData>, Map<String, PortletMetaData>>
+{
+
+ @Override
+ public List<PortletMetaData> marshal(Map<String, PortletMetaData> portletMap) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, PortletMetaData> unmarshal(List<PortletMetaData> portletList) throws Exception
+ {
+ Map<String, PortletMetaData> portletMap = new LinkedHashMap<String, PortletMetaData>();
+ for (PortletMetaData portlet : portletList)
+ {
+ if (!portletMap.containsKey(portlet.getPortletName()))
+ {
+ portletMap.put(portlet.getPortletName(), portlet);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Portlet name '" + portlet.getPortletName() + "' already defined.");
+ }
+ }
+ return portletMap;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/PortletPreferencesListAdapter.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.portlet.PortletPreferenceMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletPreferencesListAdapter
+ extends XmlAdapter<List<PortletPreferenceMetaData>, Map<String, PortletPreferenceMetaData>>
+{
+
+ @Override
+ public List<PortletPreferenceMetaData> marshal(Map<String, PortletPreferenceMetaData> arg0) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, PortletPreferenceMetaData> unmarshal(List<PortletPreferenceMetaData> list) throws Exception
+ {
+ Map<String, PortletPreferenceMetaData> map = new LinkedHashMap<String, PortletPreferenceMetaData>();
+ for (PortletPreferenceMetaData p : list)
+ {
+ map.put(p.getName(), p);
+ }
+ return map;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/adapter/UserAttributeAdapter.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.adapter;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.metadata.portlet.UserAttributeMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+public class UserAttributeAdapter
+ extends XmlAdapter<List<UserAttributeMetaData>, Map<String, UserAttributeMetaData>>
+{
+
+ @Override
+ public List<UserAttributeMetaData> marshal(Map<String, UserAttributeMetaData> arg0) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, UserAttributeMetaData> unmarshal(List<UserAttributeMetaData> list) throws Exception
+ {
+ HashMap<String, UserAttributeMetaData> m = new HashMap<String, UserAttributeMetaData>();
+ for (UserAttributeMetaData a : list)
+ {
+ String userAttributeName = a.getName();
+ if (!m.containsKey(userAttributeName))
+ {
+ m.put(a.getName(), a);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Duplicate user-attribute: " + userAttributeName);
+ }
+ }
+ return m;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/ContainerRuntimeMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "container-runtime-optionType")
+public class ContainerRuntimeMetaData
+{
+
+ /** The name */
+ private String name;
+
+ /** The value list */
+ private List<String> values;
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "value")
+ public List<String> getValues()
+ {
+ return values;
+ }
+
+ public void setValues(List<String> values)
+ {
+ this.values = values;
+ }
+
+ public void addValue(String value)
+ {
+ if( this.values == null)
+ {
+ this.values = new ArrayList<String>();
+ }
+ this.values.add(value);
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/DescribableMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.common;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public abstract class DescribableMetaData
+{
+
+ /** The description */
+ private List<LocalizedDescriptionMetaData> description;
+
+ public List<LocalizedDescriptionMetaData> getDescription()
+ {
+ return description;
+ }
+
+ @XmlElement(name = "description")
+ public void setDescription(List<LocalizedDescriptionMetaData> description)
+ {
+ this.description = description;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/InitParamMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "init-paramType")
+public class InitParamMetaData extends DescribableMetaData
+{
+
+ /** The init param id */
+ private String id;
+
+ /** The init param name */
+ private String name;
+
+ /** The init param value */
+ private String value;
+
+ public InitParamMetaData() {}
+
+ public InitParamMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "value")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/common/LocalizedDescriptionMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+
+/**
+ *
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "descriptionType")
+public class LocalizedDescriptionMetaData
+{
+
+ /** The lang */
+ private String lang = "en";
+
+ /** The description */
+ private String description;
+
+ public LocalizedDescriptionMetaData() {}
+
+ public LocalizedDescriptionMetaData(String lang)
+ {
+ this.lang = lang;
+ }
+
+ @XmlAttribute(name = "lang",
+ namespace = PortletMetaDataConstants.NS_XML_NAMESPACE)
+ public String getLang()
+ {
+ return this.lang;
+ }
+
+ public void setLang(String lang)
+ {
+ this.lang = lang;
+ }
+
+ @XmlValue
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,130 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.event;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.namespace.QName;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "event-definitionType")
+public class EventDefinitionMetaData extends DescribableMetaData
+{
+ /** The event definition id */
+ private String id;
+
+ /** The QName */
+ private QName qname;
+
+ /** The name */
+ private String name;
+
+ /** The value-type */
+ private String valueType;
+
+ /** The alias */
+ private List<QName> alias;
+
+ public EventDefinitionMetaData() {}
+
+ public EventDefinitionMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "qname")
+ public QName getQname()
+ {
+ return qname;
+ }
+
+ public void setQname(QName qname)
+ {
+ this.qname = qname;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "value-type")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getValueType()
+ {
+ return valueType;
+ }
+
+ public void setValueType(String valueType)
+ {
+ this.valueType = valueType;
+ }
+
+ @XmlElement(name = "alias")
+ public List<QName> getAlias()
+ {
+ return alias;
+ }
+
+ public void setAlias(List<QName> alias)
+ {
+ this.alias = alias;
+ }
+
+ public void addAlias(QName alias)
+ {
+ if (this.alias == null)
+ {
+ this.alias = new ArrayList<QName>();
+ }
+ this.alias.add(alias);
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/event/EventDefinitionReferenceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.event;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "event-definition-referenceType")
+public class EventDefinitionReferenceMetaData
+{
+
+ /** The reference id */
+ private String id;
+
+ /** The qname */
+ private QName qname;
+
+ /** The name */
+ private String name;
+
+ public EventDefinitionReferenceMetaData() {}
+
+ public EventDefinitionReferenceMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "qname")
+ public QName getQname()
+ {
+ return qname;
+ }
+
+ public void setQname(QName qname)
+ {
+ this.qname = qname;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMappingMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "filter-mappingType")
+public class FilterMappingMetaData
+{
+
+ /** The filter name */
+ private String name;
+
+ /** The mapped portlet names */
+ private List<String> portletNames;
+
+ @XmlElement(name = "filter-name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "portlet-name")
+ public List<String> getPortletNames()
+ {
+ return portletNames;
+ }
+
+ public void setPortletNames(List<String> portletNames)
+ {
+ this.portletNames = portletNames;
+ }
+
+ public void addPortletName(String portletName)
+ {
+ if( this.portletNames == null)
+ {
+ this.portletNames = new ArrayList<String>();
+ }
+ this.portletNames.add(portletName);
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/filter/FilterMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,137 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.InitParamMetaData;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "filterType", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS,
+ propOrder = {"description", "displayName", "filterName", "filterClass", "lifecycle", "initParams"})
+public class FilterMetaData extends DescribableMetaData
+{
+ /** The filter name */
+ private String filterName;
+
+ /** The filter class */
+ private String filterClass;
+
+ /** The filter lifecycle */
+ private List<String> lifecycle;
+
+ /** The filter display name */
+ private List<LocalizedDescriptionMetaData> displayName;
+
+ /** The filter init parameters */
+ private List<InitParamMetaData> initParams;
+
+ @XmlElement(name = "filter-name", required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getFilterName()
+ {
+ return filterName;
+ }
+
+ public void setFilterName(String filterName)
+ {
+ this.filterName = filterName;
+ }
+
+ @XmlElement(name = "filter-class", required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getFilterClass()
+ {
+ return filterClass;
+ }
+
+ public void setFilterClass(String filterClass)
+ {
+ this.filterClass = filterClass;
+ }
+
+ @XmlElement(name = "lifecycle", required = true)
+ public List<String> getLifecycle()
+ {
+ return lifecycle;
+ }
+
+ public void setLifecycle(List<String> lifecycle)
+ {
+ this.lifecycle = lifecycle;
+ }
+
+ public void addLifecycle(String lifecycle)
+ {
+ if( this.lifecycle == null)
+ {
+ this.lifecycle = new ArrayList<String>();
+ }
+ this.lifecycle.add(lifecycle);
+ }
+
+ @XmlElement(name = "display-name")
+ public List<LocalizedDescriptionMetaData> getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(List<LocalizedDescriptionMetaData> displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "init-param")
+ public List<InitParamMetaData> getInitParams()
+ {
+ return initParams;
+ }
+
+ public void setInitParams(List<InitParamMetaData> initParams)
+ {
+ this.initParams = initParams;
+ }
+
+ public void addInitParam(InitParamMetaData initParam)
+ {
+ if(this.initParams == null)
+ {
+ this.initParams = new ArrayList<InitParamMetaData>();
+ }
+ this.initParams.add(initParam);
+ }
+
+}
\ No newline at end of file
Copied: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/DisplayNameMetaData.java (from rev 12389, modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/DisplayNameMetaData.java)
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/DisplayNameMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/DisplayNameMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class DisplayNameMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected String lang;
+
+ protected String displayName;
+
+ @XmlAttribute(name = "xml:lang")
+ public void setLang(String lang)
+ {
+ this.lang = lang;
+ }
+
+ @XmlElement(name = "display-name")
+ public void setDisplayName(String displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ public String getLang()
+ {
+ return lang;
+ }
+
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/EmptyMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/EmptyMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/EmptyMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class EmptyMetaData extends IdMetaDataImpl
+{
+}
+
Copied: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/InstanceMetaData.java (from rev 12389, modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/InstanceMetaData.java)
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/InstanceMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/InstanceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,103 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class InstanceMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected String instanceId;
+
+ protected String portletRef;
+
+ protected List<DisplayNameMetaData> displayNames;
+
+ protected PortletPreferencesMetaData portletPreferences;
+
+ protected SecurityConstraintMetaData securityContraint;
+
+ @XmlElement(name = "instance-id")
+ public void setInstanceId(String instanceId)
+ {
+ this.instanceId = instanceId;
+ }
+
+ @XmlElement(name = "portlet-ref")
+ public void setPortletRef(String portletRef)
+ {
+ this.portletRef = portletRef;
+ }
+
+ @XmlElement(name = "display-name")
+ public void setDisplayName(List<DisplayNameMetaData> displayNames)
+ {
+ this.displayNames = displayNames;
+ }
+
+ @XmlElement(name = "perferences")
+ public void setPreferences(PortletPreferencesMetaData preferences)
+ {
+ this.portletPreferences = preferences;
+ }
+
+ @XmlElement(name = "security-constraint")
+ public void setSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+ {
+ this.securityContraint = securityConstraint;
+ }
+
+ public String getInstanceId()
+ {
+ return instanceId;
+ }
+
+ public String getPortletRef()
+ {
+ return portletRef;
+ }
+
+ public List<DisplayNameMetaData> getDisplayNames()
+ {
+ return displayNames;
+ }
+
+ public PortletPreferencesMetaData getPortletPreferences()
+ {
+ return portletPreferences;
+ }
+
+ public SecurityConstraintMetaData getSecurityContraint()
+ {
+ return securityContraint;
+ }
+
+}
Copied: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PolicyPermissionMetaData.java (from rev 12389, modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PolicyPermissionMetaData.java)
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PolicyPermissionMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PolicyPermissionMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PolicyPermissionMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+ protected Set<String> actionName;
+
+ protected String roleName;
+
+ protected EmptyMetaData unchecked;
+
+ @XmlElement(name = "action-name")
+ public void setActionNames(Set<String> actionName)
+ {
+ this.actionName = actionName;
+ }
+
+ @XmlElement(name = "role-name")
+ public void setRoleName(String roleName)
+ {
+ this.roleName = roleName;
+ }
+
+ @XmlElement(name = "unchecked")
+ public void setUnchecked(EmptyMetaData emptyMetaData)
+ {
+ this.unchecked = emptyMetaData;
+ }
+
+ public Set<String> getActionNames()
+ {
+ return actionName;
+ }
+
+ public String getRoleName()
+ {
+ return roleName;
+ }
+
+ public EmptyMetaData getUnchecked()
+ {
+ return unchecked;
+ }
+
+// public boolean isUnchecked()
+// {
+// if (unchecked == null)
+// {
+// return false;
+// }
+// else
+// {
+// return true;
+// }
+// }
+
+}
Copied: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstanceMetaData.java (from rev 12389, modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstanceMetaData.java)
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstanceMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstanceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,69 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletDeploymentInstanceMetaData
+{
+ private static final Logger log = Logger.getLogger(PortletDeploymentInstanceMetaData.class);
+
+ protected InstanceMetaData instance;
+
+ protected boolean overwrite;
+
+ public void setInstance(InstanceMetaData instance)
+ {
+ this.instance = instance;
+ }
+
+ public InstanceMetaData getInstance()
+ {
+ return this.instance;
+ }
+
+ @XmlElement(name = "if-exists")
+ public void setIfExists(String ifExists)
+ {
+ if (ifExists.equals("overwrite"))
+ {
+ this.overwrite = true;
+ }
+ else if (!ifExists.equals("keep"))
+ {
+ log.warn("Unknow value for if-exists, expecting overwrite or keep");
+ }
+ }
+
+ public boolean getOverwrite()
+ {
+ return this.overwrite;
+ }
+
+}
Copied: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstancesMetaData.java (from rev 12389, modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletDeploymentInstancesMetaData.java)
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstancesMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletDeploymentInstancesMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+@XmlRootElement(name = "deployments", namespace = "")
+public class PortletDeploymentInstancesMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected List<PortletDeploymentInstanceMetaData> deploymentInstances;
+
+ public List<PortletDeploymentInstanceMetaData> getDeploymentInstances()
+ {
+ return deploymentInstances;
+ }
+
+ @XmlElement(name = "deployment")
+ public void setDeploymentInstances(List<PortletDeploymentInstanceMetaData> deploymentInstances)
+ {
+ this.deploymentInstances = deploymentInstances;
+ }
+
+}
Copied: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferenceMetaData.java (from rev 12389, modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferenceMetaData.java)
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferenceMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferenceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletPreferenceMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected String name;
+
+ protected String value;
+
+ @XmlElement
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+}
Copied: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferencesMetaData.java (from rev 12389, modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/PortletPreferencesMetaData.java)
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferencesMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/PortletPreferencesMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletPreferencesMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected List<PortletPreferenceMetaData> preferences;
+
+ @XmlElement(name = "preference")
+ public void setPreference(List<PortletPreferenceMetaData> preferences)
+ {
+ this.preferences = preferences;
+ }
+
+ public List<PortletPreferenceMetaData> getPreferences()
+ {
+ return preferences;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/SecurityConstraintMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/SecurityConstraintMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/instances/SecurityConstraintMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.instances;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class SecurityConstraintMetaData extends IdMetaDataImplWithDescriptionGroup
+{
+
+ protected List<PolicyPermissionMetaData> policyPermission;
+
+ @XmlElement(name = "policy-permission")
+ public void setPolicyPermission(List<PolicyPermissionMetaData> policyPermission)
+ {
+ this.policyPermission = policyPermission;
+ }
+
+ public List<PolicyPermissionMetaData> getPolicyPermission()
+ {
+ return policyPermission;
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication10MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication10MetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication10MetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.metadata.portlet.mc;
+
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlRootElement(name = "portlet-app")
+@XmlType(name = "portlet-appType")
+@JBossXmlSchema(xmlns = {@XmlNs(namespaceURI = PortletMetaDataConstants.PORTLET_JSR_168_NS, prefix = "portlet")},
+ ignoreUnresolvedFieldOrClass = false,
+ namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS,
+ elementFormDefault = XmlNsForm.QUALIFIED)
+public class AnnotationPortletApplication10MetaData extends PortletApplication10MetaData
+{
+}
\ No newline at end of file
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication20MetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication20MetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/mc/AnnotationPortletApplication20MetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.metadata.portlet.mc;
+
+import org.jboss.portal.metadata.portlet.PortletApplication20MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlRootElement(name = "portlet-app")
+@XmlType(name = "portlet-appType")
+@JBossXmlSchema(xmlns = {@XmlNs(namespaceURI = PortletMetaDataConstants.PORTLET_JSR_286_NS, prefix = "portlet")},
+ ignoreUnresolvedFieldOrClass = false,
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS,
+ elementFormDefault = XmlNsForm.QUALIFIED)
+public class AnnotationPortletApplication20MetaData extends PortletApplication20MetaData
+{
+}
\ No newline at end of file
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletCacheScopeEnum.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlEnum
+public enum PortletCacheScopeEnum {
+
+ /** The private cache scope */
+ PRIVATE,
+
+ /** The public cache scope */
+ PUBLIC
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletInfoMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,102 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portlet-infoType")
+public class PortletInfoMetaData
+{
+
+ /** The portlet info id */
+ private String id;
+
+ /** The portlet title */
+ private String title;
+
+ /** The portlet short-title */
+ private String shortTitle;
+
+ /* The portlet keywords*/
+ private String keywords;
+
+ public PortletInfoMetaData() {}
+
+ public PortletInfoMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "title")
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ @XmlElement(name = "short-title")
+ public String getShortTitle()
+ {
+ return shortTitle;
+ }
+
+ public void setShortTitle(String shortTitle)
+ {
+ this.shortTitle = shortTitle;
+ }
+
+ @XmlElement(name = "keywords")
+// @XmlJavaTypeAdapter(KeywordsAdapter.class)
+ public String getKeywords()
+ {
+ return keywords;
+ }
+
+ public void setKeywords(String keywords)
+ {
+ this.keywords = keywords;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,400 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+import org.jboss.portal.metadata.portlet.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.metadata.portlet.common.ContainerRuntimeMetaData;
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+import org.jboss.portal.metadata.portlet.common.InitParamMetaData;
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+import org.jboss.portal.metadata.portlet.event.EventDefinitionReferenceMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portletType",
+ propOrder = {"id", "description", "portletName", "displayName", "portletClass", "initParams", "expirationCache", "cacheScope",
+ "supports", "supportedLocale", "resourceBundle", "portletInfo", "portletPreferences", "securityRoleRef",
+ "supportedProcessingEvent", "supportedPublishingEvent", "supportedPublicRenderParameters",
+ "containerRuntimeOptions"})
+public class PortletMetaData extends DescribableMetaData
+{
+
+ /** The portlet id */
+ private String id;
+
+ /** The portlet name */
+ private String portletName;
+
+ /** The portlet class */
+ private String portletClass;
+
+ /** The portlet display name */
+ private List<LocalizedDescriptionMetaData> displayName;
+
+ /** The portlet init parameters */
+ private List<InitParamMetaData> initParams;
+
+ /** The portlet expiration cache */
+ private int expirationCache;
+
+ /** The cache scope */
+ private PortletCacheScopeEnum cacheScope = PortletCacheScopeEnum.PRIVATE;
+
+ /** The supports */
+ private List<SupportsMetaData> supports;
+
+ /** The supported locale */
+ private List<SupportedLocaleMetaData> supportedLocale;
+
+ /** The resource bundle */
+ private String resourceBundle;
+
+ /** The portlet info */
+ private PortletInfoMetaData portletInfo;
+
+ /** The portlet preferences */
+ private PortletPreferencesMetaData portletPreferences;
+
+ /** The portlet security role references */
+ private List<SecurityRoleRefMetaData> securityRoleRef;
+
+ /** The portlet event supported processing event */
+ private List<EventDefinitionReferenceMetaData> supportedProcessingEvent;
+
+ /** The portlet event supported publishing event */
+ private List<EventDefinitionReferenceMetaData> supportedPublishingEvent;
+
+ /** The portlet supported public render parameters */
+ private List<String> supportedPublicRenderParameters;
+
+ /** The portlet container runtime options */
+ private Map<String, ContainerRuntimeMetaData> containerRuntimeOptions;
+
+ /** Reference to the PortletApplicationMetaData */
+ private PortletApplication10MetaData portletApplication;
+
+ public PortletMetaData() {}
+
+ public PortletMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "portlet-name",
+ required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getPortletName()
+ {
+ return portletName;
+ }
+
+ public void setPortletName(String portletName)
+ {
+ this.portletName = portletName;
+ }
+
+ @XmlElement(name = "portlet-class",
+ required = true)
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getPortletClass()
+ {
+ return portletClass;
+ }
+
+ public void setPortletClass(String portletClass)
+ {
+ this.portletClass = portletClass;
+ }
+
+ @XmlElement(name = "display-name")
+ public List<LocalizedDescriptionMetaData> getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(List<LocalizedDescriptionMetaData> displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "init-param")
+ public List<InitParamMetaData> getInitParams()
+ {
+ return initParams;
+ }
+
+ public void setInitParams(List<InitParamMetaData> initParams)
+ {
+ this.initParams = initParams;
+ }
+
+ public void addInitParam(InitParamMetaData initParam)
+ {
+ if (this.initParams == null)
+ {
+ this.initParams = new ArrayList<InitParamMetaData>();
+ }
+ this.initParams.add(initParam);
+ }
+
+ @XmlElement(name = "expiration-cache")
+ public int getExpirationCache()
+ {
+ return expirationCache;
+ }
+
+ public void setExpirationCache(int expirationCache)
+ {
+ this.expirationCache = expirationCache;
+ }
+
+ @XmlElement(name = "cache-scope",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS, type = PortletCacheScopeEnum.class)
+ public PortletCacheScopeEnum getCacheScope()
+ {
+ return cacheScope;
+ }
+
+ public void setCacheScope(PortletCacheScopeEnum cacheScope)
+ {
+ this.cacheScope = cacheScope;
+ }
+
+ @XmlElement(name = "supports",
+ required = true)
+ public List<SupportsMetaData> getSupports()
+ {
+ return supports;
+ }
+
+ public void setSupports(List<SupportsMetaData> supports)
+ {
+ this.supports = supports;
+ }
+
+ public void addSupport(SupportsMetaData support)
+ {
+ if (this.supports == null)
+ {
+ this.supports = new ArrayList<SupportsMetaData>();
+ }
+ this.supports.add(support);
+ }
+
+ @XmlElement(name = "supported-locale")
+// @XmlJavaTypeAdapter(SupportedLocaleAdapter.class)
+ public List<SupportedLocaleMetaData> getSupportedLocale()
+ {
+ return supportedLocale;
+ }
+
+ public void setSupportedLocale(List<SupportedLocaleMetaData> supportedLocale)
+ {
+ this.supportedLocale = supportedLocale;
+ }
+
+ public void addSupportedLocale(SupportedLocaleMetaData supportedLocale)
+ {
+ if(this.supportedLocale == null)
+ {
+ this.supportedLocale = new ArrayList<SupportedLocaleMetaData>();
+ }
+ this.supportedLocale.add(supportedLocale);
+ }
+
+ @XmlElement(name = "resource-bundle")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getResourceBundle()
+ {
+ return resourceBundle;
+ }
+
+ public void setResourceBundle(String resourceBundle)
+ {
+ this.resourceBundle = resourceBundle;
+ }
+
+ @XmlElement(name = "portlet-info")
+ public PortletInfoMetaData getPortletInfo()
+ {
+ return portletInfo;
+ }
+
+ public void setPortletInfo(PortletInfoMetaData portletInfo)
+ {
+ this.portletInfo = portletInfo;
+ }
+
+ @XmlElement(name = "portlet-preferences")
+ public PortletPreferencesMetaData getPortletPreferences()
+ {
+ return portletPreferences;
+ }
+
+ public void setPortletPreferences(PortletPreferencesMetaData portletPreferences)
+ {
+ this.portletPreferences = portletPreferences;
+ }
+
+ @XmlElement(name = "security-role-ref")
+ public List<SecurityRoleRefMetaData> getSecurityRoleRef()
+ {
+ return securityRoleRef;
+ }
+
+ public void setSecurityRoleRef(List<SecurityRoleRefMetaData> securityRoleRef)
+ {
+ this.securityRoleRef = securityRoleRef;
+ }
+
+ public void addSecurityRoleRef(SecurityRoleRefMetaData securityRoleRef)
+ {
+ if (this.securityRoleRef == null)
+ {
+ this.securityRoleRef = new ArrayList<SecurityRoleRefMetaData>();
+ }
+ this.securityRoleRef.add(securityRoleRef);
+ }
+
+ @XmlElement(name = "supported-processing-event",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<EventDefinitionReferenceMetaData> getSupportedProcessingEvent()
+ {
+ return supportedProcessingEvent;
+ }
+
+ public void setSupportedProcessingEvent(List<EventDefinitionReferenceMetaData> supportedProcessingEvent)
+ {
+ this.supportedProcessingEvent = supportedProcessingEvent;
+ }
+
+ public void addSupportedProcessingEvent(EventDefinitionReferenceMetaData eventRef)
+ {
+ if (this.supportedProcessingEvent == null)
+ {
+ this.supportedProcessingEvent = new ArrayList<EventDefinitionReferenceMetaData>();
+ }
+ this.supportedProcessingEvent.add(eventRef);
+ }
+
+ @XmlElement(name = "supported-publishing-event",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<EventDefinitionReferenceMetaData> getSupportedPublishingEvent()
+ {
+ return supportedPublishingEvent;
+ }
+
+ public void setSupportedPublishingEvent(List<EventDefinitionReferenceMetaData> supportedPublishingEvent)
+ {
+ this.supportedPublishingEvent = supportedPublishingEvent;
+ }
+
+ public void addSupportedPublishingEvent(EventDefinitionReferenceMetaData eventRef)
+ {
+ if(this.supportedPublishingEvent == null)
+ {
+ this.supportedPublishingEvent = new ArrayList<EventDefinitionReferenceMetaData>();
+ }
+ this.supportedPublishingEvent.add(eventRef);
+ }
+
+ @XmlElement(name = "supported-public-render-parameter",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<String> getSupportedPublicRenderParameters()
+ {
+ return supportedPublicRenderParameters;
+ }
+
+ public void setSupportedPublicRenderParameters(List<String> supportedPublicRenderParameters)
+ {
+ this.supportedPublicRenderParameters = supportedPublicRenderParameters;
+ }
+
+ public void addSupportedPublicRenderParameter(String parameter)
+ {
+ if (this.supportedPublicRenderParameters == null)
+ {
+ this.supportedPublicRenderParameters = new ArrayList<String>();
+ }
+ this.supportedPublicRenderParameters.add(parameter);
+ }
+
+ @XmlElement(name = "container-runtime-option",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ @XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
+ public Map<String, ContainerRuntimeMetaData> getContainerRuntimeOptions()
+ {
+ return containerRuntimeOptions;
+ }
+
+ public void setContainerRuntimeOptions(Map<String, ContainerRuntimeMetaData> containerRuntimeOptions)
+ {
+ this.containerRuntimeOptions = containerRuntimeOptions;
+ }
+
+ public void addContainerRuntime(ContainerRuntimeMetaData containerRuntimeOption)
+ {
+ if ( this.containerRuntimeOptions == null)
+ {
+ this.containerRuntimeOptions = new HashMap<String, ContainerRuntimeMetaData>();
+ }
+ this.containerRuntimeOptions.put(containerRuntimeOption.getName(), containerRuntimeOption);
+ }
+
+ /** . */
+ public PortletApplication10MetaData getPortletApplication()
+ {
+ return portletApplication;
+ }
+
+ public void setPortletApplication(PortletApplication10MetaData portletApplication)
+ {
+ this.portletApplication = portletApplication;
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletModeMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "portlet-modeType")
+public class PortletModeMetaData
+{
+
+ /** The portlet mode */
+ private String portletMode;
+
+ @XmlValue
+ public String getPortletMode()
+ {
+ return portletMode;
+ }
+
+ public void setPortletMode(String portletMode)
+ {
+ this.portletMode = portletMode;
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferenceMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,112 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portlet-preferenceType")
+public class PortletPreferenceMetaData
+{
+
+ /** The portlet preference id */
+ private String id;
+
+ /** The portlet preference name */
+ private String name;
+
+ /** The portlet preference value */
+ private List<String> value;
+
+ /** Is read only */
+ private boolean readOnly;
+
+ public PortletPreferenceMetaData() {}
+
+ public PortletPreferenceMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "name")
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlElement(name = "value")
+ public List<String> getValue()
+ {
+ return value;
+ }
+
+ public void setValue(List<String> value)
+ {
+ this.value = value;
+ }
+
+ public void addValue(String value)
+ {
+ if (this.value == null)
+ {
+ this.value = new ArrayList<String>();
+ }
+ this.value.add(value);
+ }
+
+ @XmlElement(name = "read-only")
+ public boolean isReadOnly()
+ {
+ return readOnly;
+ }
+
+ public void setReadOnly(boolean readOnly)
+ {
+ this.readOnly = readOnly;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/PortletPreferencesMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.adapter.PortletPreferencesListAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portlet-preferencesType")
+public class PortletPreferencesMetaData
+{
+
+ /** The portlet preferences id */
+ private String id;
+
+ /** The portlet preferences */
+ private Map<String, PortletPreferenceMetaData> portletPreferences;
+
+ /** The portlet preference validator */
+ private String preferenceValidator;
+
+ public PortletPreferencesMetaData() {}
+
+ public PortletPreferencesMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "preference")
+ @XmlJavaTypeAdapter(PortletPreferencesListAdapter.class)
+ public Map<String, PortletPreferenceMetaData> getPortletPreferences()
+ {
+ return portletPreferences;
+ }
+
+ public void setPortletPreferences(Map<String, PortletPreferenceMetaData> portletPreferences)
+ {
+ this.portletPreferences = portletPreferences;
+ }
+
+ public void addPortletPreference(PortletPreferenceMetaData preference)
+ {
+ if(this.portletPreferences == null)
+ {
+ this.portletPreferences = new HashMap<String, PortletPreferenceMetaData>();
+ }
+ this.portletPreferences.put(preference.getName(), preference);
+ }
+
+ @XmlElement(name = "preferences-validator")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getPreferenceValidator()
+ {
+ return preferenceValidator;
+ }
+
+ public void setPreferenceValidator(String preferenceValidator)
+ {
+ this.preferenceValidator = preferenceValidator;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SecurityRoleRefMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+
+@XmlType(name = "security-role-refType")
+public class SecurityRoleRefMetaData extends DescribableMetaData
+{
+
+ /** The security role ref id */
+ private String id;
+
+ /** The role name */
+ private String roleName;
+
+ /** The role link */
+ private String roleLink;
+
+ public SecurityRoleRefMetaData() {}
+
+ public SecurityRoleRefMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "role-name")
+ public String getRoleName()
+ {
+ return roleName;
+ }
+
+ public void setRoleName(String roleName)
+ {
+ this.roleName = roleName;
+ }
+
+ @XmlElement(name = "role-link")
+ public String getRoleLink()
+ {
+ return roleLink;
+ }
+
+ public void setRoleLink(String roleLink)
+ {
+ this.roleLink = roleLink;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportedLocaleMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "supported-localeType")
+public class SupportedLocaleMetaData
+{
+
+ /** The supported locale */
+ private String locale;
+
+ @XmlValue
+ public String getLocale()
+ {
+ return locale;
+ }
+
+ public void setLocale(String locale)
+ {
+ this.locale = locale;
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/SupportsMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,123 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.PortletMetaDataConstants;
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "supportsType")
+public class SupportsMetaData
+{
+
+ /** The supports id */
+ @XmlAttribute(name = "id")
+ private String id;
+
+ /** The mime type */
+ private String mimeType;
+
+ /** The portletModes */
+ private List<PortletModeMetaData> portletModes;
+
+ /** The window states */
+ private List<WindowStateMetaData> windowStates;
+
+ public SupportsMetaData() {}
+
+ public SupportsMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "mime-type")
+ public String getMimeType()
+ {
+ return mimeType;
+ }
+
+ public void setMimeType(String mimeType)
+ {
+ this.mimeType = mimeType;
+ }
+
+ @XmlElement(name = "portlet-mode")
+ public List<PortletModeMetaData> getPortletModes()
+ {
+ return this.portletModes;
+ }
+
+ public void setPortletModes(List<PortletModeMetaData> portletModes)
+ {
+ this.portletModes = portletModes;
+ }
+
+ public void addPortletMode(PortletModeMetaData portletMode)
+ {
+ if (this.portletModes == null)
+ {
+ this.portletModes = new ArrayList<PortletModeMetaData>();
+ }
+ this.portletModes.add(portletMode);
+ }
+
+ @XmlElement(name = "window-state",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<WindowStateMetaData> getWindowStates()
+ {
+ return this.windowStates;
+ }
+
+ public void setWindowStates(List<WindowStateMetaData> windowStates)
+ {
+ this.windowStates = windowStates;
+ }
+
+ public void addWindowState(WindowStateMetaData windowState)
+ {
+ if (this.windowStates == null)
+ {
+ this.windowStates = new ArrayList<WindowStateMetaData>();
+ }
+ this.windowStates.add(windowState);
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/portlet/WindowStateMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.portlet;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "window-stateType")
+public class WindowStateMetaData
+{
+
+ /** The window state */
+ private String windowState;
+
+ @XmlValue
+ public String getWindowState()
+ {
+ return windowState;
+ }
+
+ public void setWindowState(String windowState)
+ {
+ this.windowState = windowState;
+ }
+
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/PortletCollectionMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.security;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "portlet-collectionType")
+public class PortletCollectionMetaData
+{
+ /** The portlet name List */
+ private List<String> portletNames;
+
+ @XmlElement(name = "portlet-name")
+ public List<String> getPortletNames()
+ {
+ return portletNames;
+ }
+
+ public void setPortletNames(List<String> portletNames)
+ {
+ this.portletNames = portletNames;
+ }
+
+ public void addPortletname(String portletName)
+ {
+ if( this.portletNames == null )
+ {
+ this.portletNames = new ArrayList<String>();
+ }
+ this.portletNames.add(portletName);
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/SecurityConstraintMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.security;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.metadata.portlet.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "security-constraintType")
+public class SecurityConstraintMetaData
+{
+
+ /** The security constraint id */
+ private String id;
+
+ /** The security constraint display name */
+ private List<LocalizedDescriptionMetaData> displayName;
+
+ /** The portlet collection */
+ private PortletCollectionMetaData portletList;
+
+ /** The user data constraints */
+ private UserDataConstraintMetaData userDataConstraint;
+
+ public SecurityConstraintMetaData() {}
+
+ public SecurityConstraintMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "display-name")
+ public List<LocalizedDescriptionMetaData> getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(List<LocalizedDescriptionMetaData> displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "portlet-collection")
+ public PortletCollectionMetaData getPortletList()
+ {
+ return portletList;
+ }
+
+ public void setPortletList(PortletCollectionMetaData portletList)
+ {
+ this.portletList = portletList;
+ }
+
+ @XmlElement(name = "user-data-constraint")
+ public UserDataConstraintMetaData getUserDataConstraint()
+ {
+ return userDataConstraint;
+ }
+
+ public void setUserDataConstraint(UserDataConstraintMetaData userDataConstraint)
+ {
+ this.userDataConstraint = userDataConstraint;
+ }
+}
Added: modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java
===================================================================
--- modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java (rev 0)
+++ modules/metadata/trunk/metadata/src/main/java/org/jboss/portal/metadata/portlet/security/UserDataConstraintMetaData.java 2009-03-02 19:52:00 UTC (rev 12924)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.metadata.portlet.security;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.portal.metadata.portlet.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "user-data-constraint")
+public class UserDataConstraintMetaData extends DescribableMetaData
+{
+
+ /** The user data constraint id */
+ private String id;
+
+ /** The user transport quarantee */
+ private String transportQuarantee;
+
+ public UserDataConstraintMetaData() {}
+
+ public UserDataConstraintMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "transport-guarantee")
+ public String getTransportQuarantee()
+ {
+ return transportQuarantee;
+ }
+
+ public void setTransportQuarantee(String transportQuarantee)
+ {
+ this.transportQuarantee = transportQuarantee;
+ }
+}
\ No newline at end of file
17 years, 2 months
JBoss Portal SVN: r12923 - modules/deployer/trunk.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-02 14:41:16 -0500 (Mon, 02 Mar 2009)
New Revision: 12923
Modified:
modules/deployer/trunk/
Log:
Add target-eclipse directory to svn:ignore list.
Property changes on: modules/deployer/trunk
___________________________________________________________________
Name: svn:ignore
+ target-eclipse
17 years, 2 months
JBoss Portal SVN: r12922 - in modules/deployer/trunk: deployer and 9 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-02 14:30:58 -0500 (Mon, 02 Mar 2009)
New Revision: 12922
Added:
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/InstanceDeployment.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/PortalObjectDeployment.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/PortletDeployment.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/WebAppContextDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/WebAppDeployer.java
Removed:
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployerImpl.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ObjectDeployerImpl.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployerImpl.java
Modified:
modules/deployer/trunk/build/pom.xml
modules/deployer/trunk/deployer/pom.xml
modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml
modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-object_2_6.dtd
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalResolverFactory.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/JBossPortletParsingDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/MergedPortletParsingDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalObjectParsingDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalResolverDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortletInstancesParsingDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortletParsingDeployer.java
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/PortalPostWebDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/CommandServletDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ObjectDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDependencyDeployer.java
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/PortletTLDDeployer.java
modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ServiceInjectorDeployer.java
modules/deployer/trunk/deployer/src/main/resources/deployment-aop.xml
Log:
Update deployers to not use any jars from the main portal sar.
Modified: modules/deployer/trunk/build/pom.xml
===================================================================
--- modules/deployer/trunk/build/pom.xml 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/build/pom.xml 2009-03-02 19:30:58 UTC (rev 12922)
@@ -101,7 +101,7 @@
<artifactId>metadata-metadata</artifactId>
<version>${version.jboss.portal.metadata}</version>
</dependency>
- <dependency>
+<!-- <dependency>
<groupId>org.jboss.portal.web</groupId>
<artifactId>web-web</artifactId>
<version>${version.jboss.portal.web}</version>
@@ -135,7 +135,7 @@
<groupId>org.jboss.portal.core</groupId>
<artifactId>security</artifactId>
<version>${version.jboss.portal.server}</version>
- </dependency>
+ </dependency> -->
<dependency>
<groupId>org.jboss.maven.plugins</groupId>
Modified: modules/deployer/trunk/deployer/pom.xml
===================================================================
--- modules/deployer/trunk/deployer/pom.xml 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/pom.xml 2009-03-02 19:30:58 UTC (rev 12922)
@@ -42,7 +42,7 @@
<groupId>org.jboss.portal.metadata</groupId>
<artifactId>metadata-metadata</artifactId>
</dependency>
- <dependency>
+<!-- <dependency>
<groupId>org.jboss.portal.web</groupId>
<artifactId>web-web</artifactId>
</dependency>
@@ -77,7 +77,7 @@
<artifactId>test</artifactId>
<version>0.0</version>
<scope>provided</scope>
- </dependency>
+ </dependency> -->
<dependency>
<groupId>org.jboss.aspects</groupId>
@@ -147,7 +147,7 @@
</excludes>
</configuration>
</plugin>
-
+<!--
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jbossaop-plugin</artifactId>
@@ -171,11 +171,9 @@
</execution>
</executions>
</plugin>
-
+-->
</plugins>
</build>
-
-<!-- <properties/> -->
</project>
Modified: 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 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml 2009-03-02 19:30:58 UTC (rev 12922)
@@ -48,14 +48,30 @@
</entry>
<entry>
<key>portlet-instances_2_6.dtd</key>
- <value>org.jboss.portal.metadata.portlet.PortletDeploymentInstancesMetaData</value>
+ <value>org.jboss.portal.metadata.portlet.instances.PortletDeploymentInstancesMetaData</value>
</entry>
<entry>
<key>portal-object_2_6.dtd</key>
<value>org.jboss.portal.metadata.portal.object.PortalObjectMetaData</value>
</entry>
+ <entry>
+ <key>jboss-portlet_2_6.dtd</key>
+ <value>org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData</value>
+ </entry>
</map>
</property>
+ <property name="XSDMapping">
+ <map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd</key>
+ <value>org.jboss.portal.metadata.portlet.mc.AnnotationPortletApplication10MetaData</value>
+ </entry>
+ <entry>
+ <key>http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd</key>
+ <value>org.jboss.portal.metadata.portlet.mc.AnnotationPortletApplication20MetaData</value>
+ </entry>
+ </map>
+ </property>
</bean>
<bean name="PortalUnmarshallerFactory" class="org.jboss.portal.deployer.PortalUnmarshallerFactory">
@@ -70,12 +86,9 @@
<depends>WarDeployer</depends>
</bean>
<!-- end fake deployer -->
+
+ <bean name="LibDirectoryDeployer" class="org.jboss.portal.deployer.portal.LibDirectoryStructure"/>
-<!-- May not be needed in the recent JBoss AS5
- <bean name="LibDirectoryStructure" class="org.jboss.portal.deployer.portal.LibDirectoryStructure">
- </bean>
--->
-
<!-- jboss-portal-app.xml parsing-->
<bean name="PortalAppParsingDeployer" class="org.jboss.portal.deployer.parsing.PortalAppParsingDeployer"/>
@@ -85,19 +98,14 @@
<!-- *-object.xml parsing -->
<bean name="PortalObjectParsingDeployer" class="org.jboss.portal.deployer.parsing.PortalObjectParsingDeployer"/>
+ <!-- jboss-portlet.xml parsing -->
+ <bean name="JBossPortletParsingDeployer" class="org.jboss.portal.deployer.parsing.JBossPortletParsingDeployer"/>
+
<!-- portlet.xml parsing -->
- <bean name="PortletParsingDeployer" class="org.jboss.portal.deployer.parsing.PortletParsingDeployer">
- <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
- </bean>
+ <bean name="PortletParsingDeployer" class="org.jboss.portal.deployer.parsing.PortletParsingDeployer"/>
- <!-- jboss-portlet.xml parsing -->
- <bean name="JBossPortletParsingDeployer" class="org.jboss.portal.deployer.parsing.JBossPortletParsingDeployer">
- <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
- </bean>
-
<bean name="MergedPortletParsingDeployer" class="org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer">
<property name="standardPortletFileLocation">conf/standardjboss-portlet.xml</property>
- <property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
</bean>
<!-- component deployables -->
@@ -107,40 +115,36 @@
<!-- deployer that makes sure that dependencies are running before continuing -->
<bean name="PortletDependencyDeployer" class="org.jboss.portal.deployer.portlet.PortletDependencyDeployer">
- <property name="dependencies">
+ <property name="dependencies">
<list elementClass="java.lang.String">
- <value>portal:service=InfoBuilderFactory,type=Core</value>
- <value>portal:service=PortletInvoker,type=Container</value>
- <value>portal:service=PortletSecurityService</value>
- <value>portal:container=Instance</value>
+ <value>portal:deployer=ObjectDeployment</value>
+ <value>portal:deployer=InstanceDeployment</value>
+ <value>portal:deployer=PortletDeployment</value>
</list>
</property>
</bean>
-
- <bean name="CommandServletDeployer" class="org.jboss.portal.deployer.portlet.CommandServletDeployer"/>
- <bean name="PortletTLDDeployer" class="org.jboss.portal.deployer.portlet.PortletTLDDeployer">
+ <!-- Used to get information from the WarDeployer-->
+ <bean name="PortalWebAppDeployer" class="org.jboss.portal.deployer.webapp.WebAppDeployer">
<property name="warDeployer"><inject bean="WarDeployer"/></property>
+ </bean>
+ <bean name="PortalWebAppContextDeployer" class="org.jboss.portal.deployer.webapp.WebAppContextDeployer">
<property name="MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+ </bean>
+ <bean name="PortletTLDDeployer" class="org.jboss.portal.deployer.portlet.PortletTLDDeployer">
+ <property name="MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="TLDDirectory">tld</property>
</bean>
+ <!-- end war deployer beans -->
- <bean name="PortletDeployer" class="org.jboss.portal.deployer.portlet.PortletDeployer">
- <property name="warDeployer"><inject bean="WarDeployer"/></property>
- <property name="MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
- <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ <bean name="CommandServletDeployer" class="org.jboss.portal.deployer.portlet.CommandServletDeployer">
+ <property name="commandServletClass">org.jboss.portal.web.command.CommandServlet</property>
</bean>
+
+ <bean name="PortletDeployer" class="org.jboss.portal.deployer.portlet.PortletDeployer"/>
- <bean name="InstanceDeployer" class="org.jboss.portal.deployer.portlet.InstanceDeployer">
- <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
- <property name="instanceContainerReferenceName">portal:container=Instance</property>
- </bean>
+ <bean name="InstanceDeployer" class="org.jboss.portal.deployer.portlet.InstanceDeployer"/>
- <bean name="PortalObjectDeployer" class="org.jboss.portal.deployer.portlet.ObjectDeployer">
- <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
- <property name="portalObjectContainerReferenceName">portal:container=PortalObject</property>
- <property name="contentProviderRegistryReferenceName">portal:service=ContentProviderRegistry</property>
- <property name="coordinationConfiguratorReferenceName">portal:service=CoordinationService</property>
- </bean>
+ <bean name="PortalObjectDeployer" class="org.jboss.portal.deployer.portlet.ObjectDeployer"/>
</deployment>
Modified: modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-object_2_6.dtd
===================================================================
--- modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-object_2_6.dtd 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-object_2_6.dtd 2009-03-02 19:30:58 UTC (rev 12922)
@@ -382,6 +382,8 @@
-->
<!ELEMENT window-coordination (window-name, qname)>
+<!ELEMENT window-coordination (window-name, qname+)>
+
<!--
QName identifying event or shared render parameter
-->
Modified: 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 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.deployer;
+import org.jboss.logging.Logger;
import org.w3c.dom.Element;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -32,7 +33,8 @@
public class PortalEntityResolver implements org.xml.sax.EntityResolver
{
-
+ Logger log = Logger.getLogger(PortalEntityResolver.class);
+
/** . */
private Properties dtdMapping;
@@ -48,11 +50,10 @@
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;
+ //return null;
}
//
@@ -60,7 +61,7 @@
if (dtdResourceName != null)
{
- //log.debug("Looking up resource " + dtdResourceName + " for dtd publicId=" + publicId + ", systemId=" + systemId);
+ log.debug("Looking up resource " + dtdResourceName + " for dtd publicId=" + publicId + ", systemId=" + systemId);
InputStream dtdStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(dtdResourceName);
if (dtdStream != null)
{
@@ -68,12 +69,12 @@
}
else
{
- //log.debug("No resource found for dtd publicId=" + publicId + ", systemId=" + systemId);
+ log.debug("No resource found for dtd publicId=" + publicId + ", systemId=" + systemId);
}
}
else
{
- //log.debug("No resource name found for dtd publicId=" + publicId + ", systemId=" + systemId);
+ log.debug("No resource name found for dtd publicId=" + publicId + ", systemId=" + systemId);
}
//
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalResolverFactory.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalResolverFactory.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalResolverFactory.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -76,7 +76,6 @@
try
{
Class clazz = classloader.loadClass(classname);
- System.out.println("LOCATION : " + location + " : CLASS " + classname);
resolver.addClassBindingForLocation(location, clazz);
}
catch (ClassNotFoundException e)
@@ -86,5 +85,28 @@
}
}
}
+
+ public void setXSDMapping(Properties mapping)
+ {
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ if (mapping != null && mapping.size() > 0)
+ {
+ Enumeration enumer = mapping.keys();
+ while (enumer.hasMoreElements())
+ {
+ String location = (String) enumer.nextElement();
+ String classname = (String) mapping.get(location);
+ try
+ {
+ Class clazz = classloader.loadClass(classname);
+ resolver.addClassBinding(location, clazz);
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Could not find class " + classname);
+ }
+ }
+ }
+ }
}
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/InstanceDeployment.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/InstanceDeployment.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/InstanceDeployment.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * 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.deployer.container;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.portal.metadata.portlet.instances.PortletDeploymentInstancesMetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public interface InstanceDeployment
+{
+ /**
+ * Deploy the instance objects into the portlet server.
+ *
+ * @param instancesMetaData
+ * @throws DeploymentException If an exception occurs during deployment
+ */
+ public void deployInstances(PortletDeploymentInstancesMetaData instancesMetaData, String appId) throws DeploymentException;
+}
+
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/PortalObjectDeployment.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/PortalObjectDeployment.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/PortalObjectDeployment.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.deployer.container;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.portal.metadata.portal.object.PortalObjectMetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public interface PortalObjectDeployment
+{
+ /**
+ * Deploy the portlet objects into the portal server.
+ *
+ * @param objectMetaData The metadata describing the portlet objects
+ * @param classloader The classloader for the portlet webapp
+ * @throws DeploymentException If an exception occurs duing deployment
+ */
+ public void deployObjects (PortalObjectMetaData objectMetaData, ClassLoader classloader) throws DeploymentException;
+}
+
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/PortletDeployment.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/PortletDeployment.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/container/PortletDeployment.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.deployer.container;
+
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public interface PortletDeployment
+{
+ /**
+ * Deploy the portlet into the portlet server.
+ *
+ * @param servletContext The ServletContext of the portlet webapp
+ * @param url The url of the portlet webapp
+ * @param classLoader The classloader of the portlet webapp
+ * @param contextPath The ContextPath of the portlet webapp
+ * @param jbossAppMD The metadata descibed in jboss-portlet.xml
+ * @param portletAppMD The metadata descrubed in portlet.xml
+ * @throws DeploymentException If an exception occurs when trying to deploy the portlet
+ */
+ public void deployPortlets(ServletContext servletContext, URL url, ClassLoader classLoader, String contextPath,
+ JBossPortletAppMetaData jbossAppMD, PortletApplication10MetaData portletAppMD) throws DeploymentException;
+}
+
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/JBossPortletParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/JBossPortletParsingDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/JBossPortletParsingDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -22,33 +22,16 @@
******************************************************************************/
package org.jboss.portal.deployer.parsing;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.List;
-
-import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.portal.core.deployment.JBossApplicationMetaDataFactory;
-import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
-import org.jboss.portal.deployer.PortalEntityResolver;
-import org.jboss.virtual.VFS;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
import org.jboss.virtual.VirtualFile;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-public class JBossPortletParsingDeployer extends SchemaResolverDeployer<JBossApplicationMetaData>
+public class JBossPortletParsingDeployer extends PortalResolverDeployer<JBossPortletAppMetaData>
{
- private PortalEntityResolver entityResolver;
-
- public void setEntityResolver(PortalEntityResolver entityResolver)
- {
- this.entityResolver = entityResolver;
- }
-
public JBossPortletParsingDeployer()
{
- super(JBossApplicationMetaData.class);
+ super(JBossPortletAppMetaData.class);
setName("jboss-portlet.xml");
}
@@ -62,26 +45,10 @@
return getName();
}
- protected JBossApplicationMetaData parse(VFSDeploymentUnit unit, VirtualFile file, JBossApplicationMetaData root)
- throws Exception
- {
-
- //VirtualFile vFile = VFS.getVirtualFile(new URI("file:///tmp/testVFS"),"/helloworldportlet.war/WEB-INF/test123");
-// VirtualFile vFile = VFS.getRoot(new URI("file:///home/mwringe/Projects/tld-test/testtld.tld"));
-// System.out.println("VFILE : " + vFile);
-// unit.appendMetaDataFile(vFile);
-
- 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;
+ protected JBossPortletAppMetaData parse(VFSDeploymentUnit unit, VirtualFile file, JBossPortletAppMetaData root) throws Exception
+ {
+ JBossPortletAppMetaData portalApp = super.parse(unit, file, root);
+ return (JBossPortletAppMetaData) super.parse(unit, file, root);
}
}
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/MergedPortletParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/MergedPortletParsingDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/MergedPortletParsingDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -22,31 +22,24 @@
******************************************************************************/
package org.jboss.portal.deployer.parsing;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.InputStream;
-import java.net.URL;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.plugins.vfs.VirtualFileSerializator;
-import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.portal.core.deployment.JBossApplicationMetaDataFactory;
-import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
+import org.jboss.logging.Logger;
import org.jboss.portal.deployer.PortalEntityResolver;
+import org.jboss.portal.deployer.PortalResolverFactory;
+import org.jboss.portal.deployer.PortalUnmarshallerFactory;
import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
-import org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
-import org.jboss.portal.portlet.impl.metadata.portlet.PortletMetaData;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.plugins.vfs.VirtualFileURLConnection;
-import org.jboss.virtual.plugins.vfs.VirtualFileUrlStreamHandler;
-import org.jboss.virtual.spi.VirtualFileHandler;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.portlet.PortletMetaData;
import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+import org.xml.sax.InputSource;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
@@ -54,17 +47,19 @@
*/
public class MergedPortletParsingDeployer extends AbstractDeployer
{
- public static final String PORTLET_MERGED_ATTACHMENT_NAME = "merged." + JBossApplicationMetaData.class.getName();
+ public static final String PORTLET_MERGED_ATTACHMENT_NAME = "merged." + JBossPortletAppMetaData.class.getName();
+ protected final Logger log = Logger.getLogger(getClass());
+
protected String standardPortletFileLocation;
protected PortalEntityResolver entityResolver;
public MergedPortletParsingDeployer()
{
setAllInputs(false);
- setInput(JBossApplicationMetaData.class);
+ setInput(JBossPortletAppMetaData.class);
addInput(PortletApplication10MetaData.class);
- setOutput(JBossApplicationMetaData.class);
+ setOutput(JBossPortletAppMetaData.class);
addOutput(PORTLET_MERGED_ATTACHMENT_NAME);
this.setStage(DeploymentStages.POST_PARSE);
}
@@ -81,67 +76,58 @@
public void deploy(DeploymentUnit unit) throws DeploymentException
{
- JBossApplicationMetaData jbossAppMetaData = unit.getAttachment(JBossApplicationMetaData.class);
+ JBossPortletAppMetaData jbossAppMetaData = unit.getAttachment(JBossPortletAppMetaData.class);
+ PortletApplication10MetaData portletAppMetaData = unit.getAttachment(PortletApplication10MetaData.class);
// use the app-name from the jboss-portal-app.xml file if it exists
PortalAppMetaData appMetaData = unit.getAttachment(PortalAppMetaData.class);
- if (jbossAppMetaData.getId() == null && appMetaData != null && appMetaData.getAppName() != null)
+ if (jbossAppMetaData.getAppId() == null && appMetaData != null && appMetaData.getAppName() != null)
{
- jbossAppMetaData.setId(appMetaData.getAppName());
+ jbossAppMetaData.setAppId(appMetaData.getAppName());
}
-
+
try{
InputStream stream = this.getClass().getClassLoader().getResourceAsStream(standardPortletFileLocation);
+ InputSource source = new InputSource(stream);
- System.out.println("RESOURCE : " + this.getClass().getClassLoader().getResource(standardPortletFileLocation));
-
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- unmarshaller.setEntityResolver(this.entityResolver);
-
- JBossApplicationMetaData defaultAppMetaData = (JBossApplicationMetaData) unmarshaller.unmarshal(stream,
- new JBossApplicationMetaDataFactory(), new JBossApplicationMetaData());
+ SchemaBindingResolver resolver = PortalResolverFactory.getInstance().getSchemaBindingResolver();
+ Unmarshaller unmarshaller = PortalUnmarshallerFactory.getInstance().getUnmarshaller();
+ JBossPortletAppMetaData defaultAppMetaData = (JBossPortletAppMetaData)unmarshaller.unmarshal(source, resolver);
- System.out.println("DEFAULT PORTLETS : " + defaultAppMetaData.getPortlets().get("DefaultPortlet"));
-
- JBossPortletMetaData defaultPortletMetaData = defaultAppMetaData.getPortlets().get("DefaultPortlet");
- if (defaultPortletMetaData != null)
+ if (defaultAppMetaData != null)
{
- PortletApplication10MetaData portletAppMD = unit.getAttachment(PortletApplication10MetaData.class);
-
- for (PortletMetaData portletMD : portletAppMD.getPortlets().values())
+ log.debug("Found standard jboss app meta data");
+ JBossPortletMetaData defaultPortletMetaData = defaultAppMetaData.getPortlets().get("DefaultPortlet");
+ if (defaultPortletMetaData != null)
{
- String name = portletMD.getPortletName();
- JBossPortletMetaData jbossPortletMetaData = jbossAppMetaData.getPortlets().get(name);
- if (jbossPortletMetaData != null)
+ log.debug("Found default jboss portlet meta data");
+ for (PortletMetaData portlets : portletAppMetaData.getPortlets().values())
{
- jbossPortletMetaData.merge(defaultPortletMetaData);
- }
- else
- {
- jbossAppMetaData.getPortlets().put(name, (JBossPortletMetaData)defaultPortletMetaData.clone());
- }
+ String name = portlets.getPortletName();
+ JBossPortletMetaData jbossPortletMD = jbossAppMetaData.getPortlets().get(name);
+ if (jbossPortletMD != null)
+ {
+ log.debug("Merging default jboss portlet meta data for " + name);
+ jbossPortletMD.merge(defaultPortletMetaData);
+ }
+ else
+ {
+ log.debug("Using default jboss portlet meta data for " + name);
+ jbossAppMetaData.getPortlets().put(name, (JBossPortletMetaData)defaultPortletMetaData.clone());
+ }
+ }
}
}
}
- catch (Exception e)
+ catch (Throwable e)
{
- e.printStackTrace();
+ throw new DeploymentException("Cannot deploy portlet application", e);
}
- unit.addAttachment(PORTLET_MERGED_ATTACHMENT_NAME, jbossAppMetaData, JBossApplicationMetaData.class);
+ unit.addAttachment(PORTLET_MERGED_ATTACHMENT_NAME, jbossAppMetaData, JBossPortletAppMetaData.class);
}
-
- public PortalEntityResolver getEntityResolver()
- {
- return entityResolver;
- }
-
- public void setEntityResolver(PortalEntityResolver entityResolver)
- {
- this.entityResolver = entityResolver;
- }
-
+
}
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalObjectParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalObjectParsingDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalObjectParsingDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -24,7 +24,7 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.portal.metadata.portal.object.PortalObjectMetaData;
-import org.jboss.portal.metadata.portlet.PortletDeploymentInstancesMetaData;
+import org.jboss.portal.metadata.portlet.instances.PortletDeploymentInstancesMetaData;
import org.jboss.virtual.VirtualFile;
/**
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalResolverDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalResolverDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalResolverDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -60,7 +60,7 @@
{
InputStream stream = file.openStream();
InputSource source = new InputSource(stream);
-
+
return (metadata) unmarshaller.unmarshal(source, resolver);
}
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortletInstancesParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortletInstancesParsingDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortletInstancesParsingDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -23,7 +23,7 @@
package org.jboss.portal.deployer.parsing;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.portal.metadata.portlet.PortletDeploymentInstancesMetaData;
+import org.jboss.portal.metadata.portlet.instances.PortletDeploymentInstancesMetaData;
import org.jboss.virtual.VirtualFile;
/**
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortletParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortletParsingDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortletParsingDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -22,32 +22,13 @@
******************************************************************************/
package org.jboss.portal.deployer.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.portal.metadata.portlet.PortletApplication10MetaData;
import org.jboss.virtual.VirtualFile;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-public class PortletParsingDeployer extends SchemaResolverDeployer<PortletApplication10MetaData>
+public class PortletParsingDeployer extends PortalResolverDeployer<PortletApplication10MetaData>
{
- private PortalEntityResolver entityResolver;
-
- public void setEntityResolver(PortalEntityResolver entityResolver)
- {
- this.entityResolver = entityResolver;
- }
-
public PortletParsingDeployer()
{
super(PortletApplication10MetaData.class);
@@ -64,22 +45,9 @@
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;
+ protected PortletApplication10MetaData parse(VFSDeploymentUnit unit, VirtualFile file, PortletApplication10MetaData root) throws Exception
+ {
+ return (PortletApplication10MetaData) super.parse(unit, file, root);
}
}
Modified: 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 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -28,7 +28,6 @@
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.portal.core.model.instance.metadata.InstanceMetaData;
import org.jboss.virtual.VirtualFile;
/**
Modified: 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 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -26,6 +26,7 @@
import java.util.Iterator;
import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.web.WebApplication;
@@ -50,6 +51,7 @@
public PortalPostWebDeployer()
{
//addInput(PortalMetaData.class);
+ this.setStage(DeploymentStages.INSTALLED);
}
public void setWarDeployer(AbstractWarDeployer warDeployer)
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/CommandServletDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/CommandServletDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/CommandServletDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -36,31 +36,38 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.FiltersMetaData;
import org.jboss.metadata.web.spec.ServletMappingMetaData;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
-import org.jboss.portal.web.command.CommandServlet;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.mc.AnnotationPortletApplication10MetaData;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
*/
-public class CommandServletDeployer extends AbstractSimpleVFSRealDeployer<PortletApplication10MetaData>
+public class CommandServletDeployer extends AbstractSimpleVFSRealDeployer<AnnotationPortletApplication10MetaData>
{
+ //the name of the CommandServlet class to use. Set initially to default value
+ String commandServletClass = "org.jboss.portal.web.command.CommandServlet";
+
public CommandServletDeployer()
{
- super(PortletApplication10MetaData.class);
+ super(AnnotationPortletApplication10MetaData.class);
setStage(DeploymentStages.POST_PARSE);
}
+ public void setCommandServletClass(String commandServletClass)
+ {
+ this.commandServletClass = commandServletClass;
+ }
+
@Override
- public void deploy(VFSDeploymentUnit unit, PortletApplication10MetaData deployment) throws DeploymentException
+ public void deploy(VFSDeploymentUnit unit, AnnotationPortletApplication10MetaData deployment) throws DeploymentException
{
-
JBossWebMetaData jbossWebMetaData = (JBossWebMetaData) unit.getAttachment(JBossWebMetaData.class);
JBossServletMetaData commandServlet = new JBossServletMetaData();
commandServlet.setServletName("CommandServlet");
- commandServlet.setServletClass(CommandServlet.class.getName());
+ commandServlet.setServletClass(commandServletClass);
commandServlet.setLoadOnStartup(0);
JBossServletsMetaData servlets = jbossWebMetaData.getServlets();
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -22,16 +22,15 @@
******************************************************************************/
package org.jboss.portal.deployer.portlet;
-import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.beans.metadata.api.annotations.Install;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.kernel.Kernel;
-import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
-import org.jboss.portal.core.model.instance.InstanceContainer;
+import org.jboss.portal.deployer.container.InstanceDeployment;
import org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer;
-import org.jboss.portal.metadata.portlet.PortletDeploymentInstancesMetaData;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
+import org.jboss.portal.metadata.portlet.instances.PortletDeploymentInstancesMetaData;
/**
* Deploys to portlet instances to the portlet instance container
@@ -43,21 +42,8 @@
public class InstanceDeployer extends AbstractComponentDeployer
{
- protected Kernel kernel;
+ InstanceDeployment deployment;
- //default container reference name
- protected String instanceContainerReferenceName = "portal:container=Instance";
-
- public void setKernel(Kernel kernel)
- {
- this.kernel = kernel;
- }
-
- public void setInstanceContainerReferenceName (String instanceContainerReferenceName)
- {
- this.instanceContainerReferenceName = instanceContainerReferenceName;
- }
-
public InstanceDeployer()
{
this.setAllInputs(false);
@@ -73,33 +59,19 @@
this.setStage(DeploymentStages.INSTALLED);
}
+ @Install
+ public void addDeployment(InstanceDeployment deployment)
+ {
+ this.deployment = deployment;
+ }
@Override
public void internalDeploy(DeploymentUnit unit) throws DeploymentException
{
- PortletDeploymentInstancesMetaData portletInstancesMetaData = unit
- .getAttachment(PortletDeploymentInstancesMetaData.class);
- JBossApplicationMetaData appMetaData = unit.getAttachment(JBossApplicationMetaData.class);
-
- InstanceContainer instanceContainer;
- ControllerContext controllerContext = kernel.getController().getInstalledContext(instanceContainerReferenceName);
- if (controllerContext == null)
- {
- throw new DeploymentException(
- "Cannot Deploy to Instance Container, cannot get ControllerContext for \"" + instanceContainerReferenceName + "\"");
- }
-
- try
- {
- instanceContainer = (InstanceContainer) controllerContext.getTarget();
- InstanceDeployerImpl deployerImpl = new InstanceDeployerImpl(appMetaData.getId(), instanceContainer);
- deployerImpl.deployInstances(portletInstancesMetaData);
- }
- catch (Exception e)
- {
- throw new DeploymentException("Error deploying instance with portlet id :" + appMetaData.getId(), e);
- }
+ PortletDeploymentInstancesMetaData deploymentInstancesMetaData = unit.getAttachment(PortletDeploymentInstancesMetaData.class);
+ JBossPortletAppMetaData appMetaData = unit.getAttachment(MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME,JBossPortletAppMetaData.class);
+ deployment.deployInstances(deploymentInstancesMetaData, appMetaData.getAppId());
}
Deleted: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployerImpl.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployerImpl.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployerImpl.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -1,187 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.deployer.portlet;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
-import org.jboss.logging.Logger;
-import org.jboss.portal.core.model.instance.DuplicateInstanceException;
-import org.jboss.portal.core.model.instance.Instance;
-import org.jboss.portal.core.model.instance.InstanceContainer;
-import org.jboss.portal.metadata.portlet.InstanceMetaData;
-import org.jboss.portal.metadata.portlet.PolicyPermissionMetaData;
-import org.jboss.portal.metadata.portlet.PortletDeploymentInstanceMetaData;
-import org.jboss.portal.metadata.portlet.PortletDeploymentInstancesMetaData;
-import org.jboss.portal.metadata.portlet.PortletPreferenceMetaData;
-import org.jboss.portal.metadata.portlet.PortletPreferencesMetaData;
-import org.jboss.portal.metadata.portlet.SecurityConstrainMetaData;
-import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.state.PropertyChange;
-import org.jboss.portal.portlet.state.PropertyMap;
-import org.jboss.portal.security.RoleSecurityBinding;
-import org.jboss.portal.security.spi.provider.AuthorizationDomain;
-import org.jboss.portal.security.spi.provider.DomainConfigurator;
-
-/**
- * Performs the actual deployment to the Instance Container running in
- * the portal sar.
- *
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class InstanceDeployerImpl
-{
- /*
- * Note: this class must be separate from the actual deployer class as it
- * has an AOP dependency for the Transaction Manager. The Transaction Manager
- * is created after the deployer class is created, but before this class is called.
- */
-
- protected final Logger log = Logger.getLogger(getClass());
-
- protected InstanceContainer instanceContainer;
-
- protected String appId;
-
- public InstanceDeployerImpl(String appId, InstanceContainer instanceContainer)
- {
- this.appId = appId;
- this.instanceContainer = instanceContainer;
- }
-
- /**
- * Deploys the instance to the instance container running in the portlet sar.
- *
- * @param instancesMetaData The metadata for the instance.
- * @throws Exception If an exception occurs while deploying the instance
- */
- //Requires a transaction to execute properly, setup through aop configuration for the deployer.
- public void deployInstances(PortletDeploymentInstancesMetaData instancesMetaData) throws Exception
- {
- List<PortletDeploymentInstanceMetaData> instancesMD = instancesMetaData.getDeploymentInstances();
-
- for (int i = 0; i < instancesMD.size(); i++)
- {
- PortletDeploymentInstanceMetaData instanceMD = instancesMD.get(i);
-
- Instance instance = instanceContainer.getDefinition(instanceMD.getInstance().getInstanceId());
-
- if (instance == null)
- {
- createInstance(instanceMD.getInstance());
- }
- else if (instanceMD.getOverwrite() == true)
- {
- log.debug("Instance " + instanceMD.getInstance().getInstanceId() + " is about to be overwritten");
- configureInstance(instanceMD.getInstance(), instance);
- }
- else
- {
- log.debug("Instance " + instanceMD.getInstance().getInstanceId() + " already exists");
- }
- }
- }
-
- protected void createInstance(InstanceMetaData instanceMD) throws IllegalArgumentException,
- DuplicateInstanceException, PortletInvokerException
- {
- log.debug("Creating portlet instance " + instanceMD.getInstanceId());
-
- instanceMD.setPortletRef("local." + appId + "." + instanceMD.getPortletRef());
-
- Instance instance = instanceContainer.createDefinition(instanceMD.getInstanceId(), instanceMD.getPortletRef());
-
- configureInstance(instanceMD, instance);
- }
-
- protected void configureInstance(InstanceMetaData instanceMD, Instance instance)
- throws PortletInvokerException
- {
- log.debug("Configuring portlet instance " + instanceMD.getInstanceId());
- List<PropertyChange> changes = new ArrayList<PropertyChange>();
-
- // Reset all preferences that are not overridden
- PortletPreferencesMetaData preferencesMetaData = instanceMD.getPortletPreferences();
- PropertyMap propertyMap = instance.getProperties();
-
- if (propertyMap != null && propertyMap.size() > 0)
- {
- for (String key : propertyMap.keySet())
- {
- if (preferencesMetaData == null || preferencesMetaData.getPreferences() == null
- || preferencesMetaData.getPreferences().contains(key) == false)
- {
- changes.add(PropertyChange.newReset(key));
- }
- }
- }
-
- // Configure preferences only if needed
- if (preferencesMetaData != null && preferencesMetaData.getPreferences() != null && preferencesMetaData.getPreferences().size() > 0)
- {
- for (int i = 0; i < preferencesMetaData.getPreferences().size(); i++)
- {
- PortletPreferenceMetaData portletPreferenceMetaData = preferencesMetaData.getPreferences().get(i);
- PropertyChange change = PropertyChange.newUpdate(portletPreferenceMetaData.getName(), portletPreferenceMetaData.getValue());
- changes.add(change);
- }
- }
-
-
- if (changes.size() > 0)
- {
- instance.setProperties(changes.toArray(new PropertyChange[changes.size()]));
- }
-
- // Configure security
- SecurityConstrainMetaData securityConstraints = instanceMD.getSecurityContraint();
-
- if (securityConstraints == null)
- {
- securityConstraints = new SecurityConstrainMetaData();
- PolicyPermissionMetaData policyPermission = new PolicyPermissionMetaData();
- policyPermission.setActionName("view");
- policyPermission.setRoleName("__unchecked__".intern());
-
- List<PolicyPermissionMetaData> policyPermissions = new ArrayList<PolicyPermissionMetaData>();
- policyPermissions.add(policyPermission);
-
- securityConstraints.setPolicyPermission(policyPermissions);
- }
-
- HashSet<RoleSecurityBinding> bindings = new HashSet<RoleSecurityBinding>();
- for (int i = 0; i < securityConstraints.getPolicyPermission().size(); i++)
- {
- PolicyPermissionMetaData policyMD = securityConstraints.getPolicyPermission().get(i);
- RoleSecurityBinding binding = new RoleSecurityBinding(policyMD.getActionName(), policyMD.getRoleName());
- bindings.add(binding);
- }
-
- AuthorizationDomain authDomain = instance.getContainer().getAuthorizationDomain();
- DomainConfigurator domainConfigurator = authDomain.getConfigurator();
- domainConfigurator.setSecurityBindings(instance.getId(), bindings);
- }
-
-}
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ObjectDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ObjectDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ObjectDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -22,16 +22,17 @@
******************************************************************************/
package org.jboss.portal.deployer.portlet;
+import org.jboss.beans.metadata.api.annotations.Install;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.kernel.Kernel;
-import org.jboss.portal.core.controller.coordination.CoordinationConfigurator;
-import org.jboss.portal.core.model.content.spi.ContentProviderRegistry;
-import org.jboss.portal.core.model.portal.PortalObjectContainer;
+import org.jboss.portal.deployer.container.PortalObjectDeployment;
+import org.jboss.portal.metadata.portal.object.PortalObjectDeploymentMetaData;
import org.jboss.portal.metadata.portal.object.PortalObjectMetaData;
+import org.jboss.web.WebApplication;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
@@ -39,70 +40,28 @@
*/
public class ObjectDeployer extends AbstractComponentDeployer
{
-
- protected Kernel kernel;
- protected String portalObjectContainerReferenceName = "portal:container=PortalObject";
- protected String contentProviderRegistryReferenceName = "portal:service=ContentProviderRegistry";
- protected String coordinationConfiguratorReferenceName = "portal:service=CoordinationService";
+ PortalObjectDeployment deployment;
- public void setKernel (Kernel kernel)
- {
- this.kernel = kernel;
- }
-
- public void setPortalObjectContainerReferenceName (String portalObjectContainerReferenceName)
- {
- this.portalObjectContainerReferenceName = portalObjectContainerReferenceName;
- }
-
- public void setContentProviderRegistryReferenceName (String contentProviderRegistryReferenceName)
- {
- this.contentProviderRegistryReferenceName = contentProviderRegistryReferenceName;
- }
-
- public void setCoordinationConfiguratorReferenceName (String coordinationConfigurationReferenceName)
- {
- this.coordinationConfiguratorReferenceName = coordinationConfigurationReferenceName;
- }
-
public ObjectDeployer()
{
this.setAllInputs(false);
this.setInput(PortalObjectMetaData.class);
this.addInput(PortletDeployer.PORLET_DEPLOYED);
-
this.setStage(DeploymentStages.INSTALLED);
}
+ @Install
+ public void addDeployment(PortalObjectDeployment deployment)
+ {
+ this.deployment = deployment;
+ }
+
@Override
public void internalDeploy(DeploymentUnit unit) throws DeploymentException
{
- PortalObjectMetaData objectMetaData = (PortalObjectMetaData) unit.getAttachment(PortalObjectMetaData.class);
+ PortalObjectMetaData objectMetaData = unit.getAttachment(PortalObjectMetaData.class);
- ControllerContext objectContainerControllerContext = kernel.getController().getInstalledContext(portalObjectContainerReferenceName);
- if (objectContainerControllerContext == null)
- {
- throw new DeploymentException("Cannot deploy to Portal Object Container, cannot get ControllerContext for \"" + portalObjectContainerReferenceName + "\"");
- }
- PortalObjectContainer objectContainer = (PortalObjectContainer)objectContainerControllerContext.getTarget();
-
- ControllerContext contentProviderRegistryControllerContext = kernel.getController().getInstalledContext(contentProviderRegistryReferenceName);
- if (contentProviderRegistryControllerContext == null)
- {
- throw new DeploymentException("Cannot deploy to Portal Object Container, cannot get ControllerContext for \"" + contentProviderRegistryReferenceName + "\"");
- }
- ContentProviderRegistry contentProviderRegistry = (ContentProviderRegistry)contentProviderRegistryControllerContext.getTarget();
-
- ControllerContext coordinationConfiguratorControllerContext = kernel.getController().getInstalledContext(coordinationConfiguratorReferenceName);
- if (coordinationConfiguratorControllerContext == null)
- {
- throw new DeploymentException("Cannot deploy to Portal Object Container, cannot get ControllerContext for \"" + coordinationConfiguratorReferenceName + "\"");
- }
- CoordinationConfigurator coordinationConfiguration = (CoordinationConfigurator)coordinationConfiguratorControllerContext.getTarget();
-
- ObjectDeployerImpl objectDeployer = new ObjectDeployerImpl(objectContainer, contentProviderRegistry, coordinationConfiguration);
- objectDeployer.deployObjects(objectMetaData);
-
+ deployment.deployObjects(objectMetaData, unit.getClassLoader());
}
}
Deleted: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ObjectDeployerImpl.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ObjectDeployerImpl.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ObjectDeployerImpl.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -1,57 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.deployer.portlet;
-
-import org.jboss.logging.Logger;
-import org.jboss.portal.core.controller.coordination.CoordinationConfigurator;
-import org.jboss.portal.core.model.content.spi.ContentProviderRegistry;
-import org.jboss.portal.core.model.portal.PortalObjectContainer;
-import org.jboss.portal.metadata.portal.object.PortalObjectMetaData;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class ObjectDeployerImpl
-{
-
- protected final Logger log = Logger.getLogger(getClass());
-
- protected PortalObjectContainer portalObjectContainer;
- protected ContentProviderRegistry contentProviderRegistry;
- protected CoordinationConfigurator coordinationConfigurator;
-
- public ObjectDeployerImpl(PortalObjectContainer portalObjectContainer, ContentProviderRegistry contentProviderRegistry, CoordinationConfigurator coordinationConfigurator)
- {
- this.portalObjectContainer = portalObjectContainer;
- this.contentProviderRegistry = contentProviderRegistry;
- this.coordinationConfigurator = coordinationConfigurator;
- }
-
- public void deployObjects (PortalObjectMetaData objectMetaData)
- {
- //TODO: need to write a class to convert the PortalObjectMetaData class to PortalObject class
- }
-
-}
-
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDependencyDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDependencyDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDependencyDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -35,7 +35,7 @@
import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
import org.jboss.deployers.spi.deployer.helpers.DeploymentVisitor;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
/**
* This deployer adds a dependency item to the DeploymentUnit which
Modified: 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 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -22,27 +22,21 @@
******************************************************************************/
package org.jboss.portal.deployer.portlet;
-import java.lang.reflect.Method;
-import java.net.URL;
import java.util.ArrayList;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
import javax.servlet.ServletContext;
-import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.beans.metadata.api.annotations.Install;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.kernel.Kernel;
import org.jboss.logging.Logger;
-import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
+import org.jboss.portal.deployer.container.PortletDeployment;
import org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer;
-import org.jboss.portal.portlet.PortletInvoker;
-import org.jboss.portal.portlet.deployment.jboss.InfoBuilderFactory;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
-import org.jboss.portal.server.deployment.PortalWebApp;
+import org.jboss.portal.deployer.webapp.WebAppContextDeployer;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
import org.jboss.web.WebApplication;
import org.jboss.web.deployers.AbstractWarDeployer;
@@ -52,187 +46,47 @@
public static final String PORLET_DEPLOYED = "portlet.deployed";
- protected AbstractWarDeployer warDeployer;
-
- protected MBeanServer mbeanServer;
+ PortletDeployment deployment;
- protected Kernel kernel;
-
- protected String coreInfoBuilderReferenceName = "portal:service=InfoBuilderFactory,type=Core";
-
- protected String portletContainerInvoker = "portal:service=PortletInvoker,type=Container";
-
- protected ArrayList listeners = new ArrayList();
-
public PortletDeployer()
{
setAllInputs(false);
setInput(PortletApplication10MetaData.class);
addInput(MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME);
+ addInput(WebAppContextDeployer.PORTLET_APP_CONTEXT_PATH_ATTACHMENT);
+ addInput(WebAppContextDeployer.PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT);
+ addInput(WebApplication.class);
addOutput(PORLET_DEPLOYED);
setStage(DeploymentStages.INSTALLED);
}
-
- public void setWarDeployer(AbstractWarDeployer warDeployer)
- {
- this.warDeployer = warDeployer;
- }
-
- public void setMBeanServer(MBeanServer mbeanServer)
- {
- this.mbeanServer = mbeanServer;
- }
- public void setKernel(Kernel kernel)
- {
- this.kernel=kernel;
- }
- public int getRelativeOrder()
+ @Install
+ public void addDeployment(PortletDeployment deployment)
{
- return warDeployer.getRelativeOrder() + 10;
+ this.deployment = deployment;
}
-
- public void setCoreInfoBuilderReferenceName (String coreInfoBuilderReferenceName)
- {
- this.coreInfoBuilderReferenceName = coreInfoBuilderReferenceName;
- }
- public void setPortletContainerInvoker (String portletContainerInvoker)
- {
- this.portletContainerInvoker = portletContainerInvoker;
- }
-
@Override
public void internalDeploy(DeploymentUnit unit) throws DeploymentException
{
PortletApplication10MetaData portletMetaData = unit.getAttachment(PortletApplication10MetaData.class);
- JBossApplicationMetaData jbossPortletMetaData = unit.getAttachment(MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME, JBossApplicationMetaData.class);
+ JBossPortletAppMetaData jbossPortletMetaData = unit.getAttachment(MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME, JBossPortletAppMetaData.class);
- PortalWebApp portalWebApp = createPortalWebApp(unit.getName());
+ String contextPath = unit.getAttachment(WebAppContextDeployer.PORTLET_APP_CONTEXT_PATH_ATTACHMENT, String.class);
+ ServletContext servletContext = unit.getAttachment(WebAppContextDeployer.PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT, ServletContext.class);
+ WebApplication webapp = unit.getAttachment(WebApplication.class);
- ControllerContext coreInfoContext = kernel.getController().getInstalledContext(coreInfoBuilderReferenceName);
- if (coreInfoContext == null)
- {
- throw new DeploymentException(
- "Cannot Deploy to Instance Container, cannot get ControllerContext for \"" + coreInfoBuilderReferenceName + "\"");
- }
- InfoBuilderFactory infoBuilderFactory = (InfoBuilderFactory)coreInfoContext.getTarget();
-
-
- ControllerContext portletContainerContext = kernel.getController().getInstalledContext(portletContainerInvoker);
- if (portletContainerContext == null)
- {
- throw new DeploymentException(
- "Cannot Deploy to Instance Container, cannot get ControllerContext for \"" + portletContainerInvoker + "\"");
- }
- PortletInvoker portletInvoker = (PortletInvoker)portletContainerContext.getTarget();
-
- PortletDeployerImpl portletDeployerImpl = new PortletDeployerImpl(infoBuilderFactory, portletInvoker);
- portletDeployerImpl.deployPortlets(portalWebApp, jbossPortletMetaData, portletMetaData);
-
-
+ this.deployment.deployPortlets(servletContext, webapp.getURL(), webapp.getClassLoader(), contextPath, jbossPortletMetaData, portletMetaData);
+
unit.addAttachment(PORLET_DEPLOYED, "deployed");
}
@Override
public void internalUndeploy(DeploymentUnit unit)
{
- System.out.println("INTERNALUNDEPLOY");
+ System.out.println("INTERNALUNDEPLOY : " + unit.getName());
}
- /**
- * This is a hack, but we currently need this information for the portlet
- * container and there doesn't appear to be any other way to really get this info.
- *
- * TODO: fix this code to make it more sane and less prone to issues which may
- * occur if internals in the JBoss Web/Tomcat change.
- *
- */
- protected PortalWebApp createPortalWebApp(String warURL) throws DeploymentException
- {
- WebApplication webApp = warDeployer.getDeployedApp(warURL);
- ObjectName objectName;
- Object standardContextObject;
-
- try
- {
- objectName = (ObjectName) webApp.getAppData();
- }
- catch (ClassCastException cce)
- {
- throw new DeploymentException(
- "Can not deploy portlet, the WebApplication.getAppData " +
- "doesn't contain a proper ObjectName", cce);
- }
-
- try
- {
- standardContextObject = mbeanServer.getAttribute(objectName, "managedResource");
- }
- catch (Exception e)
- {
- throw new DeploymentException(
- "Could not deploy the portlet, could not get the attribute 'managedResource'" +
- "from mbean with object name '" + objectName +"'", e);
- }
-
- String contextPath = getContextPath(standardContextObject);
- ServletContext servletContext = getServletContext(standardContextObject);
- URL url = webApp.getURL();
- ClassLoader classloader = webApp.getClassLoader();
-
- PortalWebApplication portalWebApp = new PortalWebApplication(servletContext, url, classloader, contextPath);
- return portalWebApp;
- }
-
- //TODO: determine a better way to get the contextpath string
- protected String getContextPath (Object standardContextObject) throws DeploymentException
- {
- try
- {
- Class standardContextClass = standardContextObject.getClass();
- Method getPathMethod = standardContextClass.getMethod("getPath", new Class[0]);
-
- return (String)getPathMethod.invoke(standardContextObject, new Object[0]);
- }
- catch (Exception e)
- {
- throw new DeploymentException("Error trying to get the ContextPath from the web server.", e);
- }
- }
-
- //TODO: determine a better way to get the servlet context
- protected ServletContext getServletContext(Object standardContextObject) throws DeploymentException
- {
- try
- {
- Class standardContextClass = standardContextObject.getClass();
- Method getServletContextMethod = standardContextClass.getMethod("getServletContext", new Class[0]);
-
- return (ServletContext)getServletContextMethod.invoke(standardContextObject, new Object[0]);
- }
- catch (Exception e)
- {
- throw new DeploymentException("Error trying to get Reference to the ServletContext from the web server.", e);
- }
- }
-
- //TODO: remove this class and change PortalWebAPP so that only a simple interface is needed
- class PortalWebApplication extends PortalWebApp
- {
-
- public PortalWebApplication(ServletContext servletContext, URL url, ClassLoader classloader, String contextPath)
- {
- init(servletContext, url, classloader, contextPath);
- }
-
- @Override
- public void instrument() throws Exception
- {
- //do nothing
- }
-
- }
}
Deleted: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployerImpl.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployerImpl.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployerImpl.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -1,176 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.deployer.portlet;
-
-import org.jboss.logging.Logger;
-import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
-import org.jboss.portal.portlet.PortletInvoker;
-import org.jboss.portal.portlet.container.ContainerPortletInvoker;
-import org.jboss.portal.portlet.container.PortletApplicationContext;
-import org.jboss.portal.portlet.container.PortletContainer;
-import org.jboss.portal.portlet.container.PortletContainerContext;
-import org.jboss.portal.portlet.container.PortletFilterContext;
-import org.jboss.portal.portlet.container.managed.LifeCycleStatus;
-import org.jboss.portal.portlet.container.managed.ManagedObject;
-import org.jboss.portal.portlet.container.managed.ManagedObjectEvent;
-import org.jboss.portal.portlet.container.managed.ManagedObjectLifeCycleEvent;
-import org.jboss.portal.portlet.container.managed.ManagedObjectRegistryEvent;
-import org.jboss.portal.portlet.container.managed.ManagedObjectRegistryEventListener;
-import org.jboss.portal.portlet.container.object.PortletApplicationObject;
-import org.jboss.portal.portlet.container.object.PortletContainerObject;
-import org.jboss.portal.portlet.container.object.PortletFilterObject;
-import org.jboss.portal.portlet.deployment.jboss.InfoBuilder;
-import org.jboss.portal.portlet.deployment.jboss.InfoBuilderFactory;
-import org.jboss.portal.portlet.deployment.jboss.PortletApplicationContextImpl;
-import org.jboss.portal.portlet.deployment.jboss.PortletContainerContextImpl;
-import org.jboss.portal.portlet.deployment.jboss.PortletFilterContextImpl;
-import org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle;
-import org.jboss.portal.portlet.impl.container.PortletContainerLifeCycle;
-import org.jboss.portal.portlet.impl.container.PortletFilterLifeCycle;
-import org.jboss.portal.portlet.impl.info.ContainerFilterInfo;
-import org.jboss.portal.portlet.impl.info.ContainerPortletInfo;
-import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
-import org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl;
-import org.jboss.portal.portlet.impl.jsr168.PortletFilterImpl;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
-import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.server.deployment.PortalWebApp;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortletDeployerImpl
-{
- protected final Logger log = Logger.getLogger(this.getClass());
-
- protected InfoBuilderFactory coreInfoBuilderFactory;
- protected PortletInvoker portletContainerInvoker;
-
-
- public PortletDeployerImpl (InfoBuilderFactory coreInfoBuilderFactory, PortletInvoker portletContainerInvoker)
- {
- this.coreInfoBuilderFactory = coreInfoBuilderFactory;
- this.portletContainerInvoker = portletContainerInvoker;
- }
-
- public void deployPortlets(PortalWebApp pwa, JBossApplicationMetaData jbossAppMD, PortletApplication10MetaData portletAppMD)
- {
- InfoBuilder infoBuilder = coreInfoBuilderFactory.createInfoBuilder(pwa, jbossAppMD, portletAppMD);
- infoBuilder.build();
-
- PortletApplicationObject portletApplicationObject = new PortletApplicationImpl(infoBuilder.getApplication());
- PortletApplicationContext portletApplicationContext = new PortletApplicationContextImpl(pwa);
-
- //
- PortletApplicationLifeCycle portletApplicationLifeCycle = new PortletApplicationLifeCycle(bridgeToInvoker, portletApplicationContext,
- portletApplicationObject);
-
- //
- for (ContainerFilterInfo filterInfo : infoBuilder.getApplication().getFilters().values())
- {
- PortletFilterObject portletFilterObject = new PortletFilterImpl(filterInfo);
- PortletFilterContext portletFilterContext = new PortletFilterContextImpl();
-
- //
- portletApplicationLifeCycle.addPortletFilter(portletFilterContext, portletFilterObject);
- System.out.println("ADDING FILTERINFO : " + portletFilterContext + " : " + portletFilterObject);
- }
-
- //
- for (PortletInfo portletInfo : infoBuilder.getPortlets())
- {
- System.out.println("PORTLETINFO : " + portletInfo);
- ContainerPortletInfo cpi = (ContainerPortletInfo) portletInfo;
- PortletContainerObject portletContainerObject = new PortletContainerImpl(cpi);
- PortletContainerContext portletContainerContext = new PortletContainerContextImpl();
-
- //
- PortletContainerLifeCycle portletContainerLifeCycle = portletApplicationLifeCycle.addPortletContainer(
- portletContainerContext, portletContainerObject);
-
- // Now create deps
- for (String filterRef : cpi.getFilterRefs())
- {
- PortletFilterLifeCycle portletFilterLifeCycle = portletApplicationLifeCycle
- .getManagedPortletFilter(filterRef);
-
- //
- if (portletFilterLifeCycle != null)
- {
- portletApplicationLifeCycle.addDependency(portletFilterLifeCycle, portletContainerLifeCycle);
- }
- else
- {
- // todo
- }
- }
- }
-
- //
- portletApplicationLifeCycle.create();
-
- //
- portletApplicationLifeCycle.managedStart();
- }
-
- /** Bridge managed object event to add/remove portlet container in portlet container invoker. */
- protected final ManagedObjectRegistryEventListener bridgeToInvoker = new ManagedObjectRegistryEventListener()
- {
- public void onEvent(ManagedObjectRegistryEvent event)
- {
- if (event instanceof ManagedObjectEvent)
- {
- ManagedObjectEvent managedObjectEvent = (ManagedObjectEvent)event;
- ManagedObject managedObject = managedObjectEvent.getManagedObject();
-
- //
- if (managedObject instanceof PortletContainerLifeCycle)
- {
- PortletContainerLifeCycle portletContainerLifeCycle = (PortletContainerLifeCycle)managedObject;
- PortletContainer portletContainer = portletContainerLifeCycle.getPortletContainer();
-
- //
- if (managedObjectEvent instanceof ManagedObjectLifeCycleEvent)
- {
- ManagedObjectLifeCycleEvent lifeCycleEvent = (ManagedObjectLifeCycleEvent)managedObjectEvent;
-
- //
- LifeCycleStatus status = lifeCycleEvent.getStatus();
- //
- if (status == LifeCycleStatus.STARTED)
- {
- ((ContainerPortletInvoker)portletContainerInvoker).addPortletContainer(portletContainer);
- }
- else
- {
- ((ContainerPortletInvoker)portletContainerInvoker).removePortletContainer(portletContainer);
- }
- }
- }
- }
- }
- };
-
-}
-
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletTLDDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletTLDDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletTLDDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -23,30 +23,21 @@
package org.jboss.portal.deployer.portlet;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
import javax.management.MBeanServer;
import javax.management.ObjectName;
-import org.jboss.dependency.plugins.AbstractDependencyItem;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.dependency.spi.DependencyItem;
import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStage;
import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
-import org.jboss.deployers.spi.deployer.helpers.DeploymentVisitor;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication20MetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.portal.metadata.portlet.PortletApplication20MetaData;
import org.jboss.web.WebApplication;
-import org.jboss.web.deployers.AbstractWarDeployer;
/**
* Deployer to add the tld file to the portlet.
@@ -67,14 +58,12 @@
protected String tldDirectory;
- protected AbstractWarDeployer warDeployer;
-
protected MBeanServer server;
public PortletTLDDeployer()
{
setAllInputs(false);
- setInput(PortletApplication10MetaData.class);
+ setInput(WebApplication.class);
setStage(DeploymentStages.INSTALLED);
}
@@ -83,17 +72,6 @@
this.tldDirectory = path;
}
- @Override
- public int getRelativeOrder()
- {
- return warDeployer.getRelativeOrder() + 1;
- }
-
- public void setWarDeployer(AbstractWarDeployer warDeployer)
- {
- this.warDeployer = warDeployer;
- }
-
public void setMBeanServer(MBeanServer server)
{
this.server = server;
@@ -101,9 +79,7 @@
public void deploy(DeploymentUnit unit) throws DeploymentException
{
- //the name of the unit is the same as the war url used
- String name = unit.getName();
- WebApplication webApp = warDeployer.getDeployedApp(name);
+ WebApplication webApp = (WebApplication)unit.getAttachment(WebApplication.class);
//the AppData object is the name of the deployment MBean
ObjectName objectName = (ObjectName) webApp.getAppData();
@@ -113,7 +89,7 @@
// docBase will return where the webapp is deployed. This will either be in the
// deploy for an exploded war or the tmp/deploy for a non exploded war
String docBase = (String) server.getAttribute(objectName, "docBase");
-
+
PortletApplication10MetaData metaData = unit.getAttachment(PortletApplication10MetaData.class);
if (metaData instanceof PortletApplication20MetaData)
{
Modified: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ServiceInjectorDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ServiceInjectorDeployer.java 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ServiceInjectorDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -1,65 +1,64 @@
-/******************************************************************************
- * 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.deployer.portlet;
-
-import java.util.Iterator;
-
-import org.jboss.deployers.spi.DeploymentException;
-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.portal.core.metadata.ServiceMetaData;
-import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
-
-/**
- * This class injects portlet specific services into the war
- *
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class ServiceInjectorDeployer extends AbstractSimpleVFSRealDeployer<JBossApplicationMetaData>
-{
-
- public ServiceInjectorDeployer()
- {
- super(JBossApplicationMetaData.class);
- setStage(DeploymentStages.POST_PARSE);
- }
-
- @Override
- public void deploy(VFSDeploymentUnit unit, JBossApplicationMetaData deployment) throws DeploymentException
- {
- Iterator<ServiceMetaData> iterator = deployment.getServices().values().iterator();
- while (iterator.hasNext())
- {
- ServiceMetaData serviceMD = iterator.next();
- //TODO: finish this deployer. This deployer needs to inject the services into the portlet servlets
- // need to figure out if this can be done with an xml file or if this is going to need to have
- // access to the server like the tld deployer.
- }
- }
-
-
-}
-
+///******************************************************************************
+// * 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.deployer.portlet;
+//
+//import java.util.Iterator;
+//
+//import org.jboss.deployers.spi.DeploymentException;
+//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.portal.core.metadata.ServiceMetaData;
+//import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
+//
+///**
+// * This class injects portlet specific services into the war
+// *
+// * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+// * @version $Revision$
+// */
+//public class ServiceInjectorDeployer extends AbstractSimpleVFSRealDeployer<JBossApplicationMetaData>
+//{
+//
+// public ServiceInjectorDeployer()
+// {
+// super(JBossApplicationMetaData.class);
+// setStage(DeploymentStages.POST_PARSE);
+// }
+//
+// @Override
+// public void deploy(VFSDeploymentUnit unit, JBossApplicationMetaData deployment) throws DeploymentException
+// {
+// Iterator<ServiceMetaData> iterator = deployment.getServices().values().iterator();
+// while (iterator.hasNext())
+// {
+// ServiceMetaData serviceMD = iterator.next();
+// //TODO: finish this deployer. This deployer needs to inject the services into the portlet servlets
+// // need to figure out if this can be done with an xml file or if this is going to need to have
+// // access to the server like the tld deployer.
+// }
+// }
+//
+//
+//}
+//
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/WebAppContextDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/WebAppContextDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/WebAppContextDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -0,0 +1,115 @@
+/******************************************************************************
+ * 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.deployer.webapp;
+
+import java.lang.reflect.Method;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.servlet.ServletContext;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.web.WebApplication;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class WebAppContextDeployer extends AbstractDeployer
+{
+ protected MBeanServer server;
+ public static String PORTLET_APP_CONTEXT_PATH_ATTACHMENT = "portletAppContextPath." + String.class.getName();
+ public static String PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT = "portletAppServletContext." + ServletContext.class.getName();
+
+ public WebAppContextDeployer()
+ {
+ setAllInputs(false);
+ setInput(WebApplication.class);
+ setStage(DeploymentStages.INSTALLED);
+ addOutput(PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT);
+ addOutput(PORTLET_APP_CONTEXT_PATH_ATTACHMENT);
+ }
+
+ public void setMBeanServer(MBeanServer server)
+ {
+ this.server = server;
+ }
+
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ WebApplication webApp = unit.getAttachment(WebApplication.class);
+
+ ObjectName objectName = (ObjectName)webApp.getAppData();
+
+ try
+ {
+ Object standardContextObject = server.getAttribute(objectName, "managedResource");
+ String contextPath = getContextPath(standardContextObject);
+ ServletContext servletContext = getServletContext(standardContextObject);
+
+ unit.addAttachment(PORTLET_APP_CONTEXT_PATH_ATTACHMENT, contextPath, String.class);
+ unit.addAttachment(PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT, servletContext, ServletContext.class);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException ("Could not get the Standard Context for " + unit.getName());
+ }
+ }
+
+ //TODO: determine a better way to get the contextpath string
+ protected String getContextPath(Object standardContextObject) throws DeploymentException
+ {
+ try
+ {
+ Class standardContextClass = standardContextObject.getClass();
+ Method getPathMethod = standardContextClass.getMethod("getPath", new Class[0]);
+
+ return (String) getPathMethod.invoke(standardContextObject, new Object[0]);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error trying to get the ContextPath from the web server.", e);
+ }
+ }
+
+ // TODO: determine a better way to get the servlet context
+ protected ServletContext getServletContext(Object standardContextObject) throws DeploymentException
+ {
+ try
+ {
+ Class standardContextClass = standardContextObject.getClass();
+ Method getServletContextMethod = standardContextClass.getMethod("getServletContext", new Class[0]);
+
+ return (ServletContext) getServletContextMethod.invoke(standardContextObject, new Object[0]);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error trying to get Reference to the ServletContext from the web server.", e);
+ }
+ }
+
+}
+
Added: modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/WebAppDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/WebAppDeployer.java (rev 0)
+++ modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/webapp/WebAppDeployer.java 2009-03-02 19:30:58 UTC (rev 12922)
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * 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.deployer.webapp;
+
+import javax.management.MBeanServer;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.web.WebApplication;
+import org.jboss.web.deployers.AbstractWarDeployer;
+
+/**
+ * This class is used to get a WebApplication object for the deployed
+ * webapp.
+ * NOTE: that this class does not perform like a normal deployer, it is not
+ * metadata driven as the information required is not determined by the webapp's
+ * metadata but how it is deployed into the server.
+ * TODO: More research should be done to determine if this information can be more
+ * sanely extracted from the server.
+ *
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class WebAppDeployer extends AbstractDeployer
+{
+
+ protected AbstractWarDeployer warDeployer;
+
+ public WebAppDeployer()
+ {
+ setAllInputs(false);
+ setInput(PortletApplication10MetaData.class);
+ setOutput(WebApplication.class);
+ setStage(DeploymentStages.INSTALLED);
+ }
+
+ @Override
+ public int getRelativeOrder()
+ {
+ // must be set relative to the warDeployer as the data we
+ // need is only set after the webapp has been deployed.
+ return warDeployer.getRelativeOrder() + 1;
+ }
+
+ public void setWarDeployer(AbstractWarDeployer warDeployer)
+ {
+ this.warDeployer = warDeployer;
+ }
+
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ // the unit name of the deployed application is the string
+ // used to store the apps in the warDeployer
+ String name = unit.getName();
+ WebApplication webApp = warDeployer.getDeployedApp(name);
+ if (webApp == null)
+ {
+ throw new DeploymentException ("Could not find a deployed webapp with name " + name);
+ }
+ unit.addAttachment(WebApplication.class, webApp);
+ }
+
+}
+
Modified: modules/deployer/trunk/deployer/src/main/resources/deployment-aop.xml
===================================================================
--- modules/deployer/trunk/deployer/src/main/resources/deployment-aop.xml 2009-03-02 15:01:37 UTC (rev 12921)
+++ modules/deployer/trunk/deployer/src/main/resources/deployment-aop.xml 2009-03-02 19:30:58 UTC (rev 12922)
@@ -4,4 +4,9 @@
<trans-attribute>RequiresNew</trans-attribute>
</method>
</metadata>
+ <metadata tag="transaction" class="org.jboss.portal.deployer.container.ObjectDeployer">
+ <method name="deployObjects">
+ <trans-attribute>RequiresNew</trans-attribute>
+ </method>
+ </metadata>
</aop>
17 years, 2 months
JBoss Portal SVN: r12921 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: src/org/jboss/portal/test/selenium and 1 other directories.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-03-02 10:01:37 -0500 (Mon, 02 Mar 2009)
New Revision: 12921
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
Log:
[JBPORTAL-2308] locator fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-03-02 14:46:37 UTC (rev 12920)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-03-02 15:01:37 UTC (rev 12921)
@@ -72,6 +72,7 @@
<echo message="Compiling testsuite" />
<mkdir dir="${test.build.dir}" />
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" classpathref="libraries.cp" debug="on" />
+ <copy file="${test.src.dir}/org/jboss/portal/test/selenium/locator.properties" todir="${test.build.dir}/org/jboss/portal/test/selenium/"/>
</target>
<target name="run-src">
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-03-02 14:46:37 UTC (rev 12920)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-03-02 15:01:37 UTC (rev 12921)
@@ -65,6 +65,14 @@
InputStream is = cl.getResourceAsStream("org/jboss/portal/test/selenium/locator.properties");
Properties props = new Properties();
props.load(is);
+ if (props == null){
+ is = JBossPortalSeleniumTestCase.class.getResourceAsStream("org/jboss/portal/test/selenium/locator.properties");
+ props.load(is);
+ }
+ if (props == null){
+ // System.out.println("still null");
+ }
+
return props;
}
@@ -75,9 +83,10 @@
}
if (props == null) {
- //System.out.println("props null");
+ // System.out.println("props null");
return subst;
} else {
+// System.out.println("! props null");
return props.getProperty(prop) != null ? props.getProperty(prop) : subst;
}
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-03-02 14:46:37 UTC (rev 12920)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-03-02 15:01:37 UTC (rev 12921)
@@ -19,8 +19,7 @@
public static String casePfx = "portal.e2e.";
- public final String SEL_PORTLET_TYPE = getProp(casePfx + "sel.portlet.type",
- "_jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_viewRoot:windowForm:instanceId");
+ public final String SEL_PORTLET_TYPE = getProp(casePfx + "sel.portlet.type","//select[contains(@id,'windowForm:instanceId')]");
private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
private final String SUB_RENAME_PORTAL = getProp(casePfx + "sub.rename.portal", "//input[contains(@id,'renameForm:rename')]");
@@ -51,7 +50,7 @@
private final String PAG_TL_DISPLAY = getProp(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
private final String PAG_TL_DELETE = getProp(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
- private final String DIV_PORT_CONTENT = getProp(casePfx + "div.por.cont", "content-container");
+ private final String DIV_PORT_CONTENT = getProp(casePfx + "div.por.cont", "conrrerertent-container");
private final String INP_GOO_SEARCH = getProp(casePfx + "inp.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@name='query']");
private final String SUB_GOO_SEARCH = getProp(casePfx + "sup.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@type='submit']");
private final String INP_NET_SEARCH = getProp(casePfx + "inp.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@name='query']");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2009-03-02 14:46:37 UTC (rev 12920)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2009-03-02 15:01:37 UTC (rev 12921)
@@ -52,6 +52,12 @@
<class name="org.jboss.portal.test.selenium.portal.PortletInstancesTestCase"></class></classes>
</test>
+ <test name="org.jboss.portal.test.selenium.portal.PageCoordinationTestCase"
+ verbose="2" annotations="JDK">
+ <classes>
+ <class name="org.jboss.portal.test.selenium.portal.PageCoordinationTestCase"></class></classes>
+ </test>
+
<test name="org.jboss.portal.test.selenium.cms.CMSFileTestCase"
verbose="2" annotations="JDK">
<classes>
@@ -82,6 +88,18 @@
<class name="org.jboss.portal.test.selenium.cms.CMSArchiveUploadTestCase"></class></classes>
</test>
+ <test name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase"
+ verbose="2" annotations="JDK">
+ <classes>
+ <class name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase"></class></classes>
+ </test>
+
+ <test name="org.jboss.portal.test.selenium.EndToEndBeaPortlet"
+ verbose="2" annotations="JDK">
+ <classes>
+ <class name="org.jboss.portal.test.selenium.EndToEndBeaPortlet"></class></classes>
+ </test>
+
<listeners>
<!-- <listener class-name="org.testng.reporters.JUnitXMLReporter"></listener> -->
<listener class-name="org.jboss.portal.test.selenium.JBossSeleniumTestListener"/>
17 years, 2 months