JBoss Portal SVN: r6223 - trunk/core/src/main/org/jboss/portal/test/core/state.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-12 12:54:14 -0500 (Mon, 12 Feb 2007)
New Revision: 6223
Modified:
trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
Log:
more registration / state integration test
Modified: trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-02-12 17:52:07 UTC (rev 6222)
+++ trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-02-12 17:54:14 UTC (rev 6223)
@@ -29,14 +29,12 @@
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.SimpleLayout;
-import org.hibernate.Session;
import org.jboss.portal.Mode;
import org.jboss.portal.common.junit.TransactionAssert;
import org.jboss.portal.common.test.TestParametrization;
import org.jboss.portal.common.test.junit.JUnitAdapter;
import org.jboss.portal.common.test.junit.POJOJUnitTest;
import org.jboss.portal.common.value.StringValue;
-import org.jboss.portal.core.impl.portlet.state.PersistentConsumer;
import org.jboss.portal.core.impl.portlet.state.PersistentRegistration;
import org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager;
import org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker;
@@ -64,7 +62,6 @@
import org.jboss.portal.portlet.test.ValueMapAssert;
import org.jboss.portal.portlet.test.support.PortletInvokerSupport;
import org.jboss.portal.portlet.test.support.PortletSupport;
-import org.jboss.portal.registration.RegistrationStatus;
import org.jboss.portal.registration.RegistrationLocal;
import org.jboss.portal.registration.ConsumerGroup;
import org.jboss.portal.registration.Consumer;
@@ -421,7 +418,7 @@
{
try
{
- beginTX();
+ beginRegistrationScopedTX();
consumer.createClone(null);
fail("Was expecting an IllegalArgumentException");
}
@@ -433,7 +430,7 @@
public void testDestroyNonExistingPortletWithinTx() throws Exception
{
- beginTX();
+ beginRegistrationScopedTX();
List failures = consumer.destroyClones(Collections.singletonList(PortletContext.createPortletContext("_1")));
assertEquals(Collections.singletonList(new DestroyCloneFailure("_1")), failures);
commitTX();
@@ -443,7 +440,7 @@
{
try
{
- beginTX();
+ beginRegistrationScopedTX();
consumer.destroyClones(null);
fail("Was expecting an IllegalArgumentException");
}
@@ -473,44 +470,44 @@
{
// Clone a POP 2 times
beginTX();
- PortletContext cloneId1 = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
- PortletContext cloneId2 = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
+ PortletContext clone1 = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
+ PortletContext clone2 = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
commitTX();
// Clone the modified CCP 2 times
beginTX();
- PortletContext cloneCloneId1 = consumer.createClone(cloneId1);
- PortletContext cloneCloneId2 = consumer.createClone(cloneId1);
+ PortletContext cloneOfClone1 = consumer.createClone(clone1);
+ PortletContext cloneOfClone2 = consumer.createClone(clone1);
commitTX();
// Destroy the clone 2
beginTX();
- List failures = consumer.destroyClones(Collections.singletonList(cloneId2));
+ List failures = consumer.destroyClones(Collections.singletonList(clone2));
assertEquals(Collections.EMPTY_LIST, failures);
commitTX();
// Destroy the clone of the clone 2
beginTX();
- failures = consumer.destroyClones(Collections.singletonList(cloneCloneId2));
+ failures = consumer.destroyClones(Collections.singletonList(cloneOfClone2));
assertEquals(Collections.EMPTY_LIST, failures);
commitTX();
// Destroy the clone 1
beginTX();
- failures = consumer.destroyClones(Collections.singletonList(cloneId1));
+ failures = consumer.destroyClones(Collections.singletonList(clone1));
assertEquals(Collections.EMPTY_LIST, failures);
commitTX();
// Destroy the clone of the clone 1
beginTX();
- failures = consumer.destroyClones(Collections.singletonList(cloneCloneId1));
+ failures = consumer.destroyClones(Collections.singletonList(cloneOfClone1));
assertEquals(Collections.EMPTY_LIST, failures);
commitTX();
}
public void testInvokeCloneBeforeWritePOPWithinTx() throws Exception
{
- beginTX();
+ beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE, PortletContext.createPortletContext("CloningPortlet"));
action.setUserContext(new UserContextImpl("julien"));
@@ -521,24 +518,32 @@
// Check state
beginTX();
- PortletContext cloneId = instanceContext.getClonedContext();
- assertNotNull(cloneId);
- PortletStateContext state = persistenceManager.loadState(cloneId.getId().substring(1));
- assertNotNull(state);
- assertEquals(cloneId.getId().substring(1), state.getId());
- assertEquals("CloningPortlet", state.getState().getPortletId());
+ PortletContext clone = instanceContext.getClonedContext();
+ assertNotNull(clone);
+ PersistentPortletState cloneState = (PersistentPortletState)persistenceManager.loadState(clone.getId().substring(1));
+ assertNotNull(cloneState);
+ assertEquals(clone.getId().substring(1), cloneState.getId());
+ assertEquals("CloningPortlet", cloneState.getState().getPortletId());
SimplePropertyMap expectedValue = new SimplePropertyMap();
expectedValue.setProperty("abc", new StringValue("def"));
expectedValue.setProperty("_abc", new StringValue("_def"));
- ValueMapAssert.assertEquals(expectedValue, state.getState().getProperties());
+ ValueMapAssert.assertEquals(expectedValue, cloneState.getState().getProperties());
+ if (useRegistration)
+ {
+ PersistentRegistration registration = cloneState.getRelatedRegistration();
+ assertNotNull(registration);
+ assertEquals(registrationId, registration.getId());
+ }
commitTX();
}
public void testInvokeReadWritePOPWithinTx() throws Exception
{
- beginTX();
+ beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
- action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE,
+ action.setAttribute(
+ PortletInvocation.REQUEST_SCOPE,
+ PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE,
PortletContext.createPortletContext("CloneFailedCloningPortlet"));
action.setUserContext(new UserContextImpl("julien"));
InstanceContextImpl instanceContext = new InstanceContextImpl("whatever", AccessMode.READ_WRITE);
@@ -549,12 +554,13 @@
// Check state
beginTX();
assertNull(instanceContext.getClonedContext());
+ assertNull(instanceContext.getModifiedContext());
commitTX();
}
public void testInvokeReadOnlyPOPWithinTx() throws Exception
{
- beginTX();
+ beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE,
PortletContext.createPortletContext("CloneFailedCloningPortlet"));
@@ -567,6 +573,7 @@
// Check state
beginTX();
assertNull(instanceContext.getClonedContext());
+ assertNull(instanceContext.getModifiedContext());
commitTX();
}
@@ -585,7 +592,7 @@
commitTX();
//
- beginTX();
+ beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE, cloningPortletId);
action.setUserContext(new UserContextImpl("julien"));
@@ -596,16 +603,22 @@
// Check state
beginTX();
- PortletContext cloneId = instanceContext.getClonedContext();
- assertNotNull(cloneId);
- PortletStateContext state = persistenceManager.loadState(cloneId.getId().substring(1));
- assertNotNull(state);
- assertEquals(cloneId.getId().substring(1), state.getId());
- assertEquals("CloningPortlet", state.getState().getPortletId());
+ PortletContext clone = instanceContext.getClonedContext();
+ assertNotNull(clone);
+ PersistentPortletState cloneState = (PersistentPortletState)persistenceManager.loadState(clone.getId().substring(1));
+ assertNotNull(cloneState);
+ assertEquals(clone.getId().substring(1), cloneState.getId());
+ assertEquals("CloningPortlet", cloneState.getState().getPortletId());
SimplePropertyMap expectedValue = new SimplePropertyMap();
expectedValue.setProperty("abc", new StringValue("deff"));
expectedValue.setProperty("_abc", new StringValue("_def"));
- ValueMapAssert.assertEquals(expectedValue, state.getState().getProperties());
+ ValueMapAssert.assertEquals(expectedValue, cloneState.getState().getProperties());
+ if (useRegistration)
+ {
+ PersistentRegistration registration = cloneState.getRelatedRegistration();
+ assertNotNull(registration);
+ assertEquals(registrationId, registration.getId());
+ }
commitTX();
}
@@ -616,7 +629,7 @@
commitTX();
//
- beginTX();
+ beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE, cloningPortletId);
action.setUserContext(new UserContextImpl("julien"));
@@ -646,7 +659,7 @@
commitTX();
//
- beginTX();
+ beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE, cloneFailedCloningPortletId);
action.setUserContext(new UserContextImpl("julien"));
@@ -663,7 +676,7 @@
public void testInvokeCloneBeforeWritePOPWithinTxThrowsException() throws Exception
{
- beginTX();
+ beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE,
PortletContext.createPortletContext("CloningPortletThrowingRuntimeException"));
19 years, 2 months
JBoss Portal SVN: r6222 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF and 1 other directory.
by portal-commits@lists.jboss.org
Author: roy.russo(a)jboss.com
Date: 2007-02-12 12:52:07 -0500 (Mon, 12 Feb 2007)
New Revision: 6222
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/AdminPortlet.java
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/default-object.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
Log:
portal-admin portlet stub
Added: trunk/core-admin/src/main/org/jboss/portal/core/admin/AdminPortlet.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/AdminPortlet.java (rev 0)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/AdminPortlet.java 2007-02-12 17:52:07 UTC (rev 6222)
@@ -0,0 +1,54 @@
+/*
+* 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.core.admin;
+
+import org.apache.log4j.Logger;
+import org.jboss.portlet.JBossActionRequest;
+import org.jboss.portlet.JBossActionResponse;
+
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:roy.russo@jboss.com">Roy Russo</a>
+ * @version $Revision: 0 $
+ */
+public class AdminPortlet
+{
+ /** Logger. */
+ private static Logger log = Logger.getLogger(AdminPortlet.class);
+
+ public void init() throws PortletException
+ {
+ }
+
+ public void doView(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
+ {
+ }
+
+ public void processAction(JBossActionRequest aReq, JBossActionResponse aRes) throws PortletException
+ {
+ }
+}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/default-object.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/default-object.xml 2007-02-12 17:40:34 UTC (rev 6221)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/default-object.xml 2007-02-12 17:52:07 UTC (rev 6222)
@@ -27,5 +27,16 @@
"http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
<deployments>
-
+ <deployment>
+ <parent-ref>admin</parent-ref>
+ <page>
+ <page-name>Portal Admin</page-name>
+ <window>
+ <window-name>AdminPortletWindow</window-name>
+ <instance-ref>AdminPortletInstance</instance-ref>
+ <region>center</region>
+ <height>1</height>
+ </window>
+ </page>
+ </deployment>
</deployments>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml 2007-02-12 17:40:34 UTC (rev 6221)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml 2007-02-12 17:52:07 UTC (rev 6222)
@@ -27,5 +27,16 @@
"http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd">
<deployments>
-
+ <deployment>
+ <instance>
+ <instance-id>AdminPortletInstance</instance-id>
+ <portlet-ref>AdminPortlet</portlet-ref>
+ <security-constraint>
+ <policy-permission>
+ <role-name>Admin</role-name>
+ <action-name>view</action-name>
+ </policy-permission>
+ </security-constraint>
+ </instance>
+ </deployment>
</deployments>
\ No newline at end of file
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-02-12 17:40:34 UTC (rev 6221)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-02-12 17:52:07 UTC (rev 6222)
@@ -27,5 +27,18 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0">
-
+ <portlet>
+ <description>Administration portlet for portal pages administration</description>
+ <portlet-name>AdminPortlet</portlet-name>
+ <display-name>Portal Admin Portlet</display-name>
+ <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
+ <expiration-cache>-1</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Portal Administration</title>
+ </portlet-info>
+ </portlet>
</portlet-app>
19 years, 2 months
JBoss Portal SVN: r6221 - trunk/core-admin.
by portal-commits@lists.jboss.org
Author: roy.russo(a)jboss.com
Date: 2007-02-12 12:40:34 -0500 (Mon, 12 Feb 2007)
New Revision: 6221
Added:
trunk/core-admin/build.bat
trunk/core-admin/build.sh
trunk/core-admin/build.xml
Log:
portal-admin build stub
Added: trunk/core-admin/build.bat
===================================================================
--- trunk/core-admin/build.bat (rev 0)
+++ trunk/core-admin/build.bat 2007-02-12 17:40:34 UTC (rev 6221)
@@ -0,0 +1,54 @@
+@echo off
+rem
+rem Invokes a script of the same name in the 'tools' module.
+rem
+rem The 'tools' module is expected to be a peer directory of the directory
+rem in which this script lives.
+rem
+rem @author Jason Dillon <jason(a)planet57.com>
+rem
+
+rem $Id: build.bat 2 2005-01-14 23:01:32Z vietj $
+
+setlocal
+
+set PROGNAME=%~nx0
+set DIRNAME=%~dp0
+
+rem Legacy shell support
+if x%PROGNAME%==x set PROGNAME=build.bat
+if x%DIRNAME%==x set DIRNAME=.\
+
+set MODULE_ROOT=%DIRNAME%
+if x%TOOLS_ROOT%==x set TOOLS_ROOT=%DIRNAME%..\tools
+set TARGET=%TOOLS_ROOT%\bin\build.bat
+set ARGS=%*
+
+rem Start'er up yo
+goto main
+
+:debug
+if not x%DEBUG%==x echo %PROGNAME%: %*
+goto :EOF
+
+:main
+call :debug PROGNAME=%PROGNAME%
+call :debug DIRNAME=%DIRNAME%
+call :debug TOOLS_ROOT=%TOOLS_ROOT%
+call :debug TARGET=%TARGET%
+
+if exist %TARGET% call :call-script & goto :EOF
+rem else fail, we can not go on
+
+echo %PROGNAME%: *ERROR* The target executable does not exist:
+echo %PROGNAME%:
+echo %PROGNAME%: %TARGET%
+echo %PROGNAME%:
+echo %PROGNAME%: Please make sure you have checked out the 'tools' module
+echo %PROGNAME%: and make sure it is up to date.
+goto :EOF
+
+:call-script
+call :debug Executing %TARGET% %ARGS%
+call %TARGET% %ARGS%
+goto :EOF
Added: trunk/core-admin/build.sh
===================================================================
--- trunk/core-admin/build.sh (rev 0)
+++ trunk/core-admin/build.sh 2007-02-12 17:40:34 UTC (rev 6221)
@@ -0,0 +1,49 @@
+#!/bin/sh
+##
+## Invokes a script of the same name in the 'tools' module.
+##
+## The 'tools' module is expected to be a peer directory of the directory
+## in which this script lives.
+##
+## @author Jason Dillon <jason(a)planet57.com>
+##
+
+# $Id: build.sh 2 2005-01-14 23:01:32Z vietj $
+
+PROGNAME=`basename $0`
+DIRNAME=`dirname $0`
+
+# Buss it yo
+main() {
+ if [ "x$TOOLS_ROOT" = "x" ]; then
+ TOOLS_ROOT=`cd $DIRNAME/../tools && pwd`
+ fi
+
+ MODULE_ROOT=`cd $DIRNAME; pwd`
+ export TOOLS_ROOT MODULE_ROOT DEBUG TRACE
+
+ # Where is the target script?
+ target="$TOOLS_ROOT/bin/$PROGNAME"
+ if [ ! -f "$target" ]; then
+ echo "${PROGNAME}: *ERROR* The target executable does not exist:"
+ echo "${PROGNAME}:"
+ echo "${PROGNAME}: $target"
+ echo "${PROGNAME}:"
+ echo "${PROGNAME}: Please make sure you have checked out the 'tools' module"
+ echo "${PROGNAME}: and make sure it is up to date."
+ exit 2
+ fi
+
+ # Get busy yo!
+ if [ "x$DEBUG" != "x" ]; then
+ echo "${PROGNAME}: Executing: /bin/sh $target $@"
+ fi
+ if [ "x$TRACE" = "x" ]; then
+ exec /bin/sh $target "$@"
+ else
+ exec /bin/sh -x $target "$@"
+ fi
+}
+
+# Lets get ready to rumble!
+main "$@"
Added: trunk/core-admin/build.xml
===================================================================
--- trunk/core-admin/build.xml (rev 0)
+++ trunk/core-admin/build.xml 2007-02-12 17:40:34 UTC (rev 6221)
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE project [
+ <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
+ <!ENTITY buildmagic SYSTEM "../tools/etc/buildfragments/buildmagic.ent">
+ <!ENTITY tools SYSTEM "../tools/etc/buildfragments/tools.ent">
+ <!ENTITY modules SYSTEM "../tools/etc/buildfragments/modules.ent">
+ <!ENTITY defaults SYSTEM "../tools/etc/buildfragments/defaults.ent">
+ <!ENTITY targets SYSTEM "../tools/etc/buildfragments/targets.ent">
+ ]>
+
+<!--+======================================================================+-->
+<!--| JBoss Portal (The OpenSource Portal) Build File |-->
+<!--| |-->
+<!--| Distributable under LGPL license. |-->
+<!--| See terms of license at http://www.gnu.org. |-->
+<!--| |-->
+<!--| This file has been designed to work with the 'tools' module and |-->
+<!--| Buildmagic extentions. |-->
+<!--+======================================================================+-->
+
+<project default="main" name="JBoss Portal">
+
+ <!--+====================================================================+-->
+ <!--| Setup |-->
+ <!--| |-->
+ <!--| Include the common build elements. |-->
+ <!--| |-->
+ <!--| This defines several different targets, properties and paths. |-->
+ <!--| It also sets up the basic extention tasks amoung other things. |-->
+ <!--+====================================================================+-->
+
+ &buildmagic;
+ &modules;
+ &defaults;
+ &tools;
+ &targets;
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Initialize the build system. Must depend on '_buildmagic:init'.
+ | Other targets should depend on 'init' or things will mysteriously fail.
+ -->
+
+ <target name="init" unless="init.disable" depends="_buildmagic:init">
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Configuration |-->
+ <!--| |-->
+ <!--| This target is invoked by the Buildmagic initialization logic |-->
+ <!--| and should contain module specific configuration elements. |-->
+ <!--+====================================================================+-->
+
+ <target name="configure" unless="configure.disable">
+
+ <!-- Configure some properties -->
+ <property name="jboss-junit-configuration" value=""/>
+ <property name="junit.formatter.usefile" value="true"/>
+
+ <!-- Configure thirdparty libraries -->
+ &libraries;
+
+ <path id="library.classpath">
+ <path refid="jboss.jbossxb.classpath"/>
+ <path refid="jboss.cache.classpath"/>
+ <path refid="jbossas/core.libs.classpath"/>
+ <path refid="hibernate.hibernate.classpath"/>
+ <path refid="apache.ant.classpath"/>
+ <path refid="apache.myfaces.classpath"/>
+ <path refid="apache.tomahawk.classpath"/>
+ <path refid="apache.log4j.classpath"/>
+ <path refid="junit.junit.classpath"/>
+ <path refid="sun.servlet.classpath"/>
+ <path refid="jakarta.cactus.classpath"/>
+ <path refid="apache.fileupload.classpath"/>
+ <path refid="jakarta.io.classpath"/>
+ <path refid="oswego.concurrent.classpath"/>
+ <path refid="sun.javamail.classpath"/>
+ <path refid="jwebunit.jwebunit.classpath"/>
+ <path refid="dbunit.dbunit.classpath"/>
+ <path refid="sun.jaf.classpath"/>
+ <path refid="portals.bridges.classpath"/>
+ <path refid="beanshell.beanshell.classpath"/>
+ <path refid="facelets.facelets.classpath"/>
+ <path refid="dom4j.dom4j.classpath"/>
+ <path refid="jboss.aop.classpath"/>
+ <path refid="trove.trove.classpath"/>
+ <path refid="qdox.qdox.classpath"/>
+ <pathelement location="${source.etc}/sun-jsf/jsf-example.jar"/>
+ </path>
+
+ <!-- Configure modules -->
+ <call target="configure-modules"/>
+ <path id="dependentmodule.classpath">
+ <path refid="jboss.portal-common.classpath"/>
+ <path refid="jboss.portal-theme.classpath"/>
+ <path refid="jboss.portal-core.classpath"/>
+ <path refid="jboss.portal-format.classpath"/>
+ <path refid="jboss.portal-identity.classpath"/>
+ <path refid="jboss.portal-portlet.classpath"/>
+ <path refid="jboss.portlet-api.classpath"/>
+ </path>
+
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
+
+ <!-- Configure defaults & build tools -->
+ <call target="configure-defaults"/>
+ <call target="configure-tools"/>
+ <call target="configure-explode"/>
+
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
+ <property name="javadoc.private" value="true"/>
+ <property name="javadoc.protected" value="false"/>
+
+ <taskdef name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
+ <taskdef name="implode"
+ classname="org.jboss.portal.common.ant.Implode"
+ classpathref="explode.task.classpath"/>
+
+ </target>
+
+ <target name="configure-explode">
+ <path id="explode.task.classpath">
+ <pathelement location="${project.tools}/lib/explode.jar"/>
+ <path refid="apache.ant.classpath"/>
+ </path>
+ <taskdef
+ name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Compile |-->
+ <!--| |-->
+ <!--| This target should depend on other compile-* targets for each |-->
+ <!--| different type of compile that needs to be performed, short of |-->
+ <!--| documentation compiles. |-->
+ <!--+====================================================================+-->
+
+ <target name="compile"
+ description="Compile all source files."
+ depends="_default:compile-classes,
+ _default:compile-etc,
+ _default:compile-resources">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Generate Output |-->
+ <!--| |-->
+ <!--| Generates the target output for this module. Target output is |-->
+ <!--| the output which is ment to be released or used by external |-->
+ <!--| modules. |-->
+ <!--+====================================================================+-->
+
+ <target name="artifacts"
+ description="Generate all target output."
+ depends="compile">
+
+ <mkdir dir="${build.lib}"/>
+
+ <!-- portal-admin-lib.jar -->
+ <jar jarfile="${build.lib}/portal-core-admin-lib.jar">
+ <fileset dir="${build.classes}">
+ </fileset>
+ </jar>
+
+ <!-- portal-admin.sar -->
+ <copy todir="${build.resources}/portal-admin">
+ <fileset dir="${build.resources}/portal-admin-sar"/>
+ </copy>
+
+ <!-- portal-admin.war -->
+ <copy todir="${build.resources}/portal-admin/portal-admin.war">
+ <fileset dir="${source.bin}/portal-admin-war"/>
+ <fileset dir="${build.resources}/portal-admin-war"/>
+ </copy>
+
+ <!-- hibernate configuration for identity -->
+ <copy todir="${build.resources}/portal-admin/lib">
+ <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
+ </copy>
+ </target>
+
+ <!-- Build the portal-admin.sar -->
+ <target name="output" depends="artifacts">
+ <copy todir="${build.resources}/portal-admin.sar">
+ <fileset dir="${build.resources}/portal-admin" excludes="**/*.xml"/>
+ </copy>
+ <copy todir="${build.resources}/portal-admin.sar">
+ <filterset>
+ <filtersfile file="../build/etc/single.properties"/>
+ </filterset>
+ <fileset dir="${build.resources}/portal-admin" includes="**/*.xml"/>
+ </copy>
+ <implode
+ dir="${build.resources}/portal-admin.sar"
+ tofile="${build.lib}/portal-admin.sar"/>
+ </target>
+
+ <!-- create artifacts for running the portlet tests (except TCK) target output should have already been executed -->
+ <target name="package-tests" depends="init">
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Cleaning -->
+ <!-- ================================================================== -->
+
+ <!-- Clean up all build output -->
+ <target name="clean" depends="_default:clean">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Documents |-->
+ <!--| |-->
+ <!--| Generate all documentation for this module. |-->
+ <!--+====================================================================+-->
+
+ <target name="docs" depends="_default:docs">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Misc. -->
+ <!-- ================================================================== -->
+
+ <target name="main" depends="most"/>
+ <target name="all" depends="_default:all"/>
+ <target name="most" depends="_default:most"/>
+ <target name="help" depends="_default:help"/>
+
+ <!-- ================================================================== -->
+ <!-- Deployment -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Deploy the application
+ -->
+
+ <target name="deploy"
+ description="Deploy."
+ depends="output">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <copy file="${build.lib}/portal-admin.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ </target>
+
+ <!--
+ | Undeploy the application
+ -->
+ <target name="undeploy"
+ description="Undeploy."
+ depends="init">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-admin.sar"/>
+ </target>
+
+ <target name="tests" depends="init, _buildmagic:configure:deployment">
+ </target>
+</project>
19 years, 2 months
JBoss Portal SVN: r6220 - in trunk/core: src/main/org/jboss/portal/test/core/state and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-12 12:35:08 -0500 (Mon, 12 Feb 2007)
New Revision: 6220
Modified:
trunk/core/build.xml
trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
Log:
test that cloning a CCP within a registration context will relate the new state to the registration
Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml 2007-02-12 17:28:11 UTC (rev 6219)
+++ trunk/core/build.xml 2007-02-12 17:35:08 UTC (rev 6220)
@@ -550,6 +550,7 @@
</x-sysproperty>
<x-test>
+<!--
<zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase"
outfile="TEST-PortalObjectContainerTestCase">
<parameter name="CacheNaturalId" value="true"/>
@@ -578,6 +579,7 @@
<parameter name="CloneOnCreate" value="false"/>
<parameter name="CacheNaturalId" value="true"/>
</zest>
+-->
<zest todir="${test.reports}" name="org.jboss.portal.test.core.state.ProducerTestCase"
outfile="TEST-ProducerTestCase-WithoutRegistration">
<parameter name="UseRegistration" value="false"/>
@@ -586,15 +588,19 @@
outfile="TEST-ProducerTestCase-WithRegistration">
<parameter name="UseRegistration" value="true"/>
</zest>
+<!--
<zest todir="${test.reports}" name="org.jboss.portal.test.core.state.RegistrationPersistenceManagerTestCase"
outfile="TEST-RegistrationPersistenceManagerTestCase">
</zest>
+-->
+<!--
<test todir="${test.reports}"
name="org.jboss.portal.test.core.deployment.JBossApplicationMetaDataFactoryTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.core.model.portal.PortalObjectPermissionTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.core.model.portal.PortalObjectIdTestCase"/>
+-->
</x-test>
<x-classpath>
<pathelement location="${build.lib}/portal-core-lib.jar"/>
Modified: trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-02-12 17:28:11 UTC (rev 6219)
+++ trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-02-12 17:35:08 UTC (rev 6220)
@@ -45,7 +45,6 @@
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvoker;
-import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.info.MetaInfo;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.PortletInvocation;
@@ -310,43 +309,6 @@
runtimeContext.stop();
}
- private PortletContext clonePortlet(PortletContext context) throws PortletInvokerException
- {
- beginTX();
- PortletContext cloneCtx = consumer.createClone(context);
- commitTX();
- return cloneCtx;
- }
-
- public void _testCloneNonExistingPortletWithinTx() throws Exception
- {
- try
- {
- beginTX();
- consumer.createClone(PortletContext.createPortletContext("UnknownPortlet"));
- fail("Was expecting no such portlet exception");
- }
- catch (NoSuchPortletException e)
- {
- rollbackTX();
- }
-
- // todo check state
-
-// try
-// {
-// TransactionAssert.beginTransaction();
-// statefulPortletInvoker.createClone("_1");
-// fail("Was expecting no such portlet exception");
-// }
-// catch (NoSuchPortletException e)
-// {
-// TransactionAssert.rollbackTransaction(true);
-// }
-
- // todo check state
- }
-
public void beginTX()
{
TransactionAssert.beginTransaction();
@@ -417,7 +379,9 @@
public void testCloneExistingCCPWithinTx() throws Exception
{
// Clone a POP
- PortletContext cloneCtx = clonePortlet(PortletContext.createPortletContext("SimplePortlet"));
+ beginTX();
+ PortletContext cloneCtx = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
+ commitTX();
// Update CCP state directly
beginTX();
@@ -428,12 +392,14 @@
commitTX();
// Clone the modified CCP
- PortletContext cloneCloneCtx = clonePortlet(cloneCtx);
+ beginRegistrationScopedTX();
+ PortletContext cloneCloneCtx = consumer.createClone(cloneCtx);
+ commitTX();
// Check the clone clone state
beginTX();
assertTrue(cloneCloneCtx.getId().startsWith("_"));
- PortletStateContext cloneCloneState = persistenceManager.loadState(cloneCloneCtx.getId().substring(1));
+ PersistentPortletState cloneCloneState = (PersistentPortletState)persistenceManager.loadState(cloneCloneCtx.getId().substring(1));
assertNotNull(cloneCloneState);
assertEquals(cloneCloneCtx.getId(), "_" + cloneCloneState.getId());
assertEquals("SimplePortlet", cloneCloneState.getState().getPortletId());
@@ -442,33 +408,15 @@
assertNotNull(cloneCloneValues.keySet());
assertEquals(1, cloneCloneValues.keySet().size());
assertEquals(new StringValue("fed"), cloneCloneValues.getProperty("abc"));
+ if (useRegistration)
+ {
+ PersistentRegistration registration = cloneCloneState.getRelatedRegistration();
+ assertNotNull(registration);
+ assertEquals(registrationId, registration.getId());
+ }
commitTX();
}
- public void testABC()
- {
- beginTX();
- Session session = hibernateSupport.getCurrentSession();
- PersistentConsumer consumer = new PersistentConsumer("myconsumer", "myconsumer");
- session.persist(consumer);
- Long consumerPK = consumer.getKey();
- commitTX();
-
- beginTX();
- session = hibernateSupport.getCurrentSession();
- consumer = (PersistentConsumer)session.get(PersistentConsumer.class, consumerPK);
- HashMap properties = new HashMap();
- properties.put(new QName("a", "b"), "abc");
- properties.put(new QName("b"), "def");
- PersistentRegistration reg = new PersistentRegistration(properties, RegistrationStatus.PENDING);
- reg.setPersistentHandle("handle");
- reg.setRelatedConsumer(consumer);
- consumer.getRelatedRegistrations().add(reg);
- session.persist(reg);
- session.flush();
- commitTX();
- }
-
public void testCloneNullPortletWithinTx() throws Exception
{
try
@@ -524,12 +472,16 @@
public void testDestroyCCPWithinTx() throws Exception
{
// Clone a POP 2 times
- PortletContext cloneId1 = clonePortlet(PortletContext.createPortletContext("SimplePortlet"));
- PortletContext cloneId2 = clonePortlet(PortletContext.createPortletContext("SimplePortlet"));
+ beginTX();
+ PortletContext cloneId1 = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
+ PortletContext cloneId2 = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
+ commitTX();
// Clone the modified CCP 2 times
- PortletContext cloneCloneId1 = clonePortlet(cloneId1);
- PortletContext cloneCloneId2 = clonePortlet(cloneId1);
+ beginTX();
+ PortletContext cloneCloneId1 = consumer.createClone(cloneId1);
+ PortletContext cloneCloneId2 = consumer.createClone(cloneId1);
+ commitTX();
// Destroy the clone 2
beginTX();
@@ -620,7 +572,9 @@
public void testInvokeCloneBeforeWriteCCPWithinTx() throws Exception
{
- PortletContext cloningPortletId = clonePortlet(PortletContext.createPortletContext("CloningPortlet"));
+ beginTX();
+ PortletContext cloningPortletId = consumer.createClone(PortletContext.createPortletContext("CloningPortlet"));
+ commitTX();
// Modify the state of the CCP
beginTX();
@@ -657,7 +611,9 @@
public void testInvokeReadWriteCCPWithinTx() throws Exception
{
- PortletContext cloningPortletId = clonePortlet(PortletContext.createPortletContext("CloningPortlet"));
+ beginTX();
+ PortletContext cloningPortletId = consumer.createClone(PortletContext.createPortletContext("CloningPortlet"));
+ commitTX();
//
beginTX();
@@ -685,7 +641,9 @@
public void testInvokeReadOnlyCCPWithinTx() throws Exception
{
- PortletContext cloneFailedCloningPortletId = clonePortlet(PortletContext.createPortletContext("CloneFailedCloningPortlet"));
+ beginTX();
+ PortletContext cloneFailedCloningPortletId = consumer.createClone(PortletContext.createPortletContext("CloneFailedCloningPortlet"));
+ commitTX();
//
beginTX();
@@ -738,7 +696,9 @@
public void testGetCCP() throws Exception
{
// Clone a POP
- PortletContext cloneContext = clonePortlet(PortletContext.createPortletContext("SimplePortlet"));
+ beginTX();
+ PortletContext cloneContext = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
+ commitTX();
//
beginTX();
@@ -748,7 +708,9 @@
commitTX();
// Clone the modified CCP
- PortletContext cloneCloneContext = clonePortlet(cloneContext);
+ beginTX();
+ PortletContext cloneCloneContext = consumer.createClone(cloneContext);
+ commitTX();
//
beginTX();
@@ -758,4 +720,32 @@
commitTX();
}
+ public void _testCloneNonExistingPortletWithinTx() throws Exception
+ {
+ try
+ {
+ beginTX();
+ consumer.createClone(PortletContext.createPortletContext("UnknownPortlet"));
+ fail("Was expecting no such portlet exception");
+ }
+ catch (NoSuchPortletException e)
+ {
+ rollbackTX();
+ }
+
+ // todo check state
+
+// try
+// {
+// TransactionAssert.beginTransaction();
+// statefulPortletInvoker.createClone("_1");
+// fail("Was expecting no such portlet exception");
+// }
+// catch (NoSuchPortletException e)
+// {
+// TransactionAssert.rollbackTransaction(true);
+// }
+
+ // todo check state
+ }
}
19 years, 2 months
JBoss Portal SVN: r6219 - in trunk: core-admin and 15 other directories.
by portal-commits@lists.jboss.org
Author: roy.russo(a)jboss.com
Date: 2007-02-12 12:28:11 -0500 (Mon, 12 Feb 2007)
New Revision: 6219
Added:
trunk/core-admin/
trunk/core-admin/src/
trunk/core-admin/src/bin/
trunk/core-admin/src/bin/portal-admin-sar/
trunk/core-admin/src/bin/portal-admin-war/
trunk/core-admin/src/bin/portal-admin-war/images/
trunk/core-admin/src/main/
trunk/core-admin/src/main/org/
trunk/core-admin/src/main/org/jboss/
trunk/core-admin/src/main/org/jboss/portal/
trunk/core-admin/src/main/org/jboss/portal/core/
trunk/core-admin/src/main/org/jboss/portal/core/admin/
trunk/core-admin/src/resources/
trunk/core-admin/src/resources/portal-admin-sar/
trunk/core-admin/src/resources/portal-admin-sar/META-INF/
trunk/core-admin/src/resources/portal-admin-sar/META-INF/jboss-service.xml
trunk/core-admin/src/resources/portal-admin-war/
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_es.properties
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_fr.properties
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_pt_BR.properties
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/default-object.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-web.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/admin/
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portal-lib.tld
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
Log:
portal-admin dir stub
Added: trunk/core-admin/src/resources/portal-admin-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-sar/META-INF/jboss-service.xml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-sar/META-INF/jboss-service.xml 2007-02-12 17:28:11 UTC (rev 6219)
@@ -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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+</server>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,93 @@
+################################################################################
+# 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. #
+################################################################################
+
+## CMS ADMIN PORTLET
+TITLE_HEAD=CMS Admin
+TITLE_BROWSE=Directory Browser
+TITLE_FILEBROWSE=File Browser
+TITLE_DELETECONFIRM=Confirm Delete
+TITLE_CREATECOLLCONFIRM=Confirm Directory Creation
+TITLE_COPYCONFIRM=Confirm Resource Copy
+TITLE_MOVECONFIRM=Confirm Resource Move
+TITLE_VIEWFILE=Viewing File Properties
+TITLE_EDIT=Edit File
+TITLE_CREATE=Create File
+TITLE_UPLOAD=Upload File
+TITLE_SECURECONFIRM=Secure Node
+
+CMS_SEARCH=Search
+CMS_SEARCHNORESULT=No result for this search
+CMS_MENU=Action Menu
+CMS_ACTION=Action
+CMS_NAME=Name
+CMS_TYPE=Type
+CMS_CREATED=Created
+CMS_MODIFIED=Modified
+CMS_DESCRIPTION=Description
+CMS_VIEW=View
+CMS_COPY=Copy
+CMS_MOVE=Move
+CMS_DELETE=Delete
+CMS_FOLDER=Folder
+CMS_FILE=File
+CMS_CREATE=Create
+CMS_EDIT=Edit
+CMS_UPLOAD=Upload
+CMS_MODIFY=Modify
+CMS_CREATEFOLDER= Create Folder
+CMS_CREATEFILE=Create File
+CMS_UPLOADARCHIVE=Upload Archive
+CMS_BACKTOBROWSER=Back to Directory Browser
+CMS_TRANSFER=Import/Export
+CMS_EXPORTARCHIVE=Export Folder
+CMS_SECURE=Secure
+
+CMS_CREATEFILEINDIR=Creating File in Directory
+CMS_FILENAME=FileName
+CMS_TITLE=Title
+CMS_LANGUAGE=Language
+
+CMS_DELETEPATH=Confirm Deletion of
+CMS_DELETEWARN1=WARNING! You will not be able to undo these change\!
+CMS_DELETEWARN2=Are you sure you want to delete this resource\?
+
+CMS_DESTINATION=Destination
+CMS_SOURCE=Source
+
+CMS_EDITING=Editing File
+CMS_LIVE=Make \"Live\"
+CMS_VERSION=Version
+
+CMS_LIVEVERSION=Live Version
+CMS_SIZE=Size
+
+CMS_CONTENT_DIR=Content Directory
+CMS_CONTENT_DIR_USE=Use the directory tree to navigate the portal folder structure.
+CMS_MAIN_USE=Use the CMS Administration portlet to manage the content of your portal.
+
+CMS_CREATED_BY=Created By
+CMS_APPROVE=Approve
+CMS_DENY=Deny
+CMS_APPROVAL=Pending Items
+CMS_PATH=Location
+
\ No newline at end of file
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_es.properties
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_es.properties (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_es.properties 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,36 @@
+################################################################################
+# 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. #
+################################################################################
+
+# CMS ADMIN PORTLET
+TITLE_HEAD=Administraci�n de CMS
+TITLE_BROWSE=Explorador de directorios
+TITLE_DELETECONFIRM=Confirmar el borrado
+TITLE_CREATECOLLCONFIRM=Confirmar la creaci�n de directorio
+TITLE_COPYCONFIRM=Confirmar la copia del recurso
+TITLE_MOVECONFIRM=Confirmar el movimiento del recurso
+TITLE_VIEWFILE=Viendo las propiedades del fichero
+TITLE_EDIT=Editar fichero
+TITLE_CREATE=Crear fichero
+TITLE_UPLOAD=Subir fichero
+
+CMS_SEARCH=B�squeda
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_fr.properties
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_fr.properties (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_fr.properties 2007-02-12 17:28:11 UTC (rev 6219)
@@ -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. #
+################################################################################
+
+# CMS ADMIN PORTLET
+TITLE_HEAD=Administration CMS
+TITLE_BROWSE=Navigation r\u00E9pertoires
+TITLE_DELETECONFIRM=Confirmer la suppression
+TITLE_CREATECOLLCONFIRM=Confirmer la cr\u00E9ation de r\u00E9pertoire
+TITLE_COPYCONFIRM=Confirmer la copie de fichier
+TITLE_MOVECONFIRM=Confirmer le d\u00E9placement de fichier
+TITLE_VIEWFILE=Voir les propri\u00E9t\u00E9s du fichier
+TITLE_EDIT=Editer le fichier
+TITLE_CREATE=Cr\u00E9er le fichier
+TITLE_UPLOAD=Charger le fichier
+TITLE_SECURECONFIRM=S\u00E9curiser le noeud
+CMS_SEARCH=Chercher
+CMS_SEARCHNORESULT=Aucun r\u00E9sultat pour cette recherche
\ No newline at end of file
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_pt_BR.properties
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_pt_BR.properties (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_pt_BR.properties 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,87 @@
+################################################################################
+# 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. #
+################################################################################
+
+## CMS ADMIN PORTLET
+TITLE_HEAD=CMS Admin
+TITLE_BROWSE=Navegador de Diret�rios
+TITLE_FILEBROWSE=Navegador de Arquivos
+TITLE_DELETECONFIRM=Confirmar remo��o
+TITLE_CREATECOLLCONFIRM=Confirmar cria��o de diret�rio
+TITLE_COPYCONFIRM=Confirm Resource Copy
+TITLE_MOVECONFIRM=Confirm Resource Move
+TITLE_VIEWFILE=Visualizando Propriedades de Arquivo
+TITLE_EDIT=Editar Arquivo
+TITLE_CREATE=Criar Arquivo
+TITLE_UPLOAD=Enviar Arquivo
+
+CMS_SEARCH=Pesquisar
+CMS_MENU=Menu de A��es
+CMS_ACTION=A��o
+CMS_NAME=Nome
+CMS_TYPE=Tipo
+CMS_CREATED=Criado
+CMS_MODIFIED=Modificado
+CMS_DESCRIPTION=Descri��o
+CMS_VIEW=Visualizar
+CMS_COPY=Copiar
+CMS_MOVE=Mover
+CMS_DELETE=Remover
+CMS_FOLDER=Pasta
+CMS_FILE=Arquivo
+CMS_CREATE=Criar
+CMS_RESET=Resetar
+CMS_EDIT=Editar
+CMS_UPLOAD=Enviar
+CMS_MODIFY=Modificar
+CMS_CREATEFOLDER=Criar Pasta
+CMS_CREATEFILE=Criar Diret�rio
+CMS_UPLOADARCHIVE=Enviar Arquivo
+CMS_BACKTOBROWSER=Voltar ao Navegador de Diret�rios
+
+CMS_CREATEFILEINDIR=Criando Arquivo em Diret�rio
+CMS_FILENAME=Nome do Arquivo
+CMS_TITLE=T�tulo
+CMS_LANGUAGE=L�ngua
+
+CMS_DELETEPATH=Confirmar remo��o de
+CMS_DELETEWARN1=ATEN��O\! Voc� n�o poderar desfazer estas altera��es\!
+CMS_DELETEWARN2=Voc� tem certeza que deseja remover\?
+
+CMS_DESTINATION=Destino
+CMS_SOURCE=Fonte
+
+CMS_EDITING=Editando Arquivo
+CMS_LIVE=Tornar \"Ativo\"
+CMS_VERSION=Vers�o
+
+CMS_LIVEVERSION=Vers�o \"Ativa\"
+CMS_SIZE=Tamanho
+
+CMS_CONTENT_DIR=Content Directory
+CMS_CONTENT_DIR_USE=Use the directory tree to navigate the portal folder structure.
+CMS_MAIN_USE=Use the CMS Administration portlet to manage the content of your portal.
+
+CMS_CREATED_BY=Created By
+CMS_APPROVE=Approve
+CMS_DENY=Deny
+CMS_APPROVAL=Pending Items
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/default-object.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/default-object.xml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/default-object.xml 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portal Object 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
+
+<deployments>
+
+</deployments>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,101 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
+<portlet-app>
+
+ <!-- Service injected in the portlet context. -->
+ <service>
+ <service-name>PortalObjectContainer</service-name>
+ <service-class>org.jboss.portal.core.model.portal.PortalObjectContainer</service-class>
+ <service-ref>:container=PortalObject</service-ref>
+ </service>
+ <service>
+ <service-name>InstanceContainer</service-name>
+ <service-class>org.jboss.portal.core.model.instance.InstanceContainer</service-class>
+ <service-ref>:container=Instance</service-ref>
+ </service>
+ <service>
+ <service-name>ThemeService</service-name>
+ <service-class>org.jboss.portal.theme.ThemeService</service-class>
+ <service-ref>:service=ThemeService</service-ref>
+ </service>
+ <service>
+ <service-name>LayoutService</service-name>
+ <service-class>org.jboss.portal.theme.LayoutService</service-class>
+ <service-ref>:service=LayoutService</service-ref>
+ </service>
+ <service>
+ <service-name>CMS</service-name>
+ <service-class>org.jboss.portal.cms.CMS</service-class>
+ <service-ref>:service=CMS</service-ref>
+ </service>
+ <service>
+ <service-name>UserModule</service-name>
+ <service-class>org.jboss.portal.identity.UserModule</service-class>
+ <service-ref>:service=Module,type=User</service-ref>
+ </service>
+ <service>
+ <service-name>RoleModule</service-name>
+ <service-class>org.jboss.portal.identity.RoleModule</service-class>
+ <service-ref>:service=Module,type=Role</service-ref>
+ </service>
+ <service>
+ <service-name>UserProfileModule</service-name>
+ <service-class>org.jboss.portal.identity.UserProfileModule</service-class>
+ <service-ref>:service=Module,type=UserProfile</service-ref>
+ </service>
+ <service>
+ <service-name>MembershipModule</service-name>
+ <service-class>org.jboss.portal.identity.MembershipModule</service-class>
+ <service-ref>:service=Module,type=Membership</service-ref>
+ </service>
+ <service>
+ <service-name>MailModule</service-name>
+ <service-class>org.jboss.portal.core.modules.MailModule</service-class>
+ <service-ref>:service=Module,type=Mail</service-ref>
+ </service>
+ <service>
+ <service-name>PortalAuthorizationManagerFactory</service-name>
+ <service-class>org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory</service-class>
+ <service-ref>:service=PortalAuthorizationManagerFactory</service-ref>
+ </service>
+ <service>
+ <service-name>AuthorizationDomainRegistry</service-name>
+ <service-class>org.jboss.portal.security.AuthorizationDomainRegistry</service-class>
+ <service-ref>:service=AuthorizationDomainRegistry</service-ref>
+ </service>
+ <service>
+ <service-name>FederatingPortletInvoker</service-name>
+ <service-class>org.jboss.portal.portlet.federation.FederatingPortletInvoker</service-class>
+ <service-ref>:service=PortletInvoker,type=Federating</service-ref>
+ </service>
+ <service>
+ <service-name>SearchFederationService</service-name>
+ <service-class>org.jboss.portal.search.federation.SearchFederation</service-class>
+ <service-ref>:service=SearchFederationService</service-ref>
+ </service>
+</portlet-app>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-web.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-web.xml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-web.xml 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,26 @@
+<?xml version="1.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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<jboss-web>
+</jboss-web>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portal-lib.tld
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portal-lib.tld (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portal-lib.tld 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,104 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ version="2.0">
+ <tlib-version>1.1</tlib-version>
+ <short-name>JBoss-Portal-tags</short-name>
+
+ <tag>
+ <name>if</name>
+ <tag-class>org.jboss.portal.core.servlet.jsp.taglib.IfTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>ctx</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>iterate</name>
+ <tag-class>org.jboss.portal.core.servlet.jsp.taglib.IterateTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>ctx</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>include</name>
+ <tag-class>org.jboss.portal.core.servlet.jsp.taglib.IncludeTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>page</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>error</name>
+ <tag-class>org.jboss.portal.core.servlet.jsp.taglib.ErrorTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>key</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>errors</name>
+ <tag-class>org.jboss.portal.core.servlet.jsp.taglib.ErrorsTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+
+ <tag>
+ <name>success</name>
+ <tag-class>org.jboss.portal.core.servlet.jsp.taglib.SuccessTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+ <function>
+ <name>i18n</name>
+ <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+ <function-signature>java.lang.String getMessage(java.lang.String)</function-signature>
+ </function>
+
+ <function>
+ <name>out</name>
+ <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+ <function-signature>java.lang.String out(java.lang.String)</function-signature>
+ </function>
+
+ <function>
+ <name>i18nout</name>
+ <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+ <function-signature>java.lang.String i18nOut(java.lang.String)</function-signature>
+ </function>
+
+</taglib>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,31 @@
+<?xml version="1.0" standalone="yes"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portlet Instances 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd">
+
+<deployments>
+
+</deployments>
\ No newline at end of file
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app
+ xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ version="1.0">
+
+</portlet-app>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-02-12 17:28:11 UTC (rev 6219)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+</web-app>
19 years, 2 months
JBoss Portal SVN: r6218 - in trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF: wsdl and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-02-12 12:14:58 -0500 (Mon, 12 Feb 2007)
New Revision: 6218
Modified:
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jboss-web.xml
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/wsdl/wsrp_services.wsdl
Log:
- Re-organization and clean-ups.
- Added section on using https in service definition.
Modified: trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jboss-web.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jboss-web.xml 2007-02-12 16:40:07 UTC (rev 6217)
+++ trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jboss-web.xml 2007-02-12 17:14:58 UTC (rev 6218)
@@ -22,5 +22,5 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<jboss-web>
- <!--<depends>jboss.ws:service=WebServiceDeployerJSE</depends>-->
+ <depends>jboss.ws:service=WebServiceDeployerJSE</depends>
</jboss-web>
\ No newline at end of file
Modified: trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml 2007-02-12 16:40:07 UTC (rev 6217)
+++ trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml 2007-02-12 17:14:58 UTC (rev 6218)
@@ -28,12 +28,6 @@
version="2.4">
<!-- Filter to put request and response in ServletAccess -->
- <!--
- <filter>
- <filter-name>RequestDumperFilter</filter-name>
- <filter-class>org.jboss.portal.wsrp.servlet.RequestDumperFilter</filter-class>
- </filter>
- -->
<filter>
<filter-name>ServletAccessFilter</filter-name>
<filter-class>org.jboss.portal.wsrp.servlet.ServletAccessFilter</filter-class>
@@ -42,12 +36,6 @@
<filter-name>TransactionFilter</filter-name>
<filter-class>org.jboss.portal.wsrp.servlet.TransactionFilter</filter-class>
</filter>
- <!--
- <filter-mapping>
- <filter-name>RequestDumperFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- -->
<filter-mapping>
<filter-name>ServletAccessFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -57,31 +45,24 @@
<url-pattern>/*</url-pattern>
</filter-mapping>
- <servlet>
- <servlet-name>MarkupService</servlet-name>
- <servlet-class>org.jboss.portal.wsrp.endpoints.MarkupEndpoint</servlet-class>
- <init-param>
- <param-name>wsrp-interface</param-name>
- <param-value>org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType</param-value>
- </init-param>
- </servlet>
- <servlet>
- <servlet-name>ServiceDescriptionService</servlet-name>
- <servlet-class>org.jboss.portal.wsrp.endpoints.ServiceDescriptionEndpoint</servlet-class>
- <init-param>
- <param-name>wsrp-interface</param-name>
- <param-value>org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType</param-value>
- </init-param>
- </servlet>
- <servlet-mapping>
- <servlet-name>ServiceDescriptionService</servlet-name>
- <url-pattern>/ServiceDescriptionService</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>MarkupService</servlet-name>
- <url-pattern>/MarkupService</url-pattern>
- </servlet-mapping>
+ <!-- WSRP Endpoints -->
<servlet>
+ <servlet-name>ServiceDescriptionService</servlet-name>
+ <servlet-class>org.jboss.portal.wsrp.endpoints.ServiceDescriptionEndpoint</servlet-class>
+ <init-param>
+ <param-name>wsrp-interface</param-name>
+ <param-value>org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>MarkupService</servlet-name>
+ <servlet-class>org.jboss.portal.wsrp.endpoints.MarkupEndpoint</servlet-class>
+ <init-param>
+ <param-name>wsrp-interface</param-name>
+ <param-value>org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
<servlet-name>RegistrationService</servlet-name>
<servlet-class>org.jboss.portal.wsrp.endpoints.RegistrationEndpoint</servlet-class>
<init-param>
@@ -97,7 +78,17 @@
<param-value>org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType</param-value>
</init-param>
</servlet>
+
+ <!-- Mappings -->
<servlet-mapping>
+ <servlet-name>ServiceDescriptionService</servlet-name>
+ <url-pattern>/ServiceDescriptionService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>MarkupService</servlet-name>
+ <url-pattern>/MarkupService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
<servlet-name>RegistrationService</servlet-name>
<url-pattern>/RegistrationService</url-pattern>
</servlet-mapping>
Modified: trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/wsdl/wsrp_services.wsdl
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/wsdl/wsrp_services.wsdl 2007-02-12 16:40:07 UTC (rev 6217)
+++ trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/wsdl/wsrp_services.wsdl 2007-02-12 17:14:58 UTC (rev 6218)
@@ -50,4 +50,25 @@
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</wsdl:port>
</wsdl:service>
+
+ <!--
+ Uncomment to use HTTP+SSL after activating the appropriate Tomcat Connector and comment out the above service
+ definition. Adapt host name and port as appropriate.
+ <wsdl:service name="WSRPService">
+ <wsdl:port binding="bind:WSRP_v1_Markup_Binding_SOAP" name="WSRPBaseService">
+ <soap:address location="https://localhost:8443/portal-wsrp/ServiceDescriptionService"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_ServiceDescription_Binding_SOAP" name="WSRPServiceDescriptionService">
+ <soap:address location="https://localhost:8443/portal-wsrp/MarkupService"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_Registration_Binding_SOAP" name="WSRPRegistrationService">
+ <soap:address location="https://localhost:8443/portal-wsrp/RegistrationService"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_PortletManagement_Binding_SOAP" name="WSRPPortletManagementService">
+ <soap:address location="https://localhost:8443/portal-wsrp/PortletManagementService"/>
+ </wsdl:port>
+ </wsdl:service>-->
</wsdl:definitions>
19 years, 2 months
JBoss Portal SVN: r6217 - trunk/core/src/main/org/jboss/portal/test/core/state.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-12 11:40:07 -0500 (Mon, 12 Feb 2007)
New Revision: 6217
Modified:
trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
Log:
minor comments
Modified: trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-02-12 16:34:52 UTC (rev 6216)
+++ trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-02-12 16:40:07 UTC (rev 6217)
@@ -108,7 +108,7 @@
return suite;
}
- /** Whether we test registration or not. */
+ /** Test parameter whether we test registration or not. */
private boolean useRegistration;
/** . */
@@ -120,7 +120,7 @@
/** . */
private HibernateSupport hibernateSupport;
- /** . */
+ /** The persistence manager of the producer. */
private PersistentPortletStatePersistenceManager persistenceManager;
/** The producer. */
@@ -129,7 +129,7 @@
/** The portlet container. */
private PortletInvokerSupport portletContainer;
- /** The consumer portlet invoker. */
+ /** The consumer. */
private PortletInvoker consumer;
/** The registration id created during the setup. */
19 years, 2 months
JBoss Portal SVN: r6216 - in trunk/core: src/main/org/jboss/portal/test/core/state and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-12 11:34:52 -0500 (Mon, 12 Feb 2007)
New Revision: 6216
Modified:
trunk/core/build.xml
trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
trunk/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml
Log:
- handle the registration integration of the portlet state tests as a test parameter
Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml 2007-02-12 15:43:00 UTC (rev 6215)
+++ trunk/core/build.xml 2007-02-12 16:34:52 UTC (rev 6216)
@@ -536,8 +536,10 @@
<execute-tests>
<x-sysproperty>
+<!--
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"/>
+-->
<sysproperty
key="jboss.aop.path"
@@ -577,8 +579,13 @@
<parameter name="CacheNaturalId" value="true"/>
</zest>
<zest todir="${test.reports}" name="org.jboss.portal.test.core.state.ProducerTestCase"
- outfile="TEST-ProducerTestCase">
+ outfile="TEST-ProducerTestCase-WithoutRegistration">
+ <parameter name="UseRegistration" value="false"/>
</zest>
+ <zest todir="${test.reports}" name="org.jboss.portal.test.core.state.ProducerTestCase"
+ outfile="TEST-ProducerTestCase-WithRegistration">
+ <parameter name="UseRegistration" value="true"/>
+ </zest>
<zest todir="${test.reports}" name="org.jboss.portal.test.core.state.RegistrationPersistenceManagerTestCase"
outfile="TEST-RegistrationPersistenceManagerTestCase">
</zest>
Modified: trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-02-12 15:43:00 UTC (rev 6215)
+++ trunk/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-02-12 16:34:52 UTC (rev 6216)
@@ -109,7 +109,7 @@
}
/** Whether we test registration or not. */
- private boolean userRegistration;
+ private boolean useRegistration;
/** . */
private TestRuntimeContext runtimeContext;
@@ -123,20 +123,33 @@
/** . */
private PersistentPortletStatePersistenceManager persistenceManager;
- /** . */
+ /** The producer. */
private ProducerPortletInvoker producer;
- /** . */
+ /** The portlet container. */
private PortletInvokerSupport portletContainer;
- /** . */
- private PortletInvoker portletInvoker;
+ /** The consumer portlet invoker. */
+ private PortletInvoker consumer;
+ /** The registration id created during the setup. */
+ private String registrationId;
+
public String getName()
{
return super.getName() + ",ds=" + dataSourceConfigParameter.getName();
}
+ public String getUseRegistrationParameter()
+ {
+ return Boolean.toString(useRegistration);
+ }
+
+ public void setUseRegistrationParameter(String useRegistrationParameter)
+ {
+ this.useRegistration = Boolean.valueOf(useRegistrationParameter).booleanValue();
+ }
+
public HibernateSupport getHibernateSupport()
{
return hibernateSupport;
@@ -187,14 +200,14 @@
this.dataSourceConfigParameter = dataSourceConfigParameter;
}
- public PortletInvoker getPortletInvoker()
+ public PortletInvoker getConsumer()
{
- return portletInvoker;
+ return consumer;
}
- public void setPortletInvoker(PortletInvoker portletInvoker)
+ public void setConsumer(PortletInvoker consumer)
{
- this.portletInvoker = portletInvoker;
+ this.consumer = consumer;
}
public void setUp() throws Exception
@@ -271,6 +284,21 @@
throw new RuntimeException("custom_message");
}
});
+
+ // Create registration
+ if (useRegistration)
+ {
+ beginTX();
+ ConsumerGroup cg = persistenceManager.createConsumerGroup("CG");
+ Consumer consumer = persistenceManager.createConsumer("fooConsumer", "fooConsumer");
+ cg.addConsumer(consumer);
+ Map registrationProperties = new HashMap();
+ registrationProperties.put(new QName("prop1"), "value1");
+ registrationProperties.put(new QName("prop2"), "value2");
+ Registration reg = persistenceManager.addRegistrationFor("fooConsumer", registrationProperties);
+ registrationId = reg.getId();
+ commitTX();
+ }
}
public void tearDown() throws Exception
@@ -284,9 +312,9 @@
private PortletContext clonePortlet(PortletContext context) throws PortletInvokerException
{
- TransactionAssert.beginTransaction();
- PortletContext cloneCtx = portletInvoker.createClone(context);
- TransactionAssert.commitTransaction();
+ beginTX();
+ PortletContext cloneCtx = consumer.createClone(context);
+ commitTX();
return cloneCtx;
}
@@ -294,13 +322,13 @@
{
try
{
- TransactionAssert.beginTransaction();
- portletInvoker.createClone(PortletContext.createPortletContext("UnknownPortlet"));
+ beginTX();
+ consumer.createClone(PortletContext.createPortletContext("UnknownPortlet"));
fail("Was expecting no such portlet exception");
}
catch (NoSuchPortletException e)
{
- TransactionAssert.rollbackTransaction(true);
+ rollbackTX();
}
// todo check state
@@ -319,99 +347,56 @@
// todo check state
}
- public void testABC()
+ public void beginTX()
{
TransactionAssert.beginTransaction();
- Session session = hibernateSupport.getCurrentSession();
- PersistentConsumer consumer = new PersistentConsumer("myconsumer", "myconsumer");
- session.persist(consumer);
- Long consumerPK = consumer.getKey();
- TransactionAssert.commitTransaction();
-
- TransactionAssert.beginTransaction();
- session = hibernateSupport.getCurrentSession();
- consumer = (PersistentConsumer)session.get(PersistentConsumer.class, consumerPK);
- HashMap properties = new HashMap();
- properties.put(new QName("a", "b"), "abc");
- properties.put(new QName("b"), "def");
- PersistentRegistration reg = new PersistentRegistration(properties, RegistrationStatus.PENDING);
- reg.setPersistentHandle("handle");
- reg.setRelatedConsumer(consumer);
- consumer.getRelatedRegistrations().add(reg);
- session.persist(reg);
- session.flush();
- TransactionAssert.commitTransaction();
}
- private String createrRegistration() throws Exception
+ public void beginRegistrationScopedTX()
{
- Map registrationProperties = new HashMap();
- registrationProperties.put(new QName("prop1"), "value1");
- registrationProperties.put(new QName("prop2"), "value2");
+ TransactionAssert.beginTransaction();
- TransactionAssert.beginTransaction();
- ConsumerGroup cg = persistenceManager.createConsumerGroup("CG");
- Consumer consumer = persistenceManager.createConsumer("fooConsumer", "fooConsumer");
- cg.addConsumer(consumer);
- Registration reg = persistenceManager.addRegistrationFor("fooConsumer", registrationProperties);
- String regId = reg.getId();
- TransactionAssert.commitTransaction();
- return regId;
+ //
+ if (useRegistration)
+ {
+ Registration reg = persistenceManager.getRegistration(registrationId);
+ RegistrationLocal.setRegistration(reg);
+ }
}
- public void testCloneExistingPortletWithinTxWithRegistration() throws Exception
+ private void rollbackTX()
{
- String regId = createrRegistration();
+ TransactionAssert.rollbackTransaction(true);
- // Clone a POP
- PortletContext cloneCtx = null;
- try
+ //
+ if (useRegistration)
{
- TransactionAssert.beginTransaction();
- Registration reg = persistenceManager.getRegistration(regId);
- assertNotNull(reg);
- RegistrationLocal.setRegistration(reg);
- cloneCtx = portletInvoker.createClone(PortletContext.createPortletContext("SimplePortlet"));
- TransactionAssert.commitTransaction();
- }
- finally
- {
RegistrationLocal.setRegistration(null);
}
+ }
- // Lookup
- TransactionAssert.beginTransaction();
- PersistentPortletState state = (PersistentPortletState)persistenceManager.loadState(cloneCtx.getId().substring(1));
- PersistentRegistration registration = state.getRelatedRegistration();
- assertNotNull(registration);
- assertNotNull(state);
- assertEquals(regId, state.getId());
+ public void commitTX()
+ {
TransactionAssert.commitTransaction();
- }
- public void testCloneNullPortletWithinTx() throws Exception
- {
- try
+ //
+ if (useRegistration)
{
- TransactionAssert.beginTransaction();
- portletInvoker.createClone(null);
- fail("Was expecting an IllegalArgumentException");
+ RegistrationLocal.setRegistration(null);
}
- catch (IllegalArgumentException expected)
- {
- TransactionAssert.rollbackTransaction(true);
- }
}
- public void testCloneExistingPortletWithinTx() throws Exception
+ public void testCloneExistingPOPWithinTx() throws Exception
{
// Clone a POP
- PortletContext cloneCtx = clonePortlet(PortletContext.createPortletContext("SimplePortlet"));
+ beginRegistrationScopedTX();
+ PortletContext cloneCtx = consumer.createClone(PortletContext.createPortletContext("SimplePortlet"));
+ commitTX();
// Check the clone state
- TransactionAssert.beginTransaction();
+ beginTX();
assertTrue(cloneCtx.getId().startsWith("_"));
- PortletStateContext cloneState = persistenceManager.loadState(cloneCtx.getId().substring(1));
+ PersistentPortletState cloneState = (PersistentPortletState)persistenceManager.loadState(cloneCtx.getId().substring(1));
assertNotNull(cloneState);
assertEquals(cloneCtx.getId(), "_" + cloneState.getId());
assertEquals("SimplePortlet", cloneState.getState().getPortletId());
@@ -420,20 +405,33 @@
assertNotNull(cloneValues.keySet());
assertEquals(1, cloneValues.keySet().size());
assertEquals(new StringValue("def"), cloneValues.getProperty("abc"));
- TransactionAssert.commitTransaction();
+ if (useRegistration)
+ {
+ PersistentRegistration registration = cloneState.getRelatedRegistration();
+ assertNotNull(registration);
+ assertEquals(registrationId, registration.getId());
+ }
+ commitTX();
+ }
+ public void testCloneExistingCCPWithinTx() throws Exception
+ {
+ // Clone a POP
+ PortletContext cloneCtx = clonePortlet(PortletContext.createPortletContext("SimplePortlet"));
+
// Update CCP state directly
- TransactionAssert.beginTransaction();
+ beginTX();
+ PropertyMap cloneValues = consumer.getProperties(cloneCtx);
PropertyMap newCloneValues = new SimplePropertyMap(cloneValues);
newCloneValues.setProperty("abc", new StringValue("fed"));
persistenceManager.updateState(cloneCtx.getId().substring(1), newCloneValues);
- TransactionAssert.commitTransaction();
+ commitTX();
// Clone the modified CCP
PortletContext cloneCloneCtx = clonePortlet(cloneCtx);
// Check the clone clone state
- TransactionAssert.beginTransaction();
+ beginTX();
assertTrue(cloneCloneCtx.getId().startsWith("_"));
PortletStateContext cloneCloneState = persistenceManager.loadState(cloneCloneCtx.getId().substring(1));
assertNotNull(cloneCloneState);
@@ -444,28 +442,66 @@
assertNotNull(cloneCloneValues.keySet());
assertEquals(1, cloneCloneValues.keySet().size());
assertEquals(new StringValue("fed"), cloneCloneValues.getProperty("abc"));
- TransactionAssert.commitTransaction();
+ commitTX();
}
+ public void testABC()
+ {
+ beginTX();
+ Session session = hibernateSupport.getCurrentSession();
+ PersistentConsumer consumer = new PersistentConsumer("myconsumer", "myconsumer");
+ session.persist(consumer);
+ Long consumerPK = consumer.getKey();
+ commitTX();
+
+ beginTX();
+ session = hibernateSupport.getCurrentSession();
+ consumer = (PersistentConsumer)session.get(PersistentConsumer.class, consumerPK);
+ HashMap properties = new HashMap();
+ properties.put(new QName("a", "b"), "abc");
+ properties.put(new QName("b"), "def");
+ PersistentRegistration reg = new PersistentRegistration(properties, RegistrationStatus.PENDING);
+ reg.setPersistentHandle("handle");
+ reg.setRelatedConsumer(consumer);
+ consumer.getRelatedRegistrations().add(reg);
+ session.persist(reg);
+ session.flush();
+ commitTX();
+ }
+
+ public void testCloneNullPortletWithinTx() throws Exception
+ {
+ try
+ {
+ beginTX();
+ consumer.createClone(null);
+ fail("Was expecting an IllegalArgumentException");
+ }
+ catch (IllegalArgumentException expected)
+ {
+ rollbackTX();
+ }
+ }
+
public void testDestroyNonExistingPortletWithinTx() throws Exception
{
- TransactionAssert.beginTransaction();
- List failures = portletInvoker.destroyClones(Collections.singletonList(PortletContext.createPortletContext("_1")));
+ beginTX();
+ List failures = consumer.destroyClones(Collections.singletonList(PortletContext.createPortletContext("_1")));
assertEquals(Collections.singletonList(new DestroyCloneFailure("_1")), failures);
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void testDestroyNullPortletWithinTx() throws Exception
{
try
{
- TransactionAssert.beginTransaction();
- portletInvoker.destroyClones(null);
+ beginTX();
+ consumer.destroyClones(null);
fail("Was expecting an IllegalArgumentException");
}
catch (IllegalArgumentException expected)
{
- TransactionAssert.rollbackTransaction(true);
+ rollbackTX();
}
}
@@ -496,43 +532,43 @@
PortletContext cloneCloneId2 = clonePortlet(cloneId1);
// Destroy the clone 2
- TransactionAssert.beginTransaction();
- List failures = portletInvoker.destroyClones(Collections.singletonList(cloneId2));
+ beginTX();
+ List failures = consumer.destroyClones(Collections.singletonList(cloneId2));
assertEquals(Collections.EMPTY_LIST, failures);
- TransactionAssert.commitTransaction();
+ commitTX();
// Destroy the clone of the clone 2
- TransactionAssert.beginTransaction();
- failures = portletInvoker.destroyClones(Collections.singletonList(cloneCloneId2));
+ beginTX();
+ failures = consumer.destroyClones(Collections.singletonList(cloneCloneId2));
assertEquals(Collections.EMPTY_LIST, failures);
- TransactionAssert.commitTransaction();
+ commitTX();
// Destroy the clone 1
- TransactionAssert.beginTransaction();
- failures = portletInvoker.destroyClones(Collections.singletonList(cloneId1));
+ beginTX();
+ failures = consumer.destroyClones(Collections.singletonList(cloneId1));
assertEquals(Collections.EMPTY_LIST, failures);
- TransactionAssert.commitTransaction();
+ commitTX();
// Destroy the clone of the clone 1
- TransactionAssert.beginTransaction();
- failures = portletInvoker.destroyClones(Collections.singletonList(cloneCloneId1));
+ beginTX();
+ failures = consumer.destroyClones(Collections.singletonList(cloneCloneId1));
assertEquals(Collections.EMPTY_LIST, failures);
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void testInvokeCloneBeforeWritePOPWithinTx() throws Exception
{
- TransactionAssert.beginTransaction();
+ beginTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE, PortletContext.createPortletContext("CloningPortlet"));
action.setUserContext(new UserContextImpl("julien"));
InstanceContextImpl instanceContext = new InstanceContextImpl("whatever", AccessMode.CLONE_BEFORE_WRITE);
action.setInstanceContext(instanceContext);
- portletInvoker.invoke(action);
- TransactionAssert.commitTransaction();
+ consumer.invoke(action);
+ commitTX();
// Check state
- TransactionAssert.beginTransaction();
+ beginTX();
PortletContext cloneId = instanceContext.getClonedContext();
assertNotNull(cloneId);
PortletStateContext state = persistenceManager.loadState(cloneId.getId().substring(1));
@@ -543,43 +579,43 @@
expectedValue.setProperty("abc", new StringValue("def"));
expectedValue.setProperty("_abc", new StringValue("_def"));
ValueMapAssert.assertEquals(expectedValue, state.getState().getProperties());
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void testInvokeReadWritePOPWithinTx() throws Exception
{
- TransactionAssert.beginTransaction();
+ beginTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE,
PortletContext.createPortletContext("CloneFailedCloningPortlet"));
action.setUserContext(new UserContextImpl("julien"));
InstanceContextImpl instanceContext = new InstanceContextImpl("whatever", AccessMode.READ_WRITE);
action.setInstanceContext(instanceContext);
- portletInvoker.invoke(action);
- TransactionAssert.commitTransaction();
+ consumer.invoke(action);
+ commitTX();
// Check state
- TransactionAssert.beginTransaction();
+ beginTX();
assertNull(instanceContext.getClonedContext());
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void testInvokeReadOnlyPOPWithinTx() throws Exception
{
- TransactionAssert.beginTransaction();
+ beginTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE,
PortletContext.createPortletContext("CloneFailedCloningPortlet"));
action.setUserContext(new UserContextImpl("julien"));
InstanceContextImpl instanceContext = new InstanceContextImpl("whatever", AccessMode.READ_ONLY);
action.setInstanceContext(instanceContext);
- portletInvoker.invoke(action);
- TransactionAssert.commitTransaction();
+ consumer.invoke(action);
+ commitTX();
// Check state
- TransactionAssert.beginTransaction();
+ beginTX();
assertNull(instanceContext.getClonedContext());
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void testInvokeCloneBeforeWriteCCPWithinTx() throws Exception
@@ -587,25 +623,25 @@
PortletContext cloningPortletId = clonePortlet(PortletContext.createPortletContext("CloningPortlet"));
// Modify the state of the CCP
- TransactionAssert.beginTransaction();
+ beginTX();
PortletState cloningPortletState = persistenceManager.loadState(cloningPortletId.getId().substring(1)).getState();
SimplePropertyMap newCloningPortletStateValue = new SimplePropertyMap(cloningPortletState.getProperties());
newCloningPortletStateValue.setProperty("abc", new StringValue("deff"));
persistenceManager.updateState(cloningPortletId.getId().substring(1), newCloningPortletStateValue);
- TransactionAssert.commitTransaction();
+ commitTX();
//
- TransactionAssert.beginTransaction();
+ beginTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE, cloningPortletId);
action.setUserContext(new UserContextImpl("julien"));
InstanceContextImpl instanceContext = new InstanceContextImpl("whatever", AccessMode.CLONE_BEFORE_WRITE);
action.setInstanceContext(instanceContext);
- portletInvoker.invoke(action);
- TransactionAssert.commitTransaction();
+ consumer.invoke(action);
+ commitTX();
// Check state
- TransactionAssert.beginTransaction();
+ beginTX();
PortletContext cloneId = instanceContext.getClonedContext();
assertNotNull(cloneId);
PortletStateContext state = persistenceManager.loadState(cloneId.getId().substring(1));
@@ -616,7 +652,7 @@
expectedValue.setProperty("abc", new StringValue("deff"));
expectedValue.setProperty("_abc", new StringValue("_def"));
ValueMapAssert.assertEquals(expectedValue, state.getState().getProperties());
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void testInvokeReadWriteCCPWithinTx() throws Exception
@@ -624,17 +660,17 @@
PortletContext cloningPortletId = clonePortlet(PortletContext.createPortletContext("CloningPortlet"));
//
- TransactionAssert.beginTransaction();
+ beginTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE, cloningPortletId);
action.setUserContext(new UserContextImpl("julien"));
InstanceContextImpl instanceContext = new InstanceContextImpl("whatever", AccessMode.READ_WRITE);
action.setInstanceContext(instanceContext);
- portletInvoker.invoke(action);
- TransactionAssert.commitTransaction();
+ consumer.invoke(action);
+ commitTX();
// Check state
- TransactionAssert.beginTransaction();
+ beginTX();
assertNull(instanceContext.getClonedContext());
PortletStateContext state = persistenceManager.loadState(cloningPortletId.getId().substring(1));
assertNotNull(state);
@@ -644,7 +680,7 @@
expectedValue.setProperty("abc", new StringValue("def"));
expectedValue.setProperty("_abc", new StringValue("_def"));
ValueMapAssert.assertEquals(expectedValue, state.getState().getProperties());
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void testInvokeReadOnlyCCPWithinTx() throws Exception
@@ -652,24 +688,24 @@
PortletContext cloneFailedCloningPortletId = clonePortlet(PortletContext.createPortletContext("CloneFailedCloningPortlet"));
//
- TransactionAssert.beginTransaction();
+ beginTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE, cloneFailedCloningPortletId);
action.setUserContext(new UserContextImpl("julien"));
InstanceContextImpl instanceContext = new InstanceContextImpl("whatever", AccessMode.READ_ONLY);
action.setInstanceContext(instanceContext);
- portletInvoker.invoke(action);
- TransactionAssert.commitTransaction();
+ consumer.invoke(action);
+ commitTX();
// Check state
- TransactionAssert.beginTransaction();
+ beginTX();
assertNull(instanceContext.getClonedContext());
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void testInvokeCloneBeforeWritePOPWithinTxThrowsException() throws Exception
{
- TransactionAssert.beginTransaction();
+ beginTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setAttribute(PortletInvocation.REQUEST_SCOPE, PortletInvocation.PORTLET_CONTEXT_ATTRIBUTE,
PortletContext.createPortletContext("CloningPortletThrowingRuntimeException"));
@@ -678,19 +714,19 @@
action.setInstanceContext(instanceContext);
try
{
- portletInvoker.invoke(action);
+ consumer.invoke(action);
fail("Was expecting RuntimeException");
}
catch (RuntimeException expected)
{
assertEquals("custom_message", expected.getMessage());
- TransactionAssert.rollbackTransaction(true);
+ rollbackTX();
}
// Check state
- TransactionAssert.beginTransaction();
+ beginTX();
assertNull(instanceContext.getClonedContext());
- TransactionAssert.commitTransaction();
+ commitTX();
}
public void _testGetProperties()
@@ -705,21 +741,21 @@
PortletContext cloneContext = clonePortlet(PortletContext.createPortletContext("SimplePortlet"));
//
- TransactionAssert.beginTransaction();
- Portlet portlet = portletInvoker.getPortlet(cloneContext);
+ beginTX();
+ Portlet portlet = consumer.getPortlet(cloneContext);
assertEquals(cloneContext, portlet.getContext());
assertEquals("SimplePortlet", portlet.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME).getDefaultString());
- TransactionAssert.commitTransaction();
+ commitTX();
// Clone the modified CCP
PortletContext cloneCloneContext = clonePortlet(cloneContext);
//
- TransactionAssert.beginTransaction();
- portlet = portletInvoker.getPortlet(cloneCloneContext);
+ beginTX();
+ portlet = consumer.getPortlet(cloneCloneContext);
assertEquals(cloneCloneContext, portlet.getContext());
assertEquals("SimplePortlet", portlet.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME).getDefaultString());
- TransactionAssert.commitTransaction();
+ commitTX();
}
}
Modified: trunk/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml
===================================================================
--- trunk/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml 2007-02-12 15:43:00 UTC (rev 6215)
+++ trunk/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml 2007-02-12 16:34:52 UTC (rev 6216)
@@ -87,26 +87,7 @@
<property name="stateConverter"><inject bean="StateConverter"/></property>
</bean>
-<!--
- <bean name="LocalInterceptor" class="org.jboss.portal.portlet.aspects.portlet.LocalInterceptor">
- </bean>
-
- <bean name="InterceptorStack" class="org.jboss.portal.server.impl.invocation.JBossInterceptorStack">
- <constructor>
- <parameter><array class="[Lorg.jboss.portal.common.invocation.Interceptor;" elementClass="org.jboss.portal.common.invocation.Interceptor">
- <inject bean="LocalInterceptor"/>
- </array></parameter>
- </constructor>
- </bean>
-
- <bean name="InterceptorStackFactory" class="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory">
- <constructor>
- <parameter><inject bean="InterceptorStack"/></parameter>
- </constructor>
- </bean>
--->
-
- <bean name="PortletInvoker" class="org.jboss.portal.core.impl.portlet.state.LocalPortletInvoker">
+ <bean name="Consumer" class="org.jboss.portal.core.impl.portlet.state.LocalPortletInvoker">
<property name="portletInvoker"><inject bean="Producer"/></property>
</bean>
@@ -117,8 +98,8 @@
</constructor>
<property name="hibernateSupport"><inject bean="HibernateSupport"/></property>
<property name="persistenceManager"><inject bean="PersistenceManager"/></property>
+ <property name="consumer"><inject bean="Consumer"/></property>
<property name="producer"><inject bean="Producer"/></property>
<property name="portletContainer"><inject bean="PortletContainer"/></property>
- <property name="portletInvoker"><inject bean="PortletInvoker"/></property>
</bean>
</deployment>
19 years, 2 months
JBoss Portal SVN: r6215 - trunk/wsrp/src/resources/portal-wsrp-sar.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-02-12 10:43:00 -0500 (Mon, 12 Feb 2007)
New Revision: 6215
Modified:
trunk/wsrp/src/resources/portal-wsrp-sar/default-wsrp.xml
Log:
- Added comment to remind people not to use WSDL to create endpoints at deployment time.
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/default-wsrp.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/default-wsrp.xml 2007-02-12 15:33:55 UTC (rev 6214)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/default-wsrp.xml 2007-02-12 15:43:00 UTC (rev 6215)
@@ -31,6 +31,10 @@
<wsrp-producer>
<producer-id>self</producer-id>
<expiration-cache>120</expiration-cache>
+ <!--
+ we need to use the individual endpoint configuration because the configuration via wsdl forces an
+ immediate attempt to access the web service description which is not available yet at this point of deployment
+ -->
<endpoint-config>
<service-description-url>http://localhost:8080/portal-wsrp/ServiceDescriptionService</service-description-url>
<markup-url>http://localhost:8080/portal-wsrp/MarkupService</markup-url>
19 years, 2 months
JBoss Portal SVN: r6214 - in trunk/search: src and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-12 10:33:55 -0500 (Mon, 12 Feb 2007)
New Revision: 6214
Removed:
trunk/search/src/resources/
Modified:
trunk/search/build.xml
Log:
Unused files are useless
Modified: trunk/search/build.xml
===================================================================
--- trunk/search/build.xml 2007-02-12 15:10:03 UTC (rev 6213)
+++ trunk/search/build.xml 2007-02-12 15:33:55 UTC (rev 6214)
@@ -133,12 +133,12 @@
<exclude name="org/jboss/portal/search/test/**/*"/>
</fileset>
</jar>
- <copy todir="${build.resources}/portal-search-sar">
+ <!--copy todir="${build.resources}/portal-search-sar">
<fileset dir="${build.lib}" includes="portal-search-lib.jar"/>
</copy>
<jar jarfile="${build.lib}/portal-search.sar">
<fileset dir="${build.resources}/portal-search-sar" includes="**/*"/>
- </jar>
+ </jar-->
</target>
19 years, 2 months