JBoss Portal SVN: r8010 - modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-08-21 09:00:48 -0400 (Tue, 21 Aug 2007)
New Revision: 8010
Modified:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
Log:
fixed wrong registration logic
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java 2007-08-21 12:49:29 UTC (rev 8009)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java 2007-08-21 13:00:48 UTC (rev 8010)
@@ -59,6 +59,9 @@
super.bootstrap();
//
+ getKernel().getRegistry().registerListener(this, null, "ABC");
+
+ //
deployer = new BeanXMLDeployer(getKernel());
//
@@ -74,18 +77,8 @@
// System.setProperty("org.jboss.logging.Logger.pluginClass", "org.jboss.logging.log4j.Log4jLoggerPlugin");
//
- try
- {
- getKernel().getRegistry().registerListener(this, null, null);
-
- //
- run();
- log.info("Test Portal started");
- }
- catch (Throwable throwable)
- {
- log.error("Cannot register kernel registry listener", throwable);
- }
+ run();
+ log.info("Test Portal started");
}
public void contextDestroyed(ServletContextEvent event)
@@ -98,7 +91,7 @@
//
try
{
- getKernel().getRegistry().unregisterListener(this, null, null);
+ getKernel().getRegistry().unregisterListener(this, null, "ABC");
}
catch (Throwable throwable)
{
18 years, 8 months
JBoss Portal SVN: r8009 - modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-08-21 08:49:29 -0400 (Tue, 21 Aug 2007)
New Revision: 8009
Modified:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
Log:
- wire more portlet container beans
- inject kernel beans into the servlet context attributes
- added tomcat logging based on jul
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java 2007-08-21 12:43:14 UTC (rev 8008)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java 2007-08-21 12:49:29 UTC (rev 8009)
@@ -25,6 +25,9 @@
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.kernel.spi.event.KernelEventListener;
+import org.jboss.kernel.spi.event.KernelEvent;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.apache.log4j.Logger;
import javax.servlet.ServletContext;
@@ -36,7 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class PortalKernelBootstrap extends BasicBootstrap implements ServletContextListener
+public class PortalKernelBootstrap extends BasicBootstrap implements ServletContextListener, KernelEventListener
{
/** . */
@@ -71,7 +74,18 @@
// System.setProperty("org.jboss.logging.Logger.pluginClass", "org.jboss.logging.log4j.Log4jLoggerPlugin");
//
- run();
+ try
+ {
+ getKernel().getRegistry().registerListener(this, null, null);
+
+ //
+ run();
+ log.info("Test Portal started");
+ }
+ catch (Throwable throwable)
+ {
+ log.error("Cannot register kernel registry listener", throwable);
+ }
}
public void contextDestroyed(ServletContextEvent event)
@@ -82,7 +96,39 @@
}
//
+ try
+ {
+ getKernel().getRegistry().unregisterListener(this, null, null);
+ }
+ catch (Throwable throwable)
+ {
+ log.error("Cannot unregister kernel registry listener", throwable);
+ }
+
+ //
servletContext = null;
- log.info("Test Portal started");
+
+ //
+ log.info("Test Portal stopped");
}
+
+ public void onEvent(KernelEvent event, Object object)
+ {
+ Object context = event.getContext();
+ if (context instanceof String)
+ {
+ String key = (String)context;
+ String type = event.getType();
+ if ("KERNEL_REGISTRY_REGISTERED".equals(type))
+ {
+ KernelRegistryEntry entry = getKernel().getRegistry().getEntry(context);
+ Object target = entry.getTarget();
+ servletContext.setAttribute(key, target);
+ }
+ else if ("KERNEL_REGISTRY_UNREGISTERED".equals(type))
+ {
+ servletContext.removeAttribute(key);
+ }
+ }
+ }
}
18 years, 8 months
JBoss Portal SVN: r8008 - in modules/portlet/trunk/test/src: resources/portlet-test-war/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-08-21 08:43:14 -0400 (Tue, 21 Aug 2007)
New Revision: 8008
Added:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/InterceptorStackFactoryImpl.java
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/logging.properties
Modified:
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml
Log:
- wire more portlet container beans
- inject kernel beans into the servlet context attributes
- added tomcat logging based on jul
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/InterceptorStackFactoryImpl.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/InterceptorStackFactoryImpl.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/InterceptorStackFactoryImpl.java 2007-08-21 12:43:14 UTC (rev 8008)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * 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.portlet.test;
+
+import org.jboss.portal.common.invocation.InterceptorStack;
+import org.jboss.portal.common.invocation.Interceptor;
+import org.jboss.portal.common.invocation.InterceptorStackFactory;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorStackFactoryImpl implements InterceptorStackFactory
+{
+
+ /** . */
+ private volatile Interceptor[] interceptors;
+
+ /** . */
+ private final InterceptorStackImpl stack = new InterceptorStackImpl();
+
+ public Interceptor[] getInterceptors()
+ {
+ return interceptors;
+ }
+
+ public void setInterceptors(Interceptor[] interceptors)
+ {
+ this.interceptors = interceptors;
+ }
+
+ public InterceptorStack getInterceptorStack()
+ {
+ return stack;
+ }
+
+ private class InterceptorStackImpl implements InterceptorStack
+ {
+
+ public int getLength()
+ {
+ // Avoid dirty reads
+ Interceptor[] interceptors = InterceptorStackFactoryImpl.this.interceptors;
+
+ //
+ return interceptors != null ? interceptors.length : 0;
+ }
+
+ public Interceptor getInterceptor(int i) throws ArrayIndexOutOfBoundsException
+ {
+ // Avoid dirty reads
+ Interceptor[] interceptors = InterceptorStackFactoryImpl.this.interceptors;
+
+ //
+ if (interceptors == null)
+ {
+ throw new ArrayIndexOutOfBoundsException("No interceptors");
+ }
+
+ //
+ return interceptors[i];
+ }
+ }
+}
Added: modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/logging.properties
===================================================================
--- modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/logging.properties (rev 0)
+++ modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/logging.properties 2007-08-21 12:43:14 UTC (rev 8008)
@@ -0,0 +1,13 @@
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = servlet-examples.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Modified: modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2007-08-20 22:51:27 UTC (rev 8007)
+++ modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2007-08-21 12:43:14 UTC (rev 8008)
@@ -3,19 +3,92 @@
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
xmlns="urn:jboss:bean-deployer:2.0">
+
<bean name="PortletApplicationDeployer" class="org.jboss.portal.portlet.test.PortletApplicationDeployer">
</bean>
+ <!-- An application registry mainly for listeners -->
<bean name="PortletApplicationRegistry" class="org.jboss.portal.portlet.impl.container.PortletApplicationRegistryImpl">
-
</bean>
<bean name="PortletAPIFactory" class="org.jboss.portal.portlet.impl.jsr168.PortletAPIFactoryImpl">
-
</bean>
<bean name="PortletInfoFactory" class="org.jboss.portal.portlet.impl.jsr168.PortletInfoFactoryImpl">
+ </bean>
+ <!-- The servlet container context obtained from the ServletContainer registry -->
+ <bean name="ServletContainerContext" class="org.jboss.portal.web.spi.ServletContainerContext">
+ <constructor factoryClass="org.jboss.portal.web.ServletContainer" factoryMethod="getContext"/>
</bean>
+ <!-- Consumer stack -->
+ <bean name="ConsumerCacheInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor">
+ </bean>
+ <bean name="ConsumerStackFactory" class="org.jboss.portal.portlet.test.InterceptorStackFactoryImpl">
+ <property name="interceptors">
+ <array>
+ <inject bean="ConsumerCacheInterceptor"/>
+ </array>
+ </property>
+ </bean>
+
+ <!-- The consumer portlet invoker -->
+ <bean name="ConsumerPortletInvoker" class="org.jboss.portal.portlet.test.TestPortletInvoker">
+ <property name="producer"><inject bean="ProducerPortletInvoker"/></property>
+ <property name="stackFactory"><inject bean="ConsumerStackFactory"/></property>
+ </bean>
+
+ <!-- Container stack -->
+ <bean name="ValveInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ValveInterceptor">
+ </bean>
+ <bean name="SecureTransportInterceptor" class="org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor">
+ </bean>
+ <bean name="ContextDispatcherInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor">
+ <property name="servletContainerContext"><inject bean="ServletContainerContext"/></property>
+ </bean>
+ <bean name="WindowStatesInterceptor" class="org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor">
+ </bean>
+ <bean name="ModesInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ModesInterceptor">
+ </bean>
+ <bean name="ProducerCacheInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor">
+ </bean>
+ <bean name="ContainerStackFactory" class="org.jboss.portal.portlet.test.InterceptorStackFactoryImpl">
+ <property name="interceptors">
+ <array >
+ <inject bean="ValveInterceptor"/>
+ <inject bean="SecureTransportInterceptor"/>
+ <inject bean="ContextDispatcherInterceptor"/>
+ <inject bean="WindowStatesInterceptor"/>
+ <inject bean="ModesInterceptor"/>
+ <inject bean="ProducerCacheInterceptor"/>
+ </array>
+ </property>
+ </bean>
+
+ <!-- The portlet container invoker -->
+ <bean name="PortletContainerInvoker" class="org.jboss.portal.portlet.container.PortletContainerInvoker">
+ <property name="stackFactory"><inject bean="ContainerStackFactory"/></property>
+ <property name="registry"><inject bean="PortletApplicationRegistry"/></property>
+ </bean>
+
+ <!-- The producer persistence manager -->
+ <bean name="ProducerPersistenceManager" class="org.jboss.portal.portlet.impl.state.producer.PortletStatePersistenceManagerService"></bean>
+
+ <!-- The producer state management policy -->
+ <bean name="ProducerStateManagementPolicy" class="org.jboss.portal.portlet.impl.state.StateManagementPolicyService">
+ <property name="persistLocally"><value>true</value></property>
+ </bean>
+
+ <!-- The producer state converter -->
+ <bean name="ProducerStateConverter" class="org.jboss.portal.portlet.impl.state.StateConverterV0"></bean>
+
+ <!-- The producer portlet invoker -->
+ <bean name="ProducerPortletInvoker" class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">
+ <property name="portletInvoker"><inject bean="PortletContainerInvoker"/></property>
+ <property name="persistenceManager"><inject bean="ProducerPersistenceManager"/></property>
+ <property name="stateManagementPolicy"><inject bean="ProducerStateManagementPolicy"/></property>
+ <property name="stateConverter"><inject bean="ProducerStateConverter"/></property>
+ </bean>
+
</deployment>
18 years, 8 months
JBoss Portal SVN: r8007 - in modules/portlet/trunk: build and 16 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-08-20 18:51:27 -0400 (Mon, 20 Aug 2007)
New Revision: 8007
Added:
modules/portlet/trunk/test/
modules/portlet/trunk/test/build.bat
modules/portlet/trunk/test/build.sh
modules/portlet/trunk/test/build.xml
modules/portlet/trunk/test/src/
modules/portlet/trunk/test/src/main/
modules/portlet/trunk/test/src/main/org/
modules/portlet/trunk/test/src/main/org/jboss/
modules/portlet/trunk/test/src/main/org/jboss/portal/
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
modules/portlet/trunk/test/src/resources/
modules/portlet/trunk/test/src/resources/bean-deployer_1_0.xsd
modules/portlet/trunk/test/src/resources/bean-deployer_2_0.xsd
modules/portlet/trunk/test/src/resources/portlet-test-war/
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/web.xml
Modified:
modules/portlet/trunk/build/build-thirdparty.xml
modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/federation.iml
modules/portlet/trunk/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml
modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml
modules/portlet/trunk/jboss-portal-portlet.ipr
modules/portlet/trunk/jboss-portal-portlet.iws
modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
Log:
started the portal test implementation for running the portlet testsuite
Modified: modules/portlet/trunk/build/build-thirdparty.xml
===================================================================
--- modules/portlet/trunk/build/build-thirdparty.xml 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/build/build-thirdparty.xml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -50,12 +50,25 @@
<componentref name="jboss-portal/modules/common" version="1.0.0-SNAPSHOT"/>
<componentref name="jboss-portal/modules/web" version="1.0.0-SNAPSHOT"/>
<componentref name="jboss-portal/modules/test" version="1.0.0-SNAPSHOT"/>
- <componentref name="jboss/jbossxb" version="1.0.0.CR4"/>
- <componentref name="apache-log4j" version="1.2.8"/>
+ <componentref name="sun-servlet" version="2.4"/>
+
+ <!-- Based on http://anonsvn.jboss.org/repos/jbossas/tags/EMBEDDED_JBOSS_BETA_2/build/b... -->
+ <componentref name="jboss/microcontainer" version="2.0.0.Beta3"/>
+ <componentref name="jboss/aop" version="2.0.0.alpha4"/>
+ <componentref name="jboss/jbossxb" version="2.0.0.CR2"/>
+ <componentref name="jboss/jboss-vfs" version="2.0.0.Beta4"/>
+ <componentref name="jboss/common-core" version="2.0.4.Alpha"/>
+ <componentref name="jboss/common-logging-log4j" version="2.0.2.GA"/>
+ <componentref name="jboss/common-logging-jdk" version="2.0.2.GA"/>
+ <componentref name="jboss/common-logging-spi" version="2.0.2.GA"/>
+ <componentref name="javassist" version="3.5.0.CR1"/>
+ <componentref name="apache-log4j" version="1.2.14"/>
+ <componentref name="apache-xerces" version="2.7.1"/>
+ <componentref name="sun-jaf" version="1.1"/>
<componentref name="junit" version="3.8.1"/>
- <componentref name="sun-servlet" version="2.4"/>
- <componentref name="oswego-concurrent" version="1.3.4"/>
- <componentref name="sun-jaf" version="1.0.2"/>
+ <componentref name="wutka-dtdparser" version="1.2.1"/>
+ <componentref name="trove" version="1.0.2"/>
+
</build>
<synchronizeinfo/>
Modified: modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/federation.iml
===================================================================
--- modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/federation.iml 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/federation.iml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -20,5 +20,9 @@
<orderEntry type="module" module-name="portlet" />
<orderEntryProperties />
</component>
+ <component name="VcsManagerConfiguration">
+ <option name="ACTIVE_VCS_NAME" value="svn" />
+ <option name="USE_PROJECT_VCS" value="false" />
+ </component>
</module>
Modified: modules/portlet/trunk/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml
===================================================================
--- modules/portlet/trunk/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -10,5 +10,9 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntryProperties />
</component>
+ <component name="VcsManagerConfiguration">
+ <option name="ACTIVE_VCS_NAME" value="svn" />
+ <option name="USE_PROJECT_VCS" value="false" />
+ </component>
</module>
Modified: modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml
===================================================================
--- modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -10,7 +10,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servlet/lib/jsp-api.jar!/" />
@@ -19,7 +19,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servlet/lib/servlet-api.jar!/" />
@@ -55,7 +55,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar!/" />
@@ -64,7 +64,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar!/" />
@@ -73,7 +73,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar!/" />
@@ -82,7 +82,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar!/" />
Modified: modules/portlet/trunk/jboss-portal-portlet.ipr
===================================================================
--- modules/portlet/trunk/jboss-portal-portlet.ipr 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/jboss-portal-portlet.ipr 2007-08-20 22:51:27 UTC (rev 8007)
@@ -255,6 +255,7 @@
<module fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/federation/federation.iml" filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/federation/federation.iml" />
<module fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml" filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml" />
<module fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/portlet/portlet.iml" filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/portlet/portlet.iml" />
+ <module fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/test/test.iml" filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/test/test.iml" />
<module fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/testsuite/testsuite.iml" filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/testsuite/testsuite.iml" />
<module fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/thirdparty/thirdparty.iml" filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/thirdparty/thirdparty.iml" />
<module fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/tools/tools.iml" filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/tools/tools.iml" />
Modified: modules/portlet/trunk/jboss-portal-portlet.iws
===================================================================
--- modules/portlet/trunk/jboss-portal-portlet.iws 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/jboss-portal-portlet.iws 2007-08-20 22:51:27 UTC (rev 8007)
@@ -16,7 +16,9 @@
<option name="USER" value="" />
</component>
<component name="ChangeListManager">
- <list default="true" name="Default" comment="" />
+ <list default="true" name="Default" comment="">
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java" afterPath="$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java" />
+ </list>
</component>
<component name="ChangeListSynchronizer" />
<component name="ChangesViewManager" flattened_view="true" />
@@ -86,6 +88,21 @@
<disable_hints />
</component>
<component name="DebuggerManager">
+ <line_breakpoints>
+ <breakpoint url="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java" line="130" class="org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl" package="org.jboss.portal.portlet.impl.jsr168">
+ <option name="ENABLED" value="true" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ </line_breakpoints>
<breakpoint_any>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
@@ -131,24 +148,84 @@
<component name="FavoritesProjectViewPane" />
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="portal-beans.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/portlet/src/resources/test/test-portal-war/WEB-INF/portal-beans.xml">
+ <file leaf-file-name="PortletApplicationDeployment.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="0" selection-start="1998" selection-end="1998" vertical-scroll-proportion="0.45869297">
+ <state line="88" column="0" selection-start="4226" selection-end="4226" vertical-scroll-proportion="0.014796548">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="PortalKernelBootstrap.java" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="67" column="0" selection-start="2950" selection-end="2950" vertical-scroll-proportion="0.6004932">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="PortletApplicationImpl.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="130" column="0" selection-start="4473" selection-end="4473" vertical-scroll-proportion="0.24660912">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="PortletInvokerRegistrationService.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/federation/src/main/org/jboss/portal/portlet/federation/impl/PortletInvokerRegistrationService.java">
+ <file leaf-file-name="PortalServlet.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="81" column="19" selection-start="3150" selection-end="3150" vertical-scroll-proportion="0.87299633">
+ <state line="31" column="13" selection-start="1991" selection-end="1991" vertical-scroll-proportion="0.13316892">
<folding />
</state>
</provider>
</entry>
</file>
+ <file leaf-file-name="PortletApplicationDeployer.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="52" column="13" selection-start="2913" selection-end="2913" vertical-scroll-proportion="-0.7788945">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="build.xml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/build.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="168" column="0" selection-start="8708" selection-end="8708" vertical-scroll-proportion="0.28853267">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="log4j.properties" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="9" column="38" selection-start="523" selection-end="523" vertical-scroll-proportion="0.13316892">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="PortletContainerImpl.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="159" column="0" selection-start="6224" selection-end="6224" vertical-scroll-proportion="0.4535176">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
</leaf>
</component>
<component name="FindManager">
@@ -237,6 +314,10 @@
<option name="myItemId" value="jboss-portal-portlet.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="tools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -244,6 +325,168 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="tools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/tools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="tools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/tools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/tools/etc" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="tools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/tools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/tools/etc" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/tools/etc/buildfragments" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src/resources/portlet-test-war" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="portlet" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
@@ -309,14 +552,6 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources/test/test-portal-war" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources/test/test-portal-war/WEB-INF" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -336,11 +571,11 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -370,13 +605,9 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test/portlet" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -404,9 +635,13 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/deployment" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -437,6 +672,10 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/container" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
</subPane>
</component>
@@ -462,15 +701,46 @@
<property name="GoToClass.includeLibraries" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="MemberChooser.sorted" value="false" />
+ <property name="RunManagerConfig.compileBeforeRunning" value="false" />
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
+ <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
</component>
<component name="ReadonlyStatusHandler">
<option name="SHOW_DIALOG" value="true" />
</component>
<component name="RecentsManager" />
<component name="RestoreUpdateTree" />
- <component name="RunManager">
+ <component name="RunManager" selected="Remote.Unnamed">
+ <configuration default="true" type="Remote" factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
+ </configuration>
+ <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <module name="" />
+ </configuration>
+ <configuration default="true" type="Applet" factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ </configuration>
<configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -490,35 +760,22 @@
<option name="Make" value="true" />
</method>
</configuration>
- <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" />
- <option name="VM_PARAMETERS" />
- <option name="PROGRAM_PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <module name="" />
- </configuration>
- <configuration default="true" type="Remote" factoryName="Remote">
+ <configuration default="false" name="Unnamed" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
- <option name="PORT" value="5005" />
+ <option name="PORT" value="8000" />
+ <RunnerSettings RunnerId="Debug">
+ <option name="DEBUG_PORT" value="8000" />
+ <option name="TRANSPORT" value="0" />
+ <option name="LOCAL" value="false" />
+ </RunnerSettings>
+ <ConfigurationWrapper RunnerId="Debug" />
+ <method>
+ <option name="Make" value="true" />
+ </method>
</configuration>
- <configuration default="true" type="Applet" factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- </configuration>
<configuration name="<template>" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
@@ -619,7 +876,7 @@
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
<window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="4" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.23577236" order="4" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
<window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
@@ -652,7 +909,7 @@
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
<option name="ERROR_OCCURED" value="false" />
- <option name="ACTIVE_VCS_NAME" />
+ <option name="ACTIVE_VCS_NAME" value="" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
@@ -701,102 +958,125 @@
<component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
- <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.11111111" version="1">
+ <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.11111111,0.5" version="1">
<option name="myPlainMode" value="false" />
- <option name="myLastEditedConfigurable" value="federation" />
+ <option name="myLastEditedConfigurable" value="test" />
</component>
<component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java">
+ <entry file="jar://$PROJECT_DIR$/thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar!/org/jboss/kernel/spi/registry/KernelRegistryEntry.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="0" selection-start="1808" selection-end="1808" vertical-scroll-proportion="0.04522613">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="5" column="106" selection-start="260" selection-end="260" vertical-scroll-proportion="0.05918619">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/invocation/response/ErrorResponse.java">
+ <entry file="jar://$PROJECT_DIR$/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar!/org/jboss/dependency/spi/ControllerContext.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="0" selection-start="1816" selection-end="1816" vertical-scroll-proportion="0.044389643">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="5" column="17" selection-start="166" selection-end="166" vertical-scroll-proportion="0.06030151">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/tools/build.xml">
+ <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/container/PortletApplicationContext.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="34" column="17" selection-start="2204" selection-end="2204" vertical-scroll-proportion="0.19235511">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/jsr168api/build.xml">
+ <entry file="jar://$PROJECT_DIR$/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar!/org/jboss/dependency/plugins/AbstractController.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="144" column="40" selection-start="7470" selection-end="7470" vertical-scroll-proportion="0.42540073">
+ <state line="5" column="13" selection-start="166" selection-end="166" vertical-scroll-proportion="0.06030151">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/federation/build.xml">
+ <entry file="file://$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF/web.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="100" column="35" selection-start="5549" selection-end="5549" vertical-scroll-proportion="0.6806412">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/portlet/build.xml">
+ <entry file="jar:///System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar!/com/sun/tools/javadoc/Start.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="104" column="35" selection-start="5752" selection-end="5752" vertical-scroll-proportion="0.54747224">
+ <state line="5" column="6" selection-start="152" selection-end="152" vertical-scroll-proportion="0.10786517">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/tools/etc/buildfragments/modules.ent">
+ <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="62" selection-start="1388" selection-end="1388" vertical-scroll-proportion="0.35511714">
+ <state line="159" column="0" selection-start="6224" selection-end="6224" vertical-scroll-proportion="0.4535176">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/deployment/JBossApplicationMetaDataFactory.java">
+ <entry file="file://$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="2379" selection-end="2379" vertical-scroll-proportion="0.1356784">
+ <state line="9" column="38" selection-start="523" selection-end="523" vertical-scroll-proportion="0.13316892">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test/portlet/session/ReplicatedValue.java">
+ <entry file="file://$PROJECT_DIR$/test/build.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="32" column="13" selection-start="2041" selection-end="2041" vertical-scroll-proportion="0.1356784">
+ <state line="168" column="0" selection-start="8708" selection-end="8708" vertical-scroll-proportion="0.28853267">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test/portlet/session/SessionSynchronizationTestCase.java">
+ <entry file="file://$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="13" selection-start="1955" selection-end="1955" vertical-scroll-proportion="0.13316892">
+ <state line="21" column="0" selection-start="768" selection-end="768" vertical-scroll-proportion="0.3107275">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/portlet/src/resources/test/test-portal-war/WEB-INF/portal-beans.xml">
+ <entry file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="0" selection-start="1998" selection-end="1998" vertical-scroll-proportion="0.45869297">
+ <state line="130" column="0" selection-start="4473" selection-end="4473" vertical-scroll-proportion="0.24660912">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/federation/src/main/org/jboss/portal/portlet/federation/impl/PortletInvokerRegistrationService.java">
+ <entry file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="81" column="19" selection-start="3150" selection-end="3150" vertical-scroll-proportion="0.87299633">
+ <state line="88" column="0" selection-start="4226" selection-end="4226" vertical-scroll-proportion="0.014796548">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="52" column="13" selection-start="2913" selection-end="2913" vertical-scroll-proportion="-0.7788945">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="31" column="13" selection-start="1991" selection-end="1991" vertical-scroll-proportion="0.13316892">
<folding />
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="67" column="0" selection-start="2950" selection-end="2950" vertical-scroll-proportion="0.6004932">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
</component>
</project>
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-08-20 22:51:27 UTC (rev 8007)
@@ -322,9 +322,9 @@
return application;
}
- public void setApplication(PortletApplicationImpl application)
+ public void setApplication(PortletApplication application)
{
- this.application = application;
+ this.application = (PortletApplicationImpl)application;
}
public Valve getValve()
@@ -344,7 +344,7 @@
public String toString()
{
- return "PortletContainer[name=" + getId() + ",+application=" + application.getId() + "]";
+ return "PortletContainer[name=" + getId() + "]";
}
/** Initialize the portlet. */
Added: modules/portlet/trunk/test/build.bat
===================================================================
--- modules/portlet/trunk/test/build.bat (rev 0)
+++ modules/portlet/trunk/test/build.bat 2007-08-20 22:51:27 UTC (rev 8007)
@@ -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 21 2005-01-14 23:14:21Z 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
Property changes on: modules/portlet/trunk/test/build.bat
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/portlet/trunk/test/build.sh
===================================================================
--- modules/portlet/trunk/test/build.sh (rev 0)
+++ modules/portlet/trunk/test/build.sh 2007-08-20 22:51:27 UTC (rev 8007)
@@ -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 21 2005-01-14 23:14:21Z 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 "$@"
Property changes on: modules/portlet/trunk/test/build.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/portlet/trunk/test/build.xml
===================================================================
--- modules/portlet/trunk/test/build.xml (rev 0)
+++ modules/portlet/trunk/test/build.xml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,226 @@
+<?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">
+ ]>
+
+<!-- $Id: build.xml 7969 2007-08-17 09:29:00Z julien(a)jboss.com $ -->
+
+<!--+======================================================================+-->
+<!--| 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.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/web.classpath"/>
+ <path refid="jboss.portal/modules/test.classpath"/>
+
+ <path refid="jboss.microcontainer.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
+ <path refid="jboss.jbossxb.classpath"/>
+ <path refid="apache.log4j.classpath"/>
+ <path refid="sun.servlet.classpath"/>
+ </path>
+
+ <!-- Configure modules -->
+ <call target="configure-modules"/>
+ <path id="dependentmodule.classpath">
+ <path refid="jboss.portal-portlet-jsr168api.classpath"/>
+ <path refid="jboss.portal-portlet.classpath"/>
+ </path>
+
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
+
+ <!-- Configure defaults & build tools -->
+ <call target="configure-defaults"/>
+ <!--<call target="configure-tools"/>-->
+
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
+ <property name="javadoc.private" value="true"/>
+ <property name="javadoc.protected" value="false"/>
+
+ </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="output"
+ description="Generate all target output."
+ depends="compile">
+ <mkdir dir="${build.lib}"/>
+
+ <!-- Portlet lib jar -->
+ <jar jarfile="${build.lib}/portlet-test-lib.jar">
+ <fileset dir="${build.classes}"/>
+ </jar>
+
+ <!-- Portlet test lib jar -->
+ <copy todir="${build.resources}/portlet-test-war/WEB-INF/lib">
+ <fileset dir="${build.lib}" includes="portlet-test-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/common.lib}" includes="*.jar"/>
+ <fileset dir="${jboss.portal-portlet.lib}" includes="*.jar"/>
+
+ <fileset dir="${jboss.microcontainer.lib}" includes="*.jar"/>
+ <fileset dir="${jboss/common.core.lib}" includes="*.jar"/>
+ <fileset dir="${jboss/common.logging.log4j.lib}" includes="*.jar"/>
+ <fileset dir="${jboss/common.logging.spi.lib}" includes="*.jar"/>
+ <fileset dir="${jboss.aop.lib}" includes="*.jar"/>
+ <fileset dir="${jboss.jbossxb.lib}" includes="*.jar"/>
+ <fileset dir="${jboss/jboss.vfs.lib}" includes="*.jar"/>
+ <fileset dir="${javassist.javassist.lib}" includes="*.jar"/>
+ <fileset dir="${apache.log4j.lib}" includes="*.jar"/>
+ <fileset dir="${apache.xerces.lib}" includes="*.jar"/>
+ <fileset dir="${wutka.dtdparser.lib}" includes="*.jar"/>
+ <fileset dir="${oswego.concurrent.lib}" includes="*.jar"/>
+ <fileset dir="${trove.trove.lib}" includes="*.jar"/>
+ </copy>
+ <jar jarfile="${build.lib}/portlet-test.war">
+ <fileset dir="${build.resources}/portlet-test-war"/>
+ </jar>
+ </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 -->
+ <!-- ================================================================== -->
+
+ <target name="tests" depends="init, _buildmagic:configure:deployment">
+ <!--<antcall target="test-framework"/>-->
+ </target>
+
+</project>
Property changes on: modules/portlet/trunk/test/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test;
+
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortalKernelBootstrap extends BasicBootstrap implements ServletContextListener
+{
+
+ /** . */
+ private final static Logger log = Logger.getLogger(PortalKernelBootstrap.class);
+
+ /** . */
+ private ServletContext servletContext;
+
+ /** . */
+ protected BeanXMLDeployer deployer;
+
+ /** . */
+ protected KernelDeployment deployment;
+
+ protected void bootstrap() throws Throwable
+ {
+ super.bootstrap();
+
+ //
+ deployer = new BeanXMLDeployer(getKernel());
+
+ //
+ URL url = servletContext.getResource("/WEB-INF/jboss-beans.xml");
+ deployment = deployer.deploy(url);
+ }
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ servletContext = event.getServletContext();
+
+ // For now we do it here
+// System.setProperty("org.jboss.logging.Logger.pluginClass", "org.jboss.logging.log4j.Log4jLoggerPlugin");
+
+ //
+ run();
+ }
+
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ if (deployment != null)
+ {
+ deployer.undeploy(deployment);
+ }
+
+ //
+ servletContext = null;
+ log.info("Test Portal started");
+ }
+}
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortalServlet extends HttpServlet
+{
+
+ public void init() throws ServletException
+ {
+ }
+}
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,200 @@
+/******************************************************************************
+ * 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.portlet.test;
+
+import org.jboss.portal.web.WebAppListener;
+import org.jboss.portal.web.WebAppEvent;
+import org.jboss.portal.web.WebAppLifeCycleEvent;
+import org.jboss.portal.web.WebApp;
+import org.jboss.portal.web.ServletContainer;
+import org.jboss.portal.web.spi.ServletContainerContext;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletApplicationMetaData;
+import org.jboss.portal.portlet.deployment.PortletApplicationMetaDataFactory;
+import org.jboss.portal.portlet.deployment.ValueTrimmingFilter;
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.kernel.spi.dependency.KernelControllerContextAware;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.kernel.Kernel;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.JBossXBException;
+import org.apache.log4j.Logger;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.net.URL;
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletApplicationDeployer implements WebAppListener, KernelControllerContextAware
+{
+
+ /** . */
+ private Logger log = Logger.getLogger(PortletApplicationDeployer.class);
+
+ /** . */
+ private ServletContainerContext containerContext;
+
+ /** . */
+ private KernelControllerContext controllerContext;
+
+ /** . */
+ private Map deploymentMap = new HashMap();
+
+ /** . */
+ private ClassLoader classLoader;
+
+ public void onEvent(WebAppEvent event)
+ {
+ if (event instanceof WebAppLifeCycleEvent)
+ {
+ WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent)event;
+ switch(lifeCycleEvent.getType())
+ {
+ case WebAppLifeCycleEvent.ADDED:
+ add(event.getWebApp());
+ break;
+ case WebAppLifeCycleEvent.REMOVED:
+ remove(event.getWebApp());
+ break;
+ }
+ }
+ }
+
+ private void add(WebApp webApp)
+ {
+ PortletApplicationMetaData metaData = buildPortletApplicationMetaData(webApp);
+ if (metaData != null)
+ {
+ ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ Kernel kernel = controllerContext.getKernel();
+ PortletApplicationDeployment deployment = new PortletApplicationDeployment(kernel, webApp, metaData);
+ deploymentMap.put(webApp.getId(), deployment);
+ deployment.start();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(oldCL);
+ }
+ }
+ }
+
+ private void remove(WebApp webApp)
+ {
+ PortletApplicationDeployment deployment = (PortletApplicationDeployment)deploymentMap.remove(webApp.getId());
+ if (deployment != null)
+ {
+ ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ deployment.stop();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(oldCL);
+ }
+ }
+ }
+
+ public void setKernelControllerContext(KernelControllerContext controllerContext) throws Exception
+ {
+ log.debug("Set controller context " + controllerContext);
+
+ //
+ this.controllerContext = controllerContext;
+ }
+
+ public void unsetKernelControllerContext(KernelControllerContext controllerContext) throws Exception
+ {
+ log.debug("Unset controller context " + controllerContext);
+
+ //
+ this.controllerContext = null;
+ }
+
+ public void start()
+ {
+ containerContext = ServletContainer.getContext();
+ classLoader = Thread.currentThread().getContextClassLoader();
+
+ //
+ if (containerContext != null)
+ {
+ containerContext.addWebAppListener(this);
+ }
+ }
+
+ public void stop()
+ {
+ if (containerContext != null)
+ {
+ containerContext.removeWebAppListener(this);
+ }
+
+ //
+ containerContext = null;
+ classLoader = null;
+ }
+
+ private PortletApplicationMetaData buildPortletApplicationMetaData(WebApp webApp)
+ {
+ try
+ {
+ URL url = webApp.getServletContext().getResource("/WEB-INF/portlet.xml");
+ if (url != null)
+ {
+ InputStream in = null;
+ try
+ {
+ in = IOTools.safeBufferedWrapper(url.openStream());
+ PortletApplicationMetaDataFactory factory = new PortletApplicationMetaDataFactory();
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ PortletApplicationMetaData portletAppMD = (PortletApplicationMetaData)unmarshaller.unmarshal(in, new ValueTrimmingFilter(factory), null);
+ portletAppMD.setId(webApp.getId());
+ return portletAppMD;
+ }
+ finally
+ {
+ IOTools.safeClose(in);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ log.error("Cannot read portlet.xml", e);
+ }
+ catch (JBossXBException e)
+ {
+ log.error("Cannot parse portlet.xml", e);
+ }
+ return null;
+ }
+}
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,224 @@
+/******************************************************************************
+ * 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.portlet.test;
+
+import org.jboss.portal.portlet.container.PortletApplicationContext;
+import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
+import org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletApplicationMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData;
+import org.jboss.portal.portlet.impl.jsr168.spi.PortletAPIFactory;
+import org.jboss.portal.portlet.impl.jsr168.spi.PortletInfoFactory;
+import org.jboss.portal.portlet.metadata.JBossApplicationMetaData;
+import org.jboss.portal.portlet.metadata.JBossPortletMetaData;
+import org.jboss.portal.web.WebApp;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
+import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.dependency.spi.ControllerState;
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletContext;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletApplicationDeployment implements PortletApplicationContext
+{
+
+ /** . */
+ private final Logger log;
+
+ /** . */
+ private final Kernel kernel;
+
+ /** . */
+ private final WebApp webApp;
+
+ /** . */
+ private final PortletApplicationMetaData metaData;
+
+ /** . */
+ private KernelControllerContext portletApplicationControllerContext;
+
+ /** . */
+ private List portletContainerControllerContexts = new ArrayList();
+
+ public PortletApplicationDeployment(Kernel kernel, WebApp webApp, PortletApplicationMetaData metaData)
+ {
+ this.kernel = kernel;
+ this.webApp = webApp;
+ this.metaData = metaData;
+ this.log = Logger.getLogger(PortletApplicationDeployment.class + "." + webApp.getId().replace('.', '_'));
+ }
+
+ void start()
+ {
+
+ String id = "PortletApplication[" + webApp.getId() + "]";
+ log.debug("Starting installation");
+
+ //
+ KernelController controller = kernel.getController();
+
+ //
+ for (Iterator i = metaData.getPortlets().iterator(); i.hasNext();)
+ {
+ PortletMetaData portletMetaData = (PortletMetaData)i.next();
+ String portletContainerId = "PortletContainer[" + webApp.getId() + "," + portletMetaData.getName() + "]";
+ AbstractBeanMetaData bmd = new AbstractBeanMetaData(portletContainerId, PortletContainerImpl.class.getName());
+ AbstractConstructorMetaData ctormd = new AbstractConstructorMetaData();
+ ctormd.setParameters(new CollectionBuilder().
+ add(new AbstractParameterMetaData(PortletMetaData.class.getName(), portletMetaData)).
+ add(new AbstractParameterMetaData(JBossPortletMetaData.class.getName(), (Object)null)).
+ toArrayList());
+ bmd.setConstructor(ctormd);
+ bmd.setStart(new AbstractLifecycleMetaData("start"));
+ bmd.setStop(new AbstractLifecycleMetaData("stop"));
+ bmd.setProperties(Collections.singleton(new AbstractPropertyMetaData("application", new AbstractDependencyValueMetaData(id))));
+ try
+ {
+ KernelControllerContext portletContainerControllerContext = kernel.getController().install(bmd);
+ portletContainerControllerContexts.add(portletContainerControllerContext);
+ }
+ catch (Throwable t)
+ {
+ log.debug("Cannot install portlet container " + portletMetaData.getName() + " produced an error", t);
+ }
+ }
+
+ //
+ AbstractBeanMetaData bmd = new AbstractBeanMetaData(id, PortletApplicationImpl.class.getName());
+ AbstractConstructorMetaData ctormd = new AbstractConstructorMetaData();
+ ctormd.setParameters(new CollectionBuilder().
+ add(new AbstractParameterMetaData(PortletApplicationMetaData.class.getName(), metaData)).
+ add(new AbstractParameterMetaData(JBossApplicationMetaData.class.getName(), (Object)null)).
+ add(new AbstractParameterMetaData(PortletApplicationContext.class.getName(), this)).
+ add(new AbstractParameterMetaData(PortletAPIFactory.class.getName(), new AbstractDependencyValueMetaData("PortletAPIFactory"))).
+ add(new AbstractParameterMetaData(PortletInfoFactory.class.getName(), new AbstractDependencyValueMetaData("PortletInfoFactory"))).
+ toArrayList());
+ bmd.setConstructor(ctormd);
+ bmd.setStart(new AbstractLifecycleMetaData("start"));
+ bmd.setStop(new AbstractLifecycleMetaData("stop"));
+
+ //
+ try
+ {
+ portletApplicationControllerContext = controller.install(bmd);
+ }
+ catch (Throwable throwable)
+ {
+ log.debug("Installation of portlet application produced an error", throwable);
+ }
+
+ logBeanFailure(portletApplicationControllerContext);
+ for (Iterator i = portletContainerControllerContexts.iterator(); i.hasNext();)
+ {
+ KernelControllerContext portletContainerControllerContext = (KernelControllerContext)i.next();
+ logBeanFailure(portletContainerControllerContext);
+ }
+ }
+
+ private void logBeanFailure(KernelControllerContext context)
+ {
+ Throwable t = context.getError();
+ if (t != null)
+ {
+ log.debug("Installation of bean " + context.getName() + " produced an error", t);
+ }
+ }
+
+ void stop()
+ {
+ log.debug("Stopping installation");
+ if (portletApplicationControllerContext != null)
+ {
+ KernelController controller = kernel.getController();
+ controller.uninstall(portletApplicationControllerContext.getName());
+ portletApplicationControllerContext = null;
+ for (Iterator i = portletContainerControllerContexts.iterator(); i.hasNext();)
+ {
+ KernelControllerContext portletContainerControllerContext = (KernelControllerContext)i.next();
+ controller.uninstall(portletContainerControllerContext.getName());
+ }
+ }
+ }
+
+ public ServletContext getServletContext()
+ {
+ return webApp.getServletContext();
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return webApp.getClassLoader();
+ }
+
+ public void startPortletApplication() throws Exception
+ {
+ throw new NotYetImplemented();
+// try
+// {
+// kernel.getController().change(portletApplicationControllerContext, ControllerState.INSTALLED);
+// }
+// catch (Throwable throwable)
+// {
+// }
+ }
+
+ public void stopPortletApplication()
+ {
+ throw new NotYetImplemented();
+// try
+// {
+// kernel.getController().change(portletApplicationControllerContext, ControllerState.CREATE);
+// }
+// catch (Throwable throwable)
+// {
+// throwable.printStackTrace();
+// }
+ }
+
+ public void startPortletContainer(String portletName) throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void stopPortletContainer(String portletName)
+ {
+ throw new NotYetImplemented();
+ }
+}
Added: modules/portlet/trunk/test/src/resources/bean-deployer_1_0.xsd
===================================================================
--- modules/portlet/trunk/test/src/resources/bean-deployer_1_0.xsd (rev 0)
+++ modules/portlet/trunk/test/src/resources/bean-deployer_1_0.xsd 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,803 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- A prototype xsd schema for the pojoserver xml deployer
+$Id: bean-deployer_1_0.xsd 60491 2007-02-12 15:20:09Z alesj $
+ -->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:bean-deployer"
+ xmlns="urn:jboss:bean-deployer"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The xml deployer schema. The deployment document instance
+ root element should reference the schema in the root
+ deployment element using something like:
+
+ <deployment
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
+ xmlns="urn:jboss:bean-deployer">
+ ...
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:element name="deployment" type="deploymentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The root of the xml deployer instance document
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="deploymentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The deployment contains a number of beans and bean factories.
+
+ e.g.
+ <deployment ...>
+ <bean .../>
+ <bean .../>
+ <beanfactory .../>
+ </deployment>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType" minOccurs="0"/>
+ <xsd:element name="bean" type="beanType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="beanfactory" type="beanfactoryType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The bean is an instance of a pojo.
+
+ e.g.
+ <bean name="MyName" class="com.acme.POJO">
+ <classloader .../>
+ <constructor .../>
+ <property .../>
+ <property .../>
+ <depends .../>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType" minOccurs="0"/>
+ <xsd:element name="constructor" type="constructorType" minOccurs="0"/>
+ <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="create" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="start" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="stop" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="destroy" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="depends" type="dependsType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="demand" type="demandType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="supply" type="supplyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="optional"/>
+ <xsd:attribute name="class" type="xsd:token" use="required"/>
+ <xsd:attribute name="mode" type="controllerModeType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="classloaderType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The classloader is to load the bean
+
+ e.g.
+ <bean ...>
+ <classloader><inject bean="Classloader"/></classloader>
+ </bean>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="classLoaderValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="beanfactoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The beanfactory is a org.jboss.beans.metadata.plugins.factory.GenericBeanFactory deployment.
+ This gives you a factory such you can invoke createBean() multiple times with the guarantee
+ that the injected objects are "installed".
+
+ e.g.
+ <bean name="User" class="com.acme.User">
+ <property name="factory"><inject bean="Factory"/></property>
+ </bean>
+
+ <beanfactory name="Factory" class="com.acme.SomeBean">
+ <property name="someProperty"><inject bean="SomeOtherBean"/></property>
+ </beanFactory>
+
+ package com.acme.User;
+ public class User {
+ // factory has been configured at this point
+ public void setFactory(GenericBeanFactory factory) {
+ SomeBean bean1 = factory.createBean();
+ System.out.println(bean1.getSomeProperty()); // "SomeOtherBean"
+ SomeBean bean2 = factory.createBean();
+ System.out.println(bean2.getSomeProperty()); // "SomeOtherBean"
+ }
+ }
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType" minOccurs="0"/>
+ <xsd:element name="constructor" type="constructorType" minOccurs="0"/>
+ <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="create" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="start" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="depends" type="dependsType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="demand" type="demandType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="supply" type="supplyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="optional"/>
+ <xsd:attribute name="class" type="xsd:token" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="constructorType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The constructor for this bean(factory) instance.
+
+ e.g. simple constructor - new POJO(new String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor>
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+
+ e.g. static factory - com.acme.Factory.newInstance(new String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor factoryClass="com.acme.Factory" factoryMethod="newInstance">
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+
+ e.g. instance factory - "SomeOtherBean".newInstance(new String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor factoryMethod="newInstance">
+ <factory bean="SomeOtherBean"/>
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="factory" type="dependencyType" minOccurs="0"/>
+ <xsd:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="factoryClass" type="classNameType" use="optional"/>
+ <xsd:attribute name="factoryMethod" type="xsd:token" use="optional"/>
+ <xsd:attribute name="classLoader" type="xsd:token" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="lifecycleType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The lifecycle lets you override the method parameters passed to the
+ create, start, stop, destroy lifecycle callbacks.
+
+ e.g.
+ <bean>
+ <create method="initialize">
+ <parameter>String value</parameter>
+ </create>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="method" type="xsd:token" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="dependencyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dependency represents an injection into the bean.
+ They can be used anywhere a string value can appear.
+
+ e.g. Bean instance - "InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject bean="BeanInjected"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Bean property - "InjectedIntoMe".setSomeProperty("BeanInjected".getOtherProperty());
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject bean="BeanInjected" property="otherProperty"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="bean" type="xsd:string" use="required"/>
+ <xsd:attribute name="property" type="xsd:string" use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType" use="optional"/>
+ <xsd:attribute name="whenRequired" type="controllerStateType" use="optional"/>
+ </xsd:complexType>
+
+ <!-- todo use extension with dependencyType -->
+ <xsd:complexType name="injectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dependency represents an injection into the bean.
+ They can be used anywhere a string value can appear.
+
+ e.g. Bean instance - "InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject bean="BeanInjected"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Bean property - "InjectedIntoMe".setSomeProperty("BeanInjected".getOtherProperty());
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject bean="BeanInjected" property="otherProperty"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Contextual injection - finding exactly one instance which matches property's class type
+ <bean name="InjectedIntoMe" ...>
+ <property name="transactionManager"><inject/></property>
+ </bean>
+
+ e.g. Contextual injection - finding exactly one instance which matches property's name
+ <bean name="InjectedIntoMe" ...>
+ <property name="transactionManager"><inject type="ByName"/></property>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="property" type="xsd:string" use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType" use="optional"/>
+ <xsd:attribute name="whenRequired" type="controllerStateType" use="optional"/>
+ <xsd:attribute name="type" type="injectionTypeType" use="optional" default="ByClass"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="parameterType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A parameter is used to define the constructor, factory
+ and lifecycle method usage.
+
+ e.g. Using number of parameters when this is unique enough
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <parameter>2nd Parameter</parameter>
+ </constructor>
+ </bean>
+
+ e.g. Explicitly stating the parameter type to resolve overloading
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <parameter class="java.lang.String">2nd Parameter</parameter>
+ </constructor>
+ </bean>
+
+ e.g. To override the injected type use <value/>
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <!-- Parameter is java.lang.Object, but we inject a String -->
+ <parameter class="java.lang.Object">
+ <value class="java.lang.String">2nd Parameter</value>
+ </parameter>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotatedValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="propertyType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A property defines values passed to the setters.
+
+ e.g. Using the type from the setter argument
+ <bean ...>
+ <property name="someProperty">Some value</property>
+ </bean>
+
+ e.g. Overridding the injected type
+ <bean ...>
+ <property name="someProperty" class="java.lang.String">Some value</property>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="namedValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotationType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The annotation type represents an annotation on the particular join point.
+ TODO: This is currently unimplemented.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="attribute" type="annotationAttributeType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotationAttributeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An attribute attached to a particular annotation.
+ TODO: This is currently unimplemented.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:simpleType name="classNameType">
+ <xsd:annotation>
+ <xsd:documentation> The elements that use this type designate the name
+ of a Java class or interface. The name is in the form of a "binary
+ name", as defined in the JLS and as used in Class.forName().
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:group name="valueGroup">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The value group represents the comment elements of the other configurations
+ <parameter/>, <property/> or collection components
+ e.g.
+
+ <property name="someProperty">
+ <list><value class="java.lang.String">Hello</value></list>
+ </property>
+
+ e.g. This also defines the null value
+ <property name="someProperty"><null/></property>
+ as opposed to the empty string
+ <property name="someProperty"></property>
+ or the string "null"
+ <property name="someProperty">null</property>
+
+ TODO: "any" is currently unimplemented.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="bean" type="beanType"/>
+ <xsd:element name="value" type="plainValueType"/>
+ <xsd:element name="collection" type="collectionType"/>
+ <xsd:element name="list" type="listType"/>
+ <xsd:element name="set" type="setType"/>
+ <xsd:element name="array" type="arrayType"/>
+ <xsd:element name="map" type="mapType"/>
+ <xsd:element name="inject" type="injectionType"/>
+ <xsd:element name="null">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:any namespace="##other" processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:complexType name="plainValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A simple value, used in collections and to specify a type for parameters.
+
+ e.g.
+ <parameter><value class="com.acme.MyClass">xxx</value></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="class" type="classNameType" use="optional"/>
+ <xsd:attribute name="replace" type="xsd:boolean" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="valueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that can take other values, i.e. properties and parameters.
+
+ e.g.
+ <parameter><value class="com.acme.MyClass">xxx</value></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="plainValueType">
+ <xsd:sequence>
+ <xsd:choice minOccurs="0">
+ <xsd:group ref="valueGroup"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="classLoaderValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that represents a classloader.
+
+ e.g.
+ <classloader><inject bean="SomeClassLoader"/></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="bean" type="beanType"/>
+ <xsd:element name="inject" type="dependencyType"/>
+ <xsd:element name="null">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:any namespace="##other" processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotatedValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that can take annotations.
+ TODO: This is currently unimplemented.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="valueType">
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="namedValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that has a name, currently only a property.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotatedValueType">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="baseCollectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection defines a java.util.Collection object.
+ It has two class definitions:
+ class: The implementation class of the collection
+ elementClass: The default implementation class of the elements
+ The default "class" is a java.util.ArrayList unless the point of injection
+ defines a concrete type, e.g. in the signature of the setter
+
+ example:
+ <property name="whatever" class="java.util.ArrayList" elementClass="java.net.URL">
+ <value>http://localhost</value> <!-- Creates a URL -->
+ <value class="java.lang.String">http://localhost</value> <!-- Creates a String -->
+ </property>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:group ref="valueGroup"/>
+ </xsd:choice>
+ <xsd:attribute name="class" type="classNameType" use="optional"/>
+ <xsd:attribute name="elementClass" type="classNameType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="collectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection, see baseCollectionType
+ the default collection is a java.util.ArrayList
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="listType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A list, see baseCollectionType
+ the default list is a java.util.ArrayList
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="setType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A set, see baseCollectionType
+ the default set is a java.util.HashSet
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="arrayType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An array, see baseCollectionType
+ the default array is a java.lang.Object[]
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="mapType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A map defines a java.util.Map object.
+ It has three class definitions:
+ class: The implementation class of the class
+ keyClass: The default implementation class of the keys
+ valueClass: The default implementation class of the values
+ The default "class" is a java.util.HashMap unless the point of injection
+ defines a concrete type, e.g. in the signature of the setter
+
+ e.g.:
+ <property name="whatever" class="java.util.HashMap" keyClass="java.lang.String" valueClas="java.net.URL">
+ <!-- map.put(new String("default"), new URL("http://localhost"));
+ <entry><key>default</key><value>http://localhost</value>
+ <!-- map.put(new String("default"), new String("http://localhost"));
+ <entry><key>default</key><value class="java.lang.String">http://localhost</value>
+ </property>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="entry" type="entryType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="classNameType" use="optional"/>
+ <xsd:attribute name="keyClass" type="classNameType" use="optional"/>
+ <xsd:attribute name="valueClass" type="classNameType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="entryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An entry in map. These are made of key/value pairs
+
+ e.g.:
+ <entry><key>default</key><value>http://localhost</value>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="key" type="valueType" minOccurs="0"/>
+ <xsd:element name="value" type="valueType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="dependsType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The depends element is used to define that one bean depends upon
+ another for the create/start/stop/destroy lifecycle
+
+ e.g.:
+ <bean name="IGoFirst" .../>
+ <bean name="IGoSecond" ...>
+ <depends>IGoFirst</depends>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="demandType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The demand is used to specify a dependency on a supply
+ and when the demand is should be deplied
+
+ e.g.:
+ ISupply must be installed before IDemand is constructed
+
+ <bean name="IDemand">
+ <demand state="Instantiated">theSupply</demand>
+ </bean>
+ <bean name="ISupply" ...>
+ <supply>theSupply</supply>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="state" type="controllerStateType" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="supplyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The supply is used to specify that the bean supplies a demanded dependency
+
+ e.g.:
+ <bean name="IDemand" ...>
+ <demand>theSupply</demand>
+ </bean>
+ <bean name="ISupply" ...>
+ <supply>theSupply</supply>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="controllerStateType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The controller state is used to say when dependencies must be satisfied.
+ Valid values include:
+ Described
+ Instantiated
+ Configured
+ Create
+ Start
+ Installed
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="controllerModeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The controller mode, used to control how automatic the bean progresses
+ through the controller lifecyle (the states).
+ Valid values include:
+ Automatic (default) - the controller takes the bean to "Installed"
+ Manual - the user must tell the controller the required state
+ On Demand - the controller takes the bean to "Installed" when another bean depends on it
+ Disabled - the controller or user cannot change the state
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="injectionTypeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ You can set the type of lookup requirement - class type (ByClass) or property name (ByName)
+ Valid values include:
+ ByClass (default)
+ ByName
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!--
+ WARN:
+ Do not use this in the bean deployer, it won't work!
+ FIXME:
+ The correct way to do this is to have two separate
+ schemas (one for deployments the other for beans)
+ then use schema imports.
+ -->
+ <xsd:element name="bean" type="beanType"/>
+
+ <!--
+ WARN:
+ Do not use this in the bean deployer, it won't work!
+ FIXME:
+ The correct way to do this is to have two separate
+ schemas (one for deployments the other for beans)
+ then use schema imports.
+ -->
+ <xsd:element name="beanfactory" type="beanfactoryType"/>
+
+</xsd:schema>
Added: modules/portlet/trunk/test/src/resources/bean-deployer_2_0.xsd
===================================================================
--- modules/portlet/trunk/test/src/resources/bean-deployer_2_0.xsd (rev 0)
+++ modules/portlet/trunk/test/src/resources/bean-deployer_2_0.xsd 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,898 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- A prototype xsd schema for the pojoserver xml deployer
+$Id: bean-deployer_2_0.xsd 60491 2007-02-12 15:20:09Z alesj $
+ -->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:bean-deployer:2.0"
+ xmlns="urn:jboss:bean-deployer:2.0"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The xml deployer schema. The deployment document instance
+ root element should reference the schema in the root
+ deployment element using something like:
+
+ <deployment xmlns="urn:jboss:bean-deployer:2.0">
+ ...
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:element name="deployment" type="deploymentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The root of the xml deployer instance document
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="deploymentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The deployment contains a number of beans and bean factories.
+
+ e.g.
+ <deployment ...>
+ <bean .../>
+ <bean .../>
+ <beanfactory .../>
+ </deployment>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType" minOccurs="0"/>
+ <xsd:element name="bean" type="beanType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="beanfactory" type="beanfactoryType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:any namespace="##other" processContents="strict" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ <xsd:attribute name="name" type="xsd:string" use="optional"/>
+ <xsd:attribute name="scoped" type="xsd:boolean" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The bean is an instance of a pojo.
+
+ e.g.
+ <bean name="MyName" class="com.acme.POJO">
+ <classloader .../>
+ <constructor .../>
+ <property .../>
+ <property .../>
+ <depends .../>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType" minOccurs="0"/>
+ <xsd:element name="constructor" type="constructorType" minOccurs="0"/>
+ <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="create" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="start" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="stop" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="destroy" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="depends" type="dependsType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="demand" type="demandType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="supply" type="supplyType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="install" type="installType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="uninstall" type="installType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="optional"/>
+ <xsd:attribute name="class" type="xsd:token" use="optional"/>
+ <xsd:attribute name="mode" type="controllerModeType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="classloaderType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The classloader is to load the bean
+
+ e.g.
+ <bean ...>
+ <classloader><inject bean="Classloader"/></classloader>
+ </bean>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="classLoaderValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="beanfactoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The beanfactory is a org.jboss.beans.metadata.plugins.factory.GenericBeanFactory deployment.
+ This gives you a factory such you can invoke createBean() multiple times with the guarantee
+ that the injected objects are "installed".
+
+ e.g.
+ <bean name="User" class="com.acme.User">
+ <property name="factory"><inject bean="Factory"/></property>
+ </bean>
+
+ <beanfactory name="Factory" class="com.acme.SomeBean">
+ <property name="someProperty"><inject bean="SomeOtherBean"/></property>
+ </beanFactory>
+
+ package com.acme.User;
+ public class User {
+ // factory has been configured at this point
+ public void setFactory(GenericBeanFactory factory) {
+ SomeBean bean1 = factory.createBean();
+ System.out.println(bean1.getSomeProperty()); // "SomeOtherBean"
+ SomeBean bean2 = factory.createBean();
+ System.out.println(bean2.getSomeProperty()); // "SomeOtherBean"
+ }
+ }
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="classloader" type="classloaderType" minOccurs="0"/>
+ <xsd:element name="constructor" type="constructorType" minOccurs="0"/>
+ <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="create" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="start" type="lifecycleType" minOccurs="0"/>
+ <xsd:element name="depends" type="dependsType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="demand" type="demandType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="supply" type="supplyType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="install" type="installType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="uninstall" type="installType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="optional"/>
+ <xsd:attribute name="class" type="xsd:token" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="constructorType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The constructor for this bean(factory) instance.
+
+ e.g. simple constructor - new POJO(new String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor>
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+
+ e.g. static factory - com.acme.Factory.newInstance(new String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor factoryClass="com.acme.Factory" factoryMethod="newInstance">
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+
+ e.g. instance factory - "SomeOtherBean".newInstance(new String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor factoryMethod="newInstance">
+ <factory bean="SomeOtherBean"/>
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:choice minOccurs="0">
+ <xsd:sequence>
+ <xsd:element name="factory" type="factoryType" minOccurs="0"/>
+ <xsd:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:element name="bean" type="beanType"/>
+ <xsd:element name="value" type="plainValueType"/>
+ <xsd:element name="collection" type="collectionType"/>
+ <xsd:element name="list" type="listType"/>
+ <xsd:element name="set" type="setType"/>
+ <xsd:element name="array" type="arrayType"/>
+ <xsd:element name="map" type="mapType"/>
+ <xsd:element name="inject" type="injectionType"/>
+ <xsd:any namespace="##other" processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="factoryClass" type="classNameType" use="optional"/>
+ <xsd:attribute name="factoryMethod" type="xsd:token" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="lifecycleType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The lifecycle lets you override the method parameters passed to the
+ create, start, stop, destroy lifecycle callbacks.
+
+ e.g.
+ <bean>
+ <create method="initialize">
+ <parameter>String value</parameter>
+ </create>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="method" type="xsd:token" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="installType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The install type you write your installation methods state operations.
+ The install operation is invoked after the start lifecycle.
+ The uninstall operation is invoked before the stop lifecycle.
+
+ e.g.
+ <bean>
+ <install bean="Repository" method="add">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="Repository" method="remove">
+ <parameter><this/></parameter>
+ </uninstall>
+ </bean>
+
+ If you don't include a bean attribute, the method is invoked on your bean
+
+ e.g.
+ <bean>
+ <install method="install"/>
+ <uninstall bean="method="uninstall"/>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="method" type="xsd:token" use="required"/>
+ <xsd:attribute name="state" type="controllerStateType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="dependencyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dependency represents an injection into the bean.
+ They can be used anywhere a string value can appear.
+
+ e.g. Bean instance - "InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject bean="BeanInjected"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Bean property - "InjectedIntoMe".setSomeProperty("BeanInjected".getOtherProperty());
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject bean="BeanInjected" property="otherProperty"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="bean" type="xsd:string" use="required"/>
+ <xsd:attribute name="property" type="xsd:string" use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType" use="optional"/>
+ <xsd:attribute name="whenRequired" type="controllerStateType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="injectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dependency represents an injection into the bean.
+ They can be used anywhere a string value can appear.
+
+ e.g. Bean instance - "InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject bean="BeanInjected"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Bean property - "InjectedIntoMe".setSomeProperty("BeanInjected".getOtherProperty());
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject bean="BeanInjected" property="otherProperty"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Contextual injection - finding exactly one instance which matches property's class type
+ <bean name="InjectedIntoMe" ...>
+ <property name="transactionManager"><inject/></property>
+ </bean>
+
+ e.g. Contextual injection - finding exactly one instance which matches property's name
+ <bean name="InjectedIntoMe" ...>
+ <property name="transactionManager"><inject type="ByName"/></property>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="property" type="xsd:string" use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType" use="optional"/>
+ <xsd:attribute name="whenRequired" type="controllerStateType" use="optional"/>
+ <xsd:attribute name="type" type="injectionTypeType" use="optional" default="ByClass"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="factoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A factory represents another bean used to construct an object.
+
+ e.g. Bean instance - "InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="ConstructMe" ...>
+ <constructor factoryMethod="someMethod">
+ <factory bean="Factory"/>
+ </constructor>
+ </bean>
+ <bean name="Factory" .../>
+
+ You can also inject a property of the bean bean
+ e.g.
+ <bean name="ConstructMe" ...>
+ <constructor factoryMethod="someMethod">
+ <factory bean="Builder" property="getFactory"/>
+ </constructor>
+ </bean>
+
+ Or you can construct a factory in place using a different schema/namsapce
+ e.g.
+ <bean name="ConstructMe" ...>
+ <constructor factoryMethod="someMethod">
+ <factory>
+ <javabean xmlns="someOtherNamespace" class="com.acme.FactoryClass"/>
+ </factory>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0">
+ <xsd:any namespace="##other" processContents="strict"/>
+ </xsd:choice>
+ <xsd:attribute name="bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="property" type="xsd:string" use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType" use="optional"/>
+ <xsd:attribute name="whenRequired" type="controllerStateType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="parameterType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A parameter is used to define the constructor, factory
+ and lifecycle method usage.
+
+ e.g. Using number of parameters when this is unique enough
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <parameter>2nd Parameter</parameter>
+ </constructor>
+ </bean>
+
+ e.g. Explicitly stating the parameter type to resolve overloading
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <parameter class="java.lang.String">2nd Parameter</parameter>
+ </constructor>
+ </bean>
+
+ e.g. To override the injected type use <value/>
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <!-- Parameter is java.lang.Object, but we inject a String -->
+ <parameter class="java.lang.Object">
+ <value class="java.lang.String">2nd Parameter</value>
+ </parameter>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotatedValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="propertyType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A property defines values passed to the setters.
+
+ e.g. Using the type from the setter argument
+ <bean ...>
+ <property name="someProperty">Some value</property>
+ </bean>
+
+ e.g. Overridding the injected type
+ <bean ...>
+ <property name="someProperty" class="java.lang.String">Some value</property>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="namedValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotationType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The annotation type represents a Java5 annotation on the particular join point.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="replace" type="xsd:boolean"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="classNameType">
+ <xsd:annotation>
+ <xsd:documentation> The elements that use this type designate the name
+ of a Java class or interface. The name is in the form of a "binary
+ name", as defined in the JLS and as used in Class.forName().
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:group name="valueGroup">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The value group represents the comment elements of the other configurations
+ <parameter/>, <property/> or collection components
+ e.g.
+
+ <property name="someProperty">
+ <list><value class="java.lang.String">Hello</value></list>
+ </property>
+
+ e.g. This also defines the null value
+ <property name="someProperty"><null/></property>
+ as opposed to the empty string
+ <property name="someProperty"></property>
+ or the string "null"
+ <property name="someProperty">null</property>
+
+ The this operation lets you pass yourself as a parameter.
+ e.g.
+ <install bean="SomeOtherBean> method="install">
+ <parameter><this/></parameter>
+ </install>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <!--<xsd:element name="bean" type="beanType"/>-->
+ <xsd:element name="value" type="plainValueType"/>
+ <xsd:element name="inject" type="injectionType"/>
+ <xsd:element name="collection" type="collectionType"/>
+ <xsd:element name="list" type="listType"/>
+ <xsd:element name="set" type="setType"/>
+ <xsd:element name="array" type="arrayType"/>
+ <xsd:element name="map" type="mapType"/>
+ <xsd:element name="null">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:element name="this">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:any namespace="##other" processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:complexType name="plainValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A simple value, used in collections and to specify a type for parameters.
+
+ e.g.
+ <parameter><value class="com.acme.MyClass">xxx</value></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="class" type="classNameType" use="optional"/>
+ <xsd:attribute name="replace" type="xsd:boolean" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="valueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that can take other values, i.e. properties and parameters.
+
+ e.g.
+ <parameter><value class="com.acme.MyClass">xxx</value></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="plainValueType">
+ <xsd:sequence>
+ <xsd:choice minOccurs="0">
+ <xsd:group ref="valueGroup"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="classLoaderValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that represents a classloader.
+
+ e.g.
+ <classloader><inject bean="SomeClassLoader"/></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="bean" type="beanType"/>
+ <xsd:element name="inject" type="dependencyType"/>
+ <xsd:element name="null">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:any namespace="##other" processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotatedValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that can take annotations.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="valueType">
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="namedValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that has a name, currently only a property.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotatedValueType">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="baseCollectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection defines a java.util.Collection object.
+ It has two class definitions:
+ class: The implementation class of the collection
+ elementClass: The default implementation class of the elements
+ The default "class" is a java.util.ArrayList unless the point of injection
+ defines a concrete type, e.g. in the signature of the setter
+
+ example:
+ <property name="whatever" class="java.util.ArrayList" elementClass="java.net.URL">
+ <value>http://localhost</value> <!-- Creates a URL -->
+ <value class="java.lang.String">http://localhost</value> <!-- Creates a String -->
+ </property>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:group ref="valueGroup"/>
+ </xsd:choice>
+ <xsd:attribute name="class" type="classNameType" use="optional"/>
+ <xsd:attribute name="elementClass" type="classNameType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="collectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection, see baseCollectionType
+ the default collection is a java.util.ArrayList
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="listType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A list, see baseCollectionType
+ the default list is a java.util.ArrayList
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="setType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A set, see baseCollectionType
+ the default set is a java.util.HashSet
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="arrayType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An array, see baseCollectionType
+ the default array is a java.lang.Object[]
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="mapType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A map defines a java.util.Map object.
+ It has three class definitions:
+ class: The implementation class of the class
+ keyClass: The default implementation class of the keys
+ valueClass: The default implementation class of the values
+ The default "class" is a java.util.HashMap unless the point of injection
+ defines a concrete type, e.g. in the signature of the setter
+
+ e.g.:
+ <property name="whatever" class="java.util.HashMap" keyClass="java.lang.String" valueClas="java.net.URL">
+ <!-- map.put(new String("default"), new URL("http://localhost"));
+ <entry><key>default</key><value>http://localhost</value>
+ <!-- map.put(new String("default"), new String("http://localhost"));
+ <entry><key>default</key><value class="java.lang.String">http://localhost</value>
+ </property>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="entry" type="entryType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="classNameType" use="optional"/>
+ <xsd:attribute name="keyClass" type="classNameType" use="optional"/>
+ <xsd:attribute name="valueClass" type="classNameType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="entryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An entry in map. These are made of key/value pairs
+
+ e.g.:
+ <entry><key>default</key><value>http://localhost</value>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="key" type="valueType" minOccurs="0"/>
+ <xsd:element name="value" type="valueType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="dependsType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The depends element is used to define that one bean depends upon
+ another for the create/start/stop/destroy lifecycle
+
+ e.g.:
+ <bean name="IGoFirst" .../>
+ <bean name="IGoSecond" ...>
+ <depends>IGoFirst</depends>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="demandType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The demand is used to specify a dependency on a supply
+ and when the demand is should be deplied
+
+ e.g.:
+ ISupply must be installed before IDemand is constructed
+
+ <bean name="IDemand">
+ <demand state="Instantiated">theSupply</demand>
+ </bean>
+ <bean name="ISupply" ...>
+ <supply>theSupply</supply>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="state" type="controllerStateType" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="supplyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The supply is used to specify that the bean supplies a demanded dependency
+
+ e.g.:
+ <bean name="IDemand" ...>
+ <demand>theSupply</demand>
+ </bean>
+ <bean name="ISupply" ...>
+ <supply>theSupply</supply>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="controllerStateType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The controller state is used to say when dependencies must be satisfied.
+ Valid values include:
+ Described
+ Instantiated
+ Configured
+ Create
+ Start
+ Installed
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="controllerModeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The controller mode, used to control how automatic the bean progresses
+ through the controller lifecyle (the states).
+ Valid values include:
+ Automatic (default) - the controller takes the bean to "Installed"
+ Manual - the user must tell the controller the required state
+ On Demand - the controller takes the bean to "Installed" when another bean depends on it
+ Disabled - the controller or user cannot change the state
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="injectionTypeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ You can set the type of lookup requirement - class type (ByClass) or property name (ByName)
+ Valid values include:
+ ByClass (default)
+ ByName
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!--
+ WARN:
+ Do not use this in the bean deployer, it won't work!
+ FIXME:
+ The correct way to do this is to have two separate
+ schemas (one for deployments the other for beans)
+ then use schema imports.
+ -->
+ <xsd:element name="bean" type="beanType"/>
+
+ <!--
+ WARN:
+ Do not use this in the bean deployer, it won't work!
+ FIXME:
+ The correct way to do this is to have two separate
+ schemas (one for deployments the other for beans)
+ then use schema imports.
+ -->
+ <xsd:element name="beanfactory" type="beanfactoryType"/>
+
+</xsd:schema>
Added: modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties
===================================================================
--- modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties (rev 0)
+++ modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,13 @@
+### ====================================================================== ###
+## ##
+## JBoss Bootstrap Log4j Configuration ##
+## ##
+### ====================================================================== ###
+
+log4j.rootCategory=ALL, CONSOLE
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=DEBUG
+log4j.appender.CONSOLE.Target=System.out
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
Added: modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml (rev 0)
+++ modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Deployment holds beans -->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="PortletApplicationDeployer" class="org.jboss.portal.portlet.test.PortletApplicationDeployer">
+ </bean>
+
+ <bean name="PortletApplicationRegistry" class="org.jboss.portal.portlet.impl.container.PortletApplicationRegistryImpl">
+
+ </bean>
+
+ <bean name="PortletAPIFactory" class="org.jboss.portal.portlet.impl.jsr168.PortletAPIFactoryImpl">
+
+ </bean>
+
+ <bean name="PortletInfoFactory" class="org.jboss.portal.portlet.impl.jsr168.PortletInfoFactoryImpl">
+
+ </bean>
+
+</deployment>
Added: modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/web.xml (rev 0)
+++ modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/web.xml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,32 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!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>
+ <listener>
+ <listener-class>org.jboss.portal.portlet.test.PortalKernelBootstrap</listener-class>
+ </listener>
+</web-app>
18 years, 8 months
JBoss Portal SVN: r8006 - modules/web/trunk/web/src/main/org/jboss/portal/web.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-08-20 18:42:42 -0400 (Mon, 20 Aug 2007)
New Revision: 8006
Added:
modules/web/trunk/web/src/main/org/jboss/portal/web/IllegalRequestException.java
modules/web/trunk/web/src/main/org/jboss/portal/web/RequestInfo.java
Log:
Added RequestInfo which extracts useful information from an HttpServletRequest (at least for portal)
Added: modules/web/trunk/web/src/main/org/jboss/portal/web/IllegalRequestException.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/IllegalRequestException.java (rev 0)
+++ modules/web/trunk/web/src/main/org/jboss/portal/web/IllegalRequestException.java 2007-08-20 22:42:42 UTC (rev 8006)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.web;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class IllegalRequestException extends Exception
+{
+ public IllegalRequestException()
+ {
+ }
+
+ public IllegalRequestException(String string)
+ {
+ super(string);
+ }
+
+ public IllegalRequestException(String string, Throwable throwable)
+ {
+ super(string, throwable);
+ }
+
+ public IllegalRequestException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
Added: modules/web/trunk/web/src/main/org/jboss/portal/web/RequestInfo.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/RequestInfo.java (rev 0)
+++ modules/web/trunk/web/src/main/org/jboss/portal/web/RequestInfo.java 2007-08-20 22:42:42 UTC (rev 8006)
@@ -0,0 +1,214 @@
+/******************************************************************************
+ * 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.web;
+
+import org.jboss.portal.common.http.QueryStringParser;
+import org.jboss.portal.common.util.ParameterMap;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.HashMap;
+import java.nio.charset.Charset;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * Compute useful information about an <code>HttpServletRequest</code>.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class RequestInfo
+{
+
+ /** . */
+ public static final int GET_METHOD = 0;
+
+ /** . */
+ public static final int POST_METHOD = 1;
+
+ /** . */
+ public static final String APPLICATION_X_WWW_FORM_URLENCODED_MEDIA_TYPE = "application/x-www-form-urlencoded";
+
+ /** . */
+ public static final String MULTIPART_FORM_DATA_MEDIA_TYPE = "multipart/form-data";
+
+ /** . */
+ public static final Charset UTF_8_CHARSET = Charset.forName("UTF-8");
+
+ /** . */
+ private final ParameterMap queryParameterMap;
+
+ /** . */
+ private final ParameterMap bodyParameterMap;
+
+ /** . */
+ private final int method;
+
+ /** . */
+ private final String mediaType;
+
+ public RequestInfo(HttpServletRequest req) throws UnsupportedEncodingException, IllegalRequestException
+ {
+ int method;
+ if ("GET".equals(req.getMethod()))
+ {
+ method = GET_METHOD;
+ }
+ else if ("POST".equals(req.getMethod()))
+ {
+ method = POST_METHOD;
+ }
+ else
+ {
+ throw new IllegalRequestException("HTTP Method " + req.getMethod() + " not accepted");
+ }
+
+ // Compute the media type in the content type
+ String mediaType = retrieveMediaType(req.getContentType());
+
+ // Only affect the charset encoding if the servlet container will decode the request
+ if (method == POST_METHOD && APPLICATION_X_WWW_FORM_URLENCODED_MEDIA_TYPE.equals(mediaType))
+ {
+ // Now we must ensure that we have either an equals or a trailing space after the media-type
+ String characterEncoding = req.getCharacterEncoding();
+ if (characterEncoding == null)
+ {
+ // Set out charset for the request
+ req.setCharacterEncoding(UTF_8_CHARSET.name());
+ }
+ else
+ {
+ Charset charset = Charset.forName(characterEncoding);
+ if (!UTF_8_CHARSET.equals(charset))
+ {
+ throw new IllegalRequestException("Charset " + characterEncoding + " not accepted, it should be UTF8");
+ }
+ }
+ }
+
+ // Parse the query string to have the get parameters
+ // The resulting map has its parameters decoded from the x-www-form-url encoding
+ Map queryParameterMap = Collections.EMPTY_MAP;
+ String queryString = req.getQueryString();
+ if (queryString != null)
+ {
+ queryParameterMap = QueryStringParser.parseQueryString(queryString);
+ }
+
+ //
+ Map bodyParameterMap = null;
+ if (method == POST_METHOD && APPLICATION_X_WWW_FORM_URLENCODED_MEDIA_TYPE.equals(mediaType))
+ {
+ bodyParameterMap = Collections.EMPTY_MAP;
+ for (Iterator i = req.getParameterMap().entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+
+ // Get param name
+ String paramName = (String)entry.getKey();
+
+ // Values that are aggregated from the query string and the body
+ String[] paramValues = (String[])entry.getValue();
+
+ // Values decoded from the query string
+ String[] queryValues = (String[])queryParameterMap.get(paramName);
+ if (queryValues != null)
+ {
+ int bodyValuesLength = paramValues.length - queryValues.length;
+ if (bodyValuesLength > 0)
+ {
+ String[] bodyValues = new String[bodyValuesLength];
+ System.arraycopy(paramValues, queryValues.length, bodyValues, 0, bodyValuesLength);
+ if (bodyParameterMap.isEmpty())
+ {
+ bodyParameterMap = new HashMap();
+ }
+ bodyParameterMap.put(paramName, bodyValues);
+ }
+ }
+ else
+ {
+ if (bodyParameterMap.isEmpty())
+ {
+ bodyParameterMap = new HashMap();
+ }
+ bodyParameterMap.put(paramName, paramValues);
+ }
+ }
+
+ // Make the map unmodifiable
+ bodyParameterMap = bodyParameterMap.isEmpty() ? bodyParameterMap : Collections.unmodifiableMap(bodyParameterMap);
+ }
+
+ //
+ this.method = method;
+ this.queryParameterMap = new ParameterMap(queryParameterMap);
+ this.bodyParameterMap = new ParameterMap(bodyParameterMap);
+ this.mediaType = mediaType;
+ }
+
+ public ParameterMap getQueryParameterMap()
+ {
+ return queryParameterMap;
+ }
+
+ public ParameterMap getBodyParameterMap()
+ {
+ return bodyParameterMap;
+ }
+
+ public int getMethod()
+ {
+ return method;
+ }
+
+ public String getMediaType()
+ {
+ return mediaType;
+ }
+
+ private String retrieveMediaType(String contentType)
+ {
+ String mediaType = contentType;
+
+ //
+ if (mediaType != null)
+ {
+ // Remove any parameters
+ int index = mediaType.indexOf(';');
+ if (index != -1)
+ {
+ mediaType = contentType.substring(0, index);
+ }
+
+ // Trim
+ mediaType = mediaType.trim();
+
+ // Media type matching is case insensitive, so we convert to lower case
+ mediaType = mediaType.toLowerCase();
+ }
+ return mediaType;
+ }
+}
18 years, 8 months
JBoss Portal SVN: r8005 - in modules/web/trunk: web/src/main/org/jboss/portal/web and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-08-20 18:41:30 -0400 (Mon, 20 Aug 2007)
New Revision: 8005
Modified:
modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml
modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java
modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6WebApp.java
Log:
minor improvement to web integration spi we need the ServletContext not the WEB-INF URL (wich can be computed from the ServletContext)
Modified: modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml
===================================================================
--- modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml 2007-08-20 20:49:59 UTC (rev 8004)
+++ modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml 2007-08-20 22:41:30 UTC (rev 8005)
@@ -35,6 +35,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java 2007-08-20 20:49:59 UTC (rev 8004)
+++ modules/web/trunk/web/src/main/org/jboss/portal/web/WebApp.java 2007-08-20 22:41:30 UTC (rev 8005)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.web;
+import javax.servlet.ServletContext;
import java.net.URL;
import java.io.InputStream;
import java.io.IOException;
@@ -36,11 +37,11 @@
{
/**
- * Returns the URL of the WEB-INF directory of the web application.
+ * Returns the servlet context of the web application.
*
- * @return the URL of the WEB-INF directory
+ * @return the servlet context
*/
- URL getWEBINFURL();
+ ServletContext getServletContext();
/**
* Returns an identifier for the web application valid in the scope of all the web applications deployed.
Modified: modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java 2007-08-20 20:49:59 UTC (rev 8004)
+++ modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java 2007-08-20 22:41:30 UTC (rev 8005)
@@ -26,6 +26,7 @@
import org.jboss.portal.web.RequestDispatchCallback;
import org.jboss.portal.web.WebAppEvent;
import org.jboss.portal.web.WebAppLifeCycleEvent;
+import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.command.CommandDispatcher;
import org.jboss.portal.web.spi.ServletContainerContext;
import org.apache.catalina.LifecycleListener;
@@ -71,6 +72,11 @@
/** . */
private final CommandDispatcher dispatcher = new CommandDispatcher();
+ public TC6ServletContainerContext()
+ {
+ ServletContainer.registerContext(this);
+ }
+
public Object include(
ServletContext targetServletContext,
HttpServletRequest request,
Modified: modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6WebApp.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6WebApp.java 2007-08-20 20:49:59 UTC (rev 8004)
+++ modules/web/trunk/web/src/main/org/jboss/portal/web/impl/tomcat/TC6WebApp.java 2007-08-20 22:41:30 UTC (rev 8005)
@@ -53,9 +53,6 @@
private ClassLoader loader;
/** . */
- private URL webinfurl;
-
- /** . */
private String id;
/** . */
@@ -76,7 +73,6 @@
loader = context.getLoader().getClassLoader();
id = context.getPath();
contextPath = context.getPath();
- webinfurl = servletContext.getResource("/WEB-INF");
}
void instrument() throws Exception
@@ -112,9 +108,9 @@
}
}
- public URL getWEBINFURL()
+ public ServletContext getServletContext()
{
- return webinfurl;
+ return servletContext;
}
public String getId()
18 years, 8 months
JBoss Portal SVN: r8004 - in branches/JBoss_Portal_Branch_2_6/identity/src: main/org/jboss/portal/test/identity and 3 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-08-20 16:49:59 -0400 (Mon, 20 Aug 2007)
New Revision: 8004
Modified:
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTestCase.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtUserModuleTestCase.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticGroupMembershipModuleTestCase.java
branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/opends-config.xml
branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/openldap-config.xml
branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/rhds-config.xml
branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/sunds-config.xml
branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-opends.ldif
branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-openldap.ldif
branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-sunds.ldif
branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa.ldif
Log:
JBPORTAL-1592 - Backslashes not escaped correctly with ldap modules
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java 2007-08-20 20:49:59 UTC (rev 8004)
@@ -200,7 +200,7 @@
}
/**
- * This method should be used by over modules to perform searches. It will allow user module
+ * This method should be used by other modules to perform searches. It will allow role module
* implementation to apply proper filter and search scope from the configuration
*
* @param filter that will be concatenated with proper user search filter from the module
@@ -213,6 +213,9 @@
controls.setReturningObjFlag(true);
controls.setTimeLimit(getSearchTimeLimit());
+ //
+ filter = filter.replaceAll("\\\\", "\\\\\\\\");
+
log.debug("Search filter: " + filter);
if (log.isDebugEnabled() && filterArgs != null)
{
@@ -222,7 +225,7 @@
log.debug("Search filterArg: {" + i + "}: " + filterArg);
}
}
- log.debug("Search ctx: " + getRoleCtxDN());
+ log.debug("Search ctx: " + getRoleSearchCtxDNs());
Set roleCtxs = getRoleSearchCtxDNs();
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-08-20 20:49:59 UTC (rev 8004)
@@ -232,7 +232,7 @@
log.debug("Search filterArg: {" + i + "}: " + filterArg);
}
}
- log.debug("Search ctx: " + getUserSearchCtxDN());
+ log.debug("Search ctx: " + getUserSearchCtxDNs());
Set userCtxs = getUserSearchCtxDNs();
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2007-08-20 20:49:59 UTC (rev 8004)
@@ -305,6 +305,7 @@
controls.setReturningObjFlag(true);
//String filter = getUidAttributeID().concat("=").concat(userName);
+ filter = filter.replaceAll("\\\\", "\\\\\\\\");
log.debug("Search filter: " + filter);
Enumeration results = null;
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-08-20 20:49:59 UTC (rev 8004)
@@ -412,16 +412,24 @@
user = userModule.createUser("user2, Test", "password");
users.add(user);
- membershipModule.assignUsers(role, users);
+ //
//create names with RFC 2253 exceptions
- userModule.createUser("test ++", "password");
- userModule.createUser("test \"", "password");
+ user = userModule.createUser("test ++", "password");
+ users.add(user);
+ user = userModule.createUser("test \"", "password");
+ users.add(user);
//userModule.createUser("test \\", "password");
- userModule.createUser("test <", "password");
- userModule.createUser("test >", "password");
- userModule.createUser("test ;", "password");
+ //users.add(user);
+ user = userModule.createUser("test <", "password");
+ users.add(user);
+ user = userModule.createUser("test >", "password");
+ users.add(user);
+ user = userModule.createUser("test ;", "password");
+ users.add(user);
+ membershipModule.assignUsers(role, users);
+
ctx.commit();
ctx.begin();
@@ -430,7 +438,7 @@
users = membershipModule.getUsers(role);
- assertEquals(3, users.size());
+ assertEquals(8, users.size());
assertNotNull(userModule.findUserByUserName("user, Test"));
assertNotNull(userModule.findUserByUserName("user1, Test"));
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTestCase.java 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTestCase.java 2007-08-20 20:49:59 UTC (rev 8004)
@@ -6,12 +6,18 @@
import org.jboss.portal.identity.IdentityContext;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.ldap.LDAPRoleImpl;
import java.util.Set;
import java.util.List;
import java.util.LinkedList;
import java.util.Iterator;
+import java.util.HashSet;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -26,8 +32,15 @@
return createTestSuite(LDAPExtRoleModuleTestCase.class, "directories-extrolemodule.xml", "datasources.xml");
}
+ UserModule userModule;
+
RoleModule roleModule;
+ MembershipModule membershipModule;
+
+ UserProfileModule userProfileModule;
+
+
private String suffix;
public void setUp() throws Exception
@@ -61,7 +74,11 @@
controller.setRegisterMBeans(false);
controller.start();
identityContext = controller.getIdentityContext();
- this.roleModule = (RoleModule)identityContext.getObject(IdentityContext.TYPE_ROLE_MODULE);
+ userModule = (UserModule)identityContext.getObject(IdentityContext.TYPE_USER_MODULE);
+ userModule = (UserModule)identityContext.getObject(IdentityContext.TYPE_USER_MODULE);
+ roleModule = (RoleModule)identityContext.getObject(IdentityContext.TYPE_ROLE_MODULE);
+ membershipModule = (MembershipModule)identityContext.getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
+ userProfileModule = (UserProfileModule)identityContext.getObject(IdentityContext.TYPE_USER_PROFILE_MODULE);
suffix = getDirectoryServerConfigParameter().getCleanUpDN();
@@ -200,4 +217,44 @@
}
}
+
+ public void testNonStandardName() throws Exception
+ {
+ User u = userModule.findUserByUserName("jduke1");
+ assertNotNull(u);
+
+ Set roles = membershipModule.getRoles(u);
+
+ assertEquals(2, roles.size());
+
+ Set roleNames = new HashSet();
+ for (Iterator iterator = roles.iterator(); iterator.hasNext();)
+ {
+ Role role = (Role)iterator.next();
+ roleNames.add(role.getName());
+ System.out.println("ROlE NAME: " + role.getName());
+ }
+
+
+ assertTrue(roleNames.contains("Echo"));
+ assertTrue(roleNames.contains("User11"));
+
+
+ u = userModule.findUserByUserName("jduke4, Duke");
+ assertNotNull(u);
+
+ roles = membershipModule.getRoles(u);
+
+ roleNames = new HashSet();
+ for (Iterator iterator = roles.iterator(); iterator.hasNext();)
+ {
+ Role role = (Role)iterator.next();
+ roleNames.add(role.getName());
+ }
+
+ assertTrue(roleNames.contains("Echo"));
+ assertTrue(roleNames.contains("User11"));
+
+
+ }
}
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtUserModuleTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtUserModuleTestCase.java 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtUserModuleTestCase.java 2007-08-20 20:49:59 UTC (rev 8004)
@@ -21,6 +21,7 @@
import java.util.Set;
import java.util.HashSet;
+import java.util.Iterator;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -152,4 +153,42 @@
}
+
+ public void testNonStandardName() throws Exception
+ {
+ User u = userModule.findUserByUserName("jduke1");
+ assertNotNull(u);
+
+ Set roles = membershipModule.getRoles(u);
+
+ assertEquals(1, roles.size());
+
+ Set roleNames = new HashSet();
+ for (Iterator iterator = roles.iterator(); iterator.hasNext();)
+ {
+ Role role = (Role)iterator.next();
+ roleNames.add(role.getName());
+ System.out.println("ROlE NAME: " + role.getName());
+ }
+
+
+ assertTrue(roleNames.contains("Echo"));
+
+
+ u = userModule.findUserByUserName("jduke4, Duke");
+ assertNotNull(u);
+
+ roles = membershipModule.getRoles(u);
+
+ roleNames = new HashSet();
+ for (Iterator iterator = roles.iterator(); iterator.hasNext();)
+ {
+ Role role = (Role)iterator.next();
+ roleNames.add(role.getName());
+ }
+
+ assertTrue(roleNames.contains("Echo"));
+
+
+ }
}
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticGroupMembershipModuleTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticGroupMembershipModuleTestCase.java 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticGroupMembershipModuleTestCase.java 2007-08-20 20:49:59 UTC (rev 8004)
@@ -102,7 +102,7 @@
}
assertTrue(names.contains((prefix + "=jduke1,ou=People," + suffix).toLowerCase()));
assertTrue(names.contains((prefix + "=jduke3,ou=People," + suffix).toLowerCase()));
- assertTrue(names.contains((prefix + "=jduke4,ou=People," + suffix).toLowerCase()));
+ assertTrue(names.contains((prefix + "=jduke4\\, Duke,ou=People," + suffix).toLowerCase()));
}
//TODO:extend this
@@ -143,7 +143,7 @@
{
Set users = new HashSet();
users.add((LDAPUserImpl)userModule.findUserByUserName("jduke1"));
- users.add((LDAPUserImpl)userModule.findUserByUserName("jduke4"));
+ users.add((LDAPUserImpl)userModule.findUserByUserName("jduke4, Duke"));
LDAPRoleImpl role = (LDAPRoleImpl)roleModule.findRoleByName("Echo1");
membershipModule.assignUsers(role,users);
@@ -160,7 +160,7 @@
}
assertTrue(names.contains((prefix + "=jduke1,ou=People," + suffix).toLowerCase()));
- assertTrue(names.contains((prefix + "=jduke4,ou=People," + suffix).toLowerCase()));
+ assertTrue(names.contains((prefix + "=jduke4\\, Duke,ou=People," + suffix).toLowerCase()));
}
@@ -169,7 +169,7 @@
{
Set users = new HashSet();
users.add(userModule.findUserByUserName("jduke3"));
- users.add(userModule.findUserByUserName("jduke4"));
+ users.add(userModule.findUserByUserName("jduke4, Duke"));
LDAPRoleImpl role = (LDAPRoleImpl)roleModule.findRoleByName("Echo1");
membershipModule.assignUsers(role,users);
@@ -186,7 +186,7 @@
}
assertTrue(names.contains((prefix + "=jduke3,ou=People," + suffix).toLowerCase()));
- assertTrue(names.contains((prefix + "=jduke4,ou=People," + suffix).toLowerCase()));
+ assertTrue(names.contains((prefix + "=jduke4\\, Duke,ou=People," + suffix).toLowerCase()));
}
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/opends-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/opends-config.xml 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/opends-config.xml 2007-08-20 20:49:59 UTC (rev 8004)
@@ -110,7 +110,7 @@
<option>
<name>roleCtxDN</name>
<value>ou=Roles,dc=example,dc=com</value>
- <value>ou=Roles1,dc=example,dc=com</value>
+ <!--<value>ou=Roles1,dc=example,dc=com</value>-->
</option>
</option-group>
</options>
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/openldap-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/openldap-config.xml 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/openldap-config.xml 2007-08-20 20:49:59 UTC (rev 8004)
@@ -106,7 +106,7 @@
<option>
<name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
- <value>ou=Roles1,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
+ <!--<value>ou=Roles1,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>-->
</option>
<option>
<name>userSearchFilter</name>
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/rhds-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/rhds-config.xml 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/rhds-config.xml 2007-08-20 20:49:59 UTC (rev 8004)
@@ -106,7 +106,7 @@
<option>
<name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
- <value>ou=Roles1,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <!--<value>ou=Roles1,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>-->
</option>
<option>
<name>userSearchFilter</name>
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/sunds-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/sunds-config.xml 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/config/extuser/sunds-config.xml 2007-08-20 20:49:59 UTC (rev 8004)
@@ -110,7 +110,7 @@
<option>
<name>roleCtxDN</name>
<value>ou=Roles,dc=example,dc=com</value>
- <value>ou=Roles1,dc=example,dc=com</value>
+ <!--<value>ou=Roles1,dc=example,dc=com</value>-->
</option>
</option-group>
</options>
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-opends.ldif
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-opends.ldif 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-opends.ldif 2007-08-20 20:49:59 UTC (rev 8004)
@@ -51,11 +51,11 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke4,ou=People,dc=example,dc=com
+dn: uid=jduke4\, Duke,ou=People,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
-uid: jduke4
+uid: jduke4, Duke
cn: Java Duke4
sn: Duke4
userPassword: theduke
@@ -124,7 +124,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=example,dc=com
member: uid=jduke3,ou=People,dc=example,dc=com
-member: uid=jduke4,ou=People,dc=example,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=example,dc=com
dn: cn=Echo1,ou=Roles,dc=example,dc=com
objectClass: top
@@ -154,7 +154,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=example,dc=com
member: uid=jduke3,ou=People,dc=example,dc=com
-member: uid=jduke4,ou=People,dc=example,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=example,dc=com
dn: ou=Roles2,dc=example,dc=com
objectclass: top
@@ -168,7 +168,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=example,dc=com
member: uid=jduke3,ou=People,dc=example,dc=com
-member: uid=jduke4,ou=People,dc=example,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=example,dc=com
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-openldap.ldif
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-openldap.ldif 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-openldap.ldif 2007-08-20 20:49:59 UTC (rev 8004)
@@ -51,11 +51,11 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke4,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
+dn: uid=jduke4\, Duke,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
-uid: jduke4
+uid: jduke4, Duke
cn: Java Duke4
sn: Duke4
userPassword: theduke
@@ -124,7 +124,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
member: uid=jduke3,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
-member: uid=jduke4,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
dn: cn=Echo1,ou=Roles,dc=testsuite,dc=portal,dc=my-domain,dc=com
objectClass: top
@@ -155,7 +155,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
member: uid=jduke3,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
-member: uid=jduke4,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
dn: ou=Roles2,dc=testsuite,dc=portal,dc=my-domain,dc=com
objectclass: top
@@ -169,7 +169,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
member: uid=jduke3,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
-member: uid=jduke4,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
# tree2
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-sunds.ldif
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-sunds.ldif 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa-sunds.ldif 2007-08-20 20:49:59 UTC (rev 8004)
@@ -51,11 +51,11 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke4,ou=People,dc=example,dc=com
+dn: uid=jduke4\, Duke,ou=People,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
-uid: jduke4
+uid: jduke4, Duke
cn: Java Duke4
sn: Duke4
userPassword: theduke
@@ -124,7 +124,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=example,dc=com
member: uid=jduke3,ou=People,dc=example,dc=com
-member: uid=jduke4,ou=People,dc=example,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=example,dc=com
dn: cn=Echo1,ou=Roles,dc=example,dc=com
objectClass: top
@@ -154,7 +154,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=example,dc=com
member: uid=jduke3,ou=People,dc=example,dc=com
-member: uid=jduke4,ou=People,dc=example,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=example,dc=com
dn: ou=Roles2,dc=example,dc=com
objectclass: top
@@ -168,7 +168,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=example,dc=com
member: uid=jduke3,ou=People,dc=example,dc=com
-member: uid=jduke4,ou=People,dc=example,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=example,dc=com
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa.ldif
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa.ldif 2007-08-20 14:46:16 UTC (rev 8003)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/test/ldif/initial-tests-qa.ldif 2007-08-20 20:49:59 UTC (rev 8004)
@@ -51,11 +51,11 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke4,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: uid=jduke4\, Duke,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
-uid: jduke4
+uid: jduke4, Duke
cn: Java Duke4
sn: Duke4
userPassword: theduke
@@ -124,7 +124,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
member: uid=jduke3,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-member: uid=jduke4,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
dn: cn=Echo1,ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: top
@@ -154,7 +154,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
member: uid=jduke3,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-member: uid=jduke4,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
dn: ou=Roles2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
@@ -168,7 +168,7 @@
description: the JBossAdmin group
member: uid=jduke1,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
member: uid=jduke3,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-member: uid=jduke4,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke4\, Duke,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
# tree2
18 years, 8 months
JBoss Portal SVN: r8003 - modules/test/trunk/test/src/resources/config.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-08-20 10:46:16 -0400 (Mon, 20 Aug 2007)
New Revision: 8003
Modified:
modules/test/trunk/test/src/resources/config/directories-extrolemodule.xml
modules/test/trunk/test/src/resources/config/directories-extusermodule.xml
modules/test/trunk/test/src/resources/config/directories-identity.xml
modules/test/trunk/test/src/resources/config/directories-simplerolemodule.xml
modules/test/trunk/test/src/resources/config/directories-simpleusermodule.xml
modules/test/trunk/test/src/resources/config/directories-staticgroupmembership.xml
modules/test/trunk/test/src/resources/config/directories-staticrolemembership.xml
modules/test/trunk/test/src/resources/config/directories.xml
Log:
update path to ldifs
Modified: modules/test/trunk/test/src/resources/config/directories-extrolemodule.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories-extrolemodule.xml 2007-08-20 14:41:52 UTC (rev 8002)
+++ modules/test/trunk/test/src/resources/config/directories-extrolemodule.xml 2007-08-20 14:46:16 UTC (rev 8003)
@@ -31,7 +31,7 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
@@ -43,7 +43,7 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
@@ -57,7 +57,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -72,7 +72,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>
@@ -87,7 +87,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
Modified: modules/test/trunk/test/src/resources/config/directories-extusermodule.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories-extusermodule.xml 2007-08-20 14:41:52 UTC (rev 8002)
+++ modules/test/trunk/test/src/resources/config/directories-extusermodule.xml 2007-08-20 14:46:16 UTC (rev 8003)
@@ -31,7 +31,7 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
@@ -43,7 +43,7 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
@@ -56,7 +56,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -72,7 +72,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>
@@ -87,7 +87,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
Modified: modules/test/trunk/test/src/resources/config/directories-identity.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories-identity.xml 2007-08-20 14:41:52 UTC (rev 8002)
+++ modules/test/trunk/test/src/resources/config/directories-identity.xml 2007-08-20 14:46:16 UTC (rev 8003)
@@ -32,7 +32,7 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-notpopulated-opends.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
@@ -44,7 +44,7 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-notpopulated-opends.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
@@ -57,7 +57,7 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-notpopulated-sunds.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
@@ -69,7 +69,7 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-notpopulated-sunds.ldif</populate-ldif>
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
@@ -83,7 +83,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-notpopulated.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -98,7 +98,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-notpopulated.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -114,7 +114,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-notpopulated-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>
@@ -129,7 +129,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
Modified: modules/test/trunk/test/src/resources/config/directories-simplerolemodule.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories-simplerolemodule.xml 2007-08-20 14:41:52 UTC (rev 8002)
+++ modules/test/trunk/test/src/resources/config/directories-simplerolemodule.xml 2007-08-20 14:46:16 UTC (rev 8003)
@@ -33,7 +33,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -48,7 +48,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -63,7 +63,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -78,7 +78,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>
@@ -93,7 +93,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
Modified: modules/test/trunk/test/src/resources/config/directories-simpleusermodule.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories-simpleusermodule.xml 2007-08-20 14:41:52 UTC (rev 8002)
+++ modules/test/trunk/test/src/resources/config/directories-simpleusermodule.xml 2007-08-20 14:46:16 UTC (rev 8003)
@@ -33,7 +33,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -48,7 +48,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -63,7 +63,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -78,7 +78,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>
@@ -93,7 +93,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
Modified: modules/test/trunk/test/src/resources/config/directories-staticgroupmembership.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories-staticgroupmembership.xml 2007-08-20 14:41:52 UTC (rev 8002)
+++ modules/test/trunk/test/src/resources/config/directories-staticgroupmembership.xml 2007-08-20 14:46:16 UTC (rev 8003)
@@ -33,7 +33,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -48,7 +48,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -63,7 +63,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -78,7 +78,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-nonDNMember.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-nonDNMember.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -93,7 +93,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>
@@ -108,7 +108,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
Modified: modules/test/trunk/test/src/resources/config/directories-staticrolemembership.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories-staticrolemembership.xml 2007-08-20 14:41:52 UTC (rev 8002)
+++ modules/test/trunk/test/src/resources/config/directories-staticrolemembership.xml 2007-08-20 14:46:16 UTC (rev 8003)
@@ -33,7 +33,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -48,7 +48,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -63,7 +63,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -78,7 +78,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-nonDNMember.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-nonDNMember.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -93,7 +93,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>-->
@@ -108,7 +108,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
Modified: modules/test/trunk/test/src/resources/config/directories.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories.xml 2007-08-20 14:41:52 UTC (rev 8002)
+++ modules/test/trunk/test/src/resources/config/directories.xml 2007-08-20 14:46:16 UTC (rev 8003)
@@ -33,7 +33,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -48,7 +48,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -63,7 +63,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -78,7 +78,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
@@ -93,7 +93,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>
18 years, 8 months
JBoss Portal SVN: r8002 - modules/test/trunk/test/src/resources/config.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-08-20 10:41:52 -0400 (Mon, 20 Aug 2007)
New Revision: 8002
Modified:
modules/test/trunk/test/src/resources/config/directories-userprofilemodule.xml
Log:
somehow forgot to change path here...
Modified: modules/test/trunk/test/src/resources/config/directories-userprofilemodule.xml
===================================================================
--- modules/test/trunk/test/src/resources/config/directories-userprofilemodule.xml 2007-08-20 14:32:54 UTC (rev 8001)
+++ modules/test/trunk/test/src/resources/config/directories-userprofilemodule.xml 2007-08-20 14:41:52 UTC (rev 8002)
@@ -33,7 +33,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -48,7 +48,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>testldap</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-sunds.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
@@ -63,7 +63,7 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>qpq123qpq</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
@@ -78,7 +78,7 @@
<admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
<admin-password>jbossqa</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
</directory>
@@ -93,7 +93,7 @@
<admin-dn>JBOSS\jbossqa</admin-dn>
<admin-password>jboss42</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+ <populate-ldif>test/ldif/initial-tests-qa-msad.ldif</populate-ldif>
<cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
</directory>-->
18 years, 8 months
JBoss Portal SVN: r8001 - branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-08-20 10:32:54 -0400 (Mon, 20 Aug 2007)
New Revision: 8001
Modified:
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
Log:
fix identity test cases
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-08-19 23:06:08 UTC (rev 8000)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-08-20 14:32:54 UTC (rev 8001)
@@ -75,30 +75,45 @@
{
ctx.begin();
Set set1 = userModule.findUsersFilteredByUserName("user", 0, 10);
- Iterator it = set1.iterator();
- User user = (User)it.next();
- assertEquals("user1", user.getUserName());
- user = (User)it.next();
- assertEquals("user2", user.getUserName());
-
+
+
+ Set userNames = new HashSet();
+
+ for (Iterator iterator = set1.iterator(); iterator.hasNext();)
+ {
+ User u = (User)iterator.next();
+ userNames.add(u.getUserName());
+ }
+
+ assertTrue(userNames.contains("user1"));
+ assertTrue(userNames.contains("user2"));
+
+
//
Set set2 = userModule.findUsersFilteredByUserName("blah", 0, 10);
assertEquals(0, set2.size());
//
Set set3 = userModule.findUsersFilteredByUserName("", 0, 10);
- it = set3.iterator();
- user = (User)it.next();
- assertEquals("admin", user.getUserName());
- user = (User)it.next();
- assertEquals("user1", user.getUserName());
- user = (User)it.next();
- assertEquals("user2", user.getUserName());
+ userNames = new HashSet();
+
+ for (Iterator iterator = set3.iterator(); iterator.hasNext();)
+ {
+ User u = (User)iterator.next();
+ userNames.add(u.getUserName());
+ }
+
+ assertTrue(userNames.contains("admin"));
+ assertTrue(userNames.contains("user1"));
+ assertTrue(userNames.contains("user2"));
+
//
Set set4 = userModule.findUsersFilteredByUserName("user1", 0, 10);
- it = set4.iterator();
- user = (User)it.next();
+
+
+ Iterator it = set4.iterator();
+ User user = (User)it.next();
assertEquals("user1", user.getUserName());
ctx.commit();
}
@@ -339,30 +354,44 @@
{
ctx.begin();
Set set1 = membershipModule.findRoleMembers("role1", 0, 10, "user");
- Iterator i = set1.iterator();
- User user = (User)i.next();
- assertEquals("user1", user.getUserName());
- user = (User)i.next();
- assertEquals("user2", user.getUserName());
+ Set userNames = new HashSet();
+
+ for (Iterator iterator = set1.iterator(); iterator.hasNext();)
+ {
+ User u = (User)iterator.next();
+ userNames.add(u.getUserName());
+ }
+
+ assertTrue(userNames.contains("user1"));
+ assertTrue(userNames.contains("user2"));
+
+
+
//
Set set2 = membershipModule.findRoleMembers("role1", 0, 10, "blah");
assertEquals(0, set2.size());
//
Set set3 = membershipModule.findRoleMembers("role1", 0, 10, "");
- i = set3.iterator();
- user = (User)i.next();
- assertEquals("admin", user.getUserName());
- user = (User)i.next();
- assertEquals("user1", user.getUserName());
- user = (User)i.next();
- assertEquals("user2", user.getUserName());
+ userNames = new HashSet();
+
+ for (Iterator iterator = set3.iterator(); iterator.hasNext();)
+ {
+ User u = (User)iterator.next();
+ userNames.add(u.getUserName());
+ }
+
+ assertTrue(userNames.contains("user1"));
+ assertTrue(userNames.contains("user2"));
+ assertTrue(userNames.contains("admin"));
+
+
//
Set set4 = membershipModule.findRoleMembers("role1", 0, 10, "user1");
- i = set4.iterator();
- user = (User)i.next();
+ Iterator i = set4.iterator();
+ User user = (User)i.next();
assertEquals("user1", user.getUserName());
ctx.commit();
18 years, 8 months