weaver 2004/08/01 08:50:23
Modified: portal/src/test/org/apache/jetspeed/deployment
TestSimpleDeployment.java
Log:
Changes due to refactoring of portlet factory and cache
Revision Changes Path
1.16 +16 -4
jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/deployment/TestSimpleDeployment.java
Index: TestSimpleDeployment.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/deployment/TestSimpleDeployment.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- TestSimpleDeployment.java 31 Jul 2004 20:05:27 -0000 1.15
+++ TestSimpleDeployment.java 1 Aug 2004 15:50:23 -0000 1.16
@@ -23,6 +23,7 @@
import junit.framework.TestSuite;
import org.apache.jetspeed.AbstractPrefsSupportedTestCase;
+import org.apache.jetspeed.cache.PortletCache;
import org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException;
import org.apache.jetspeed.container.window.PortletWindowAccessor;
import org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl;
@@ -32,6 +33,8 @@
import org.apache.jetspeed.deployment.simpleregistry.SimpleRegistry;
import org.apache.jetspeed.deployment.simpleregistry.impl.InMemoryRegistryImpl;
import org.apache.jetspeed.factory.JetspeedPortletFactory;
+import org.apache.jetspeed.factory.JetspeedPortletFactoryProxy;
+import org.apache.jetspeed.factory.PortletFactory;
import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
import org.apache.jetspeed.om.common.portlet.MutablePortletEntity;
import org.apache.jetspeed.tools.pamanager.FileSystemPAM;
@@ -67,6 +70,10 @@
protected File webAppsDirFile;
protected File copyFrom;
protected PortletWindowAccessor windowAccess;
+ protected PortletCache portletCache;
+ protected PortletFactory portletFactory;
+
+
/**
* @param testName
@@ -140,7 +147,7 @@
.getAbsolutePath());
DeployPortletAppEventListener dpal = new
DeployPortletAppEventListener(webAppsDir, new FileSystemPAM(
- webAppsDir, portletRegistry, entityAccess, windowAccess),
portletRegistry );
+ webAppsDir, portletRegistry, entityAccess, windowAccess,
portletCache), portletRegistry, portletFactory );
ArrayList eventListeners = new ArrayList(2);
eventListeners.add(ddel);
eventListeners.add(dpal);
@@ -174,7 +181,7 @@
PortletDefinition def = (PortletDefinition) portletDefItr.next();
try
{
- Portlet portlet =
JetspeedPortletFactory.loadPortletClass(def.getClassName());
+ Portlet portlet =
JetspeedPortletFactoryProxy.loadPortletClass(def.getClassName());
assertNotNull(portlet);
}
catch (Exception e)
@@ -236,7 +243,7 @@
public void testUndeployVersusRedeploy() throws Exception
{
DeployPortletAppEventListener dpal = new
DeployPortletAppEventListener(webAppsDir, new FileSystemPAM(
- webAppsDir, portletRegistry, entityAccess, windowAccess),
portletRegistry );
+ webAppsDir, portletRegistry, entityAccess, windowAccess,
portletCache), portletRegistry, portletFactory );
ArrayList eventListeners = new ArrayList(1);
eventListeners.add(dpal);
@@ -382,6 +389,10 @@
copyDeployables();
windowAccess = new PortletWindowAccessorImpl(entityAccess);
+
+ portletCache = new PortletCache();
+ portletFactory = new JetspeedPortletFactory(portletCache);
+ new JetspeedPortletFactoryProxy(portletFactory);
}
catch (Exception e)
@@ -446,7 +457,7 @@
*/
public void tearDown() throws Exception
{
- FileSystemPAM pam = new FileSystemPAM(webAppsDir, portletRegistry,
entityAccess, windowAccess);
+ FileSystemPAM pam = new FileSystemPAM(webAppsDir, portletRegistry,
entityAccess, windowAccess, portletCache);
try
{
@@ -476,6 +487,7 @@
// DirectoryUtils.rmdir(new File("./target/deployment"));
new DirectoryHelper(new File("./target/deployment")).remove();
+ JetspeedPortletFactoryProxy.reset();
super.tearDown();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]