JBoss Portal SVN: r6845 - in branches/JBoss_Portal_Branch_2_4: server/src/main/org/jboss/portal/server and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-27 08:33:42 -0400 (Tue, 27 Mar 2007)
New Revision: 6845
Modified:
branches/JBoss_Portal_Branch_2_4/build/distrib.xml
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/PortalConstants.java
Log:
updating 2.4 branch with release infos
Modified: branches/JBoss_Portal_Branch_2_4/build/distrib.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_4/build/distrib.xml 2007-03-27 12:28:06 UTC (rev 6844)
+++ branches/JBoss_Portal_Branch_2_4/build/distrib.xml 2007-03-27 12:33:42 UTC (rev 6845)
@@ -1,7 +1,7 @@
<project default="main" name="JBoss Portal">
<property name="source.dir" value="../../jboss-portal-2.4"/>
- <property name="release.version" value="2.4.1"/>
+ <property name="release.version" value="2.4.2"/>
<!-- -->
<property name="portal.release.normal.name" value="jboss-portal-${release.version}"/>
Modified: branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/PortalConstants.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/PortalConstants.java 2007-03-27 12:28:06 UTC (rev 6844)
+++ branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/PortalConstants.java 2007-03-27 12:33:42 UTC (rev 6845)
@@ -35,7 +35,7 @@
public class PortalConstants
{
/** Current version. */
- public static Version VERSION = new Version("JBoss Portal", 2, 4, 1, new Version.Qualifier(Version.Qualifier.Prefix.GA, ""), "Devil");
+ public static Version VERSION = new Version("JBoss Portal", 2, 4, 2, new Version.Qualifier(Version.Qualifier.Prefix.CR, "1"), "Devil");
/** The default portal name. */
public static String DEFAULT_PORTAL_NAME = "default";
17 years, 3 months
JBoss Portal SVN: r6844 - docs/tags.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-27 08:28:06 -0400 (Tue, 27 Mar 2007)
New Revision: 6844
Added:
docs/tags/JBoss_Portal_2_4_2_CR1/
Log:
tagging 2.4.2 CR1
Copied: docs/tags/JBoss_Portal_2_4_2_CR1 (from rev 6843, docs/branches/JBoss_Portal_Branch_2_4)
17 years, 3 months
JBoss Portal SVN: r6843 - tags.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-27 08:27:36 -0400 (Tue, 27 Mar 2007)
New Revision: 6843
Added:
tags/JBoss_Portal_2_4_2_CR1/
Log:
tagging 2.4.2 CR1
Copied: tags/JBoss_Portal_2_4_2_CR1 (from rev 6842, branches/JBoss_Portal_Branch_2_4)
17 years, 3 months
JBoss Portal SVN: r6842 - trunk/core-admin/src/main/org/jboss/portal/core/admin/ui.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-03-27 08:25:46 -0400 (Tue, 27 Mar 2007)
New Revision: 6842
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
Log:
Modifying a window was broken
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-27 11:43:01 UTC (rev 6841)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-27 12:25:46 UTC (rev 6842)
@@ -535,9 +535,9 @@
{
PortletActionEvent actionEvent = (PortletActionEvent)event;
Map actionParams = actionEvent.getParameterMap();
- if (actionParams.get("meta_action") != null)
+ if (actionParams.get("content.action.select") != null)
{
- String[] uris = (String[])actionParams.get("uri");
+ String[] uris = (String[])actionParams.get("content.uri");
if (uris != null && uris.length > 0)
{
String uri = uris[0];
17 years, 3 months
JBoss Portal SVN: r6841 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsf/common and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-03-27 07:43:01 -0400 (Tue, 27 Mar 2007)
New Revision: 6841
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPageLayout.xhtml
Log:
Keep window name and target region defined when navigating for content
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2007-03-27 10:26:44 UTC (rev 6840)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2007-03-27 11:43:01 UTC (rev 6841)
@@ -36,6 +36,7 @@
import org.jboss.portal.theme.PortalLayout;
import org.jboss.portal.theme.LayoutService;
import org.jboss.portal.faces.component.portlet.PortletActionEvent;
+import org.jboss.portal.faces.component.portlet.PortletRenderEvent;
import org.jboss.portal.faces.el.dynamic.DynamicBean;
import org.jboss.portal.faces.el.PropertyValue;
import org.jboss.portal.portlet.PortletInvoker;
@@ -215,15 +216,54 @@
assignedWindows.values.clear();
}
+ private String windowName;
+ private String targetRegion;
+
+ public String getWindowName()
+ {
+ return windowName;
+ }
+
+ public void setWindowName(String windowName)
+ {
+ this.windowName = windowName;
+ }
+
+ public String getTargetRegion()
+ {
+ return targetRegion;
+ }
+
+ public void setTargetRegion(String targetRegion)
+ {
+ this.targetRegion = targetRegion;
+ }
+
+
/**
* Portlet event
*/
public void assignWindow(ActionEvent event)
{
- if (event instanceof PortletActionEvent)
+ if (event instanceof PortletRenderEvent)
{
+ PortletRenderEvent renderEvent = (PortletRenderEvent)event;
+ Map renderParams = renderEvent.getParameterMap();
+
+ // Keep window name and region defined
+ setWindowName(((String[])renderParams.get("windowName"))[0]);
+ setTargetRegion(((String[])renderParams.get("targetRegion"))[0]);
+ }
+ else if (event instanceof PortletActionEvent)
+ {
+
PortletActionEvent actionEvent = (PortletActionEvent)event;
Map actionParams = actionEvent.getParameterMap();
+
+ // Keep window name and region defined
+ setWindowName(((String[])actionParams.get("windowName"))[0]);
+ setTargetRegion(((String[])actionParams.get("targetRegion"))[0]);
+
if (actionParams.get(CONTENT_ACTION_SELECT) != null)
{
String[] uris = (String[])actionParams.get(CONTENT_URI);
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPageLayout.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPageLayout.xhtml 2007-03-27 10:26:44 UTC (rev 6840)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPageLayout.xhtml 2007-03-27 11:43:01 UTC (rev 6841)
@@ -112,8 +112,7 @@
</td>
<td class="widget">
<h:form id="windowForm">
- <h:inputText id="windowName" value="#{assignWindowsAction.windowName}"
- styleClass="portlet-form-input-field"/>
+ <h:inputText id="windowName" value="#{pageManager.windowName}" styleClass="portlet-form-input-field"/>
<h:message for="windowName" errorClass="portlet-msg-error"/>
</h:form>
</td>
@@ -124,7 +123,7 @@
</td>
<td class="widget">
<h:form id="regionForm">
- <h:selectOneMenu id="targetRegion" styleClass="portlet-form-input-field">
+ <h:selectOneMenu id="targetRegion" value="#{pageManager.targetRegion}" styleClass="portlet-form-input-field">
<f:selectItems value="#{pageManager.regionItems}"/>
</h:selectOneMenu>
<h:message for="targetRegion" errorClass="portlet-msg-error"/>
17 years, 3 months
JBoss Portal SVN: r6840 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-03-27 06:26:44 -0400 (Tue, 27 Mar 2007)
New Revision: 6840
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
Log:
Add links to modify layout, rename, change theme, destroy at the object level (While keeping the links on the parent level too)
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2007-03-26 22:53:22 UTC (rev 6839)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2007-03-27 10:26:44 UTC (rev 6840)
@@ -7,32 +7,54 @@
<ui:composition template="objectTemplate.xhtml">
<ui:define name="content">
+
+ <h:form>
+ <h:panelGroup rendered="#{portalobjectmgr.selectedObject.type == 2}"><h:commandLink action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Page layout"/>
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ </h:commandLink> | </h:panelGroup><h:commandLink action="editPageSecurity" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Security"/>
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ </h:commandLink> | <h:commandLink action="editPageTheme" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Theme"/>
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ </h:commandLink> | <h:panelGroup rendered="#{!((portalobjectmgr.selectedObject.type == 1) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}"><h:commandLink action="renameObject" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Rename"/>
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ </h:commandLink> | </h:panelGroup><h:commandLink action="confirm" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ </h:commandLink>
+ </h:form>
<!-- Sub page addition -->
<div style="padding:1em 0 0 0">
- <div class="portlet-font">Create a nested page:</div>
- <div style="padding:1em 0 1em 0">
- <h:form id="addPageForm">
+ <h:form id="addPageForm">
+ <span class="portlet-font">Create a nested page:</span>
+ <span style="padding:1em 0 1em 0">
<h:inputText id="pageName" value="#{addPageAction.pageName}" styleClass="portlet-form-input-field" required="true"/>
<h:commandButton action="#{addPageAction.execute}" value="Add" styleClass="portlet-form-button"/>
<h:message for="pageName" errorClass="portlet-msg-error"/>
- </h:form>
- </div>
+ </span>
+ </h:form>
</div>
<!-- Default page -->
<div style="padding:1em 0 0 0">
- <div class="portlet-font">Default page:</div>
- <div style="padding:1em 0 1em 0">
<h:form>
+ <span class="portlet-font">Default page:</span>
+ <span style="padding:1em 0 1em 0">
<h:selectOneMenu id="name" styleClass="portlet-form-field" value="#{portalAction.defaultPageName}">
<f:selectItems value="#{portalobjectmgr.portalPageItems}" />
</h:selectOneMenu>
<h:commandButton styleClass="portlet-form-button" value="Update" action="objects"/>
+ </span>
</h:form>
- </div>
</div>
+
+
+
<!-- Separation -->
<hr/>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-03-26 22:53:22 UTC (rev 6839)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-03-27 10:26:44 UTC (rev 6840)
@@ -65,7 +65,7 @@
</td>
<td>
<h:commandLink action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Layout"/>
+ <h:outputText value="Page layout"/>
<f:param name="id" value="#{object.id}"/>
</h:commandLink> | <h:commandLink action="editPageSecurity"
actionListener="#{portalobjectmgr.selectObject}">
17 years, 3 months
JBoss Portal SVN: r6839 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-26 18:53:22 -0400 (Mon, 26 Mar 2007)
New Revision: 6839
Modified:
docs/trunk/referenceGuide/en/modules/migration.xml
Log:
migration update
Modified: docs/trunk/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/migration.xml 2007-03-26 22:43:28 UTC (rev 6838)
+++ docs/trunk/referenceGuide/en/modules/migration.xml 2007-03-26 22:53:22 UTC (rev 6839)
@@ -13,7 +13,8 @@
</chapterinfo>
<title>Upgrading 2.4 - 2.6</title>
<warning>
- Before performing any instructions or operations mentioned below remember to backup your database content!
+ Before performing any instructions or operations mentioned below remember to backup your database content and
+ the whole application server directory!
</warning>
<sect1 id="manual_migration">
<title>Manual upgrade</title>
@@ -28,9 +29,9 @@
<listitem>
Remove <emphasis role="bold">$JBOSS_HOME/server/default/deploy/jboss-portal.sar</emphasis> file.
</listitem>
- <listitem>
+ <!--<listitem>
Remove <emphasis role="bold">$JBOSS_HOME/server/default/data</emphasis> directory.
- </listitem>
+ </listitem>-->
<listitem>
Update data in portal database like described in following sections of this chapter
</listitem>
@@ -49,16 +50,15 @@
<para>
Themes in 2.6 version changed as now they
contain additional areas - the best example is upper right corner where links like "Login", "Admin", "My Dashboard"
- are visable. If you use default theme like "renaissance" you should clean up old theme files deployed in portal by removing
- <emphasis role="bold">$JBOSS_HOME/server/default/data</emphasis> directory. To update your custom themes please
- refere to those bundled with portal as an example.
+ are visable. If you use default theme like "renaissance" that is present in 2.6, you shouldn't need to do anything. To update your custom themes please
+ refer to those bundled with portal as an example.
</para>
<note>If you stay with old theme files you may find JBP 2.6 unusable by not even be able to log in.</note>
</sect2>
<sect2>
<title>Database</title>
<para>
- Database schema wasn't changed between 2.4 and 2.6 releases. Still content that is kept in the database
+ Database schema wasn't changed between 2.4 and 2.6 releases, but still content that is kept in it
changed slightly in few areas. You can easily update the data manually by using tools proper for your
RDBMS. If you use <emphasis>MySQL</emphasis> you can use <emphasis>MySQL Query Browser</emphasis> that can
be downloaded from <emphasis>MySQL</emphasis> website.
17 years, 3 months
JBoss Portal SVN: r6838 - in branches/JBoss_Portal_Branch_2_4: common/src/main/org/jboss/portal/common/util and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-26 18:43:28 -0400 (Mon, 26 Mar 2007)
New Revision: 6838
Removed:
branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/common/util/ThrowableBean.java
branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/test/common/ThrowableBeanTestCase.java
Modified:
branches/JBoss_Portal_Branch_2_4/common/build.xml
branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/test/common/URLNavigatorTestCase.java
branches/JBoss_Portal_Branch_2_4/tools/etc/buildfragments/buildmagic.ent
Log:
removing unused class + fix a test where the build.lib location was not provided to the test
Modified: branches/JBoss_Portal_Branch_2_4/common/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_4/common/build.xml 2007-03-26 22:34:33 UTC (rev 6837)
+++ branches/JBoss_Portal_Branch_2_4/common/build.xml 2007-03-26 22:43:28 UTC (rev 6838)
@@ -206,7 +206,7 @@
<target name="most" depends="_default:most"/>
<target name="help" depends="_default:help"/>
- <target name="tests" depends="compile">
+ <target name="tests" depends="init">
<execute-tests>
<x-test>
<test todir="${test.reports}" name="org.jboss.portal.test.common.LocaleInfoTestCase"/>
@@ -221,12 +221,10 @@
<test todir="${test.reports}" name="org.jboss.portal.test.common.URLNavigatorTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.PathTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.JavaBeanModelMBeanBuilderTestCase"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.common.ThrowableBeanTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.ParameterMapTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.LocalizedStringTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.ImplodeTestCase"/>
- <test todir="${test.reports}"
- name="org.jboss.portal.test.common.Application_XWWWFormURLEncodedFormatTestCase"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.common.Application_XWWWFormURLEncodedFormatTestCase"/>
</x-test>
<x-classpath>
<pathelement location="${build.classes}"/>
Deleted: branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/common/util/ThrowableBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/common/util/ThrowableBean.java 2007-03-26 22:34:33 UTC (rev 6837)
+++ branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/common/util/ThrowableBean.java 2007-03-26 22:43:28 UTC (rev 6838)
@@ -1,285 +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. *
- ******************************************************************************/
-package org.jboss.portal.common.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-
-/**
- * A bean to manipulate throwable.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class ThrowableBean
-{
-
- /** The stack trace. */
- private StackTraceElementBean[] stackTrace;
-
- /** The throwable with its stack trace and its cause cleared. */
- private Throwable state;
-
- /** The nested cause if any. */
- private ThrowableBean cause;
-
- public ThrowableBean()
- {
- }
-
- public ThrowableBean(Throwable throwable)
- {
- if (throwable == null)
- {
- throw new IllegalArgumentException();
- }
-
- // Clone first the throwable
- this.state = clone(throwable);
-
- // Then get its stack trace and clear it on the object itself
- StackTraceElement[] stackTrace = throwable.getStackTrace();
- this.stackTrace = new StackTraceElementBean[stackTrace.length];
- for (int i = 0; i < stackTrace.length; i++)
- {
- this.stackTrace[i] = new StackTraceElementBean(stackTrace[i]);
- }
- state.setStackTrace(new StackTraceElement[0]);
-
- // If the throwable has a cause, process recursively and clear the cause as well
- if (this.state.getCause() != null)
- {
- try
- {
- this.cause = new ThrowableBean(this.state.getCause());
- Field f = Throwable.class.getDeclaredField("cause");
- f.setAccessible(true);
- f.set(this.state, null);
- }
- catch (Exception unexpected)
- {
- throw new RuntimeException(unexpected);
- }
- }
- }
-
- public Throwable getState()
- {
- return state;
- }
-
- public void setState(Throwable state)
- {
- this.state = state;
- }
-
- public StackTraceElementBean[] getStackTrace()
- {
- return stackTrace;
- }
-
- public void setStackTrace(StackTraceElementBean[] stackTrace)
- {
- this.stackTrace = stackTrace;
- }
-
- public static class StackTraceElementBean
- {
-
- private String declaringClass;
- private String methodName;
- private String fileName;
- private int lineNumber;
-
- public StackTraceElementBean()
- {
- }
-
- public StackTraceElementBean(StackTraceElement ste)
- {
- declaringClass = ste.getClassName();
- methodName = ste.getMethodName();
- fileName = ste.getFileName();
- lineNumber = ste.getLineNumber();
- }
-
- public String getDeclaringClass()
- {
- return declaringClass;
- }
-
- public void setDeclaringClass(String declaringClass)
- {
- this.declaringClass = declaringClass;
- }
-
- public String getMethodName()
- {
- return methodName;
- }
-
- public void setMethodName(String methodName)
- {
- this.methodName = methodName;
- }
-
- public String getFileName()
- {
- return fileName;
- }
-
- public void setFileName(String fileName)
- {
- this.fileName = fileName;
- }
-
- public int getLineNumber()
- {
- return lineNumber;
- }
-
- public void setLineNumber(int lineNumber)
- {
- this.lineNumber = lineNumber;
- }
-
- /** Create a <code>java.lang.StackTraceElement</code> from this object. */
- public StackTraceElement toStackTraceElement()
- {
- if (declaringClass == null)
- {
- throw new IllegalStateException("No declaring class");
- }
- if (methodName == null)
- {
- throw new IllegalStateException("No method name");
- }
- if (fileName == null)
- {
- throw new IllegalStateException("No file name");
- }
- try
- {
- Constructor ctor = StackTraceElement.class.getDeclaredConstructor(new Class[0]);
- ctor.setAccessible(true);
- StackTraceElement ste = (StackTraceElement)ctor.newInstance(new Object[0]);
-
- //
- Field methodNameSetter = StackTraceElement.class.getDeclaredField("methodName");
- methodNameSetter.setAccessible(true);
- methodNameSetter.set(ste, methodName);
-
- //
- Field declaringClassSetter = StackTraceElement.class.getDeclaredField("declaringClass");
- declaringClassSetter.setAccessible(true);
- declaringClassSetter.set(ste, declaringClass);
-
- //
- Field fileNameSetter = StackTraceElement.class.getDeclaredField("fileName");
- fileNameSetter.setAccessible(true);
- fileNameSetter.set(ste, fileName);
-
- //
- Field lineNumberSetter = StackTraceElement.class.getDeclaredField("lineNumber");
- lineNumberSetter.setAccessible(true);
- lineNumberSetter.setInt(ste, lineNumber);
-
- //
- return ste;
- }
- catch (Exception e)
- {
- throw new Error("Not expected", e);
- }
- }
- }
-
- public Throwable toThrowable()
- {
- if (this.state == null)
- {
- throw new IllegalStateException("No throwable present");
- }
- if (this.stackTrace == null)
- {
- throw new IllegalStateException("No stack trace present");
- }
-
- // Clone the state
- Throwable throwable = clone(this.state);
-
- // Set the stack trace back
- StackTraceElement[] stackTrace = new StackTraceElement[this.stackTrace.length];
- for (int i = 0; i < stackTrace.length; i++)
- {
- if (this.stackTrace[i] == null)
- {
- throw new IllegalStateException("No stack trace element present at index=" + i);
- }
- stackTrace[i] = this.stackTrace[i].toStackTraceElement();
- }
- throwable.setStackTrace(stackTrace);
-
- // Process the cause recursively
- if (cause != null)
- {
- try
- {
- Field f = Throwable.class.getDeclaredField("cause");
- f.setAccessible(true);
- f.set(throwable, cause.toThrowable());
- }
- catch (Exception unexpected)
- {
- throw new RuntimeException(unexpected);
- }
- }
-
- //
- return throwable;
- }
-
- /** Clone a throwable using serialization. */
- private Throwable clone(Throwable t)
- {
- try
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(t);
- oos.close();
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- ObjectInputStream ois = new ObjectInputStream(bais);
- t = (Throwable)ois.readObject();
- return t;
- }
- catch (Exception unexpected)
- {
- throw new RuntimeException(unexpected);
- }
- }
-}
Deleted: branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/test/common/ThrowableBeanTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/test/common/ThrowableBeanTestCase.java 2007-03-26 22:34:33 UTC (rev 6837)
+++ branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/test/common/ThrowableBeanTestCase.java 2007-03-26 22:43:28 UTC (rev 6838)
@@ -1,110 +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. *
- ******************************************************************************/
-package org.jboss.portal.test.common;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-import org.jboss.portal.common.util.ThrowableBean;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class ThrowableBeanTestCase extends TestCase
-{
-
- public void testException()
- {
- Exception e1 = new Exception();
- ThrowableBean tb = new ThrowableBean(e1);
- Exception e2 = (Exception)tb.toThrowable();
- assertEquals(e1, e2);
- }
-
- public void testNestedException()
- {
- Exception e1 = new Exception(new Exception());
- ThrowableBean tb = new ThrowableBean(e1);
- Exception e2 = (Exception)tb.toThrowable();
- assertEquals(e1, e2);
- }
-
- public void testExceptionNotEquals()
- {
- Exception e1 = (Exception)new ThrowableBean(new Exception()).toThrowable();
- Exception e2 = (Exception)new ThrowableBean(new Exception()).toThrowable();
- assertNotEquals(e1, e2);
- }
-
- private void assertNotEquals(Throwable t1, Throwable t2)
- {
- try
- {
- assertEquals(t1, t2);
- fail();
- }
- catch (AssertionFailedError expected)
- {
- }
- }
-
- private void assertEquals(Throwable t1, Throwable t2)
- {
- if (t1 == null || t2 == null)
- {
- fail();
- }
- if (!t1.getClass().equals(t2.getClass()))
- {
- fail();
- }
- StackTraceElement[] st1 = t1.getStackTrace();
- assertNotNull(st1);
- StackTraceElement[] st2 = t2.getStackTrace();
- assertNotNull(st2);
- assertEquals(st1.length, st2.length);
- for (int i = 0; i < st2.length; i++)
- {
- assertEquals(st1[i], st2[i]);
- }
- Throwable cause1 = t1.getCause();
- Throwable cause2 = t2.getCause();
- if (cause1 == null)
- {
- assertNull(cause2);
- }
- else
- {
- assertNotNull(cause2);
- assertEquals(cause1, cause2);
- }
- }
-
-// private void assertBinaryEquals(Throwable t1, Throwable t2)
-// {
-// String a1 = Base64.encodeObject(t1);
-// String a2 = Base64.encodeObject(t2);
-// assertEquals(a1, a2);
-//
-// }
-}
Modified: branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/test/common/URLNavigatorTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/test/common/URLNavigatorTestCase.java 2007-03-26 22:34:33 UTC (rev 6837)
+++ branches/JBoss_Portal_Branch_2_4/common/src/main/org/jboss/portal/test/common/URLNavigatorTestCase.java 2007-03-26 22:43:28 UTC (rev 6838)
@@ -114,7 +114,9 @@
public void testJar() throws Exception
{
- File libDir = new File(System.getProperty("build.lib"));
+ String pathname = System.getProperty("build.lib");
+ assertNotNull(pathname);
+ File libDir = new File(pathname);
assertTrue(libDir.exists());
assertTrue(libDir.isDirectory());
File jarFile = new File(libDir, "test.jar");
Modified: branches/JBoss_Portal_Branch_2_4/tools/etc/buildfragments/buildmagic.ent
===================================================================
--- branches/JBoss_Portal_Branch_2_4/tools/etc/buildfragments/buildmagic.ent 2007-03-26 22:34:33 UTC (rev 6837)
+++ branches/JBoss_Portal_Branch_2_4/tools/etc/buildfragments/buildmagic.ent 2007-03-26 22:43:28 UTC (rev 6838)
@@ -658,6 +658,7 @@
usefile="${junit.formatter.usefile}"
extension="${jboss-junit-configuration}.xml"/>
<sysproperty key="build.resources" value="${build.resources}"/>
+ <sysproperty key="build.lib" value="${build.lib}"/>
<!-- definition of the property for keeping results between configuration -->
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<x-sysproperty/>
17 years, 3 months
JBoss Portal SVN: r6837 - trunk/common.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-26 18:34:33 -0400 (Mon, 26 Mar 2007)
New Revision: 6837
Modified:
trunk/common/build.xml
Log:
run all tests of common
Modified: trunk/common/build.xml
===================================================================
--- trunk/common/build.xml 2007-03-26 22:00:36 UTC (rev 6836)
+++ trunk/common/build.xml 2007-03-26 22:34:33 UTC (rev 6837)
@@ -210,7 +210,6 @@
</x-sysproperty>
<x-test>
-<!--
<test todir="${test.reports}" name="org.jboss.portal.test.common.BundleNameIteratorTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.BundleNameParserTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.ComplexResourceBundleFactoryTestCase"/>
@@ -230,10 +229,8 @@
<test todir="${test.reports}" name="org.jboss.portal.test.common.TemporaryHashTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.HexTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.StringTestCase"/>
--->
- <!--<test todir="${test.reports}" name="org.jboss.portal.test.common.JarTestCase"/>-->
+ <test todir="${test.reports}" name="org.jboss.portal.test.common.JarTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.URLNavigatorTestCase"/>
-<!--
<test todir="${test.reports}" name="org.jboss.portal.test.common.PathTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.JavaBeanModelMBeanBuilderTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.ParameterMapTestCase"/>
@@ -246,7 +243,6 @@
<test todir="${test.reports}" name="org.jboss.portal.test.common.ToolsTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.ModifierTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.common.IteratorStatusTestCase"/>
--->
</x-test>
<x-classpath>
<pathelement location="${build.classes}"/>
17 years, 3 months
JBoss Portal SVN: r6836 - in docs/trunk/referenceGuide/en: modules and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-26 18:00:36 -0400 (Mon, 26 Mar 2007)
New Revision: 6836
Added:
docs/trunk/referenceGuide/en/images/migration/querybrowser1.png
docs/trunk/referenceGuide/en/images/migration/querybrowser2.png
docs/trunk/referenceGuide/en/images/migration/theme.png
Modified:
docs/trunk/referenceGuide/en/modules/migration.xml
Log:
migration guide
Added: docs/trunk/referenceGuide/en/images/migration/querybrowser1.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/migration/querybrowser1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/trunk/referenceGuide/en/images/migration/querybrowser2.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/migration/querybrowser2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/trunk/referenceGuide/en/images/migration/theme.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/migration/theme.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: docs/trunk/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/migration.xml 2007-03-26 19:48:47 UTC (rev 6835)
+++ docs/trunk/referenceGuide/en/modules/migration.xml 2007-03-26 22:00:36 UTC (rev 6836)
@@ -13,9 +13,174 @@
</chapterinfo>
<title>Upgrading 2.4 - 2.6</title>
<warning>
- This section to be updated soon with 2.4 to 2.6 migration instructions, using the Migration Application.
+ Before performing any instructions or operations mentioned below remember to backup your database content!
</warning>
-<!--
+ <sect1 id="manual_migration">
+ <title>Manual upgrade</title>
+ <para>
+ Although database schema remains the same in JBoss Portal 2.6 there are several differences that prevent from simple deployment
+ of newest portal version using JBoss Portal 2.4 database. In this chapter we will list major ones and give
+ instructions on how to manually update proper data.
+ </para>
+ <para>
+ Upgrading procedure can be quite straightforward:
+ <itemizedlist>
+ <listitem>
+ Remove <emphasis role="bold">$JBOSS_HOME/server/default/deploy/jboss-portal.sar</emphasis> file.
+ </listitem>
+ <listitem>
+ Remove <emphasis role="bold">$JBOSS_HOME/server/default/data</emphasis> directory.
+ </listitem>
+ <listitem>
+ Update data in portal database like described in following sections of this chapter
+ </listitem>
+ <listitem>
+ Deploy JBoss Portal 2.6
+ </listitem>
+ </itemizedlist>
+ </para>
+ <sect2>
+ <title>Theme</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" valign="middle" fileref="images/migration/theme.png"/>
+ </imageobject>
+ </mediaobject>
+ <para>
+ Themes in 2.6 version changed as now they
+ contain additional areas - the best example is upper right corner where links like "Login", "Admin", "My Dashboard"
+ are visable. If you use default theme like "renaissance" you should clean up old theme files deployed in portal by removing
+ <emphasis role="bold">$JBOSS_HOME/server/default/data</emphasis> directory. To update your custom themes please
+ refere to those bundled with portal as an example.
+ </para>
+ <note>If you stay with old theme files you may find JBP 2.6 unusable by not even be able to log in.</note>
+ </sect2>
+ <sect2>
+ <title>Database</title>
+ <para>
+ Database schema wasn't changed between 2.4 and 2.6 releases. Still content that is kept in the database
+ changed slightly in few areas. You can easily update the data manually by using tools proper for your
+ RDBMS. If you use <emphasis>MySQL</emphasis> you can use <emphasis>MySQL Query Browser</emphasis> that can
+ be downloaded from <emphasis>MySQL</emphasis> website.
+ </para>
+ <note>
+ Instructions below refer to standard JBoss Portal 2.4 deployment. If you named core portlets, portlet instances
+ or portlet windows differently you will need to make proper modifications in those steps.
+ </note>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" valign="middle" fileref="images/migration/querybrowser1.png"/>
+ </imageobject>
+ </mediaobject>
+ <sect3>
+ <title>Portlet names</title>
+ <para>Names of few core bundled portlets changed. To update them you need to:</para>
+ <para>
+ In <emphasis role="bold">JBP_INSTANCES</emphasis> table:
+ <itemizedlist>
+ <listitem>Change "<emphasis>local.portal.CMSPorlet</emphasis>" in <emphasis>PORTLET_REF</emphasis> column to
+ "<emphasis>local./portal-cms.CMSPortlet</emphasis>"
+ </listitem>
+ <listitem>Change "<emphasis>local.portal.CMSAdminPorlet</emphasis>" in <emphasis>PORTLET_REF</emphasis> column to
+ "<emphasis>local./portal-cms.CMSAdminPortlet</emphasis>"
+ </listitem>
+ <listitem>Change "<emphasis>local.portal.ManagementPorlet</emphasis>" in <emphasis>PORTLET_REF</emphasis> column to
+ "<emphasis>local./portal-admin.AdminPortlet</emphasis>"
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ <emphasis>NavigationPortlet</emphasis> from JBP 2.4 is not present anymore. Its functionality is now realized by
+ <emphasis>PageCustomizerInterceptor</emphasis> so all references to <emphasis>NavigationPortlet</emphasis> should
+ be removed from all portal pages. You can do it either by cleaning up database content or by using
+ <emphasis>AdminPortlet</emphasis> in Portal interface. In database you should remove:
+ <itemizedlist>
+ <listitem>
+ Rows containing "<emphasis>local.portal.NavigationPortlet</emphasis>" in
+ "<emphasis>PORTLET_REF</emphasis>" column in
+ "<emphasis>JBP_INSTANCES</emphasis>" table.
+ </listitem>
+ <listitem>
+ Rows containing "<emphasis>NavigationPortletInstance</emphasis>" in
+ "<emphasis>INSTANCE_REF</emphasis>" column in
+ "<emphasis>JBP_WINDOW</emphasis>" table.
+ </listitem>
+ <listitem>
+ Rows containing "<emphasis>NavigationPortletWindow</emphasis>" in
+ "<emphasis>NAME</emphasis>" column in
+ "<emphasis>JBP_OBJECT</emphasis>" table.
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect3>
+ <sect3>
+ <title>CMS</title>
+ <para>
+ This is probably the less trival part to do directly in database. In JBP 2.6 version the way that CMS
+ content is being displayed changed significantly. Please refer to
+ <link linkend="contentIntegration">Content Integration</link> and <link linkend="cmsPortlet">CMS Portlet</link>
+ chapters for more information. Basically currently there is no need to have more than one instance of
+ <emphasis>CMSPortlet</emphasis> and the portlet window displays CMS content not by referring to that portlet instance
+ but by having proper <emphasis>content-type</emphasis> defined. In "<emphasis>default-object.xml</emphasis>
+ you will find following configuration:
+ <programlisting>
+ <![CDATA[
+ <window>
+ <window-name>CMSWindow</window-name>
+ <content>
+ <content-type>cms</content-type>
+ <content-uri>/default/index.html</content-uri>
+ </content>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ ]]>
+ </programlisting>
+ </para>
+ <para>
+ Open <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table in your database schema. By looking at
+ <emphasis role="bold">PATH</emphasis> column you will easily find any occurances of CMS in your portal
+ deployment
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" valign="middle" fileref="images/migration/querybrowser2.png"/>
+ </imageobject>
+ </mediaobject>
+ <para>
+ For any row you will identify as referring to <emphasis>CMSPortletWindow</emphasis> in your system remember
+ the number in <emphasis role="bold">PK</emphasis> column. It will be needed in next steps
+ </para>
+ <para> Go to <emphasis role="bold">JBP_WINDOW</emphasis> table and find row with the same
+ <emphasis role="bold">PK</emphasis> value like the one from
+ <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table. In such row replace
+ "<emphasis>CMSPortletInstance</emphasis>" with a path to your CMS resource. For example by default
+ portal is displaying "<emphasis>/default/index.html</emphasis>".
+ </para>
+ <para> Go to <emphasis role="bold">JBP_PORTAL_OBJECT_PROPS</emphasis> table and add a row containing:
+ <itemizedlist>
+ <listitem>
+ The number you remembered in "<emphasis>OBJECT_KEY</emphasis>" column.
+ </listitem>
+ <listitem>
+ "<emphasis>portal.windowContentType</emphasis>" in "<emphasis>NAME</emphasis>" column.
+ </listitem>
+ <listitem>
+ "<emphasis>cms</emphasis>" in "<emphasis>jbp_VALUE</emphasis>" column.
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ <note>Remember that you can also change portlet window content type and configure path to CMS resource
+ using AdminPortlet</note>
+ </para>
+ </sect3>
+ </sect2>
+
+
+
+ </sect1>
+ <!--
<para>This chapter addresses migration issues from version 2.2 to 2.4 of JBoss Portal.</para>
<sect1 id="migrating_database">
<title>Migrating the Database</title>
17 years, 3 months