Author: mwringe
Date: 2009-03-06 18:21:38 -0500 (Fri, 06 Mar 2009)
New Revision: 12973
Added:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/images/logo-small-blue.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/js/login.js
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/HasDisplayName.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource_ja.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource_pt_BR.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ja.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_pt_BR.properties
Removed:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ru.properties
Modified:
branches/JBoss_Portal_AS5_Deployer/core/build.xml
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/css/login.css
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/common/portlet-editor.css
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_left.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_admin.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_current.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_hover2.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_right.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_admin.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_current.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_hover2.gif
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renewal/portal_style.css
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/aspects/server/UserInterceptor.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/classic/ClassicResponseHandler.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/command/response/StreamContentResponse.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/handler/HTTPResponse.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeImpl.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/mail/MailModuleImpl.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/instance/Instance.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalObjectMetaData.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/navstate/PortalObjectNavigationalStateContext.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/modules/MailModule.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/portlet/PortletRequestDecoder.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/identity/profile-config.xml
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIf01.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testInclude01.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testInclude03.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate01.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate02.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate03.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testTaglib01.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testTaglib02.jsp
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/login.jsp
Log:
Merge JBoss_Portal_Branch_2_7 changes (rev range 12254:12964) into
JBoss_Portal_AS5_Deployer branch
Modified: branches/JBoss_Portal_AS5_Deployer/core/build.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/build.xml 2009-03-06 23:21:14 UTC (rev 12972)
+++ branches/JBoss_Portal_AS5_Deployer/core/build.xml 2009-03-06 23:21:38 UTC (rev 12973)
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
- ~ contributors as indicated by the @authors tag. See the ~
- ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~
- ~ ~
- ~ This is free software; you can redistribute it and/or modify it ~
- ~ under the terms of the GNU Lesser General Public License as ~
- ~ published by the Free Software Foundation; either version 2.1 of ~
- ~ the License, or (at your option) any later version. ~
- ~ ~
- ~ This software is distributed in the hope that it will be useful, ~
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
- ~ Lesser General Public License for more details. ~
- ~ ~
- ~ You should have received a copy of the GNU Lesser General Public ~
- ~ License along with this software; if not, write to the Free ~
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ Copyright 2009, 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. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -589,8 +589,8 @@
outfile="TEST-PortalNodeTestCase">
<parameter name="CacheNaturalId" value="true"/>
<parameter name="Config"
value="persistent-jboss-beans.xml"/>
- </zest>
- <!--
+ </zest>
+ <!--
<zest todir="${test.reports}"
name="org.jboss.portal.test.core.model.portal.PortalNodeTestCase"
outfile="TEST-PortalObjectContainerTestCase">
<parameter name="CacheNaturalId" value="true"/>
@@ -602,6 +602,11 @@
<parameter name="CacheNaturalId" value="true"/>
<parameter name="Config"
value="persistent-jboss-beans.xml"/>
</zest>
+ <zest todir="${test.reports}"
name="org.jboss.portal.test.core.model.portal.PortalObjectTestCase"
+ outfile="TEST-PortalObjectTestCase">
+ <parameter name="CacheNaturalId" value="true"/>
+ <parameter name="Config"
value="persistent-jboss-beans.xml"/>
+ </zest>
<zest todir="${test.reports}"
name="org.jboss.portal.test.core.model.portal.coordination.CoordinationServiceTestCase"
outfile="TEST-CoordinationServiceTestCase">
<parameter name="CacheNaturalId" value="true"/>
@@ -716,10 +721,12 @@
-->
<target name="one-test" depends="init" if="test"
description="Run a single unit test">
<property name="build.testlog"
value="${module.output}/log"/>
+ <property name="test.reports"
value="${module.output}/tests"/>
<mkdir dir="${build.reports}"/>
<mkdir dir="${build.testlog}"/>
-
+ <mkdir dir="${test.reports}"/>
+
<junit printsummary="yes" showoutput="yes"
dir="${module.output}">
<!--jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006" /-->
Modified: branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/css/login.css
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/css/login.css 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/css/login.css 2009-03-06
23:21:38 UTC (rev 12973)
@@ -20,6 +20,17 @@
position: absolute;
}
+input.disabled-button {
+ background-color: #9db3cf;
+ border-color: #c5d7df #8598ab #8598ab #c5d7df;
+ border-style: solid;
+ border-width: 1px;
+ color: #FFFFFF;
+ font-size: 10px;
+ font-weight: bold;
+ position: absolute;
+}
+
input.login-button {
bottom: 25px;
right: 90px;
@@ -33,14 +44,16 @@
}
div.login-container div.login-header {
- background-image: url( ../images/modal/login-header-bg.gif );
- background-position: top left;
- background-repeat: repeat-x;
+ background: url(../themes/renewal/images/header-bg-left-shadow2.gif) repeat-x top
left;
width: 255px;
- height: 27px;
+ height: 30px;
text-align: left;
}
+div.login-container div.login-header img {
+ margin: 5px 0 0 5px;
+}
+
div.login-container div.login-header h2 {
color: #fff;
font-weight: bold;
@@ -51,12 +64,12 @@
}
div.login-container div.login-content {
- background-image: url( ../images/modal/login-content-bg.gif );
- background-position: top left;
- background-repeat: repeat-x;
+ background: url(../images/modal/login-content-bg.gif) repeat-x top left;
width: 255px;
font-weight: bold;
text-align: right;
+ padding: 0;
+
}
div.login-container div.login-content div.form-field {
@@ -77,4 +90,8 @@
div.button-container{
height: 50px;
position: relative;
+}
+
+div.form-field .highlight {
+ border: 2px solid #6a9cd4;
}
\ No newline at end of file
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/images/logo-small-blue.gif
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/images/logo-small-blue.gif)
===================================================================
(Binary files differ)
Copied: branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/js/login.js (from
rev 12964, branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/js/login.js)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/js/login.js
(rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/js/login.js 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,143 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, 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. *
+ ******************************************************************************/
+
+if (typeof JBossPortal == 'undefined') {
+ var JBossPortal = {
+ login : { }
+ };
+}
+
+JBossPortal.login = function() {
+
+ //namespace login functions and variables
+ var isModal = true;
+
+ /**
+ * Delay for a number of milliseconds
+ */
+ function sleep(delay)
+ {
+ var start = new Date().getTime();
+ while (new Date().getTime() < start + delay);
+ }
+
+ return{
+ /**
+ * Gets the current display status of the login box (modal or page) sets global
variable and
+ * performs dynamic rendering options for login box
+ *
+ * @public
+ * @type Function
+ * @name displayStatus
+ * @return {void}
+ */
+ displayStatus : function() {
+ if (window.parent.frames.length >= 1)
+ {
+ //loaded as modal
+ }
+ else
+ {
+ isModal = false;
+ try
+ {
+ if (document.getElementById('login-content').scrollHeight
> 0)
+ {
+ document.body.style.paddingTop =
((document.documentElement.clientHeight / 2) -
document.getElementById('login-content').scrollHeight) + 'px';
+ }
+ }
+ catch(e)
+ {
+ //swallow
+ }
+ //give the cancel button back button functionality (hackish) but there is
no other way
+ //to get returning page
+ document.getElementById('login-cancel').onclick = function()
+ {
+ self.history.go(-1);
+ };
+ document.getElementById('login-submit').style.right =
'';
+ }
+ },
+
+ /**
+ * set focus on username
+ *
+ * @public
+ * @type Function
+ * @name setFocusOnLoginForm
+ * @return {void}
+ */
+ setFocusOnLoginForm : function() {
+ try
+ {
+ document.loginform.j_username.focus();
+ highlightField(document.getElementById('j_username'));
+ }
+ catch (e)
+ {
+ }
+
+ },
+
+ /**
+ * simple validate login fields and disable submit
+ *
+ * @public
+ * @type Function
+ * @name validate
+ * @return {void}
+ */
+ validate : function(delay) {
+ try
+ {
+ //delay for cached browser credentials
+ if (delay != undefined) {
+ sleep(delay);
+ }
+ if (document.getElementById('j_username').value.length < 1 ||
document.getElementById('j_password').value.length < 1) {
+ document.getElementById('login-submit').disabled = true;
+ document.getElementById('login-submit').className =
'login-button disabled-button';
+ } else {
+ document.getElementById('login-submit').disabled = false;
+ document.getElementById('login-submit').className =
'login-button';
+ }
+ }
+ catch (e)
+ {
+ }
+
+ },
+
+ highlight : function(id) {
+ var el = document.getElementById(id);
+ if (el.className != 'highlight') {
+ el.className = 'highlight';
+ }
+ else {
+ el.className = '';
+ }
+ }
+ };
+
+}();
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/common/portlet-editor.css
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/common/portlet-editor.css 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/common/portlet-editor.css 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,8 +1,8 @@
.portlet-editor-content {
height:300px;
width:500px;
- overflow: auto;
overflow-x: hidden;
+ overflow-y: scroll;
border: 1px solid #333;
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_left.gif
===================================================================
(Binary files differ)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_admin.gif
===================================================================
(Binary files differ)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_current.gif
===================================================================
(Binary files differ)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_left_hover2.gif
===================================================================
(Binary files differ)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_right.gif
===================================================================
(Binary files differ)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_admin.gif
===================================================================
(Binary files differ)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_current.gif
===================================================================
(Binary files differ)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renaissance/images/tab_right_hover2.gif
===================================================================
(Binary files differ)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renewal/portal_style.css
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/bin/portal-core-war/themes/renewal/portal_style.css 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,5 @@
-
@import url("/portal-core/themes/common/portlet-editor.css");
-@import url( "../common/tooltip.css" );
+@import url("../common/tooltip.css");
/* *************************************************** */
/* Default for JBoss Portal */
@@ -13,11 +12,10 @@
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #656565;
- background-image: url( images/header-bg2.gif );
+ background-image: url(images/header-bg2.gif);
background-repeat: repeat-x;
}
-
/*****************
* Portal Header *
******************/
@@ -42,8 +40,7 @@
/* Header background */
#header {
- height: 64px;
- /*background-image: url( 'images/header-bg-left-shadow.gif' );*/
+ height: 64px; /*background-image: url( 'images/header-bg-left-shadow.gif'
);*/
background-position: top left;
background-repeat: no-repeat;
width: 100%;
@@ -54,13 +51,13 @@
}
#logoName {
- background-image: url( images/JBP-logo-white.gif );
+ background-image: url(images/JBP-logo-white.gif);
background-repeat: no-repeat;
float: left;
width: 250px;
height: 27px;
position: absolute;
- left: 29px;
+ left: 7px;
top: 3px;
}
@@ -73,8 +70,8 @@
#portal-container {
/* part of below IE hack to preserve min-width for portlet regions */
/*width: 100%;*/
- /*margin: 4px 2% 0px 2%;*/
- background-image: url( 'images/header-bg-left-shadow2.gif' );
+/*margin: 4px 2% 0px 2%;*/
+ background-image: url('images/header-bg-left-shadow2.gif');
background-position: top left;
background-repeat: no-repeat;
padding: 0 350px 0 350px;
@@ -82,7 +79,7 @@
/* min width for IE */
#expander {
- /*position: relative;*/
+ position: relative;
padding: 0 0 0 0;
margin: 0 -327px 0 -327px;
@@ -172,12 +169,10 @@
#regionA {
/* test to swap columns...
float: right; */
-
- width: 30%;
+ width: 35%;
float: left;
margin: 0px;
- padding: 0px;
- min-width: 250px; /*height: 300px;*/
+ padding: 0px; /*height: 300px;*/
}
#regionB {
@@ -187,7 +182,7 @@
/*two column layout
margin: 0 0 0 30%;*/
padding: 0px; /* test to add 3rd region in layout...*/
- width: 67%;
+ width: 62%;
float: left; /*height: 300px;*/
}
@@ -215,8 +210,6 @@
/* used to clear float in regionA,B,C divs so that
footer spans bottom of page */
-/* used to clear float in regionA,B,C divs so that
-footer spans bottom of page */
hr.cleaner {
clear: both;
height: 1px;
@@ -231,62 +224,86 @@
*****************************/
div#navigation {
- position:relative;
+ position: relative;
width: 100%;
height: 64px;
}
ul#tabsHeader {
- width: 100%;
list-style: none;
- margin: 0;
+ margin: 0 0 -5px 0;
padding: 0;
- position:absolute;
+ position: absolute;
+ bottom: 0px;
+ left: 0;
+ min-width: 550px;
+ z-index: 10;
+}
+
+* html ul#tabsHeader {
+ list-style: none;
+ margin: 0 0 -5px 0;
+ padding: 0;
+ position: absolute;
bottom: -5px;
left: 0;
- z-index: 1;
+ min-width: 550px;
+ z-index: 10;
}
ul#tabsHeader li {
+ display: inline;
float: left;
height: 29px;
font-family: Lucida, Tahoma, Verdana, sans-serif;
font-size: 12px;
margin: 0 1px 0 1px;
position: relative;
+ white-space: nowrap;
}
ul#tabsHeader li,
-ul#tabsHeader li#current{
+ ul#tabsHeader li#current {
background-position: top right;
background-repeat: no-repeat;
}
-ul#tabsHeader li a,
-ul#tabsHeader li#current a{
+ul#tabsHeader li a {
background-position: top left;
background-repeat: no-repeat;
+ padding: 5px 10px 0 10px;
+ display: block;
+ height: 29px;
+ font-weight: bold;
+ width: 55px;
+ white-space: nowrap;
+}
+
+ul#tabsHeader li#current a {
+ background-position: top left;
+ background-repeat: no-repeat;
padding: 5px 15px 0 15px;
display: block;
height: 29px;
font-weight: bold;
+ white-space: nowrap;
}
ul#tabsHeader li#current {
- background-image: url( 'images/nav-active-right2.gif' );
+ background-image: url('images/nav-active-right2.gif');
}
-ul#tabsHeader li#current a{
- background-image: url( 'images/nav-active-left.gif' );
+ul#tabsHeader li#current a {
+ background-image: url('images/nav-active-left.gif');
color: #2c2c2c;
}
ul#tabsHeader li {
- background-image: url( 'images/nav-inactive-right2.gif' );
+ background-image: url('images/nav-inactive-right2.gif');
}
-ul#tabsHeader li a{
- background-image: url( 'images/nav-inactive-left.gif' );
+ul#tabsHeader li a {
+ background-image: url('images/nav-inactive-left.gif');
color: #113266;
}
@@ -304,6 +321,7 @@
margin: 0px;
padding: 0px;
margin-top: 28px;
+ z-index: 10;
}
ul#tabsHeader ul a {
@@ -339,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;
@@ -358,14 +376,13 @@
background: #C0D3DC;
}
-
/* End Submenu selectors */
/* -------- These are new selectors for the admin and add page styles ------- */
ul#tabsHeader #admin {
display: inline;
- background-image: url( images/tab_right_admin.gif );
+ background-image: url(images/tab_right_admin.gif);
background-repeat: no-repeat;
background-position: right top;
padding-top: -3px;
@@ -430,9 +447,9 @@
*****************************/
#dashboardnav {
- /*float: right;*/
- position:absolute;
- top:0;
+/*float: right;*/
+ position: absolute;
+ top: 0;
right: 15px;
font-size: 10px;
padding: 6px 12px 0px 0px;
@@ -445,7 +462,7 @@
}
#dashboardnav .addcontent {
- background-image: url( images/ico_addcontent.gif );
+ background-image: url(images/ico_addcontent.gif);
background-repeat: no-repeat;
background-position: left;
height: 20px;
@@ -464,14 +481,17 @@
/* wrapper for floating portlet window modes */
.portlet-mode-container {
white-space: nowrap;
- float:right;
+ float: right;
+ padding: 2px 0 0 0;
+ /*position: relative;*/
+ /*z-index: 1;*/
}
.mode-button {
- /*position:absolute;*/
+/*position:absolute;*/
margin-right: 3px;
- padding-top:5px;
- float:left;
+ padding-top: 5px;
+ float: left;
}
.portlet-titlebar-title {
@@ -480,14 +500,13 @@
font-size: 12px;
font-weight: bold;
white-space: nowrap;
- line-height: 100%;
+ line-height: 20px;
float: left;
text-indent: 5px;
- padding-top: 5px;
+ padding-top: 4px;
padding-bottom: 6px;
- width:65%;
- display:block;
- margin-right:10px;
+ display: block;
+ margin-right: 10px;
}
/* ------ NOT CURRENTLY IN USE FOR NEW 2.6 FUNCTIONALITY -------
@@ -495,7 +514,7 @@
*/
.portlet-titlebar-left {
- background-image: url( images/portlet-top-left2.gif );
+ background-image: url(images/portlet-top-left2.gif);
background-repeat: no-repeat;
width: 9px;
height: 29px;
@@ -504,15 +523,15 @@
}
.portlet-titlebar-center {
- background-image: url( images/portlet-top-middle2.gif );
+ background-image: url(images/portlet-top-middle2.gif);
background-repeat: repeat-x;
height: 29px;
background-position: bottom;
- position:relative;
+ position: relative;
}
.portlet-titlebar-right {
- background-image: url( images/portlet-top-right2.gif );
+ background-image: url(images/portlet-top-right2.gif);
background-repeat: no-repeat;
width: 10px;
height: 30px;
@@ -521,7 +540,7 @@
}
.portlet-content-left {
- background-image: url( images/portlet-left-vertical.gif );
+ background-image: url(images/portlet-left-vertical.gif);
background-repeat: repeat-y;
width: 9px;
min-width: 9px;
@@ -545,7 +564,7 @@
}
.portlet-content-right {
- background-image: url( images/portlet-right-vertical.gif );
+ background-image: url(images/portlet-right-vertical.gif);
height: 100%;
background-repeat: repeat-y;
background-position: left;
@@ -561,7 +580,7 @@
}
.portlet-footer-left {
- background-image: url( images/portlet-bottom-left.gif );
+ background-image: url(images/portlet-bottom-left.gif);
width: 9px;
height: 4px;
background-repeat: no-repeat;
@@ -578,7 +597,7 @@
}
.portlet-footer-center {
- background-image: url( images/portlet-bottom-middle.gif );
+ background-image: url(images/portlet-bottom-middle.gif);
height: 4px;
background-repeat: repeat-x;
/* background-color:#FFFFFF;
@@ -588,7 +607,7 @@
}
.portlet-footer-right {
- background-image: url( images/portlet-bottom-right.gif );
+ background-image: url(images/portlet-bottom-right.gif);
width: 5px;
height: 4px;
background-repeat: no-repeat;
@@ -605,7 +624,7 @@
* Portlet Window Modes *
************************/
.portlet-mode-maximized {
- background-image: url( images/ico_16_maximize.gif );
+ background-image: url(images/ico_16_maximize.gif);
background-repeat: no-repeat;
width: 16px;
height: 16px;
@@ -620,7 +639,7 @@
}
.portlet-mode-minimized {
- background-image: url( images/ico_16_minimize.gif );
+ background-image: url(images/ico_16_minimize.gif);
background-repeat: no-repeat;
width: 16px;
height: 16px;
@@ -635,7 +654,7 @@
}
.portlet-mode-normal {
- background-image: url( images/ico_16_normal.gif );
+ background-image: url(images/ico_16_normal.gif);
width: 16px;
height: 16px;
background-repeat: no-repeat;
@@ -650,7 +669,7 @@
}
.portlet-mode-help {
- background-image: url( images/ico_16_help.gif );
+ background-image: url(images/ico_16_help.gif);
width: 16px;
height: 16px;
background-repeat: no-repeat;
@@ -665,7 +684,7 @@
}
.portlet-mode-edit {
- background-image: url( images/ico_edit.gif );
+ background-image: url(images/ico_edit.gif);
background-repeat: no-repeat;
width: 28px;
height: 16px;
@@ -680,7 +699,7 @@
}
.portlet-mode-admin {
- background-image: url( images/ico_admin.gif );
+ background-image: url(images/ico_admin.gif);
background-repeat: no-repeat;
width: 16px;
height: 16px;
@@ -695,7 +714,7 @@
}
.portlet-mode-remove {
- background-image: url( images/ico_16_remove.gif );
+ background-image: url(images/ico_16_remove.gif);
background-repeat: no-repeat;
width: 16px;
height: 16px;
@@ -710,7 +729,7 @@
}
.portlet-mode-view {
- background-image: url( images/ico_cancel.gif );
+ background-image: url(images/ico_cancel.gif);
background-repeat: no-repeat;
width: 28px;
height: 16px;
@@ -726,7 +745,7 @@
}
.portlet-mode-reload {
- background-image: url( images/ico_16_reload.gif );
+ background-image: url(images/ico_16_reload.gif);
background-repeat: no-repeat;
width: 16px;
height: 16px;
@@ -741,7 +760,7 @@
}
.portlet-mode-hide {
- background-image: url( images/ico_16_swizzleclosed.gif );
+ background-image: url(images/ico_16_swizzleclosed.gif);
background-repeat: no-repeat;
width: 16px;
height: 16px;
@@ -912,14 +931,14 @@
}
/* Text for form field labels */
-.portlet-form-field-label{
+.portlet-form-field-label {
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
color: #000;
white-space: nowrap
}
-.provider-menu-container{
- padding:10px;
+.provider-menu-container {
+ padding: 10px;
}
/* Text for a form field */
@@ -1212,7 +1231,7 @@
a.addicon {
font-weight: bold;
- background-image: url( images/ico_addcontent.gif );
+ background-image: url(images/ico_addcontent.gif);
background-repeat: no-repeat;
background-position: left;
padding-left: 16px;
@@ -1287,7 +1306,7 @@
.pagination li.nextpage {
font-weight: bold;
- background-image: url( images/ico_arrow_blue_right.gif );
+ background-image: url(images/ico_arrow_blue_right.gif);
background-repeat: no-repeat;
background-position: left;
margin-left: 3px;
@@ -1297,7 +1316,7 @@
.pagination li.nextpagedisabled {
color: #656565;
font-weight: bold;
- background-image: url( images/ico_arrow_grey_right.gif );
+ background-image: url(images/ico_arrow_grey_right.gif);
background-repeat: no-repeat;
background-position: left;
margin-left: 3px;
@@ -1307,7 +1326,7 @@
.pagination li.previouspage {
font-weight: bold;
- background-image: url( images/ico_arrow_blue_left.gif );
+ background-image: url(images/ico_arrow_blue_left.gif);
background-repeat: no-repeat;
background-position: right;
padding-left: 10px;
@@ -1318,7 +1337,7 @@
.pagination li.previouspagedisabled {
font-weight: bold;
color: #656565;
- background-image: url( images/ico_arrow_grey_left.gif );
+ background-image: url(images/ico_arrow_grey_left.gif);
background-repeat: no-repeat;
background-position: right;
padding-left: 12px;
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/aspects/server/UserInterceptor.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/aspects/server/UserInterceptor.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/aspects/server/UserInterceptor.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -22,18 +22,10 @@
******************************************************************************/
package org.jboss.portal.core.aspects.server;
-import java.security.Principal;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.servlet.http.HttpServletRequest;
-
import org.jboss.logging.Logger;
import org.jboss.portal.common.invocation.AttributeResolver;
import org.jboss.portal.common.invocation.InvocationException;
+import org.jboss.portal.common.p3p.P3PConstants;
import org.jboss.portal.identity.CachedUserImpl;
import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.User;
@@ -42,6 +34,14 @@
import org.jboss.portal.server.ServerInterceptor;
import org.jboss.portal.server.ServerInvocation;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.servlet.http.HttpServletRequest;
+import java.security.Principal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* The interceptor is responsible for managing the user identity lifecycle based on the
principal name returned by the
* <code>HttpServletRequest.getUserPrincipal()</code> method.
@@ -148,7 +148,10 @@
// Set Last login date
getUserProfileModule().setProperty(user, User.INFO_USER_LAST_LOGIN_DATE,
"" + new Date().getTime());
-
+
+ // Set login id
+ getUserProfileModule().setProperty(user, P3PConstants.INFO_USER_LOGIN_ID,
userName);
+
// Get profile
profile = getUserProfileModule().getProperties(user);
@@ -163,8 +166,8 @@
// Cache
invocation.getContext().setAttribute(ServerInvocation.PRINCIPAL_SCOPE,
PROFILE_KEY, profile);
-
-
+
+
}
//
@@ -188,7 +191,7 @@
}
try
- {
+ {
// Continue the invocation
invocation.invokeNext();
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -20,6 +20,7 @@
* 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.core.controller.ajax;
import org.apache.log4j.Logger;
@@ -29,13 +30,13 @@
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.ControllerResponse;
-import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
-import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
import org.jboss.portal.core.controller.handler.AjaxResponse;
import org.jboss.portal.core.controller.handler.CommandForward;
import org.jboss.portal.core.controller.handler.HandlerResponse;
import org.jboss.portal.core.controller.handler.ResponseHandler;
import org.jboss.portal.core.controller.handler.ResponseHandlerException;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
@@ -47,9 +48,9 @@
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.command.response.PortletWindowActionResponse;
import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
-import org.jboss.portal.core.model.portal.command.response.UpdateWindowResponse;
import org.jboss.portal.core.model.portal.command.view.ViewPageCommand;
import org.jboss.portal.core.model.portal.content.WindowRendition;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateChange;
import org.jboss.portal.core.navstate.NavigationalStateContext;
@@ -70,10 +71,13 @@
import org.jboss.portal.theme.render.ThemeContext;
import org.jboss.portal.web.ServletContextDispatcher;
+import javax.xml.namespace.QName;
import java.io.StringWriter;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Map;
import java.util.Set;
/**
@@ -86,36 +90,6 @@
*/
public class AjaxResponseHandler implements ResponseHandler
{
-
- // Detect any change that would require a total refresh
-// HttpServletRequest req = invocation.getServerContext().getClientRequest();
-// String clientViewId = req.getHeader("view_id");
-// if (clientViewId != null)
-// {
-// PortalObjectNavigationalStateContext ctx =
(PortalObjectNavigationalStateContext)controllerContext.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
-// String serverViewId = ctx.getViewId();
-// if (!clientViewId.equals(serverViewId))
-// {
-// // todo : that will not work for FORMS submissions, we need a response for
the client
-// // to tell to do the request the normal way
-// try
-// {
-// UpdatePageLocationResponse dresp = new
UpdatePageLocationResponse(req.getRequestURL().toString());
-// AjaxResponse aresp = new AjaxResponse(dresp);
-// aresp.sendResponse(invocation.getServerContext());
-// }
-// catch (IOException e)
-// {
-// e.printStackTrace();
-// }
-// catch (ServletException e)
-// {
-// e.printStackTrace();
-// }
-// return;
-// }
-// }
-
/** . */
private static final Logger log = Logger.getLogger(AjaxResponseHandler.class);
@@ -171,22 +145,11 @@
}
}
else if (controllerResponse instanceof UpdatePageResponse)
-// {
-// UpdatePageResponse upr = (UpdatePageResponse)controllerResponse;
-// ViewPageCommand rpc = new ViewPageCommand(upr.getPageId());
-// String url = controllerContext.renderURL(rpc, null, null);
-// UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(url);
-// return new AjaxResponse(dresp);
-// }
-// else if (controllerResponse instanceof UpdateWindowResponse)
{
UpdatePageResponse upw = (UpdatePageResponse)controllerResponse;
- // Obtain page and portal
-// final Window window =
(Window)portalObjectContainer.getObject(upw.getWindowId());
-// Page page = (Page)window.getParent();
+ // Obtain page
final Page page = (Page)portalObjectContainer.getObject(upw.getPageId());
-
//
NavigationalStateContext ctx =
(NavigationalStateContext)controllerContext.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
@@ -197,68 +160,93 @@
// Whether we need a full refresh or not
boolean fullRefresh = false;
- //
-
+ // in case we have we have a page navigational state...
+ Map<String, String[]> parameters = null;
+
if (ctx.getChanges() == null)
{
fullRefresh = true;
}
else
{
-
- for (Iterator i = ctx.getChanges(); i.hasNext();)
- {
- NavigationalStateChange change = (NavigationalStateChange)i.next();
- // A change that modifies potentially the page structure
- if (!(change instanceof NavigationalStateObjectChange))
+ for (Iterator i = ctx.getChanges(); i.hasNext();)
{
- fullRefresh = true;
- break;
- }
- NavigationalStateObjectChange update =
(NavigationalStateObjectChange)change;
-/*
- // A change that modifies potentially the page structure
- if (update.getType() != NavigationalStateObjectChange.UPDATE)
- {
- fullRefresh = true;
- break;
- }
-*/
- // Get the state key
- NavigationalStateKey key = update.getKey();
+ NavigationalStateChange change = (NavigationalStateChange)i.next();
- // We consider only portal object types
- if (key.getType() == WindowNavigationalState.class)
- {
- // Get old window state
- WindowNavigationalState oldNS =
(WindowNavigationalState)update.getOldValue();
- WindowState oldWindowState = oldNS != null ? oldNS.getWindowState() :
null;
+ // A change that modifies potentially the page structure
+ if (!(change instanceof NavigationalStateObjectChange))
+ {
+ fullRefresh = true;
+ break;
+ }
+ NavigationalStateObjectChange update =
(NavigationalStateObjectChange)change;
- // Get new window state
- WindowNavigationalState newNS =
(WindowNavigationalState)update.getNewValue();
- WindowState newWindowState = newNS != null ? newNS.getWindowState() :
null;
+ // Get the state key
+ NavigationalStateKey key = update.getKey();
- // Check if window state requires a refresh
- if (WindowState.MAXIMIZED.equals(oldWindowState))
+ // We consider only portal object types
+ Class type = key.getType();
+ if (type == WindowNavigationalState.class)
{
- if (!WindowState.MAXIMIZED.equals(newWindowState))
+ // Get old window state
+ WindowNavigationalState oldNS =
(WindowNavigationalState)update.getOldValue();
+ WindowState oldWindowState = oldNS != null ? oldNS.getWindowState() :
null;
+
+ // Get new window state
+ WindowNavigationalState newNS =
(WindowNavigationalState)update.getNewValue();
+ WindowState newWindowState = newNS != null ? newNS.getWindowState() :
null;
+
+ // Check if window state requires a refresh
+ if (WindowState.MAXIMIZED.equals(oldWindowState))
{
+ if (!WindowState.MAXIMIZED.equals(newWindowState))
+ {
+ fullRefresh = true;
+ break;
+ }
+ }
+ else if (WindowState.MAXIMIZED.equals(newWindowState))
+ {
fullRefresh = true;
break;
}
+
+ // Collect the dirty window id
+ dirtyWindowIds.add(key.getId());
}
- else if (WindowState.MAXIMIZED.equals(newWindowState))
+ else if (type == PageNavigationalState.class)
{
+ // force full refresh for now... for JBPORTAL-2326
fullRefresh = true;
- break;
- }
- // Collect the dirty window id
- dirtyWindowIds.add(key.getId());
+ // TODO: implement proper propagation of PRPs and events
+ PageNavigationalState pns =
(PageNavigationalState)update.getNewValue();
+
+ if (pns != null)
+ {
+
+ // todo: fix-me, this is a hack to copy PRPs when we force the full
refresh as parameters to ViewPageCommand...
+ Map<QName, String[]> qNameMap = pns.getParameters();
+ if (qNameMap != null && !qNameMap.isEmpty())
+ {
+ parameters = new HashMap<String,
String[]>(qNameMap.size());
+
+ for (Map.Entry<QName, String[]> entry :
qNameMap.entrySet())
+ {
+ parameters.put(entry.getKey().toString(), entry.getValue());
+ }
+ }
+
+ /*CoordinationManager coordinationManager =
controllerContext.getController().getCoordinationManager();
+ for (QName qName : pns.getParameters().keySet())
+ {
+ //
+ }*/
+ }
+ }
}
}
- }
// Commit changes
ctx.applyChanges();
@@ -267,10 +255,13 @@
if (!fullRefresh)
{
ArrayList<PortalObject> refreshedWindows = new
ArrayList<PortalObject>();
- for (PortalObject child : page.getChildren(PortalObject.WINDOW_MASK))
+
+ for (Object dirtyWindowId : dirtyWindowIds)
{
- PortalObjectId childId = child.getId();
- if (dirtyWindowIds.contains(childId))
+ PortalObjectId poid = (PortalObjectId)dirtyWindowId;
+ String windowName = poid.getPath().getLastComponentName();
+ PortalObject child = page.getChild(windowName, Window.class);
+ if (child != null)
{
refreshedWindows.add(child);
}
@@ -315,12 +306,6 @@
{
WindowContext wc = wcf.createWindowContext(refreshedWindow,
rendition);
-// WindowContext wc = new WindowContext(
-//
_window.getId().toString(PortalObjectPath.LEGACY_BASE64_FORMAT),
-// _window.getProperty(ThemeConstants.PORTAL_PROP_REGION),
-// "0",
-// windowResult);
-
//
res.addWindowContext(wc);
@@ -390,7 +375,17 @@
}
// We perform a full refresh
- ViewPageCommand rpc = new ViewPageCommand(page.getId());
+ ViewPageCommand rpc;
+ if (parameters == null)
+ {
+ rpc = new ViewPageCommand(page.getId());
+ }
+ else
+ {
+ // if we have parameters from a PNS, feed them to ViewPageCommand (this is
rather hackish)
+ rpc = new ViewPageCommand(page.getId(), parameters);
+ }
+
String url = controllerContext.renderURL(rpc, null, null);
UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(url);
return new AjaxResponse(dresp);
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/classic/ClassicResponseHandler.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/classic/ClassicResponseHandler.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/classic/ClassicResponseHandler.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -73,9 +73,8 @@
ControllerCommand command,
ControllerResponse commandResponse) throws ResponseHandlerException
{
- for (int i = 0; i < handlers.length; i++)
+ for (ResponseHandler handler : handlers)
{
- ResponseHandler handler = handlers[i];
HandlerResponse handlerResponse =
handler.processCommandResponse(controllerContext, command, commandResponse);
if (handlerResponse != null)
{
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -129,11 +129,11 @@
if (scr.getInputStream() != null)
{
- return HTTPResponse.sendBinary(scr.getContentType(), scr.getLastModified(),
scr.getInputStream());
+ return HTTPResponse.sendBinary(scr.getContentType(), scr.getLastModified(),
scr.getProperties(), scr.getInputStream());
}
else
{
- return HTTPResponse.sendBinary(scr.getContentType(), scr.getLastModified(),
scr.getReader());
+ return HTTPResponse.sendBinary(scr.getContentType(), scr.getLastModified(),
scr.getProperties(), scr.getReader());
}
}
else if (controllerResponse instanceof SecurityErrorResponse)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/command/response/StreamContentResponse.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/command/response/StreamContentResponse.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/command/response/StreamContentResponse.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -22,10 +22,13 @@
******************************************************************************/
package org.jboss.portal.core.controller.command.response;
+import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.core.controller.ControllerResponse;
+import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.Reader;
+import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -47,6 +50,9 @@
/** . */
private final InputStream inputStream;
+
+ /** . */
+ private MultiValuedPropertyMap<String> properties;
/** . */
private final Reader reader;
@@ -87,6 +93,22 @@
this.reader = reader;
}
+ public StreamContentResponse(String contentType,
+ MultiValuedPropertyMap<String> properties,
+ ByteArrayInputStream inputStream) {
+
+ this(contentType, -1, inputStream);
+ this.properties = properties;
+ }
+
+ public StreamContentResponse(String contentType,
+ MultiValuedPropertyMap<String> properties,
+ Reader reader) {
+ this(contentType, -1, reader);
+ this.properties = properties;
+ }
+
+
public String getContentType()
{
return contentType;
@@ -106,4 +128,9 @@
{
return reader;
}
+
+ public MultiValuedPropertyMap<String> getProperties()
+ {
+ return properties;
+ }
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/handler/HTTPResponse.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/handler/HTTPResponse.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/handler/HTTPResponse.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.handler;
import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.server.ServerInvocationContext;
import javax.servlet.ServletException;
@@ -32,6 +33,7 @@
import java.io.InputStream;
import java.io.Reader;
import java.io.Writer;
+import java.util.Map;
/**
* Response that sends a response to the http layer.
@@ -56,7 +58,7 @@
};
}
- public static HTTPResponse sendBinary(final String contentType, final long
lastModified, final InputStream in)
+ public static HTTPResponse sendBinary(final String contentType, final long
lastModified, final MultiValuedPropertyMap<String> properties, final InputStream
in)
{
return new HTTPResponse()
{
@@ -72,6 +74,17 @@
{
resp.addDateHeader("Last-Modified", lastModified);
}
+
+ if (properties != null)
+ {
+ for (String key: properties.keySet())
+ {
+ if (properties.getValue(key) != null)
+ {
+ resp.addHeader(key, properties.getValue(key));
+ }
+ }
+ }
//
ServletOutputStream sout = null;
@@ -89,7 +102,7 @@
};
}
- public static HTTPResponse sendBinary(final String contentType, final long
lastModified, final Reader reader)
+ public static HTTPResponse sendBinary(final String contentType, final long
lastModified, final MultiValuedPropertyMap<String> properties, final Reader reader)
{
return new HTTPResponse()
{
@@ -106,6 +119,17 @@
resp.addDateHeader("Last-Modified", lastModified);
}
+ if (properties != null)
+ {
+ for (String key: properties.keySet())
+ {
+ if (properties.getValue(key) != null)
+ {
+ resp.addHeader(key, properties.getValue(key));
+ }
+ }
+ }
+
//
Writer writer = null;
try
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -20,26 +20,27 @@
* 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.core.controller.portlet;
+import org.jboss.portal.core.CoreConstants;
+import org.jboss.portal.core.controller.coordination.CoordinationManager;
+import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.navstate.NavigationalStateContext;
import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.info.NavigationInfo;
import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.core.CoreConstants;
-import org.jboss.portal.core.navstate.NavigationalStateContext;
-import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.core.controller.coordination.CoordinationManager;
+import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
-import javax.xml.XMLConstants;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-import java.util.Collection;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
@@ -102,12 +103,10 @@
this.implicitMode =
getCoordinationManager().resolveParameterBindingImplicitModeEnabled(controllerContext.getPage());
}
- /**
- * Flush all updates to the navigational state context.
- */
+ /** Flush all updates to the navigational state context. */
public void flushUpdates()
{
-
+
if (windowPublicNavigationalStateUpdate != null && updates != null)
{
for (Map.Entry<String, HashMap<QName, String[]>> entry :
windowPublicNavigationalStateUpdate.entrySet())
@@ -125,7 +124,7 @@
{
Map<String, String[]> parameters = new HashMap<String,
String[]>();
-
+
for (Map.Entry<QName, String[]> value :
entry.getValue().entrySet())
{
parameters.put(value.getKey().toString(), value.getValue());
@@ -138,9 +137,8 @@
//
windowPublicNavigationalStateUpdate.clear();
+ }
- }
-
if (updates != null)
{
for (Map.Entry<String,
org.jboss.portal.core.model.portal.navstate.WindowNavigationalState> entry :
updates.entrySet())
@@ -193,13 +191,10 @@
//
pageUpdates.clear();
}
-
-
-
}
/**
- *
+ *
*/
public Set<String> getPortletWindowIds()
{
@@ -207,7 +202,7 @@
}
/**
- *
+ *
*/
public PortletWindowNavigationalState getPortletWindowNavigationalState(String
windowName) throws IllegalArgumentException
{
@@ -250,7 +245,7 @@
}
/**
- *
+ *
*/
public void setPortletWindowNavigationalState(String windowName,
PortletWindowNavigationalState windowNavigationalState) throws IllegalArgumentException,
IllegalStateException
{
@@ -286,13 +281,11 @@
initiateWindowPublicNavigationalStateUpdate();
}
- //
if (windowPublicNavigationalStateUpdate.get(windowName) == null)
{
windowPublicNavigationalStateUpdate.put(windowName, new HashMap<QName,
String[]>());
}
- //
windowPublicNavigationalStateUpdate.get(windowName).put(name, value);
}
@@ -307,13 +300,13 @@
{
value = windowPublicNavigationalStateUpdate.get(windowName).get(name);
}
-
+
}
-
+
//
if (value == null)
{
-
+
Window window = controllerContext.getWindow(windowName);
org.jboss.portal.core.model.portal.navstate.WindowNavigationalState wns =
navigationalStateContext.getWindowNavigationalState(window.getId().toString());
@@ -332,85 +325,96 @@
return value != null && value.length > 0 ? value : null;
}
- /**
- * For now we do not implement any kind of mapping between qnames, it's the basic
straightforward 1-1 mapping.
- */
+ /** For now we do not implement any kind of mapping between qnames, it's the basic
straightforward 1-1 mapping. */
public Map<String, String[]> getPortletPublicNavigationalState(String
windowName) throws IllegalArgumentException
{
PortletInfo info = controllerContext.getPortletInfo(windowName);
- CoordinationManager manager = getCoordinationManager();
-
- // For explicit initiate windowPublicNavigationStateUpdate with previous state
- if (windowPublicNavigationalStateUpdate == null)
+ if (info != null)
{
- initiateWindowPublicNavigationalStateUpdate();
- }
-
- //
- if (info != null && info.getNavigation() != null)
- {
- Map<String, String[]> publicNavigationalState = new HashMap<String,
String[]>();
- for (ParameterInfo parameterInfo : info.getNavigation().getPublicParameters())
+ NavigationInfo navigation = info.getNavigation();
+ if (navigation != null)
{
+ Map<String, String[]> publicNavigationalState = null;
- Collection<String> bindings =
manager.getBindingNames(getWindow(windowName), parameterInfo.getName());
-
- // Don't store the URI as a page scoped public render parameter but
window scoped
- // Also for explicit and parameter with no bindings
- if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(parameterInfo.getName()) ||
(!implicitMode && bindings.size() == 0))
+ // first make sure that we actually have public parameters before actually
doing anything
+ Collection<? extends ParameterInfo> publicParameters =
navigation.getPublicParameters();
+ if (publicParameters != null && !publicParameters.isEmpty())
{
- String[] parameterValue = getWindowPublicNavigationalState(windowName,
parameterInfo.getName());
+ publicNavigationalState = new HashMap<String, String[]>();
+ CoordinationManager manager = getCoordinationManager();
- //
- if (parameterValue != null)
+ // For explicit initiate windowPublicNavigationStateUpdate with previous
state
+ if (windowPublicNavigationalStateUpdate == null)
{
- String parameterId = parameterInfo.getId();
+ initiateWindowPublicNavigationalStateUpdate();
+ }
- // We clone the value here so we keep the internal state not
potentially changed
- publicNavigationalState.put(parameterId, parameterValue.clone());
+ for (ParameterInfo parameterInfo : publicParameters)
+ {
- }
- }
- else
- {
- String[] parameterValue =
getPublicNavigationalState(parameterInfo.getName());
+ QName parameterName = parameterInfo.getName();
+ Collection<String> bindings =
manager.getBindingNames(getWindow(windowName), parameterName);
- // Explicit binding
- String[] explicitParameterValue = null;
+ // Don't store the URI as a page scoped public render parameter but
window scoped
+ // Also for explicit and parameter with no bindings
+ if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(parameterName) ||
(!implicitMode && bindings.size() == 0))
+ {
+ String[] parameterValue =
getWindowPublicNavigationalState(windowName, parameterName);
- // Check all bindings for this window/qname pair
- // If this window/qname is binded several times with different updated
params value will be unpredictable...
- for (String binding : bindings)
- {
- explicitParameterValue = getPublicNavigationalState(new
QName(XMLConstants.DEFAULT_NS_PREFIX, binding));
- }
+ if (parameterValue != null)
+ {
+ String parameterId = parameterInfo.getId();
- //
- String parameterId = parameterInfo.getId();
+ // We clone the value here so we keep the internal state not
potentially changed
+ publicNavigationalState.put(parameterId,
parameterValue.clone());
+ }
+ }
+ else
+ {
+ String[] parameterValue =
getPublicNavigationalState(parameterName);
- //
- if (explicitParameterValue != null)
- {
- // We clone the value here so we keep the internal state not
potentially changed
- publicNavigationalState.put(parameterId,
explicitParameterValue.clone());
+ // Explicit binding
+ String[] explicitParameterValue = null;
+
+ // Check all bindings for this window/qname pair
+ // If this window/qname is bound several times with different
updated params value will be unpredictable...
+ for (String binding : bindings)
+ {
+ explicitParameterValue = getPublicNavigationalState(new
QName(XMLConstants.DEFAULT_NS_PREFIX, binding));
+
+ // if a PNS has been found for a binding, use it and do not look
further
+ if (explicitParameterValue != null)
+ {
+ break;
+ }
+ }
+
+ //
+ String parameterId = parameterInfo.getId();
+
+ //
+ if (explicitParameterValue != null)
+ {
+ // We clone the value here so we keep the internal state not
potentially changed
+ publicNavigationalState.put(parameterId,
explicitParameterValue.clone());
+ }
+ else if (implicitMode && parameterValue != null)
+ {
+ // We clone the value here so we keep the internal state not
potentially changed
+ publicNavigationalState.put(parameterId,
parameterValue.clone());
+ }
+ }
}
- else if (implicitMode && parameterValue != null)
- {
- // We clone the value here so we keep the internal state not
potentially changed
- publicNavigationalState.put(parameterId, parameterValue.clone());
- }
}
+
+ return publicNavigationalState;
}
-
- //
- return publicNavigationalState;
}
//
return null;
}
-
public String getPublicNavigationalParameterId(String windowName, QName name)
@@ -434,7 +438,7 @@
}
/**
- *
+ *
*/
public void setPortletPublicNavigationalState(String windowName, Map<String,
String[]> update)
{
@@ -472,7 +476,7 @@
// Don't store the URI as a page scoped public render parameter but
window scoped
// Also for explicit and parameter with no bindings
if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(name)
- || (!implicitMode && bindings.size() == 0))
+ || (!implicitMode && bindings.size() == 0))
{
if (value.length > 0)
{
@@ -509,7 +513,7 @@
}
/**
- *
+ *
*/
public Set<QName> getPublicNames()
{
@@ -523,7 +527,7 @@
}
/**
- *
+ *
*/
public String[] getPublicNavigationalState(QName name) throws
IllegalArgumentException
{
@@ -552,7 +556,7 @@
}
/**
- *
+ *
*/
public void setPublicNavigationalState(QName name, String[] value) throws
IllegalArgumentException, IllegalStateException
{
@@ -572,7 +576,7 @@
}
/**
- *
+ *
*/
public void removePublicNavigationalState(QName name) throws IllegalArgumentException,
IllegalStateException
{
@@ -592,7 +596,7 @@
}
/**
- *
+ *
*/
public HashMap<QName, String[]> getWindowPublicContentStateParameters(String
windowName)
{
@@ -617,13 +621,11 @@
}
}
}
-
+
return params;
}
- /**
- * @throws IllegalStateException if the public navigational state of the window is
already initialized
- */
+ /** @throws IllegalStateException if the public navigational state of the window is
already initialized */
private void initiateWindowPublicNavigationalStateUpdate() throws
IllegalStateException
{
if (windowPublicNavigationalStateUpdate != null)
@@ -631,11 +633,11 @@
throw new IllegalStateException("Was called with a non null
windowPublicNavigationalStateUpdate field");
}
- //
- windowPublicNavigationalStateUpdate = new HashMap<String, HashMap<QName,
String[]>>();
+ Set<String> windowNames = controllerContext.getWindowNames();
+ windowPublicNavigationalStateUpdate = new HashMap<String, HashMap<QName,
String[]>>(windowNames.size());
// Initial state for all windows on this page
- for (String windowName : controllerContext.getWindowNames())
+ for (String windowName : windowNames)
{
HashMap<QName, String[]> publicContentStateParams =
getWindowPublicContentStateParameters(windowName);
windowPublicNavigationalStateUpdate.put(windowName, publicContentStateParams);
@@ -653,5 +655,4 @@
}
-
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -26,24 +26,32 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.common.FixMe;
import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.command.response.ErrorResponse;
import org.jboss.portal.core.controller.command.response.RedirectionResponse;
import org.jboss.portal.core.controller.command.response.SecurityErrorResponse;
import org.jboss.portal.core.controller.command.response.SignOutResponse;
+import org.jboss.portal.core.controller.command.response.StreamContentResponse;
import org.jboss.portal.core.controller.command.response.UnavailableResourceResponse;
-import org.jboss.portal.core.controller.command.response.StreamContentResponse;
import
org.jboss.portal.core.model.instance.command.response.PortletInstanceActionResponse;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.command.response.PortletWindowActionResponse;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.portlet.NoSuchPortletException;
+import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.info.ParameterInfo;
+import org.jboss.portal.portlet.invocation.response.ContentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.response.ResponseProperties;
import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
-import org.jboss.portal.portlet.invocation.response.ContentResponse;
import java.io.ByteArrayInputStream;
import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -64,11 +72,11 @@
}
}
- public static ControllerResponse createActionResponse(PortalObjectId targetId,
PortletInvocationResponse response)
+ public static ControllerResponse createActionResponse(PortalObjectId targetId,
PortletInvocationResponse response, org.jboss.portal.portlet.info.PortletInfo portletInfo,
PageNavigationalState pns)
{
if (response instanceof UpdateNavigationalStateResponse)
{
- UpdateNavigationalStateResponse renderResult =
(UpdateNavigationalStateResponse)response;
+ UpdateNavigationalStateResponse renderResult =
(UpdateNavigationalStateResponse)response;
//
Mode mode = renderResult.getMode();
@@ -76,8 +84,39 @@
//
WindowState windowState = renderResult.getWindowState();
- //
- return new PortletWindowActionResponse(targetId, windowState, mode,
renderResult.getNavigationalState());
+ StateString state = renderResult.getNavigationalState();
+
+ // if we are in the local case, decode the parameters and mix in public
navigational state if needed
+ // in the WSRP case, we get an OpaqueStateString that we just pass along as is
+ if (state instanceof ParametersStateString)
+ {
+ Map<String, String[]> stringMap =
((ParametersStateString)state).getParameters();
+
+ Map<String, String[]> parameters = new HashMap<String,
String[]>(stringMap);
+
+ parameters.putAll(renderResult.getPublicNavigationalStateUpdates());
+
+ if (pns != null)
+ {
+ //
+ for (ParameterInfo parameterInfo :
portletInfo.getNavigation().getPublicParameters())
+ {
+ String key = parameterInfo.getId();
+
+ //
+ String[] values = pns.getParameter(parameterInfo.getName());
+
+ //
+ if (values != null)
+ {
+ parameters.put(key, values);
+ }
+ }
+ }
+ state = ParametersStateString.create(parameters);
+ }
+
+ return new PortletWindowActionResponse(targetId, windowState, mode, state);
}
else
{
@@ -89,7 +128,7 @@
{
if (response instanceof UpdateNavigationalStateResponse)
{
- UpdateNavigationalStateResponse renderResult =
(UpdateNavigationalStateResponse)response;
+ UpdateNavigationalStateResponse renderResult =
(UpdateNavigationalStateResponse)response;
//
return new PortletInstanceActionResponse(instanceId, null, null,
renderResult.getNavigationalState());
@@ -134,22 +173,29 @@
ContentResponse contentResponse = (ContentResponse)response;
//
- if (contentResponse.getType() == ContentResponse.TYPE_EMPTY)
+ int type = contentResponse.getType();
+ if (type == ContentResponse.TYPE_EMPTY)
{
- throw new NotYetImplemented("todo");
+ throw new NotYetImplemented("handling of empty ContentResponse");
}
else
{
String contentType = contentResponse.getContentType();
//
- if (contentResponse.getType() == ContentResponse.TYPE_BYTES)
+ ResponseProperties properties = contentResponse.getProperties();
+ MultiValuedPropertyMap<String> headers = null;
+ if (properties != null)
{
- return new StreamContentResponse(contentType, -1, new
ByteArrayInputStream(contentResponse.getBytes()));
+ headers = properties.getTransportHeaders();
}
+ if (type == ContentResponse.TYPE_BYTES)
+ {
+ return new StreamContentResponse(contentType, headers, new
ByteArrayInputStream(contentResponse.getBytes()));
+ }
else
{
- return new StreamContentResponse(contentType, -1, new
StringReader(contentResponse.getChars()));
+ return new StreamContentResponse(contentType, headers, new
StringReader(contentResponse.getChars()));
}
}
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -22,11 +22,11 @@
package org.jboss.portal.core.identity.cache;
+import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.Role;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
@@ -34,9 +34,9 @@
*/
public class IdentityCacheService
{
- private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(IdentityCacheService.class);
+ private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(IdentityCacheService.class);
- public final static String JNDI_NAME = "java:portal/IdentityCacheService";
+ public final static String JNDI_NAME = "java:portal/IdentityCacheService";
protected ThreadLocal<Map<String, User>> userNameCache = new
ThreadLocal<Map<String, User>>();
@@ -200,7 +200,7 @@
if (user != null && log.isDebugEnabled())
{
- log.debug("User retreived from cache for username=" +
user.getUserName());
+ log.debug("User retrieved from cache for username=" +
user.getUserName());
}
return user;
@@ -212,10 +212,10 @@
if (user != null && log.isDebugEnabled())
{
- log.debug("User retreived from cache for id=" + user.getId());
+ log.debug("User retrieved from cache for id=" + user.getId());
}
- return user;
+ return user;
}
public Map findUserProfileById(Object id)
@@ -224,10 +224,10 @@
if (profile != null && log.isDebugEnabled())
{
- log.debug("User profile retreived from cache for user id=" + id);
+ log.debug("User profile retrieved from cache for user id=" + id);
}
- return profile;
+ return profile;
}
public Role findRoleByName(String roleName)
@@ -236,7 +236,7 @@
if (role != null && log.isDebugEnabled())
{
- log.debug("Role retreived from cache for name=" + role.getName());
+ log.debug("Role retrieved from cache for name=" + role.getName());
}
return role;
@@ -248,10 +248,10 @@
if (role != null && log.isDebugEnabled())
{
- log.debug("Role retreived from cache for id=" + role.getId());
+ log.debug("Role retrieved from cache for id=" + role.getId());
}
- return role;
+ return role;
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeImpl.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeImpl.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeImpl.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -40,7 +40,6 @@
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -169,7 +168,7 @@
}
public String getDisplayName(Locale locale)
- {
+ {
LocalizedString ldisplayName = object.getDisplayName();
if (ldisplayName != null)
{
@@ -179,7 +178,7 @@
return result;
}
}
-
+
// Lazily compute the display name
if (displayNameKey == null)
{
@@ -196,7 +195,7 @@
catch (MissingResourceException ignore)
{
}
-
+
if (bundle != null)
{
try
@@ -302,15 +301,15 @@
String orderProperty2S = (String)node2.getProperties().get(ORDER);
if (orderProperty1S != null && orderProperty2S == null)
- {
+ {
return -1;
}
else if (orderProperty1S == null && orderProperty2S != null)
- {
+ {
return 1;
}
else if (orderProperty1S != null && orderProperty2S != null)
- {
+ {
float orderProperty1 = -1;
float orderProperty2 = -1;
@@ -401,10 +400,8 @@
boolean allVisible = portalAuthorizationManager.checkPermission(new
PortalObjectPermission(objectNode.object.getId(),
PortalObjectPermission.VIEW_RECURSIVE_ACTION));
//
- for (Iterator<PortalObject> i = tmp.iterator(); i.hasNext();)
+ for (PortalObject childObject : tmp)
{
- PortalObject childObject = (PortalObject)i.next();
-
// It is visible if the parent has recursive view enabled
boolean visible = allVisible;
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/mail/MailModuleImpl.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/mail/MailModuleImpl.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/mail/MailModuleImpl.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -100,6 +100,9 @@
/** A serial id used to track messages locally. */
private final SynchronizedLong currentSerialId = new SynchronizedLong(0);
+ /** Default Content Type for Mail */
+ public static final String DEFAULT_CONTENT_MIME_TYPE = "text/plain";
+
public int getSMTPConnectionTimeout()
{
return SMTPConnectionTimeout;
@@ -225,11 +228,12 @@
public void send(String from,
String to,
String subject,
- String body)
+ String body,
+ String contentType)
{
try
{
- MyMessage runnable = new MyMessage(from, to, subject, body);
+ MyMessage runnable = new MyMessage(from, to, subject, body, contentType);
log.debug("Enqueuing serialId=" + runnable.serialId);
executor.execute(runnable);
log.debug("Enqueued serialId=" + runnable.serialId);
@@ -239,6 +243,14 @@
log.debug("Interrupted during deliver attempt");
}
}
+
+ public void send(String from,
+ String to,
+ String subject,
+ String body)
+ {
+ send(from, to, subject, body, DEFAULT_CONTENT_MIME_TYPE);
+ }
protected void startService()
throws Exception
@@ -303,13 +315,23 @@
String to,
String subject,
String body)
+ {
+ return deliver(serialId, from, to, subject, body, DEFAULT_CONTENT_MIME_TYPE);
+ }
+
+ public boolean deliver(long serialId,
+ String from,
+ String to,
+ String subject,
+ String body,
+ String contentType)
{
boolean delivered = false;
try
{
if ((gateway != null) && (gateway.length() > 0))
{
- delivered = deliver(serialId, gateway, from, to, subject, body);
+ delivered = deliver(serialId, gateway, from, to, subject, body,
contentType);
}
else
{
@@ -329,7 +351,8 @@
String from,
String to,
String subject,
- String body)
+ String body,
+ String contentType)
throws AddressException,
NoSuchProviderException,
MessagingException
@@ -354,8 +377,11 @@
// Prepare message
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
- message.setSubject(subject);
- message.setText(body);
+
+ // Replaced message.setText(body); for setContent(...) to allow
+ // a MIME type be set. Now MailModule can support text/html messages
+ message.setContent(body, contentType);
+ message.setSubject(subject);
message.setSentDate(new Date());
message.addRecipient(javax.mail.Message.RecipientType.TO, toAddress);
@@ -417,17 +443,21 @@
public final String subject;
public final String body;
+
+ public final String contentType;
public MyMessage(String from,
String to,
String subject,
- String body)
+ String body,
+ String contentType)
{
this.serialId = currentSerialId.increment();
this.from = from;
this.to = to;
this.subject = subject;
this.body = body;
+ this.contentType = contentType;
}
public void run()
@@ -435,7 +465,7 @@
try
{
log.debug("Dequeued serialId=" + serialId + " and delivering
it");
- boolean delivered = deliver(serialId, from, to, subject, body);
+ boolean delivered = deliver(serialId, from, to, subject, body, contentType);
log.debug(delivered + " on delivery for serialId=" + serialId);
}
catch (Throwable t)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -195,7 +195,6 @@
{
ControllerResponse cr;
- //
if (e instanceof NoSuchPortletException)
{
cr = new
UnavailableResourceResponse(((NoSuchPortletException)e).getPortletId(), false);
@@ -206,19 +205,11 @@
cr = new org.jboss.portal.core.controller.command.response.ErrorResponse(e,
false);
}
- //
return new WindowRendition(windowProps, WindowState.NORMAL, Mode.VIEW, null,
null, cr);
}
- //
PortletWindowNavigationalState windowNS =
rendererContext.getPortletNavigationalState();
- if (windowNS == null)
- {
-
- }
-
- //
Mode mode = windowNS.getMode();
WindowState windowState = windowNS.getWindowState();
@@ -256,23 +247,11 @@
Portlet portlet = instance.getPortlet();
CapabilitiesInfo capabilitiesInfo = portlet.getInfo().getCapabilities();
- // Add window states for any media type
- Set<WindowStateInfo> windowStatesInfo =
capabilitiesInfo.getAllWindowStates();
- supportedWindowStates = new
ArrayList<WindowState>(windowStatesInfo.size());
- for (WindowStateInfo windowStateInfo : windowStatesInfo)
- {
- WindowState tmp = windowStateInfo.getWindowState();
- if (portal.getSupportedWindowStates().contains(tmp))
- {
- supportedWindowStates.add(tmp);
- }
- }
-
// Get current Media Type
MediaType mediaType = invocation.getContext().getMarkupInfo().getMediaType();
// Add window states for the current media type
- windowStatesInfo = capabilitiesInfo.getWindowStates(mediaType);
+ Set<WindowStateInfo> windowStatesInfo =
capabilitiesInfo.getWindowStates(mediaType);
supportedWindowStates = new
ArrayList<WindowState>(windowStatesInfo.size());
for (WindowStateInfo windowStateInfo : windowStatesInfo)
{
@@ -283,29 +262,8 @@
}
}
- // fail fast if we are requesting a window state that is not supported by this
portlet
- // todo: this causes an issue with WSRP. See: JBPORTAL-2208
- /*if (!supportedWindowStates.contains(windowState))
- {
- String windowStateName = windowState.toString();
- throw new WindowStateException(windowStateName + " is not supported by
portlet " + getPortletName(portlet),
- new javax.portlet.WindowState(windowStateName));
- }*/
-
- // Add modes for any media type
- Set<ModeInfo> modesInfo = capabilitiesInfo.getAllModes();
- supportedModes = new ArrayList<Mode>(modesInfo.size());
- for (ModeInfo modeInfo : modesInfo)
- {
- Mode tmp = modeInfo.getMode();
- if (portal.getSupportedModes().contains(tmp))
- {
- supportedModes.add(tmp);
- }
- }
-
// Add modes specific to the current media type
- modesInfo = capabilitiesInfo.getModes(mediaType);
+ Set<ModeInfo> modesInfo = capabilitiesInfo.getModes(mediaType);
supportedModes = new ArrayList<Mode>(modesInfo.size());
for (ModeInfo modeInfo : modesInfo)
{
@@ -316,15 +274,6 @@
}
}
- // fail fast if we are requesting a window state that is not supported by this
portlet
- // todo: this causes an issue with WSRP. See: JBPORTAL-2208
- /*if (!supportedModes.contains(mode))
- {
- String modeName = mode.toString();
- throw new PortletModeException(modeName + " is not supported by portlet
" + getPortletName(portlet),
- new javax.portlet.PortletMode(modeName));
- }*/
-
// Remove edit mode if the user is not logged it
if (rendererContext.getUser() == null)
{
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -85,15 +85,6 @@
/** . */
protected JBossAuthorizationDomainRegistry authorizationDomainRegistry;
- /** . */
- protected PortletInvoker handler = new PortletInvokerInterceptor()
- {
- public PortletInvocationResponse invoke(PortletInvocation invocation) throws
IllegalArgumentException, PortletInvokerException
- {
- return portletInvoker.invoke(invocation);
- }
- };
-
/** Used to bypass security checks for testing. */
protected boolean performSecurityChecks;
@@ -414,7 +405,6 @@
{
try
{
- stack.getInterceptor(stack.getLength() - 1).setNext(handler);
return stack.getInterceptor(0).invoke(invocation);
}
catch (Exception e)
@@ -432,10 +422,6 @@
throw new PortletInvokerException(e);
}
}
- finally
- {
- stack.getInterceptor(stack.getLength() - 1).setNext(null);
- }
}
return portletInvoker.invoke(invocation);
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -22,6 +22,13 @@
******************************************************************************/
package org.jboss.portal.core.impl.model.portal;
+import org.jboss.logging.Logger;
+import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
+import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
+import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.jems.hibernate.ContextObject;
+import org.jboss.portal.security.RoleSecurityBinding;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -30,13 +37,6 @@
import java.util.Map;
import java.util.Set;
-import org.jboss.logging.Logger;
-import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
-import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
-import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.jems.hibernate.ContextObject;
-import org.jboss.portal.security.RoleSecurityBinding;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
@@ -57,10 +57,11 @@
private ObjectNode parent;
private Map children;
private PortalObjectImpl object;
- private Map securityConstraints;
+ private Map<String, ObjectNodeSecurityConstraint> securityConstraints;
// Runtime fields
private AbstractPortalObjectContainer.ContainerContext containerContext;
+ private static final String DASHBOARD = "dashboard";
public ObjectNode()
{
@@ -81,7 +82,7 @@
this.path = path;
this.name = name;
this.children = new HashMap();
- this.securityConstraints = new HashMap();
+ this.securityConstraints = new HashMap<String,
ObjectNodeSecurityConstraint>();
}
// ContextObject implementation
*************************************************************************************
@@ -264,18 +265,16 @@
public void setBindings(Set bindings)
{
// Clear existing constraints
- securityConstraints.clear();
- for (Iterator i = securityConstraints.values().iterator(); i.hasNext();)
+ for (ObjectNodeSecurityConstraint onsc : securityConstraints.values())
{
- ObjectNodeSecurityConstraint onsc = (ObjectNodeSecurityConstraint)i.next();
- i.remove();
onsc.setObjectNode(null);
}
+ securityConstraints.clear();
// Replace with new ones
- for (Iterator i = bindings.iterator(); i.hasNext();)
+ for (Object binding : bindings)
{
- RoleSecurityBinding sc = (RoleSecurityBinding)i.next();
+ RoleSecurityBinding sc = (RoleSecurityBinding)binding;
// Optmize a bit
if (sc.getActions().size() > 0)
@@ -294,10 +293,9 @@
public Set getBindings()
{
- Set bindings = new HashSet();
- for (Iterator i = securityConstraints.values().iterator(); i.hasNext();)
+ Set<RoleSecurityBinding> bindings = new
HashSet<RoleSecurityBinding>();
+ for (ObjectNodeSecurityConstraint onsc : securityConstraints.values())
{
- ObjectNodeSecurityConstraint onsc = (ObjectNodeSecurityConstraint)i.next();
Set actions = onsc.getActions();
RoleSecurityBinding sc = new RoleSecurityBinding(actions, onsc.getRole());
bindings.add(sc);
@@ -307,28 +305,26 @@
public RoleSecurityBinding getBinding(String roleName)
{
- Set actions = null;
- for (Iterator i = securityConstraints.values().iterator(); i.hasNext();)
+ Set<String> actions = null;
+
+ //
+ ObjectNodeSecurityConstraint onsc = securityConstraints.get(roleName);
+ if (onsc != null)
{
- ObjectNodeSecurityConstraint onsc = (ObjectNodeSecurityConstraint)i.next();
- if (onsc.getRole().equals(roleName))
- {
- actions = onsc.getActions();
- break;
- }
+ actions = onsc.getActions();
}
//
- if ("dashboard".equals(path.getNamespace()))
+ if (DASHBOARD.equals(path.getNamespace()))
{
if (actions == null)
{
- actions = Collections.singleton("dashboard");
+ actions = Collections.singleton(DASHBOARD);
}
else
{
- actions = new HashSet(actions);
- actions.add("dashboard");
+ actions = new HashSet<String>(actions);
+ actions.add(DASHBOARD);
}
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -47,7 +47,7 @@
/** The query for lookup when the path is null. */
private static final String LOOKUP_QUERY_FOR_ROOT = "from ObjectNode where
path=:path or path is null";
- /** The query for lookup when the path is null. */
+ /** The query for lookup when the path is not null. */
private static final String LOOKUP_QUERY = "from ObjectNode where
path=:path";
/** . */
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -20,6 +20,7 @@
* 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.core.impl.model.portal;
import org.apache.log4j.Logger;
@@ -40,6 +41,7 @@
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
+import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
@@ -75,8 +77,6 @@
private ObjectNode objectNode;
// Runtime fields
-
- private Map childrenMap;
private Map properties;
private Map unmodifiableProperties;
private SortedSet accessedChildren;
@@ -88,11 +88,10 @@
public PortalObjectImpl(boolean initState)
{
- this.declaredPropertyMap = new HashMap();
+ this.declaredPropertyMap = new HashMap<String, String>();
this.listener = null;
//
- this.childrenMap = null;
this.properties = null;
this.unmodifiableProperties = null;
this.accessedChildren = null;
@@ -118,8 +117,6 @@
this.objectNode = objectNode;
}
- //
-
public PortalObjectId getId()
{
return objectNode.getPath();
@@ -141,13 +138,12 @@
{
return objectNode.getName();
}
-
+
public void setDisplayNames(Map displayNames)
{
this.displayNames = displayNames;
}
-
-
+
public Map getDisplayNames()
{
return displayNames;
@@ -161,7 +157,7 @@
}
displayNames = new HashMap();
-
+
Map map = displayName.getValues();
Iterator it = map.values().iterator();
while (it.hasNext())
@@ -170,7 +166,7 @@
displayNames.put(value.getLocale(), value.getString());
}
}
-
+
public LocalizedString getDisplayName()
{
if (displayNames != null)
@@ -203,13 +199,14 @@
private class ChildrenCollection implements Collection
{
-
/** . */
private final int mask;
+ private final SortedMap children;
- public ChildrenCollection(int mask)
+ public ChildrenCollection(int mask, Map children)
{
this.mask = mask;
+ this.children = new TreeMap(children);
}
public void clear()
@@ -254,30 +251,36 @@
public boolean isEmpty()
{
- return objectNode.getChildren().isEmpty();
+ return children.isEmpty();
}
public int size()
{
- if (mask == ALL_TYPES_MASK)
+ if (mask != ALL_TYPES_MASK)
{
- return objectNode.getChildren().size();
- }
- else
- {
int count = 0;
- for (Iterator i = iterator(); i.hasNext();)
+
+ for (Object object : children.values())
{
- i.next();
- count++;
+ ObjectNode childNode = (ObjectNode)object;
+ PortalObjectImpl childObject = childNode.getObject();
+ if (isMatchingMask(childObject, mask))
+ {
+ count++;
+ }
}
+
return count;
}
+ else
+ {
+ return children.size();
+ }
}
public Object[] toArray()
{
- return toArray(new Object[0]);
+ return toArray(new Object[size()]);
}
public Iterator iterator()
@@ -287,40 +290,39 @@
public Object[] toArray(Object a[])
{
- ArrayList tmp = new ArrayList(objectNode.getChildren().size());
-
- //
- Set accessedChildren = getAccessedChildren();
-
- //
- for (Iterator i = iterator(); i.hasNext();)
+ ArrayList tmp = new ArrayList(children.size());
+ for (Object child : this)
{
- PortalObject childObject = (PortalObject)i.next();
+ // no need to add to accessedChildren here as it's already done by
ChildrenIterator.next()...
+ tmp.add(child);
+ }
- //
- accessedChildren.add(childObject);
+ return tmp.toArray(a);
+ }
- //
- tmp.add(childObject);
+ @Override
+ public String toString()
+ {
+ StringBuilder sb = new StringBuilder(512);
+ sb.append("[");
+ for (Object o : this)
+ {
+ sb.append(" ").append(o);
}
- return tmp.toArray(a);
+ sb.append(" ]");
+ return sb.toString();
}
private class ChildrenIterator implements Iterator
{
-
- /** . */
private final Iterator iterator;
- /** . */
private PortalObject nextChild = null;
public ChildrenIterator()
{
// Make sure the children are sorted for consistent ordering downstream
- Map childrenMap = new TreeMap(objectNode.getChildren());
- Collection children = childrenMap.values();
- iterator = children.iterator();
+ iterator = children.values().iterator();
}
public void remove()
@@ -336,7 +338,7 @@
{
ObjectNode childNode = (ObjectNode)iterator.next();
PortalObjectImpl childObject = childNode.getObject();
- if (mask == ALL_TYPES_MASK || (childObject.getMask() & mask) != 0)
+ if (isMatchingMask(childObject, mask))
{
nextChild = childObject;
}
@@ -369,32 +371,17 @@
}
}
+ private boolean isMatchingMask(PortalObjectImpl object, int mask)
+ {
+ return (mask == ALL_TYPES_MASK || (object.getMask() & mask) != 0);
+ }
+
public Collection getChildren(int wantedMask)
{
- /// Correct eventually the mask
+ // Correct eventually the mask
final int mask = wantedMask & ALL_TYPES_MASK;
- // Compute the lookup cache key
- Integer key = new Integer(mask);
-
- //
- Collection children = null;
- if (childrenMap == null)
- {
- childrenMap = new HashMap();
- }
- else
- {
- children = (Collection)childrenMap.get(key);
- }
-
- //
- if (children == null)
- {
- children = new ChildrenCollection(mask);
- childrenMap.put(key, children);
- }
- return children;
+ return new ChildrenCollection(mask, objectNode.getChildren());
}
public String getListener()
@@ -421,17 +408,18 @@
public PortalObject getChild(String name)
{
- ParameterValidation.throwIllegalArgExceptionIfNull(name, "child name");
- ObjectNode childNode = (ObjectNode)objectNode.getChildren().get(name);
- if (childNode != null)
+ if (name == null)
{
- PortalObjectImpl childObject = childNode.getObject();
+ throw new IllegalArgumentException();
+ }
- // Track it
- getAccessedChildren().add(childObject);
-
- //
- return childObject;
+ // use container directly instead of going through children to avoid having to
retrieve all of them just for one
+ // this leads to major perfomance improvement by dramatically reducing the number
of DB requests
+ PortalObject portalObject =
objectNode.getContext().getContainer().getObject(getId().getChildId(name));
+ if (portalObject != null)
+ {
+ getAccessedChildren().add(portalObject);
+ return portalObject;
}
else
{
@@ -445,7 +433,7 @@
PortalObject child = getChild(name);
// only return the child if it matches the expected class
- if(expectedType.isInstance(child))
+ if (expectedType.isInstance(child))
{
return expectedType.cast(child);
}
@@ -512,7 +500,7 @@
public void setDeclaredProperty(String name, String value)
{
- ParameterValidation.throwIllegalArgExceptionIfNull(name, "property
name");
+ ParameterValidation.throwIllegalArgExceptionIfNull(name, "property
name");
if (value == null)
{
declaredPropertyMap.remove(name);
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -149,9 +149,9 @@
{
if (dirty)
{
+ value = new ArrayList<String>();
for (int i=0; i<strings.length; i++)
{
- value = new ArrayList<String>();
value.add(strings[i]);
}
dirty = false;
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/HasDisplayName.java
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/HasDisplayName.java)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/HasDisplayName.java
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/HasDisplayName.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, 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.core.model;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public interface HasDisplayName
+{
+ /**
+ * Return the localized string used to represent that object.
+ *
+ * @return the localized display name
+ */
+ LocalizedString getDisplayName();
+
+ /**
+ * Set the localized string used to represent that object.
+ *
+ * @param localizedString the localized display name
+ */
+ void setDisplayName(LocalizedString localizedString);
+}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/instance/Instance.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/instance/Instance.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/instance/Instance.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.core.model.instance;
-import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.core.model.HasDisplayName;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.invocation.PortletInvocation;
@@ -38,7 +38,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public interface Instance
+public interface Instance extends HasDisplayName
{
/** The attribute name under which the instance id can be accessed. */
String INSTANCE_ID_ATTRIBUTE = "instanceid";
@@ -51,20 +51,6 @@
String getId();
/**
- * Return the display name
- *
- * @return the display name
- */
- LocalizedString getDisplayName();
-
- /**
- * Set the display name
- *
- * @param localizedString
- */
- void setDisplayName(LocalizedString localizedString);
-
- /**
* Return the runtime metadata for this portlet.
*
* @return the info
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/instance/InstanceInvoker.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * 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.core.model.instance;
+
+import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class InstanceInvoker extends PortletInvokerInterceptor
+{
+ /** . */
+ protected PortletInvoker portletInvoker;
+
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws
IllegalArgumentException, PortletInvokerException
+ {
+ return portletInvoker.invoke(invocation);
+ }
+
+ public PortletInvoker getPortletInvoker()
+ {
+ return portletInvoker;
+ }
+
+ public void setPortletInvoker(PortletInvoker portletInvoker)
+ {
+ this.portletInvoker = portletInvoker;
+ }
+
+}
+
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.core.model.portal;
-import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.core.model.HasDisplayName;
import java.util.Collection;
import java.util.Map;
@@ -33,7 +33,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public interface PortalObject extends Comparable
+public interface PortalObject extends Comparable, HasDisplayName
{
/** Portal property name that indicates the name of the default portal to lookup. */
@@ -86,22 +86,8 @@
* @return the object name
*/
String getName();
-
- /**
- * Return the localized string used to represent that object.
- *
- * @return the localized display name
- */
- LocalizedString getDisplayName();
/**
- * Set the localized string used to represent that object.
- *
- * @param localizedString the localized display name
- */
- void setDisplayName(LocalizedString localizedString);
-
- /**
* Returns the listener id or null if there is none.
*
* @return the listener
@@ -146,7 +132,7 @@
/**
* Returns the child of the specified type and with the given name or
<code>null</code> if it cannot be found.
*
- * @param name the child's name
+ * @param name the child's name
* @param expectedType the expected type of the child to be retrieved
* @param <T> a class extending PortalObject
* @return the named child or <code>null</code> if it cannot be found
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.model.portal;
+import org.jboss.portal.common.util.ParameterValidation;
+
import java.io.Serializable;
/**
@@ -60,14 +62,8 @@
*/
public PortalObjectId(String namespace, PortalObjectPath path) throws
IllegalArgumentException
{
- if (namespace == null)
- {
- throw new IllegalArgumentException();
- }
- if (path == null)
- {
- throw new IllegalArgumentException();
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(namespace,
"namespace");
+ ParameterValidation.throwIllegalArgExceptionIfNull(path, "path");
this.namespace = namespace;
this.path = path;
}
@@ -125,10 +121,7 @@
*/
public static PortalObjectId parse(String idValue, PortalObjectPath.Format format)
throws IllegalArgumentException
{
- if (idValue == null)
- {
- throw new IllegalArgumentException("No null id value accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(idValue, "id");
int pos = idValue.indexOf(NAMESPACE_SEPARATOR);
//
@@ -144,6 +137,12 @@
}
}
+ public PortalObjectId getChildId(String name)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(name, "child name");
+ return new PortalObjectId(getNamespace(), getPath().getChild(name));
+ }
+
/**
* Parse a portal object id given the namespace and the path string representation.
*
@@ -177,10 +176,7 @@
*/
public String toString(PortalObjectPath.Format format) throws
IllegalArgumentException
{
- if (format == null)
- {
- throw new IllegalArgumentException("No null format accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(format, "format");
//
if (format == PortalObjectPath.LEGACY_FORMAT)
@@ -216,14 +212,8 @@
*/
public static String toString(String namespace, PortalObjectPath path,
PortalObjectPath.Format format) throws IllegalArgumentException
{
- if (namespace == null)
- {
- throw new IllegalArgumentException("No null namespace accepted");
- }
- if (path == null)
- {
- throw new IllegalArgumentException("No null path accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(namespace,
"namespace");
+ ParameterValidation.throwIllegalArgExceptionIfNull(path, "path");
if (namespace.length() > 0)
{
return namespace + NAMESPACE_SEPARATOR + path.toString(format);
@@ -240,4 +230,4 @@
int order = namespace.compareTo(that.namespace);
return order != 0 ? order : path.compareTo(that.path);
}
-}
+}
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -181,6 +181,11 @@
return names[index - from];
}
+ public String getLastComponentName()
+ {
+ return names[names.length - 1];
+ }
+
public boolean equals(Object obj)
{
if (obj == this)
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.core.model.portal;
+import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerContext;
@@ -42,12 +43,8 @@
import org.jboss.portal.web.ServletContextDispatcher;
import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletRequestWrapper;
import javax.servlet.http.HttpServletRequestWrapper;
-
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Locale;
@@ -62,13 +59,15 @@
{
if (controllerResponse instanceof UpdateWindowResponse)
{
- UpdateWindowResponse uwmr = (UpdateWindowResponse)controllerResponse;
- PortalObjectContainer portalObjectContainer =
controllerContext.getController().getPortalObjectContainer();
- PortalObject window = portalObjectContainer.getObject(uwmr.getWindowId());
- Page page = (Page)window.getParent();
+ /* UpdateWindowResponse uwmr = (UpdateWindowResponse)controllerResponse;
+ PortalObjectContainer portalObjectContainer =
controllerContext.getController().getPortalObjectContainer();
+ PortalObject window = portalObjectContainer.getObject(uwmr.getWindowId());
+ Page page = (Page)window.getParent();
- // We can do that safely as we know that only this class is responsible for
evaluating UpdatePageResponse objects
- controllerResponse = new UpdatePageResponse(page.getId());
+ // We can do that safely as we know that only this class is responsible for
evaluating UpdatePageResponse objects
+ controllerResponse = new UpdatePageResponse(page.getId());*/
+
+ throw new NotYetImplemented("UpdateWindowResponse doesn't seem
supported anymore!");
}
//
@@ -89,7 +88,8 @@
{
public void sendResponse(ServerInvocationContext ctx) throws
IOException, ServletException
{
- HttpServletRequestWrapper request = new
HttpServletRequestWrapper(invocation.getServerContext().getClientRequest()) {
+ HttpServletRequestWrapper request = new
HttpServletRequestWrapper(invocation.getServerContext().getClientRequest())
+ {
@Override
public Locale getLocale()
{
@@ -103,7 +103,7 @@
}
};
- ServletContextDispatcher dispatcher = new
ServletContextDispatcher(request, invocation.getServerContext().getClientResponse(),
invocation.getRequest().getServer().getServletContainer());
+ ServletContextDispatcher dispatcher = new
ServletContextDispatcher(request, invocation.getServerContext().getClientResponse(),
invocation.getRequest().getServer().getServletContainer());
MarkupInfo markupInfo =
(MarkupInfo)invocation.getResponse().getContentInfo();
rendition.render(markupInfo, dispatcher);
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -25,18 +25,32 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerException;
+import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.NoSuchResourceException;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
import org.jboss.portal.core.controller.command.info.CommandInfo;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
+import org.jboss.portal.core.controller.portlet.ControllerResponseFactory;
import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
+import org.jboss.portal.core.navstate.NavigationalStateContext;
import org.jboss.portal.identity.User;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.controller.PortletController;
import org.jboss.portal.portlet.controller.request.PortletActionRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
+import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
+import org.jboss.portal.portlet.controller.response.PortletResponse;
+import org.jboss.portal.portlet.controller.response.ResourceResponse;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
@@ -140,4 +154,59 @@
pageNS
);
}
+
+ public ControllerResponse execute() throws ControllerException
+ {
+ try
+ {
+ ControllerPortletControllerContext cpcc = new
ControllerPortletControllerContext(
+ context,
+ page
+ );
+
+ //
+ PortletPageNavigationalState pageNS =
cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
+
+ //
+ PortletWindowNavigationalState windowNS =
pageNS.getPortletWindowNavigationalState(window.getName());
+
+ //
+ PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
+
+ //
+ ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS,
windowNS);
+
+ //
+ PortletController controller = new PortletController();
+
+ //
+ org.jboss.portal.portlet.controller.response.ControllerResponse cr =
controller.process(cpcc, containerRequest);
+
+ PortletResponse portletResponse = (PortletResponse)cr;
+
+ if (cr instanceof PageUpdateResponse)
+ {
+ //
+ PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
+
+ //
+ ControllerPageNavigationalState pageNavigationalState =
(ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
+
+ // Flush all NS
+ pageNavigationalState.flushUpdates();
+ }
+ // Populate the parameters
+ NavigationalStateContext ctx =
(NavigationalStateContext)cpcc.getControllerContext().getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
+
+ PageNavigationalState pns =
ctx.getPageNavigationalState(page.getId().toString());
+
+ //
+ return ControllerResponseFactory.createActionResponse(targetId,
portletResponse.getResponse(), portletInfo, pns);
+ }
+ catch (PortletInvokerException e)
+ {
+ return ControllerResponseFactory.createResponse(e);
+ }
+ }
+
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -24,15 +24,26 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.core.controller.ControllerException;
+import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
+import org.jboss.portal.core.controller.portlet.ControllerResponseFactory;
import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.info.ParameterInfo;
+import org.jboss.portal.portlet.controller.PortletController;
import org.jboss.portal.portlet.controller.request.PortletRenderRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
+import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
+import org.jboss.portal.portlet.controller.response.PortletResponse;
+import org.jboss.portal.portlet.controller.response.ResourceResponse;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
@@ -153,4 +164,51 @@
pageNS
);
}
+
+ public ControllerResponse execute() throws ControllerException
+ {
+ try
+ {
+ ControllerPortletControllerContext cpcc = new
ControllerPortletControllerContext(
+ context,
+ page
+ );
+
+ //
+ PortletPageNavigationalState pageNS =
cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
+
+ //
+ PortletWindowNavigationalState windowNS =
pageNS.getPortletWindowNavigationalState(window.getName());
+
+ //
+ PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
+
+ //
+ ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS,
windowNS);
+
+ //
+ PortletController controller = new PortletController();
+
+ //
+ org.jboss.portal.portlet.controller.response.ControllerResponse cr =
controller.process(cpcc, containerRequest);
+
+ //
+ PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
+
+ //
+ ControllerPageNavigationalState pageNavigationalState =
(ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
+
+ // Flush all NS
+ pageNavigationalState.flushUpdates();
+
+ //
+ return new UpdatePageResponse(page.getId());
+
+ }
+ catch (PortletInvokerException e)
+ {
+ return ControllerResponseFactory.createResponse(e);
+ }
+ }
+
}
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -23,14 +23,28 @@
package org.jboss.portal.core.model.portal.command.action;
import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
+import org.jboss.portal.core.navstate.NavigationalStateContext;
+import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerException;
+import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
+import org.jboss.portal.core.controller.portlet.ControllerResponseFactory;
import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.controller.PortletController;
import org.jboss.portal.portlet.controller.request.PortletResourceRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
+import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
+import org.jboss.portal.portlet.controller.response.PortletResponse;
+import org.jboss.portal.portlet.controller.response.ResourceResponse;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.cache.CacheLevel;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.info.PortletInfo;
@@ -133,4 +147,49 @@
resourceForm,
scope);
}
+
+ public ControllerResponse execute() throws ControllerException
+ {
+ try
+ {
+ ControllerPortletControllerContext cpcc = new
ControllerPortletControllerContext(
+ context,
+ page
+ );
+
+ //
+ PortletPageNavigationalState pageNS =
cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
+
+ //
+ PortletWindowNavigationalState windowNS =
pageNS.getPortletWindowNavigationalState(window.getName());
+
+ //
+ PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
+
+ //
+ ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS,
windowNS);
+
+ //
+ PortletController controller = new PortletController();
+
+ //
+ org.jboss.portal.portlet.controller.response.ControllerResponse cr =
controller.process(cpcc, containerRequest);
+
+ //
+ ResourceResponse resourceResponse = (ResourceResponse)cr;
+
+ // Populate the parameters
+ NavigationalStateContext ctx =
(NavigationalStateContext)cpcc.getControllerContext().getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
+
+ PageNavigationalState pns =
ctx.getPageNavigationalState(page.getId().toString());
+
+ //
+ return ControllerResponseFactory.createActionResponse(targetId,
resourceResponse.getResponse(), portletInfo, pns);
+ }
+ catch (PortletInvokerException e)
+ {
+ return ControllerResponseFactory.createResponse(e);
+ }
+ }
+
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -57,65 +57,4 @@
PortletPageNavigationalState pageNS,
PortletWindowNavigationalState windowNS);
- public ControllerResponse execute() throws ControllerException
- {
- try
- {
- ControllerPortletControllerContext cpcc = new
ControllerPortletControllerContext(
- context,
- page
- );
-
- //
- PortletPageNavigationalState pageNS =
cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
-
- //
- PortletWindowNavigationalState windowNS =
pageNS.getPortletWindowNavigationalState(window.getName());
-
- //
- PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
-
- //
- ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS,
windowNS);
-
- //
- PortletController controller = new PortletController();
-
- //
- org.jboss.portal.portlet.controller.response.ControllerResponse cr =
controller.process(cpcc, containerRequest);
-
- //
- if (cr instanceof PageUpdateResponse)
- {
- PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
-
- //
- ControllerPageNavigationalState pageNavigationalState =
(ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
-
- // Flush all NS
- pageNavigationalState.flushUpdates();
-
- //
- return new UpdatePageResponse(page.getId());
- }
- else if (cr instanceof PortletResponse)
- {
- PortletResponse portletResponse = (PortletResponse)cr;
-
- //
- return ControllerResponseFactory.createActionResponse(targetId,
portletResponse.getResponse());
- }
- else
- {
- ResourceResponse resourceResponse = (ResourceResponse)cr;
-
- //
- return ControllerResponseFactory.createActionResponse(targetId,
resourceResponse.getResponse());
- }
- }
- catch (PortletInvokerException e)
- {
- return ControllerResponseFactory.createResponse(e);
- }
- }
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -20,26 +20,26 @@
* 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.core.model.portal.command.view;
+import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerException;
import org.jboss.portal.core.controller.ControllerResponse;
-import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ViewCommandInfo;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.model.portal.command.PageCommand;
import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
+import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.navstate.NavigationalStateContext;
-import org.jboss.portal.common.util.ParameterMap;
-import javax.xml.namespace.QName;
import javax.xml.XMLConstants;
-import java.util.Map;
+import javax.xml.namespace.QName;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -52,7 +52,7 @@
private static final CommandInfo info = new ViewCommandInfo();
/** . */
- private static final Map<String,String[]> EMPTY_PARAMETERS =
Collections.emptyMap();
+ private static final Map<String, String[]> EMPTY_PARAMETERS =
Collections.emptyMap();
/** . */
private Map<String, String[]> parameters;
@@ -93,34 +93,25 @@
public ControllerResponse execute() throws ControllerException
{
- if (parameters.size() > 0)
- {
- NavigationalStateContext nsContext =
(NavigationalStateContext)context.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
+ NavigationalStateContext nsContext =
(NavigationalStateContext)context.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
- //
- String pageId = getPage().getId().toString();
+ String pageId = getPage().getId().toString();
- //
- PageNavigationalState previousPNS = nsContext.getPageNavigationalState(pageId);
-
- //
+ if (parameters.size() > 0)
+ {
Map<QName, String[]> state = new HashMap<QName, String[]>();
- // Clone the previous state if needed
- if (previousPNS != null)
- {
- state.putAll(previousPNS.getParameters());
- }
-
- //
for (Map.Entry<String, String[]> entry : parameters.entrySet())
{
state.put(new QName(XMLConstants.DEFAULT_NS_PREFIX, entry.getKey()),
entry.getValue());
}
- //
nsContext.setPageNavigationalState(pageId, new PageNavigationalState(state));
}
+ else
+ {
+ nsContext.setPageNavigationalState(pageId, null);
+ }
//
return new UpdatePageResponse(page.getId());
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalObjectMetaData.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalObjectMetaData.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalObjectMetaData.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -199,7 +199,17 @@
if (resourceBundle != null)
{
- ResourceBundleManager bundleMgr =
MetaDataResourceBundleFactory.createResourceBundleManager(buildContext.getPortalWebApp().getClassLoader(),
supportedLocales, resourceBundle);
+ ClassLoader classloader = null;
+ if (buildContext.getPortalWebApp() != null)
+ {
+ classloader = buildContext.getPortalWebApp().getClassLoader();
+ }
+ else
+ {
+ classloader = Thread.currentThread().getContextClassLoader();
+ }
+
+ ResourceBundleManager bundleMgr =
MetaDataResourceBundleFactory.createResourceBundleManager(classloader, supportedLocales,
resourceBundle);
object.setDisplayName(bundleMgr.getLocalizedValue("org.jboss.portal.object.name."
+ object.getId().getPath().toString(PortalObjectPath.LEGACY_FORMAT), object.getName()));
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/navstate/PortalObjectNavigationalStateContext.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/navstate/PortalObjectNavigationalStateContext.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/model/portal/navstate/PortalObjectNavigationalStateContext.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -135,7 +135,7 @@
{
PortalObjectId id = (PortalObjectId)wantedKey.getId();
Object storedNS = store.getAttribute(id.toString());
- if (storedNS instanceof WindowNavigationalState)
+ if (storedNS instanceof WindowNavigationalState || storedNS instanceof
PageNavigationalState)
{
oldNS = storedNS;
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/modules/MailModule.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/modules/MailModule.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/modules/MailModule.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -29,6 +29,8 @@
void send(String from, String to, String subject, String body);
+ void send(String from, String to, String subject, String body, String contentType);
+
void setSMTPConnectionTimeout(int SMTPConnectionTimeout);
void setSMTPTimeout(int SMTPTimeout);
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/portlet/PortletRequestDecoder.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/portlet/PortletRequestDecoder.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/portlet/PortletRequestDecoder.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -22,12 +22,13 @@
******************************************************************************/
package org.jboss.portal.core.portlet;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.ParametersStateString;
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.portlet.OpaqueStateString;
+import org.jboss.portal.portlet.ParametersStateString;
+import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.cache.CacheLevel;
import java.util.Map;
@@ -185,21 +186,15 @@
if ((meta & RESOURCE_ID_MASK) != 0)
{
String[] resourceIdParam = queryParams.get(RESOURCE_ID_PARAMETER);
- if (resourceIdParam == null)
- {
- throw new IllegalArgumentException();
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(resourceIdParam,
"resource id");
resourceId = resourceIdParam[0];
}
- // Get the resource id from the parameters if it exists
+ // Get the cacheability from the parameters if it exists
if ((meta & CACHEABILITY_MASK) != 0)
{
String[] cacheabilityParam = queryParams.get(CACHEABILITY_PARAMETER);
- if (cacheabilityParam == null)
- {
- throw new IllegalArgumentException();
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(cacheabilityParam,
"cacheability");
cacheability = CacheLevel.valueOf(cacheabilityParam[0]);
}
}
@@ -209,10 +204,7 @@
if ((meta & MODE_MASK) != 0)
{
String[] modeParam = queryParams.get(MODE_PARAMETER);
- if (modeParam == null)
- {
- throw new IllegalArgumentException();
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(modeParam,
"mode");
mode = Mode.create(modeParam[0]);
}
@@ -220,10 +212,7 @@
if ((meta & WINDOW_STATE_MASK) != 0)
{
String[] windowStateParam = queryParams.get(WINDOW_STATE_PARAMETER);
- if (windowStateParam == null)
- {
- throw new IllegalArgumentException();
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(windowStateParam,
"window state");
windowState = WindowState.create(windowStateParam[0]);
}
}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -25,11 +25,11 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.core.controller.ControllerContext;
-import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.Window;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.content.WindowRendition;
+import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
import org.jboss.portal.server.ServerInvocationContext;
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.server.request.URLFormat;
@@ -84,7 +84,7 @@
//
return new WindowContext(
- window.getId().toString(PortalObjectPath.LEGACY_BASE64_FORMAT),
+ PortletUtils.generateNamespaceFrom(window.getId().toString()),
region,
order,
windowResult);
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -39,6 +39,8 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.portlet.UnavailableException;
+
import javax.xml.namespace.QName;
import java.io.IOException;
import java.io.PrintWriter;
@@ -97,6 +99,15 @@
}
}
+
+ protected void doView(RenderRequest req, RenderResponse resp) throws PortletException,
PortletSecurityException, IOException
+ {
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+ writer.write("This portlet is not made to be viewed");
+ writer.close();
+ }
+
protected void doEditContent(RenderRequest req, RenderResponse resp) throws
PortletException, PortletSecurityException, IOException
{
getContent(req, resp, false);
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, 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. *
@@ -20,6 +20,7 @@
* 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.test.core.model.portal;
import junit.framework.TestSuite;
@@ -130,7 +131,7 @@
duplicate = true;
}
assertTrue(duplicate);
-
+
TransactionAssert.commitTransaction();
}
@@ -144,9 +145,9 @@
n1.createPage("default");
TransactionAssert.commitTransaction();
-
+
boolean rollback = false;
-
+
TransactionAssert.beginTransaction();
try
{
@@ -361,11 +362,6 @@
TransactionAssert.commitTransaction();
}
- public void testPortalNode() throws Exception
- {
-
- }
-
public void testRecreate() throws Exception
{
PortalObjectId defaultId = PortalObjectId.parse("/default",
PortalObjectPath.CANONICAL_FORMAT);
@@ -443,16 +439,6 @@
TransactionAssert.commitTransaction();
}
-// private void constructPortalObjects() throws Exception
-// {
-// Context root = container.getContext();
-// assertNotNull(root);
-// Portal portal = root.createPortal("default");
-// assertNotNull(portal);
-// Page page = portal.createPage("default");
-// assertNotNull(page);
-// }
-
private static class PortalObjectComparator implements Comparator
{
public int compare(Object o1, Object o2)
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,242 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, 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.test.core.model.portal;
+
+import junit.framework.TestSuite;
+import org.jboss.portal.common.junit.TransactionAssert;
+import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.model.portal.Context;
+import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
+import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
+import org.jboss.portal.core.model.portal.Page;
+import org.jboss.portal.core.model.portal.Portal;
+import org.jboss.portal.core.model.portal.PortalObject;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class PortalObjectTestCase extends AbstractPortalObjectContainerTestCase
+{
+ private Context root;
+ private Portal p_1;
+ private Page p_1_1;
+ private Page p_1_2;
+ private static final int A_INDEX = 65;
+
+ public static TestSuite suite() throws Exception
+ {
+ return AbstractPortalObjectContainerTestCase.suite(PortalObjectTestCase.class);
+ }
+
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ TransactionAssert.beginTransaction();
+ root = container.getContext("");
+ p_1 = root.createPortal("1");
+ p_1_1 = p_1.createPage("1");
+ p_1_2 = p_1.createPage("2");
+ p_1_1.createPage("11");
+ p_1_1.createPage("12");
+ p_1_1.createPage("13");
+ p_1_1.createPage("14");
+ p_1_1.createWindow("w1", ContentType.PORTLET, "foo1");
+ p_1_1.createWindow("w2", ContentType.PORTLET, "foo2");
+ p_1_1.createWindow("w3", ContentType.PORTLET, "foo3");
+ p_1_2.createPage("21");
+ p_1_2.createPage("22");
+ p_1_2.createPage("23");
+ p_1_2.createPage("24");
+ TransactionAssert.commitTransaction();
+ }
+
+ public void testGetChildren() throws Exception
+ {
+ Collection<PortalObject> children = root.getChildren();
+ assertEquals(1, children.size());
+
+ children = p_1.getChildren();
+ assertEquals(2, children.size());
+
+ children = p_1_1.getChildren();
+ assertEquals(7, children.size());
+
+ children = p_1_2.getChildren();
+ assertEquals(4, children.size());
+
+ children = p_1_1.getChildren(PortalObject.PAGE_MASK);
+ assertEquals(4, children.size());
+
+ children = p_1_1.getChildren(PortalObject.WINDOW_MASK);
+ assertEquals(3, children.size());
+ }
+
+ public void testGetChild()
+ {
+ TransactionAssert.beginTransaction();
+ PortalObject child = p_1_1.getChild("w1");
+ assertNotNull(child);
+ assertEquals("w1", child.getName());
+ assertEquals(p_1_1, child.getParent());
+ TransactionAssert.commitTransaction();
+ }
+
+ public void testIterator() throws NoSuchPortalObjectException,
DuplicatePortalObjectException
+ {
+ Portal portal;
+ Page page;
+
+ TransactionAssert.beginTransaction();
+ root.destroyChild(p_1.getName());
+ char nbChildren = 20;
+ portal = root.createPortal("portal");
+ page = portal.createPage("page");
+
+ // create children, we need to convert the current index with Character.toString as
default ordering results in
+ // pa10 < pa2 and in test failure
+ for (char i = A_INDEX; i < nbChildren + A_INDEX; i++)
+ {
+ // convert current index into a letter
+ String letter = Character.toString(i);
+ page.createPage("pa" + letter);
+ page.createWindow("w" + letter, ContentType.PORTLET, "foo" +
letter);
+ }
+ TransactionAssert.commitTransaction();
+
+ Collection<PortalObject> children =
page.getChildren(PortalObject.PAGE_MASK);
+ assertNotNull(children);
+ char i = A_INDEX;
+ String name;
+ for (PortalObject child : children)
+ {
+ name = child.getName();
+ assertEquals("pa" + Character.toString(i++), name);
+ }
+
+ children = page.getChildren(PortalObject.WINDOW_MASK);
+ assertNotNull(children);
+ i = A_INDEX;
+ for (PortalObject child : children)
+ {
+ name = child.getName();
+ assertEquals("w" + Character.toString(i++), name);
+ }
+ }
+
+ /*
+ // This is commented out because this test is meant to test performance and takes a
long time
+ // TODO: Should be moved to a performance test suite
+ public void testPerformanceToArray() throws NoSuchPortalObjectException,
DuplicatePortalObjectException
+ {
+ Portal portal;
+ Page page;
+
+ long time = System.currentTimeMillis();
+ TransactionAssert.beginTransaction();
+ root.destroyChild(p_1.getName());
+ portal = root.createPortal("portal");
+ page = portal.createPage("page");
+ int nbPages = 200;
+ int nbWindows = 100;
+ for(int j = 0; j < nbPages; j++)
+ {
+ page.createPage("page" + j);
+ }
+ for (int k = 0; k < nbWindows; k++)
+ {
+ page.createWindow("window" + k, ContentType.PORTLET, "foo" +
k);
+ }
+ TransactionAssert.commitTransaction();
+ System.out.println("Creation time = " + (System.currentTimeMillis() -
time));
+
+ time = System.currentTimeMillis();
+ for (int i = 0; i < 100000; i++)
+ {
+ assertEquals(nbWindows,
page.getChildren(PortalObject.WINDOW_MASK).toArray().length);
+ assertEquals(nbPages,
page.getChildren(PortalObject.PAGE_MASK).toArray().length);
+ }
+ System.out.println("Tests time = " + (System.currentTimeMillis() -
time));
+ }*/
+
+ /*
+ // This is commented out because this test is meant to test performance and takes a
long time
+ // TODO: Should be moved to a performance test suite
+ public void testPerformanceGetChildren() throws DuplicatePortalObjectException,
NoSuchPortalObjectException
+ {
+ Portal portal;
+ Page page;
+
+ long time = System.currentTimeMillis();
+ TransactionAssert.beginTransaction();
+ root.destroyChild(p_1.getName());
+ int nbPortals = 5;
+ int nbPages = 20;
+ int nbWindows = 20;
+ for(int i = 0; i < nbPortals; i++)
+ {
+ portal = root.createPortal("p" + i);
+ for(int j = 0; j < nbPages; j++)
+ {
+ String name = "p" + i + "pa" + j;
+ page = portal.createPage(name);
+ page.createPage(name + "pa1");
+ page.createPage(name + "pa2");
+ for (int k = 0; k < nbWindows; k++)
+ {
+ page.createWindow(name + "w" + k, ContentType.PORTLET,
"foo" + k);
+ }
+ }
+ }
+ TransactionAssert.commitTransaction();
+ System.out.println("Creation time = " + (System.currentTimeMillis() -
time));
+
+
+ time = System.currentTimeMillis();
+ int portalIndex = (int) (nbPortals * Math.random());
+ assertEquals(nbPortals, root.getChildren().size());
+ assertEquals(nbPortals, root.getChildren(PortalObject.PORTAL_MASK).size());
+ assertEquals(nbPages, root.getChild("p" +
portalIndex).getChildren().size());
+ assertEquals(nbPages, root.getChild("p" +
portalIndex).getChildren(PortalObject.PAGE_MASK).size());
+
+ for (int i = 0; i < 1000000; i++)
+ {
+ portalIndex = (int) (nbPortals * Math.random());
+ String portalName = "p" + portalIndex;
+ PortalObject child = root.getChild(portalName);
+ assertNotNull(child);
+ int pageIndex = (int) (nbPages * Math.random());
+ child = child.getChild(portalName + "pa" + pageIndex);
+ assertNotNull(child);
+ assertEquals(2 + nbWindows, child.getChildren().size());
+ assertEquals(2, child.getChildren(PortalObject.PAGE_MASK).size());
+ assertEquals(nbWindows, child.getChildren(PortalObject.WINDOW_MASK).size());
+ }
+ System.out.println("Tests time = " + (System.currentTimeMillis() -
time));
+ }*/
+}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2009-03-06
23:21:38 UTC (rev 12973)
@@ -148,6 +148,9 @@
</depends-list>
</mbean>
+
+
+
<!-- Command stack -->
<mbean
code="org.jboss.portal.core.aspects.controller.ControlInterceptor"
name="portal:service=Interceptor,type=Command,name=Control"
xmbean-dd=""
@@ -267,6 +270,14 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
</mbean>
+ <mbean code="org.jboss.portal.core.model.instance.InstanceInvoker"
+ name="portal:service=Interceptor,type=Portlet,name=InstanceInvoker"
xmbean-dd=""
+
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <depends optional-attribute-name="PortletInvoker"
proxy-type="attribute">
+ portal:service=PortletInvoker,type=Federating
+ </depends>
+ <xmbean/>
+ </mbean>
<mbean
code="org.jboss.portal.portlet.impl.invocation.JBossPortletInterceptorStackFactory"
name="portal:service=InterceptorStackFactory,type=Instance"
xmbean-dd=""
@@ -276,6 +287,7 @@
<depends-list-element>portal:service=Interceptor,type=Portlet,name=ConsumerCache</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=InstanceSecurity</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=PortalSessionSynchronization</depends-list-element>
+
<depends-list-element>portal:service=Interceptor,type=Portlet,name=InstanceInvoker</depends-list-element>
</depends-list>
</mbean>
@@ -1035,7 +1047,6 @@
<depends optional-attribute-name="CoordinationConfigurator"
proxy-type="attribute">
portal:service=CoordinationService
</depends>
-
</mbean>
<!-- The controller factory -->
@@ -1209,5 +1220,5 @@
<depends optional-attribute-name="JBossAppEntityResolver"
proxy-type="attribute">portal:service=EntityResolver
</depends>
</mbean>
-
+
</server>
Copied: branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles)
Deleted:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource.properties 2009-03-06
20:30:12 UTC (rev 12964)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,24 +0,0 @@
-################################################################################
-# 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. #
-################################################################################
-
-org.jboss.portal.object.name.admin.default=Admin
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,24 @@
+################################################################################
+# 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. #
+################################################################################
+
+org.jboss.portal.object.name.admin.default=Admin
Deleted:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties 2009-03-06
20:30:12 UTC (rev 12964)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,25 +0,0 @@
-################################################################################
-# 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. #
-################################################################################
-
-org.jboss.portal.object.name.admin.default=Administration
-org.jboss.portal.object.name.admin.Members=Utilisateurs
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_fr.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,25 @@
+################################################################################
+# 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. #
+################################################################################
+
+org.jboss.portal.object.name.admin.default=Administration
+org.jboss.portal.object.name.admin.Members=Utilisateurs
Deleted:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties 2009-03-06
20:30:12 UTC (rev 12964)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,25 +0,0 @@
-################################################################################
-# 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. #
-################################################################################
-
-org.jboss.portal.object.name.admin.default=Amministrazione
-org.jboss.portal.object.name.admin.Members=Membri
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,25 @@
+################################################################################
+# 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. #
+################################################################################
+
+org.jboss.portal.object.name.admin.default=Amministrazione
+org.jboss.portal.object.name.admin.Members=Membri
Deleted:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties 2009-03-06
20:30:12 UTC (rev 12964)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,25 +0,0 @@
-################################################################################
-# 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. #
-################################################################################
-
-org.jboss.portal.object.name.admin.default=\u30dd\u30fc\u30bf\u30eb\u7ba1\u7406
-org.jboss.portal.object.name.admin.Members=\u30e6\u30fc\u30b6\u7ba1\u7406
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_ja.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,25 @@
+################################################################################
+# 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. #
+################################################################################
+
+org.jboss.portal.object.name.admin.default=\u30dd\u30fc\u30bf\u30eb\u7ba1\u7406
+org.jboss.portal.object.name.admin.Members=\u30e6\u30fc\u30b6\u7ba1\u7406
Deleted:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties 2009-03-06
20:30:12 UTC (rev 12964)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,24 +0,0 @@
-################################################################################
-# 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. #
-################################################################################
-
-org.jboss.portal.object.name.admin.default=Administra\u00E7\u00E3o
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/bundles/Resource_pt.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,24 @@
+################################################################################
+# 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. #
+################################################################################
+
+org.jboss.portal.object.name.admin.default=Administra\u00E7\u00E3o
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/identity/profile-config.xml
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/identity/profile-config.xml 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-sar/conf/identity/profile-config.xml 2009-03-06
23:21:38 UTC (rev 12973)
@@ -34,7 +34,7 @@
<access-mode>read-only</access-mode>
<usage>mandatory</usage>
<display-name xml:lang="en">Name</display-name>
- <description xml:lang="en">The user name</description>
+ <description xml:lang="en">The user's
nickname</description>
<mapping>
<database>
<type>column</type>
@@ -48,7 +48,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Given Name</display-name>
- <description xml:lang="en">The user given name</description>
+ <description xml:lang="en">The user's given
name</description>
<mapping>
<database>
<type>column</type>
@@ -62,7 +62,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Family name</display-name>
- <description xml:lang="en">The user family
name</description>
+ <description xml:lang="en">The user's family
name</description>
<mapping>
<database>
<type>column</type>
@@ -76,7 +76,7 @@
<access-mode>read-write</access-mode>
<usage>mandatory</usage>
<display-name xml:lang="en">Email</display-name>
- <description xml:lang="en">The user real email</description>
+ <description xml:lang="en">The user's real
email</description>
<mapping>
<database>
<type>column</type>
@@ -93,7 +93,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Fake email</display-name>
- <description xml:lang="en">The user fake email</description>
+ <description xml:lang="en">The user's fake
email</description>
<mapping>
<database>
<type>column</type>
@@ -107,7 +107,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Registration date</display-name>
- <description xml:lang="en">Registration date of
user</description>
+ <description xml:lang="en">The user's registration
date</description>
<mapping>
<database>
<type>column</type>
@@ -121,7 +121,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">View real email</display-name>
- <description xml:lang="en">Is user real email displayed in
public</description>
+ <description xml:lang="en">Should the user's real email be
displayed in public?</description>
<mapping>
<database>
<type>column</type>
@@ -135,7 +135,7 @@
<access-mode>read-write</access-mode>
<usage>mandatory</usage>
<display-name xml:lang="en">Enabled</display-name>
- <description xml:lang="en">User enabled state</description>
+ <description xml:lang="en">Is user enabled?</description>
<mapping>
<database>
<type>column</type>
@@ -151,7 +151,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Location</display-name>
- <description xml:lang="en">The user location</description>
+ <description xml:lang="en">The user's
location</description>
<mapping>
<database>
<type>dynamic</type>
@@ -165,7 +165,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Occupation</display-name>
- <description xml:lang="en">The user occupation</description>
+ <description xml:lang="en">The user's
occupation</description>
<mapping>
<database>
<type>dynamic</type>
@@ -196,7 +196,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Signature</display-name>
- <description xml:lang="en">The user signature</description>
+ <description xml:lang="en">The user's
signature</description>
<mapping>
<database>
<type>dynamic</type>
@@ -213,7 +213,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Interests</display-name>
- <description xml:lang="en">The user interests</description>
+ <description xml:lang="en">The user's
interests</description>
<mapping>
<database>
<type>dynamic</type>
@@ -227,7 +227,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Locale</display-name>
- <description xml:lang="en">The user locale</description>
+ <description xml:lang="en">The user's
locale</description>
<mapping>
<database>
<type>dynamic</type>
@@ -244,7 +244,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">ICQ</display-name>
- <description xml:lang="en">The user ICQ id</description>
+ <description xml:lang="en">The user's ICQ
id</description>
<mapping>
<database>
<type>dynamic</type>
@@ -258,7 +258,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">AIM</display-name>
- <description xml:lang="en">The user AIM id</description>
+ <description xml:lang="en">The user's AIM
id</description>
<mapping>
<database>
<type>dynamic</type>
@@ -272,7 +272,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">MSN</display-name>
- <description xml:lang="en">The user MSN id</description>
+ <description xml:lang="en">The user's MSN
id</description>
<mapping>
<database>
<type>dynamic</type>
@@ -286,7 +286,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">YIM</display-name>
- <description xml:lang="en">The user YIM id</description>
+ <description xml:lang="en">The user's YIM
id</description>
<mapping>
<database>
<type>dynamic</type>
@@ -300,7 +300,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Skype</display-name>
- <description xml:lang="en">The user skype id</description>
+ <description xml:lang="en">The user's Skype
id</description>
<mapping>
<database>
<type>dynamic</type>
@@ -314,7 +314,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">XMMP</display-name>
- <description xml:lang="en">The user XMMP id</description>
+ <description xml:lang="en">The user's XMMP
id</description>
<mapping>
<database>
<type>dynamic</type>
@@ -328,14 +328,14 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Homepage</display-name>
- <description xml:lang="en">The user homepage</description>
+ <description xml:lang="en">The user's
homepage</description>
<mapping>
<database>
<type>dynamic</type>
<value>portal.user.homepage</value>
</database>
<!--<ldap>-->
- <!--<value>seeAlso</value>-->
+ <!--<value>seeAlso</value>-->
<!--</ldap>-->
</mapping>
</property>
@@ -345,7 +345,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Timezone</display-name>
- <description xml:lang="en">Timezone in users
location</description>
+ <description xml:lang="en">The user's
timezone</description>
<mapping>
<database>
<type>dynamic</type>
@@ -359,7 +359,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Theme</display-name>
- <description xml:lang="en">Portlat theme that user is
using</description>
+ <description xml:lang="en">The user's chosen Portal
theme</description>
<mapping>
<database>
<type>dynamic</type>
@@ -401,7 +401,7 @@
<access-mode>read-write</access-mode>
<usage>optional</usage>
<display-name xml:lang="en">Last login</display-name>
- <description xml:lang="en">The date of users last
login</description>
+ <description xml:lang="en">The user's last login
date</description>
<mapping>
<database>
<type>dynamic</type>
@@ -409,4 +409,18 @@
</database>
</mapping>
</property>
+ <property>
+ <name>user.login.id</name>
+ <type>java.lang.String</type>
+ <access-mode>read-write</access-mode>
+ <usage>mandatory</usage>
+ <display-name xml:lang="en">User login
identifier</display-name>
+ <description xml:lang="en">The user's login
identifier</description>
+ <mapping>
+ <database>
+ <type>dynamic</type>
+ <value>user.login.id</value>
+ </database>
+ </mapping>
+ </property>
</profile>
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource.properties 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -34,4 +34,4 @@
PORTAL=Portal
ADMIN=Admin
MEMBERS=Members
-LOGGED=Logged in as
\ No newline at end of file
+LOGGED=Logged in as
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource_ja.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/classes/Resource_ja.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource_ja.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource_ja.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,37 @@
+################################################################################
+# 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. #
+################################################################################
+
+POWERED_BY=Powered by
+THEME_BY=Theme by
+LOGIN=\u30ed\u30b0\u30a4\u30f3
+LOGOUT=\u30ed\u30b0\u30a2\u30a6\u30c8
+PORTLET_INSTANCE_ASSOCIATED=\u3053\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u95a2\u9023\u3059\u308b\u30dd\u30fc\u30c8\u30ec\u30c3\u30c8\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9
+PORTLET_NAME=\u30dd\u30fc\u30c8\u30ec\u30c3\u30c8\u540d
+PORTLET_DESCRIPTION=\u30dd\u30fc\u30c8\u30ec\u30c3\u30c8\u8aac\u660e
+DASHBOARD=\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9
+CONFIGURE_DASHBOARD=\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306e\u8a2d\u5b9a
+COPY_TO_DASHBOARD=\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3078\u30b3\u30d4\u30fc
+PORTAL=\u30dd\u30fc\u30bf\u30eb
+ADMIN=\u7ba1\u7406
+MEMBERS=\u30e1\u30f3\u30d0\u30fc
+LOGGED=\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource_pt_BR.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/classes/Resource_pt_BR.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource_pt_BR.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/classes/Resource_pt_BR.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,37 @@
+################################################################################
+# 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. #
+################################################################################
+
+POWERED_BY=Desenvolvido com
+THEME_BY=Tema por
+LOGIN=Entrar
+LOGOUT=Sair
+PORTLET_INSTANCE_ASSOCIATED=Inst\u00E2ncia de portlet associada a esta janela
+PORTLET_NAME=Nome do Portlet
+PORTLET_DESCRIPTION=Descri\u00E7\u00E3o do Portlet
+DASHBOARD=Meu Portal
+CONFIGURE_DASHBOARD=Configurar Meu Portal
+COPY_TO_DASHBOARD=Copiar para o Meu Portal
+PORTAL=Portal
+ADMIN=Administra\u00E7\u00E3o
+MEMBERS=Membros
+LOGGED=Conectado como
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -12,7 +12,7 @@
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.Locale" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%
@@ -185,7 +185,7 @@
private String getIcon(PortletInfo info)
{
String iconLocation = PortletContentEditorPortlet.DEFAULT_PORTLET_ICON;
- PortletInfoInfo portletInfo = info.getAttachment(PortletInfoInfo.class);
+ PortletInfoInfo portletInfo =
(PortletInfoInfo)info.getAttachment(PortletInfoInfo.class);
if (portletInfo != null)
{
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -29,7 +29,7 @@
document.write('<a href=\"<%= loginURL
%>\">Login</a>');
}
//set the iframe src for login modal to requested URL
- var iframeSrc = '<%= loginURL %>' + '?loginheight=0';
+ var iframeSrc = '<%= loginURL %>';
document.getElementById('loginIframe').src = iframeSrc;
/* ]]> */
</script>
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIf01.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIf01.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIf01.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,5 +1,5 @@
<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ page isELIgnored="false" %>
<n:if ctx="IfCond">Some text</n:if>
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testInclude01.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testInclude01.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testInclude01.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,5 +1,5 @@
<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ page isELIgnored="false" %>
BeginInclude:<n:include page="testInclude02.jsp"/>:EndInclude
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testInclude03.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testInclude03.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testInclude03.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,5 +1,5 @@
<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ page isELIgnored="false" %>
Foo:<n:include page="testInclude01.jsp"/>:Bar
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate01.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate01.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate01.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,5 +1,5 @@
<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ page isELIgnored="false" %>
<n:iterate ctx="row">Some text</n:iterate>
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate02.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate02.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate02.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,5 +1,5 @@
<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ page isELIgnored="false" %>
<n:iterate ctx="row">A<n:iterate
ctx="col">B</n:iterate>C</n:iterate>
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate03.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate03.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testIterate03.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,5 +1,5 @@
<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ page isELIgnored="false" %>
<n:iterate ctx="row">A<n:iterate ctx="col">B<n:iterate
ctx="foo">C</n:iterate></n:iterate>D</n:iterate>
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testTaglib01.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testTaglib01.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testTaglib01.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,5 +1,5 @@
<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ page isELIgnored="false" %>
${n:out("foo")}:<n:include
page="testTaglib02.jsp"/>:${n:out("bar")}
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testTaglib02.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testTaglib02.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-core-war/WEB-INF/jsp/test/testTaglib02.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,6 +1,6 @@
<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
-<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
<%@ page isELIgnored="false" %>
${n:out("foo")}:
<n:iterate ctx="row1">
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ja.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ja.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ja.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ja.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,32 @@
+################################################################################
+# 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. #
+################################################################################
+
+ACCOUNT_DISABLED=\u3042\u306a\u305f\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u7121\u52b9\u3067\u3059\u3002
+ACCOUNT_INEXISTING_OR_WRONG_PASSWORD=\u30e6\u30fc\u30b6\u304c\u5b58\u5728\u3057\u306a\u3044\u304b\u3001\u3082\u3057\u304f\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002
+ACCOUNT_NOTASSIGNEDTOROLE=\u6a29\u9650\u304c\u3042\u308a\u307e\u305b\u3093\u3002
+
+LOGIN_TITLE=JBoss Portal \u30ed\u30b0\u30a4\u30f3
+LOGIN_USERNAME=\u30e6\u30fc\u30b6\u540d
+LOGIN_PASSWORD=\u30d1\u30b9\u30ef\u30fc\u30c9
+LOGIN_CANCEL=\u30ad\u30e3\u30f3\u30bb\u30eb
+LOGIN_SUBMIT=\u9001\u4fe1
Copied:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_pt_BR.properties
(from rev 12964,
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/WEB-INF/classes/Resource_pt_BR.properties)
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_pt_BR.properties
(rev 0)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_pt_BR.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -0,0 +1,32 @@
+################################################################################
+# 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. #
+################################################################################
+
+ACCOUNT_DISABLED=Sua conta est\u00E1 desativada
+ACCOUNT_INEXISTING_OR_WRONG_PASSWORD=O usu\u00E1rio n\u00E3o existe ou a senha est\u00E1
incorreta
+ACCOUNT_NOTASSIGNEDTOROLE=O usu\u00E1rio n\u00E3o tem a permiss\u00E3o correta
+
+LOGIN_TITLE=Login do JBoss Portal
+LOGIN_USERNAME=Usu\u00E1rio
+LOGIN_PASSWORD=Senha
+LOGIN_CANCEL=Cancelar
+LOGIN_SUBMIT=Enviar
Deleted:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ru.properties
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ru.properties 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/WEB-INF/classes/Resource_ru.properties 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,32 +0,0 @@
-################################################################################
-# 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. #
-################################################################################
-
-ACCOUNT_DISABLED=Your account is disabled
-ACCOUNT_INEXISTING_OR_WRONG_PASSWORD=The user doesn't exist or the password is
incorrect
-ACCOUNT_NOTASSIGNEDTOROLE=The user doesn't have the correct role
-
-LOGIN_TITLE=JBoss Portal Login
-LOGIN_USERNAME=Username
-LOGIN_PASSWORD=Password
-LOGIN_CANCEL=Cancel
-LOGIN_SUBMIT=Submit
\ No newline at end of file
Modified:
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/login.jsp
===================================================================
---
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/login.jsp 2009-03-06
23:21:14 UTC (rev 12972)
+++
branches/JBoss_Portal_AS5_Deployer/core/src/resources/portal-server-war/login.jsp 2009-03-06
23:21:38 UTC (rev 12973)
@@ -1,108 +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 ~
+ ~ Copyright 2009, 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. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
<%@ page pageEncoding="utf-8" %>
-<%@page import="org.jboss.portal.identity.UserStatus"%>
-<%@page import="java.util.ResourceBundle"%>
+<%@page import="org.jboss.portal.identity.UserStatus" %>
+<%@page import="java.util.ResourceBundle" %>
<%
- ResourceBundle rb = ResourceBundle.getBundle("Resource",
request.getLocale());
+ ResourceBundle rb = ResourceBundle.getBundle("Resource",
request.getLocale());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title><%= rb.getString("LOGIN_TITLE") %></title>
- <style type="text/css">
- /* <![CDATA[ */
- body {
- margin: 0;
- padding: 0;
- border: 0;
- padding-top: <%=(request.getParameter("loginheight") != null ?
request.getParameter("loginheight") : "300px")%>;
- }
- /* ]]> */
- </style>
+ <title><%= rb.getString("LOGIN_TITLE")%>
+ </title>
- <script>
- function setFocusOnLoginForm() {
- try {
- document.loginform.j_username.focus();
- }
- catch (e) {
- }
- }
- </script>
+ <script type="text/javascript"
src="/portal-core/js/login.js"></script>
- <link rel="stylesheet" href="/portal-core/css/login.css"
type="text/css" />
+ <link rel="stylesheet" href="/portal-core/css/login.css"
type="text/css"/>
</head>
-<body onload="setFocusOnLoginForm();">
+<body
onload="JBossPortal.login.setFocusOnLoginForm();JBossPortal.login.displayStatus();JBossPortal.login.validate(10);">
<div class="login-container">
- <div class="login-header">
- <h2><%= rb.getString("LOGIN_TITLE") %></h2>
- </div>
- <div class="login-content">
+ <div class="login-header">
+ <%--text title--%>
+ <%--<h2><%= rb.getString("LOGIN_TITLE")
%></h2>--%>
+ <%--img title--%>
+ <img src="/portal-core/images/logo-small-blue.gif"
width="118px" height="17px" alt=""/>
+ </div>
+ <div class="login-content" id="login-content">
+ <div class="error-message" id="login-error-message"
+
style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus")
? "" : "display:none"))%>;">
+ <%
- <div class="error-message"
-
style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus")
? "" : "display:none"))%>;">
- <%
-
- if
(UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_DISABLED"));
- }
- else if
(UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus"))
||
UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
-
out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
- }
- else if
(UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
- }
- %>
- </div>
- <form method="post" action="<%=
response.encodeURL("j_security_check") %>" name="loginform"
id="loginForm"
- target="_parent">
- <div class="form-field">
- <label for="j_username"><%=
rb.getString("LOGIN_USERNAME") %></label>
- <input type="text" name="j_username"
id="j_username" value=""/>
- </div>
- <div class="form-field">
- <label for="j_password"><%=
rb.getString("LOGIN_PASSWORD") %></label>
- <input type="password" name="j_password"
id="j_password" value=""/>
- </div><br class="clear"/>
- <div class="button-container"><br
class="clear"/>
- <input style="<%=(request.getParameter("loginheight") !=
null ? "" : "display:none")%>;" type="button"
name="cancel" value="<%= rb.getString("LOGIN_CANCEL")
%>" class="cancel-button"
onclick="window.parent.hideContentModal('login-modal');"/>
+ if
(UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
{
+ out.println(rb.getString("ACCOUNT_DISABLED"));
+ } else if
(UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus"))
||
UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus")))
{
+
out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
+ } else if
(UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
{
+ out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
+ }
+ %>
+ </div>
+ <form method="post" action="<%=
response.encodeURL("j_security_check") %>" name="loginform"
id="loginForm"
+ target="_parent" style="margin:0;padding:0">
+ <div class="form-field">
+ <label for="j_username"><%=
rb.getString("LOGIN_USERNAME") %>
+ </label>
+ <input type="text" style="width:155px;"
name="j_username" id="j_username" value=""
onkeyup="JBossPortal.login.validate();"
onFocus="JBossPortal.login.highlight('j_username');"
onblur="JBossPortal.login.highlight('j_username');"/>
+ </div>
+ <div class="form-field">
+ <label for="j_password"><%=
rb.getString("LOGIN_PASSWORD") %>
+ </label>
+ <input type="password" style="width:155px;"
name="j_password" id="j_password" value=""
onkeyup="JBossPortal.login.validate();"
onFocus="JBossPortal.login.highlight('j_password');"
onblur="JBossPortal.login.highlight('j_password');"/>
+ </div>
<br class="clear"/>
- <input style="<%=(request.getParameter("loginheight") !=
null ? "" : "right:10px")%>;" type="submit"
name="login" value="<%= rb.getString("LOGIN_SUBMIT")
%>" class="login-button"/>
- </div>
- <br class="clear"/>
- </form>
- </div>
+ <div class="button-container">
+ <br class="clear"/>
+ <input type="button" name="cancel"
id="login-cancel"
+ value="<%= rb.getString("LOGIN_CANCEL")
%>" class="cancel-button"
+
onclick="window.parent.hideContentModal('login-modal');"/>
+ <br class="clear"/>
+ <input type="submit" name="login"
id="login-submit"
+ value="<%= rb.getString("LOGIN_SUBMIT")
%>" class="login-button"/>
+ </div>
+ </form>
+
+ </div>
</div>
</body>
</html>