Author: julien(a)jboss.com
Date: 2008-02-02 19:39:42 -0500 (Sat, 02 Feb 2008)
New Revision: 9716
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/AbstractPortletFilter.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/AbstractRenderFilter.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/FilterConfigFilter.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/FilterConfigTestCase.java
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/portlet.xml
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/web.xml
Removed:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractPortletFilter.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractRenderFilter.java
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/FilterConfigImpl.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/Filter1.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PortletFilterCounter.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/TraceFilter.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/WildcardTestCase.java
modules/portlet/trunk/test/src/test/build.xml
modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
Log:
- test case for filter config
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java 2008-02-02
23:18:06 UTC (rev 9715)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -213,7 +213,7 @@
context.getClassLoader(),
className,
"filter",
- filterInfo.getName());
+ filterInfo);
//
lifeCycle.create();
@@ -352,24 +352,24 @@
{
/** . */
- private final String filterName;
+ private final ContainerFilterInfo info;
private FilterLifecycle(
Class<PortletFilter> expectedClass,
ClassLoader classLoader,
String className,
String type,
- String filterName)
+ ContainerFilterInfo info)
{
super(log, expectedClass, classLoader, className, type);
//
- this.filterName = filterName;
+ this.info = info;
}
public void start(PortletFilter instance) throws Exception
{
- FilterConfigImpl config = new FilterConfigImpl(filterName, portletContext);
+ FilterConfigImpl config = new FilterConfigImpl(info, portletContext);
//
instance.init(config);
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/FilterConfigImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/FilterConfigImpl.java 2008-02-02
23:18:06 UTC (rev 9715)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/FilterConfigImpl.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -23,10 +23,12 @@
package org.jboss.portal.portlet.impl.jsr168.api;
import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.portlet.impl.info.ContainerFilterInfo;
import javax.portlet.filter.FilterConfig;
import javax.portlet.PortletContext;
import java.util.Enumeration;
+import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -36,20 +38,20 @@
{
/** . */
- private final String name;
+ private final ContainerFilterInfo filterInfo;
/** . */
private final PortletContext context;
- public FilterConfigImpl(String name, PortletContext context)
+ public FilterConfigImpl(ContainerFilterInfo filterInfo, PortletContext context)
{
- this.name = name;
+ this.filterInfo = filterInfo;
this.context = context;
}
public String getFilterName()
{
- return name;
+ return filterInfo.getName();
}
public PortletContext getPortletContext()
@@ -57,13 +59,20 @@
return context;
}
- public String getInitParameter(String s)
+ public String getInitParameter(String name)
{
- throw new NotYetImplemented();
+ if (name != null)
+ {
+ return filterInfo.getParameters().get(name);
+ }
+ else
+ {
+ return null;
+ }
}
public Enumeration getInitParameterNames()
{
- throw new NotYetImplemented();
+ return Collections.enumeration(filterInfo.getParameters().keySet());
}
}
Copied:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/AbstractPortletFilter.java
(from rev 9715,
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractPortletFilter.java)
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/AbstractPortletFilter.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/AbstractPortletFilter.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.common;
+
+import javax.portlet.filter.FilterConfig;
+import javax.portlet.PortletException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class AbstractPortletFilter
+{
+
+ /** . */
+ private FilterConfig config;
+
+ public void init(FilterConfig config) throws PortletException
+ {
+ this.config = config;
+ }
+
+ public void destroy()
+ {
+ this.config = null;
+ }
+
+ protected FilterConfig getConfig()
+ {
+ return config;
+ }
+
+ protected String getName()
+ {
+ if (config != null)
+ {
+ return config.getFilterName();
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
Copied:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/AbstractRenderFilter.java
(from rev 9715,
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractRenderFilter.java)
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/AbstractRenderFilter.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/common/AbstractRenderFilter.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.common;
+
+import javax.portlet.filter.RenderFilter;
+import javax.portlet.filter.FilterChain;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class AbstractRenderFilter extends AbstractPortletFilter implements RenderFilter
+{
+ public void doFilter(RenderRequest req, RenderResponse resp, FilterChain chain) throws
IOException, PortletException
+ {
+ chain.doFilter(req, resp);
+ }
+}
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/FilterConfigFilter.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/FilterConfigFilter.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/FilterConfigFilter.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.ext.portletfilter;
+
+import org.jboss.portal.test.portlet.jsr286.common.AbstractRenderFilter;
+
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.filter.FilterChain;
+import java.io.IOException;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Enumeration;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class FilterConfigFilter extends AbstractRenderFilter
+{
+
+ /** . */
+ public static String name;
+
+ /** . */
+ public static Map<String, String> parameters;
+
+ public void init(javax.portlet.filter.FilterConfig config) throws PortletException
+ {
+ super.init(config);
+
+ //
+ HashMap<String, String> tmp = new HashMap<String, String>();
+ for (Enumeration e = config.getInitParameterNames();e.hasMoreElements();)
+ {
+ String name = (String)e.nextElement();
+ String value = config.getInitParameter(name);
+ tmp.put(name, value);
+ }
+
+ //
+ name = config.getFilterName();
+ parameters = tmp;
+ }
+
+ public void doFilter(RenderRequest req, RenderResponse resp, FilterChain chain) throws
IOException, PortletException
+ {
+ chain.doFilter(req, resp);
+ }
+}
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/FilterConfigTestCase.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/FilterConfigTestCase.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/ext/portletfilter/FilterConfigTestCase.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.ext.portletfilter;
+
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.common.util.MapBuilder;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.*;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import java.io.IOException;
+
+/**
+ * Test that the init parameters of a filter are correct.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+@TestCase()
+public class FilterConfigTestCase
+{
+ public FilterConfigTestCase(PortletTestCase seq)
+ {
+ seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request,
RenderResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ assertEquals("FilterConfigFilter", FilterConfigFilter.name);
+ assertEquals(MapBuilder.hashMap("foo",
"foo_value").put("bar", "bar_value").get(),
FilterConfigFilter.parameters);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractPortletFilter.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractPortletFilter.java 2008-02-02
23:18:06 UTC (rev 9715)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractPortletFilter.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -1,64 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.test.portlet.jsr286.tck.portletfilter;
-
-import javax.portlet.filter.FilterConfig;
-import javax.portlet.PortletException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class AbstractPortletFilter
-{
-
- /** . */
- private FilterConfig config;
-
- public void init(FilterConfig config) throws PortletException
- {
- this.config = config;
- }
-
- public void destroy()
- {
- this.config = null;
- }
-
- protected FilterConfig getConfig()
- {
- return config;
- }
-
- protected String getName()
- {
- if (config != null)
- {
- return config.getFilterName();
- }
- else
- {
- return null;
- }
- }
-}
Deleted:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractRenderFilter.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractRenderFilter.java 2008-02-02
23:18:06 UTC (rev 9715)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/AbstractRenderFilter.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -1,42 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.test.portlet.jsr286.tck.portletfilter;
-
-import javax.portlet.filter.RenderFilter;
-import javax.portlet.filter.FilterChain;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class AbstractRenderFilter extends AbstractPortletFilter implements RenderFilter
-{
- public void doFilter(RenderRequest req, RenderResponse resp, FilterChain chain) throws
IOException, PortletException
- {
- chain.doFilter(req, resp);
- }
-}
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/Filter1.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/Filter1.java 2008-02-02
23:18:06 UTC (rev 9715)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/Filter1.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr286.tck.portletfilter;
+import org.jboss.portal.test.portlet.jsr286.common.AbstractRenderFilter;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PortletFilterCounter.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PortletFilterCounter.java 2008-02-02
23:18:06 UTC (rev 9715)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PortletFilterCounter.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr286.tck.portletfilter;
+import org.jboss.portal.test.portlet.jsr286.common.AbstractRenderFilter;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/TraceFilter.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/TraceFilter.java 2008-02-02
23:18:06 UTC (rev 9715)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/TraceFilter.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr286.tck.portletfilter;
+import org.jboss.portal.test.portlet.jsr286.common.AbstractPortletFilter;
+
import javax.portlet.filter.ActionFilter;
import javax.portlet.filter.EventFilter;
import javax.portlet.filter.RenderFilter;
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/WildcardTestCase.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/WildcardTestCase.java 2008-02-02
23:18:06 UTC (rev 9715)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/WildcardTestCase.java 2008-02-03
00:39:42 UTC (rev 9716)
@@ -53,7 +53,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-(a)TestCase({Assertion.JSR286_298})
+(a)TestCase({Assertion.JSR286_298,Assertion.JSR286_300})
public class WildcardTestCase
{
public WildcardTestCase(PortletTestCase seq)
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-02-02 23:18:06 UTC (rev 9715)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-02-03 00:39:42 UTC (rev 9716)
@@ -263,6 +263,12 @@
includes="org/jboss/portal/test/portlet/@{testsuiteversion}/@{testsuitetype}/common/**"/>
<fileset
dir="${test.temp.portlet}"
+
includes="org/jboss/portal/test/portlet/@{testsuiteversion}/common/**"/>
+ <fileset
+ dir="${test.temp.portlet}"
+ includes="org/jboss/portal/test/portlet/common/**"/>
+ <fileset
+ dir="${test.temp.portlet}"
includes="org/jboss/portal/test/portlet/@{testsuiteversion}/@{testsuitetype}/@{testsuitename}/**"/>
<fileset
dir="${test.temp.portlet}"
@@ -361,6 +367,7 @@
<package-jsr286-tck-test test="portletfilter"/>
<package-jsr286-api-test test="event"/>
<package-jsr286-ext-test test="portletrequests"/>
+ <package-jsr286-ext-test test="portletfilter"/>
<package-jsr286-ext-test test="portletresponses"/>
<package-jsr286-ext-test test="dispatcher"/>
Added:
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/portlet.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/portlet.xml
(rev 0)
+++
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/portlet.xml 2008-02-03
00:39:42 UTC (rev 9716)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2...
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+
+ <portlet>
+ <portlet-name>UniversalTestPortletA</portlet-name>
+
<portlet-class>org.jboss.portal.test.portlet.framework.UTP1</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ </portlet>
+
+ <filter>
+ <filter-name>FilterConfigFilter</filter-name>
+
<filter-class>org.jboss.portal.test.portlet.jsr286.ext.portletfilter.FilterConfigFilter</filter-class>
+ <lifecycle>RENDER_PHASE</lifecycle>
+ <init-param>
+ <name>foo</name>
+ <value>foo_value</value>
+ </init-param>
+ <init-param>
+ <name>bar</name>
+ <value>bar_value</value>
+ </init-param>
+ </filter>
+
+</portlet-app>
Added:
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/web.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/web.xml
(rev 0)
+++
modules/portlet/trunk/test/src/test/resources/jsr286/ext/portletfilter-war/WEB-INF/web.xml 2008-02-03
00:39:42 UTC (rev 9716)
@@ -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.unit.PortletTestSuite</listener-class>
+ </listener>
+</web-app>
Modified: modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-02-02
23:18:06 UTC (rev 9715)
+++ modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-02-03
00:39:42 UTC (rev 9716)
@@ -207,6 +207,10 @@
<class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId"
value="test-jsr286-ext-dispatcher.war"/>
</generic>
+ <generic>
+ <class
name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
+ <property name="archiveId"
value="test-jsr286-ext-portletfilter.war"/>
+ </generic>
<!--Misc Tests-->
<!--