You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by cd...@apache.org on 2007/11/11 00:19:36 UTC
svn commit: r593821 - in
/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src: assemble/
main/java/org/apache/pluto/util/ main/resources/org/apache/pluto/core/
main/resources/org/apache/pluto/core/impl/
main/resources/org/apache/pluto/intern...
Author: cdoremus
Date: Sat Nov 10 15:19:29 2007
New Revision: 593821
URL: http://svn.apache.org/viewvc?rev=593821&view=rev
Log:
Missed these additions and modifications for PLUTO-404.
Added:
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/ClasspathScanner.java
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java
Removed:
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/spi/optional/UserInfoAttributesServicesImplTest.java
Modified:
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/LocalStrings.properties
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/impl/LocalStrings.properties
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/pluto-configuration.properties
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/LocalStrings.properties
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/impl/LocalStrings.properties
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/site.xml
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/embed.xml
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/getting-started.xml
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/EnvironmentTest.java
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/ArgumentUtilityTest.java
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/PlutoTestCase.java
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/StringUtilsTest.java
portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/impl/NamespaceMapperImplTest.java
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/assemble/bin.xml Sat Nov 10 15:19:29 2007
@@ -1,9 +1,10 @@
<!--
- Copyright 2005-2006 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/ClasspathScanner.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/ClasspathScanner.java?rev=593821&view=auto
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/ClasspathScanner.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/ClasspathScanner.java Sat Nov 10 15:19:29 2007
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+public class ClasspathScanner {
+
+ private static final Log LOG = LogFactory.getLog(ClasspathScanner.class);
+
+ /**
+ * Retrieve a lit of all urls matching the specified
+ * path.
+ *
+ * @param path
+ * @return
+ * @throws IOException
+ */
+ public static List scan(String path) throws IOException {
+ List list = scan(path, ClasspathScanner.class.getClassLoader());
+ list.addAll(scan(path, Thread.currentThread().getContextClassLoader()));
+ list.add(ClasspathScanner.class.getResource(path));
+
+ if(LOG.isInfoEnabled()) {
+ LOG.info("Found "+list.size()+" resources for path '"+path+"'.");
+ }
+
+ return list;
+ }
+
+ /**
+ * Retrieve a list of all urls massing the specified path
+ * for the specified classloader.
+ *
+ * @param path
+ * @param loader
+ * @return
+ * @throws IOException
+ */
+ public static List scan(String path, ClassLoader loader) throws IOException {
+ ArrayList list = new ArrayList();
+ if (loader == null) {
+ return list;
+ }
+
+ Enumeration enumeration = loader.getResources(path);
+ while (enumeration.hasMoreElements()) {
+ list.add(enumeration.nextElement());
+ }
+ return list;
+ }
+
+ /**
+ * Mechanism for finding all implementations of the specified
+ * interface. This method is used for resolving low level
+ * implementations of interfaces needed by static and/or non
+ * services. These implementations are not bound to their
+ * container, but instead, are bound to the global application
+ * environment.
+ *
+ * @param implemented interface implemnted by configured impls
+ * @return list of classes
+ * @throws java.io.IOException if an error occurs during classpath scanning.
+ */
+ public static List findConfiguredImplementations(Class implemented)
+ throws IOException {
+ List classes = new ArrayList();
+ List resources = scan("/META-INF/pluto.properties");
+ Iterator i = resources.iterator();
+
+ Properties p = new Properties();
+ while (i.hasNext()) {
+ URL url = (URL) i.next();
+ p.load(url.openStream());
+ String impl = p.getProperty(implemented.getName());
+ if (impl != null) {
+ StringTokenizer st = new StringTokenizer(impl, ",", false);
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken().trim();
+ if (token.length() > 0) {
+ try {
+ classes.add(Class.forName(token));
+ } catch (ClassNotFoundException cnfe) {
+ LOG.warn("Unable to find configured implementation " + impl + " of interface " + implemented.getName());
+ }
+ }
+ }
+ }
+ p.clear();
+ }
+ return classes;
+ }
+}
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/LocalStrings.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/LocalStrings.properties?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/LocalStrings.properties (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/LocalStrings.properties Sat Nov 10 15:19:29 2007
@@ -1,8 +1,10 @@
#
-# Copyright 2005 The Apache Software Foundation
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/impl/LocalStrings.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/impl/LocalStrings.properties?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/impl/LocalStrings.properties (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/impl/LocalStrings.properties Sat Nov 10 15:19:29 2007
@@ -1,8 +1,10 @@
#
-# Copyright 2005 The Apache Software Foundation
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/pluto-configuration.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/pluto-configuration.properties?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/pluto-configuration.properties (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/core/pluto-configuration.properties Sat Nov 10 15:19:29 2007
@@ -1,8 +1,10 @@
#
-# Copyright 2005 The Apache Software Foundation
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/LocalStrings.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/LocalStrings.properties?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/LocalStrings.properties (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/LocalStrings.properties Sat Nov 10 15:19:29 2007
@@ -1,8 +1,10 @@
#
-# Copyright 2006 The Apache Software Foundation
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@@ -16,5 +18,5 @@
#
######################################################################
-error.context.descriptor.load=Error loading context: {0}
+error.context.descriptor.load=Error loading portlet.xml at context {0}. Please validate the file structure of this portlet's portlet.xml file.
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/impl/LocalStrings.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/impl/LocalStrings.properties?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/impl/LocalStrings.properties (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/resources/org/apache/pluto/internal/impl/LocalStrings.properties Sat Nov 10 15:19:29 2007
@@ -1,8 +1,10 @@
#
-# Copyright 2006 The Apache Software Foundation
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/site.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/site.xml?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/site.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/site.xml Sat Nov 10 15:19:29 2007
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-Copyright 2004 The Apache Software Foundation
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@@ -26,6 +28,12 @@
<bannerRight>
<src>http://portals.apache.org/pluto/images/banner.png</src>
</bannerRight>
+
+ <skin>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>pluto-site-skin</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </skin>
<body>
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/embed.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/embed.xml?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/embed.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/embed.xml Sat Nov 10 15:19:29 2007
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-Copyright 2004 The Apache Software Foundation
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@@ -20,7 +22,6 @@
<properties>
<title>Embedding the Pluto Container</title>
- <author email="ddewolf@apache.org">David DeWolf</author>
</properties>
<body>
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/getting-started.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/getting-started.xml?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/getting-started.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/site/xdoc/getting-started.xml Sat Nov 10 15:19:29 2007
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-Copyright 2004 The Apache Software Foundation
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@@ -20,7 +22,6 @@
<properties>
<title>Getting Started</title>
- <author email="ddewolf@apache.org">David DeWolf</author>
</properties>
<body>
Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java?rev=593821&view=auto
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java Sat Nov 10 15:19:29 2007
@@ -0,0 +1,48 @@
+package org.apache.pluto.core;
+
+import junit.framework.TestCase;
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.PortletWindowID;
+
+import javax.portlet.WindowState;
+import javax.portlet.PortletMode;
+
+
+public class ContainerInvocationTest extends TestCase
+{
+ private static PortletContainerImpl container =
+ new PortletContainerImpl("test", null, null);
+
+ public void testSetInvocation()
+ {
+ ContainerInvocation.setInvocation(container, new PortletWindow() {
+
+ public PortletWindowID getId() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getContextPath() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public String getPortletName() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public WindowState getWindowState() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public PortletMode getPortletMode() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+ });
+
+ }
+
+ public void testClearInvocation()
+ {
+ ContainerInvocation.clearInvocation();
+ }
+
+}
Added: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java?rev=593821&view=auto
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java (added)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java Sat Nov 10 15:19:29 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.core;
+
+import java.net.MalformedURLException;
+
+import javax.servlet.ServletContext;
+
+import junit.framework.TestCase;
+
+
+public class PortletContextManagerTest extends TestCase {
+
+ private PortletContextManager manager;
+ private ServletContext context;
+
+ public void setUp() {
+ /* Java5 Required!
+ context = EasyMock.createMock(ServletContext.class);
+ */
+ manager = PortletContextManager.getManager();
+ }
+
+ public void testComputeContextPath() throws MalformedURLException {
+ /* Java5 Required!
+ URL url = new URL("file://usr/local/apache-tomcat-5.1.19/webapps/my-test-context/WEB-INF/web.xml");
+ EasyMock.expect(context.getResource("/WEB-INF/web.xml")).andReturn(url);
+ EasyMock.replay(context);
+ assertEquals("/my-test-context", manager.computeContextPath(context));
+ EasyMock.verify(context);
+
+
+ EasyMock.reset(context);
+ url = new URL("file://usr/local/apache-tomcat-5.1.19/webapps/my-test-context.war!/WEB-INF/web.xml");
+ EasyMock.expect(context.getResource("/WEB-INF/web.xml")).andReturn(url);
+ EasyMock.replay(context);
+ assertEquals("/my-test-context", manager.computeContextPath(context));
+ */
+ }
+}
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/EnvironmentTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/EnvironmentTest.java?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/EnvironmentTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/EnvironmentTest.java Sat Nov 10 15:19:29 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -22,7 +23,6 @@
/**
* Test Class
*
- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
* @version 1.0
* @since June 1, 2005
*/
@@ -36,11 +36,15 @@
}
public void testContainerMajorVersion() {
- assertEquals(props.getProperty("pluto.container.version.major"), Environment.getPortletContainerMajorVersion());
+ assertEquals("1", Environment.getPortletContainerMajorVersion());
}
public void testContainerMinorVersion() {
- assertEquals(props.getProperty("pluto.container.version.minor"), Environment.getPortletContainerMinorVersion());
+ assertTrue(Environment.getPortletContainerVersion().endsWith(Environment.getPortletContainerMinorVersion()));
+ }
+
+ public void testContainerVersion() {
+ assertEquals(props.getProperty("pluto.container.version"), Environment.getPortletContainerVersion());
}
public void testContainerName() {
@@ -57,7 +61,6 @@
public void testServerInfo() {
assertContains("Server Info does not contain container name.", props.getProperty("pluto.container.name"), Environment.getServerInfo());
- assertContains("Server Info does not contain container name.", props.getProperty("pluto.container.version.major"), Environment.getServerInfo());
- assertContains("Server Info does not contain container name.", props.getProperty("pluto.container.version.minor"), Environment.getServerInfo());
+ assertContains("Server Info does not contain container name.", props.getProperty("pluto.container.version"), Environment.getServerInfo());
}
}
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java Sat Nov 10 15:19:29 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -27,7 +28,6 @@
/**
* Unit test for the resource bundle factory.
- * @author ddewolf@apache.org
* @since Jul 30, 2005
*/
public class ResourceBundleFactoryTest extends PlutoTestCase {
@@ -44,7 +44,7 @@
info.setShortTitle("Info Short Title");
info.setKeywords("Info Keywords");
validDD.setPortletInfo(info);
-
+
validDD.setResourceBundle(TestResourceBundle.class.getName());
}
@@ -117,7 +117,7 @@
public static class TestResourceBundle extends ListResourceBundle {
-
+
private Object[][] contents = {
{"javax.portlet.title", "Bundle Title"},
{"javax.portlet.short-title", "Bundle Short Title"},
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/ArgumentUtilityTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/ArgumentUtilityTest.java?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/ArgumentUtilityTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/ArgumentUtilityTest.java Sat Nov 10 15:19:29 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -20,7 +21,6 @@
/**
* Test Class
*
- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
* @version 1.0
* @since June 1, 2005
*/
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/PlutoTestCase.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/PlutoTestCase.java?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/PlutoTestCase.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/PlutoTestCase.java Sat Nov 10 15:19:29 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -23,7 +24,6 @@
/**
* Test Class
*
- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
* @version 1.0
* @since June 1, 2005
*/
@@ -66,6 +66,6 @@
String testString) {
if (testString.indexOf(expectedSubstring) < 0) {
fail(message);
- }
+ }
}
}
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/StringUtilsTest.java?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/StringUtilsTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/StringUtilsTest.java Sat Nov 10 15:19:29 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -21,7 +22,6 @@
/**
* Test Class
*
- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
* @version 1.0
* @since June 1, 2005
*/
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/impl/NamespaceMapperImplTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/impl/NamespaceMapperImplTest.java?rev=593821&r1=593820&r2=593821&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/impl/NamespaceMapperImplTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/test/java/org/apache/pluto/util/impl/NamespaceMapperImplTest.java Sat Nov 10 15:19:29 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -22,7 +23,6 @@
/**
* Test Class
*
- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
* @version 1.0
* @since June 1, 2005
*/
@@ -61,10 +61,10 @@
}
private static int objectIDCounter = 1;
-
-
+
+
private class InternalPortletWindowID implements PortletWindowID {
-
+
private int id;
public InternalPortletWindowID() {