From afec362f9a9d56365c23e222959ddaf88c591def Mon Sep 17 00:00:00 2001 From: Dave Ward Date: Mon, 23 Nov 2009 20:20:06 +0000 Subject: [PATCH] Merged BRANCHES/DEV/DAVEW/SPRING3 to HEAD 15422: Fix deploy-virtual-tomcat macro for Spring 3 15391: Fix ContentStoreReplicatorTest for Spring 3 15390: Upgrade CXF to version 2.2.2 for Spring 3 compatibility 15385: Correction to previous checkin 15384: Fix ClassPathStore.createRelative() to work with Spring 3 - Relative resource path resolution with directory resources has changed 15346: Merged V3.3_SPRING3 to SPRING3 15310: Spring 3: Change to the way that FileContentStore broadcasts its existence to interested parties (for enterprise-only monitoring) - Introduced new SafeEventPublisher singleton that queues up events until after the application context has finished refreshing 15309: Use AUTODETECT_NONE auto detect mode for JMX exporters to be compatible with Spring 3 15308: Fix IBATIS integration to be compatible with Spring 3 15307: Added missing runtime dependencies - org.springframework.expression-3.0.0.RC2.jar - org.springframework.asm-3.0.0.RC2.jar 15289: Move Alfresco stack to Spring 3 - Stage 1: get it compiling in eclipse and update ant scripts - Still requires Web Framework contributions from Uzi git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17624 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../web/config/ConfigAdminInterpreter.java | 4 +- .../org/alfresco/web/forms/FormsTest.java | 49 +++++++++---------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/source/java/org/alfresco/web/config/ConfigAdminInterpreter.java b/source/java/org/alfresco/web/config/ConfigAdminInterpreter.java index 0d67c014b6..2ee9a4ebed 100755 --- a/source/java/org/alfresco/web/config/ConfigAdminInterpreter.java +++ b/source/java/org/alfresco/web/config/ConfigAdminInterpreter.java @@ -31,12 +31,12 @@ import java.io.PrintStream; import java.util.List; import org.alfresco.config.ConfigDeployment; +import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.i18n.I18NUtil; import org.alfresco.repo.admin.BaseInterpreter; import org.alfresco.repo.config.xml.RepoXMLConfigService; import org.alfresco.service.transaction.TransactionService; import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.io.ClassPathResource; /** @@ -63,7 +63,7 @@ public class ConfigAdminInterpreter extends BaseInterpreter */ public static void main(String[] args) { - ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"classpath:alfresco/application-context.xml","classpath:alfresco/web-client-application-context.xml"}); + ApplicationContext context = new FixedClassPathXmlApplicationContext(new String[] {"classpath:alfresco/application-context.xml","classpath:alfresco/web-client-application-context.xml"}); runMain(context, "webClientConfigAdminInterpreter"); } diff --git a/source/java/org/alfresco/web/forms/FormsTest.java b/source/java/org/alfresco/web/forms/FormsTest.java index 901e2446bd..bf48496927 100644 --- a/source/java/org/alfresco/web/forms/FormsTest.java +++ b/source/java/org/alfresco/web/forms/FormsTest.java @@ -24,40 +24,35 @@ */ package org.alfresco.web.forms; -import java.io.*; -import java.util.*; -import org.alfresco.service.namespace.QName; +import java.io.Serializable; +import java.util.Calendar; +import java.util.HashMap; + +import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.model.WCMAppModel; -import junit.framework.AssertionFailedError; -import org.alfresco.service.cmr.repository.*; -import org.alfresco.service.namespace.NamespaceService; +import org.alfresco.repo.security.authentication.AuthenticationUtil; +import org.alfresco.repo.security.authentication.MutableAuthenticationDao; +import org.alfresco.service.cmr.model.FileFolderService; +import org.alfresco.service.cmr.model.FileInfo; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.repository.NodeService; +import org.alfresco.service.cmr.repository.StoreRef; +import org.alfresco.service.cmr.security.AuthenticationService; +import org.alfresco.service.namespace.QName; import org.alfresco.util.BaseSpringTest; -import org.alfresco.web.forms.XMLUtil; -import org.apache.commons.jxpath.JXPathContext; -import org.apache.commons.jxpath.Pointer; +import org.alfresco.util.TestWithUserUtils; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.chiba.xml.ns.NamespaceConstants; -import org.chiba.xml.events.XFormsEventNames; -import org.chiba.xml.events.XMLEvent; -import org.chiba.xml.xforms.ChibaBean; -import org.chiba.xml.xforms.exception.XFormsException; -import org.chiba.xml.xforms.XFormsElement; -import org.chiba.xml.events.DOMEventNames; -import org.w3c.dom.*; -import org.w3c.dom.events.*; -import org.xml.sax.*; -import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.apache.shale.test.mock.MockExternalContext; +import org.apache.shale.test.mock.MockFacesContext; +import org.apache.shale.test.mock.MockHttpServletRequest; +import org.apache.shale.test.mock.MockHttpServletResponse; +import org.apache.shale.test.mock.MockServletContext; import org.springframework.context.ConfigurableApplicationContext; -import org.alfresco.service.cmr.security.AuthenticationService; -import org.alfresco.service.cmr.model.*; -import org.alfresco.repo.security.authentication.AuthenticationUtil; -import org.alfresco.repo.security.authentication.MutableAuthenticationDao; -import org.alfresco.util.TestWithUserUtils; -import org.apache.shale.test.mock.*; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.StaticWebApplicationContext; +import org.w3c.dom.Document; /** * JUnit tests to exercise parts of the forms codebase @@ -168,7 +163,7 @@ public class FormsTest protected ConfigurableApplicationContext loadContext(Object key) throws Exception { - return new ClassPathXmlApplicationContext((String[])key); + return new FixedClassPathXmlApplicationContext((String[])key); } public void testOutputPathPatternForFormInstanceData()