Author: thomas.heute(a)jboss.com
Date: 2008-06-30 06:09:21 -0400 (Mon, 30 Jun 2008)
New Revision: 11201
Added:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/EmptyPortletInterceptorStackFactory.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/JBossPortletInterceptorStack.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/JBossPortletInterceptorStackFactory.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/PortletInterceptorStack.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/PortletInterceptorStackFactory.java
Removed:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml
branches/JBoss_Portal_Branch_2_7/portlet-server/.classpath
branches/JBoss_Portal_Branch_2_7/server/.classpath
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml
Log:
Moving JBossPortletInterceptorsStack from server to portlet-server
(Removing 'portlet' dependency from 'server'
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -34,6 +34,8 @@
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.PortletInvokerInterceptor;
+import org.jboss.portal.portlet.impl.invocation.PortletInterceptorStack;
+import org.jboss.portal.portlet.impl.invocation.PortletInterceptorStackFactory;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.state.DestroyCloneFailure;
@@ -50,8 +52,6 @@
import org.jboss.portal.security.spi.provider.PermissionFactory;
import org.jboss.portal.security.spi.provider.PermissionRepository;
import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
-import org.jboss.portal.server.impl.invocation.PortletInterceptorStack;
-import org.jboss.portal.server.impl.invocation.PortletInterceptorStackFactory;
import java.util.ArrayList;
import java.util.Collection;
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-06-30
10:09:21 UTC (rev 11201)
@@ -261,7 +261,7 @@
<xmbean/>
</mbean>
- <mbean
code="org.jboss.portal.server.impl.invocation.JBossPortletInterceptorStackFactory"
+ <mbean
code="org.jboss.portal.portlet.impl.invocation.JBossPortletInterceptorStackFactory"
name="portal:service=InterceptorStackFactory,type=Instance"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -340,7 +340,7 @@
</mbean>
- <mbean
code="org.jboss.portal.server.impl.invocation.JBossPortletInterceptorStackFactory"
+ <mbean
code="org.jboss.portal.portlet.impl.invocation.JBossPortletInterceptorStackFactory"
name="portal:service=InterceptorStackFactory,type=Producer"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml 2008-06-30
10:09:21 UTC (rev 11201)
@@ -99,7 +99,7 @@
<property name="stateConverter"><inject
bean="StateConverter"/></property>
</bean>
- <bean name="StackFactory"
class="org.jboss.portal.server.impl.invocation.EmptyPortletInterceptorStackFactory"/>
+ <bean name="StackFactory"
class="org.jboss.portal.portlet.impl.invocation.EmptyPortletInterceptorStackFactory"/>
<bean name="ContainerContext"
class="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceContainerContext">
<property
name="sessionFactoryJNDIName">java:/InstanceSessionFactory</property>
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml 2008-06-30
10:09:21 UTC (rev 11201)
@@ -98,7 +98,7 @@
<property name="stateConverter"><inject
bean="StateConverter"/></property>
</bean>
- <bean name="StackFactory"
class="org.jboss.portal.server.impl.invocation.EmptyPortletInterceptorStackFactory"/>
+ <bean name="StackFactory"
class="org.jboss.portal.portlet.impl.invocation.EmptyPortletInterceptorStackFactory"/>
<bean name="ContainerContext"
class="org.jboss.portal.core.impl.model.instance.TransientContainerContext"/>
<bean name="InstanceContainer"
class="org.jboss.portal.core.impl.model.instance.InstanceContainerImpl">
<property name="cloneOnCreate"><inject
bean="TestCaseConfig" property="cloneOnCreate"/></property>
Modified: branches/JBoss_Portal_Branch_2_7/portlet-server/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/.classpath 2008-06-30 10:06:51 UTC
(rev 11200)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/.classpath 2008-06-30 10:09:21 UTC
(rev 11201)
@@ -19,5 +19,6 @@
<classpathentry kind="lib"
path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/jems"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Copied:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/EmptyPortletInterceptorStackFactory.java
(from rev 11157,
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java)
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/EmptyPortletInterceptorStackFactory.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/EmptyPortletInterceptorStackFactory.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -0,0 +1,37 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.impl.invocation;
+
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class EmptyPortletInterceptorStackFactory implements
PortletInterceptorStackFactory
+{
+ public PortletInterceptorStack getInterceptorStack()
+ {
+ return JBossPortletInterceptorStack.EMPTY_STACK;
+ }
+}
+
Copied:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/JBossPortletInterceptorStack.java
(from rev 11157,
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java)
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/JBossPortletInterceptorStack.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/JBossPortletInterceptorStack.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -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.portlet.impl.invocation;
+
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class JBossPortletInterceptorStack implements PortletInterceptorStack
+{
+
+ /** . */
+ public static final PortletInterceptorStack EMPTY_STACK = new
JBossPortletInterceptorStack(new PortletInvokerInterceptor[0]);
+
+ /** . */
+ private final PortletInvokerInterceptor[] interceptors;
+
+ public JBossPortletInterceptorStack(PortletInvokerInterceptor interceptor)
+ {
+ this.interceptors = new PortletInvokerInterceptor[]{interceptor};
+ }
+
+ public JBossPortletInterceptorStack(PortletInvokerInterceptor[] interceptors)
+ {
+ if (interceptors == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.interceptors = interceptors;
+ }
+
+ public int getLength()
+ {
+ return interceptors.length;
+ }
+
+ public PortletInvokerInterceptor getInterceptor(int index) throws
ArrayIndexOutOfBoundsException
+ {
+ return interceptors[index];
+ }
+}
+
Copied:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/JBossPortletInterceptorStackFactory.java
(from rev 11157,
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java)
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/JBossPortletInterceptorStackFactory.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/JBossPortletInterceptorStackFactory.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -0,0 +1,148 @@
+/******************************************************************************
+ * 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.impl.invocation;
+
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+import javax.management.ObjectName;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8784 $
+ */
+public class JBossPortletInterceptorStackFactory extends AbstractJBossService implements
PortletInterceptorStackFactory
+{
+
+ /** . */
+ protected List<ObjectName> interceptorNames;
+
+ /** . */
+ protected List<ObjectName> dynamicInterceptorNames;
+
+ /** . */
+ protected PortletInterceptorStack stack;
+
+ public JBossPortletInterceptorStackFactory()
+ {
+ interceptorNames = null;
+ dynamicInterceptorNames = new ArrayList<ObjectName>();
+ }
+
+ public List<ObjectName> getInterceptorNames()
+ {
+ return interceptorNames;
+ }
+
+ public void setInterceptorNames(List<ObjectName> interceptorNames)
+ {
+ this.interceptorNames = interceptorNames;
+ }
+
+ public List<ObjectName> getDynamicInterceptorNames()
+ {
+ return Collections.unmodifiableList(dynamicInterceptorNames);
+ }
+
+ /**
+ * Add's the supplied name to the list of interceptor names.
+ *
+ * @param name the intercptor's ObjectName.
+ * @throws Exception
+ */
+ public void addInterceptor(ObjectName name) throws Exception
+ {
+ dynamicInterceptorNames.add(name);
+ }
+
+ /**
+ * Remove's the supplied name from the list of interceptor names.
+ *
+ * @param name the intercptor's ObjectName.
+ * @throws Exception
+ */
+ public void removeInterceptor(ObjectName name) throws Exception
+ {
+ dynamicInterceptorNames.remove(name);
+ }
+
+ public void startService() throws Exception
+ {
+ rebuild();
+ }
+
+ /** Rebuild the interceptor stack. */
+ public void rebuild() throws Exception
+ {
+ List<ObjectName> names = new ArrayList<ObjectName>();
+
+ //
+ if (interceptorNames != null)
+ {
+ names.addAll(interceptorNames);
+ }
+
+ //
+ names.addAll(dynamicInterceptorNames);
+
+ //
+ log.debug("Building interceptor stack " + getName());
+ PortletInvokerInterceptor[] interceptors = new
PortletInvokerInterceptor[names.size()];
+ if (names.size() == 1)
+ {
+ ObjectName name = names.get(0);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor a =
(PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ interceptors[0] = a;
+ }
+ for (int i = 0; i < names.size()-1; i++)
+ {
+ ObjectName name = names.get(i);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor a =
(PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ name = names.get(i+1);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor b =
(PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ a.setNext(b);
+ interceptors[i] = a;
+ interceptors[i+1] = b;
+ }
+
+ //
+ stack = new JBossPortletInterceptorStack(interceptors);
+
+ }
+
+ public void stopService()
+ {
+ this.stack = JBossPortletInterceptorStack.EMPTY_STACK;
+ }
+
+ public PortletInterceptorStack getInterceptorStack()
+ {
+ return stack;
+ }
+}
Copied:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/PortletInterceptorStack.java
(from rev 11157,
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java)
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/PortletInterceptorStack.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/PortletInterceptorStack.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -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.portlet.impl.invocation;
+
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public interface PortletInterceptorStack
+{
+ /**
+ * Returns the stack length.
+ *
+ * @return the length
+ */
+ int getLength();
+
+ /**
+ * Return the interceptor at the specified index.
+ *
+ * @param index the interceptor index in the stack
+ * @return the specified interceptor
+ * @throws ArrayIndexOutOfBoundsException if the index is not valid
+ */
+ PortletInvokerInterceptor getInterceptor(int index) throws
ArrayIndexOutOfBoundsException;
+}
+
Copied:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/PortletInterceptorStackFactory.java
(from rev 11157,
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java)
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/PortletInterceptorStackFactory.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/interceptors/PortletInterceptorStackFactory.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * 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.impl.invocation;
+
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public interface PortletInterceptorStackFactory
+{
+ PortletInterceptorStack getInterceptorStack();
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_7/server/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/.classpath 2008-06-30 10:06:51 UTC (rev
11200)
+++ branches/JBoss_Portal_Branch_2_7/server/.classpath 2008-06-30 10:09:21 UTC (rev
11201)
@@ -16,6 +16,5 @@
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar"
sourcepath="/module-web"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/test/lib/portal-test-jboss-lib.jar"/>
- <classpathentry kind="lib"
path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"
sourcepath="/module-portlet-trunk"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Deleted:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -1,36 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2008, 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.server.impl.invocation;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
- * @version $Revision$
- */
-public class EmptyPortletInterceptorStackFactory implements
PortletInterceptorStackFactory
-{
- public PortletInterceptorStack getInterceptorStack()
- {
- return JBossPortletInterceptorStack.EMPTY_STACK;
- }
-}
-
Deleted:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStack.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -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.server.impl.invocation;
-
-import org.jboss.portal.portlet.PortletInvokerInterceptor;
-
-/**
- * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
- * @version $Revision$
- */
-public class JBossPortletInterceptorStack implements PortletInterceptorStack
-{
-
- /** . */
- public static final PortletInterceptorStack EMPTY_STACK = new
JBossPortletInterceptorStack(new PortletInvokerInterceptor[0]);
-
- /** . */
- private final PortletInvokerInterceptor[] interceptors;
-
- public JBossPortletInterceptorStack(PortletInvokerInterceptor interceptor)
- {
- this.interceptors = new PortletInvokerInterceptor[]{interceptor};
- }
-
- public JBossPortletInterceptorStack(PortletInvokerInterceptor[] interceptors)
- {
- if (interceptors == null)
- {
- throw new IllegalArgumentException();
- }
- this.interceptors = interceptors;
- }
-
- public int getLength()
- {
- return interceptors.length;
- }
-
- public PortletInvokerInterceptor getInterceptor(int index) throws
ArrayIndexOutOfBoundsException
- {
- return interceptors[index];
- }
-}
-
Deleted:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/JBossPortletInterceptorStackFactory.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -1,148 +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.server.impl.invocation;
-
-import org.jboss.portal.jems.as.system.AbstractJBossService;
-import org.jboss.portal.portlet.PortletInvokerInterceptor;
-
-import javax.management.ObjectName;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 8784 $
- */
-public class JBossPortletInterceptorStackFactory extends AbstractJBossService implements
PortletInterceptorStackFactory
-{
-
- /** . */
- protected List<ObjectName> interceptorNames;
-
- /** . */
- protected List<ObjectName> dynamicInterceptorNames;
-
- /** . */
- protected PortletInterceptorStack stack;
-
- public JBossPortletInterceptorStackFactory()
- {
- interceptorNames = null;
- dynamicInterceptorNames = new ArrayList<ObjectName>();
- }
-
- public List<ObjectName> getInterceptorNames()
- {
- return interceptorNames;
- }
-
- public void setInterceptorNames(List<ObjectName> interceptorNames)
- {
- this.interceptorNames = interceptorNames;
- }
-
- public List<ObjectName> getDynamicInterceptorNames()
- {
- return Collections.unmodifiableList(dynamicInterceptorNames);
- }
-
- /**
- * Add's the supplied name to the list of interceptor names.
- *
- * @param name the intercptor's ObjectName.
- * @throws Exception
- */
- public void addInterceptor(ObjectName name) throws Exception
- {
- dynamicInterceptorNames.add(name);
- }
-
- /**
- * Remove's the supplied name from the list of interceptor names.
- *
- * @param name the intercptor's ObjectName.
- * @throws Exception
- */
- public void removeInterceptor(ObjectName name) throws Exception
- {
- dynamicInterceptorNames.remove(name);
- }
-
- public void startService() throws Exception
- {
- rebuild();
- }
-
- /** Rebuild the interceptor stack. */
- public void rebuild() throws Exception
- {
- List<ObjectName> names = new ArrayList<ObjectName>();
-
- //
- if (interceptorNames != null)
- {
- names.addAll(interceptorNames);
- }
-
- //
- names.addAll(dynamicInterceptorNames);
-
- //
- log.debug("Building interceptor stack " + getName());
- PortletInvokerInterceptor[] interceptors = new
PortletInvokerInterceptor[names.size()];
- if (names.size() == 1)
- {
- ObjectName name = names.get(0);
- log.debug("Adding interceptor " + name + " to the stack");
- PortletInvokerInterceptor a =
(PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
- interceptors[0] = a;
- }
- for (int i = 0; i < names.size()-1; i++)
- {
- ObjectName name = names.get(i);
- log.debug("Adding interceptor " + name + " to the stack");
- PortletInvokerInterceptor a =
(PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
- name = names.get(i+1);
- log.debug("Adding interceptor " + name + " to the stack");
- PortletInvokerInterceptor b =
(PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
- a.setNext(b);
- interceptors[i] = a;
- interceptors[i+1] = b;
- }
-
- //
- stack = new JBossPortletInterceptorStack(interceptors);
-
- }
-
- public void stopService()
- {
- this.stack = JBossPortletInterceptorStack.EMPTY_STACK;
- }
-
- public PortletInterceptorStack getInterceptorStack()
- {
- return stack;
- }
-}
Deleted:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -1,49 +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.server.impl.invocation;
-
-import org.jboss.portal.portlet.PortletInvokerInterceptor;
-
-/**
- * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
- * @version $Revision$
- */
-public interface PortletInterceptorStack
-{
- /**
- * Returns the stack length.
- *
- * @return the length
- */
- int getLength();
-
- /**
- * Return the interceptor at the specified index.
- *
- * @param index the interceptor index in the stack
- * @return the specified interceptor
- * @throws ArrayIndexOutOfBoundsException if the index is not valid
- */
- PortletInvokerInterceptor getInterceptor(int index) throws
ArrayIndexOutOfBoundsException;
-}
-
Deleted:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStackFactory.java 2008-06-30
10:09:21 UTC (rev 11201)
@@ -1,34 +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.server.impl.invocation;
-
-/**
- * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
- * @version $Revision$
- */
-public interface PortletInterceptorStackFactory
-{
- PortletInterceptorStack getInterceptorStack();
-
-}
-
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml 2008-06-30
10:06:51 UTC (rev 11200)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml 2008-06-30
10:09:21 UTC (rev 11201)
@@ -72,7 +72,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
</mbean>
- <mbean
code="org.jboss.portal.server.impl.invocation.JBossPortletInterceptorStackFactory"
+ <mbean
code="org.jboss.portal.portlet.impl.invocation.JBossPortletInterceptorStackFactory"
name="portal:service=InterceptorStackFactory,type=Container"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>