JBoss Portal SVN: r7725 - in branches/JBoss_Portal_Branch_2_6: core-admin and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 17:21:55 -0400 (Wed, 11 Jul 2007)
New Revision: 7725
Modified:
branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_6/core-admin/build.xml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
Log:
Isolate myFaces inside the sar
Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-07-11 21:12:42 UTC (rev 7724)
+++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-07-11 21:21:55 UTC (rev 7725)
@@ -51,8 +51,10 @@
<componentref name="apache-ant" version="1.6.5"/>
<componentref name="jackrabbit" version="1.1.1"/>
<componentref name="apache-myfaces" version="1.1.1"/>
+ <componentref name="apache-beanutils" version="1.7.0"/>
<componentref name="apache-codec" version="1.3.0"/>
<componentref name="apache-collections" version="3.1"/>
+ <componentref name="apache-digester" version="1.6"/>
<!--<componentref name="apache-directory" version="mixed"/>-->
<componentref name="apache-fileupload" version="1.1.1"/>
<componentref name="apache-httpclient" version="3.0.1"/>
@@ -65,6 +67,7 @@
<componentref name="asm" version="1.5.3"/>
<componentref name="beanshell" version="1.3.0"/>
<componentref name="cglib" version="2.1.3"/>
+ <componentref name="commons-el" version="1.0"/>
<componentref name="dbunit" version="2.1"/>
<componentref name="dom4j" version="1.6.1jboss"/>
<componentref name="ehcache" version="1.2.2"/>
@@ -103,6 +106,7 @@
<componentref name="sun-jaf" version="1.0.2"/>
<componentref name="sun-javacc" version="3.2-portal"/>
<componentref name="sun-javamail" version="1.3.1"/>
+ <componentref name="sun-jsf" version="1.2.1_02"/>
<componentref name="sun-opends" version="snapshot"/>
<componentref name="sun-servlet" version="2.4"/>
<componentref name="xdoclet" version="1.2.3"/>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/build.xml 2007-07-11 21:12:42 UTC (rev 7724)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/build.xml 2007-07-11 21:21:55 UTC (rev 7725)
@@ -195,15 +195,17 @@
<fileset dir="${build.resources}/portal-admin-sar"/>
</copy>
<copy todir="${build.resources}/portal-admin.sar/lib">
- <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
- <!--<fileset dir="." includes="jsf-portlet.jar"/>-->
+ <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
- <!-- For JSF -->
- <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
- <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
- <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
- <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
+ <!-- For JSF -->
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar, myfaces-impl.jar, jstl.jar"/>
+ <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
+ <fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
+ <fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
+ <fileset dir="${el.el.lib}" includes="el-api.jar, el-ri.jar"/>
+ <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
</copy>
<copy todir="${build.resources}/portal-admin.sar/portal-admin.war">
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-sar/META-INF/jboss-service.xml 2007-07-11 21:12:42 UTC (rev 7724)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-sar/META-INF/jboss-service.xml 2007-07-11 21:21:55 UTC (rev 7725)
@@ -23,6 +23,10 @@
<server>
+ <loader-repository>
+ org.jboss.portal:loader=core-admin
+ </loader-repository>
+
<mbean
code="org.jboss.portal.core.model.instance.InstanceCommandFactory"
name="portal:commandFactory=Configurator"
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-11 21:12:42 UTC (rev 7724)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-11 21:21:55 UTC (rev 7725)
@@ -31,9 +31,9 @@
<description>Administration Portlet</description>
<portlet-name>AdminPortlet</portlet-name>
<display-name>Administration Portlet</display-name>
- <portlet-class>org.jboss.portal.faces.portlet.JSFMetaBridgePortlet</portlet-class>
+ <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
<init-param>
- <name>VIEW</name>
+ <name>default-view</name>
<value>/WEB-INF/jsf/objects.xhtml</value>
</init-param>
<supports>
@@ -49,9 +49,9 @@
<description>Dashboard Configurator Portlet</description>
<portlet-name>DashboardConfigPortlet</portlet-name>
<display-name>Dashboard Configurator Portlet</display-name>
- <portlet-class>org.jboss.portal.faces.portlet.JSFMetaBridgePortlet</portlet-class>
+ <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
<init-param>
- <name>VIEW</name>
+ <name>default-view</name>
<value>/WEB-INF/jsf/dashboard/dashboard.xhtml</value>
</init-param>
<expiration-cache>-1</expiration-cache>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-07-11 21:12:42 UTC (rev 7724)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-07-11 21:21:55 UTC (rev 7725)
@@ -80,10 +80,14 @@
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
+
+ <context-param>
+ <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
+ <param-value>true</param-value>
+ </context-param>
- <!-- The JSF meta bridge bootstrap -->
<listener>
- <display-name> Faces Meta Bridge Bootstrap</display-name>
- <listener-class>org.jboss.portal.faces.portlet.JSFMetaBridgeBootstrap</listener-class>
+ <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
+
</web-app>
16 years, 11 months
JBoss Portal SVN: r7724 - in branches/JBoss_Portal_Branch_2_6/wsrp: src/main/org/jboss/portal/test/wsrp/other and 4 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 17:12:42 -0400 (Wed, 11 Jul 2007)
New Revision: 7724
Added:
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/
Removed:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/admin/
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/jboss-portlet.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/jsf/
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/portlet-instances.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/wsrp-object.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/web.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
Log:
Splitted JSF admin and wsrp services
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-07-11 21:10:38 UTC (rev 7723)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-07-11 21:12:42 UTC (rev 7724)
@@ -252,6 +252,7 @@
<path refid="jbossas/core.libs.classpath"/>
<path refid="dependentmodule.classpath"/>
<pathelement path="${build.classes}"/>
+ <path refid="hibernate.hibernate.classpath"/>
</path>
<aopc compilerclasspathref="aop.classpath" verbose="true">
@@ -287,26 +288,34 @@
</fileset>
<!--<fileset dir="${build.resources}/portal-wsrp-lib-jar"/>-->
</jar>
- <copy todir="${build.resources}/portal-wsrp-war/lib">
- <!-- For JSF -->
- <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
- <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
- <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
- <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- </copy>
<jar jarfile="${build.lib}/portal-wsrp-test-lib.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/portal/test/**"/>
</fileset>
</jar>
+ <!--copy todir="${build.resources}/portal-wsrp-jse/WEB-INF/lib">
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar, myfaces-impl.jar, jstl.jar"/>
+ <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
+ <fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
+ <fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
+ <fileset dir="${el.el.lib}" includes="el-api.jar, el-ri.jar"/>
+ <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
+ </copy-->
+ <!--copy todir="${build.resources}/portal-wsrp-jse/WEB-INF/lib">
+ <fileset dir="${build.lib}" includes="portal-wsrp-lib.jar"/>
+ </copy-->
<jar jarfile="${build.lib}/portal-wsrp.jse">
- <fileset dir="${build.resources}/portal-wsrp-war"/>
+ <fileset dir="${build.resources}/portal-wsrp-jse"/>
</jar>
<copy todir="${build.resources}/portal-wsrp-sar" overwrite="true">
<fileset dir="${build.lib}" includes="portal-wsrp-client.jar"/>
- <fileset dir="${build.lib}" includes="portal-wsrp-lib.jar"/>
<fileset dir="${build.lib}" includes="portal-wsrp.jse"/>
</copy>
+ <copy todir="${build.resources}/portal-wsrp-sar" overwrite="true">
+ <fileset dir="${build.lib}" includes="portal-wsrp-lib.jar"/>
+ </copy>
<jar jarfile="${build.lib}/portal-wsrp.sar">
<fileset dir="${build.resources}/portal-wsrp-sar" includes="**/*"/>
</jar>
Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java 2007-07-11 21:10:38 UTC (rev 7723)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java 2007-07-11 21:12:42 UTC (rev 7724)
@@ -1,95 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2007, 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.wsrp.other;
-
-import junit.framework.TestCase;
-import org.jboss.portal.common.NotYetImplemented;
-import org.jboss.portal.test.wsrp.framework.support.MockConsumerRegistry;
-import org.jboss.portal.wsrp.admin.ui.BeanContext;
-import org.jboss.portal.wsrp.admin.ui.ConsumerBean;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- * @since 2.6
- */
-public class ConsumerBeanTestCase extends TestCase
-{
- private ConsumerBean bean;
-
- protected void setUp() throws Exception
- {
- bean = new ConsumerBean();
- bean.setRegistry(new MockConsumerRegistry());
-
- // consumer associated with bean is null at this point so it should be loaded from the registry
- bean.setId(MockConsumerRegistry.CONSUMER2);
- }
-
- public void testInitialState()
- {
- assertEquals(MockConsumerRegistry.CONSUMER2, bean.getId());
- assertEquals(MockConsumerRegistry.MOCK_MARKUP, bean.getMarkup());
- assertEquals(MockConsumerRegistry.MOCK_SERVICE_DESCRIPTION, bean.getServiceDescription());
- assertFalse(bean.isModified());
- }
-
- public void testSetId()
- {
- String newId = "newId";
- bean.setId(newId);
- assertEquals(newId, bean.getId());
- assertTrue(bean.isModified());
- }
-
- public void testSetCache()
- {
- bean.setCache(new Integer(300));
- assertEquals(300, bean.getCache().intValue());
- assertTrue(bean.isModified());
- }
-
- private static class TestBeanContext extends BeanContext
- {
- protected String getParameter(String key)
- {
- throw new NotYetImplemented();
- }
-
- protected void createMessage(String target, String message, Object severity)
- {
- // ignore for tests
- }
-
- protected Object getErrorSeverity()
- {
- return null;
- }
-
- protected Object getInfoSeverity()
- {
- return null;
- }
- }
-}
Copied: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse (from rev 7716, branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war)
Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/faces-config.xml 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/faces-config.xml 2007-07-11 21:12:42 UTC (rev 7724)
@@ -1,89 +0,0 @@
-<?xml version="1.0"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, 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 faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
-
-<faces-config>
-
- <!-- Facelet portlet view handler-->
- <application>
- <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
- </application>
-
- <managed-bean>
- <managed-bean-name>beanContext</managed-bean-name>
- <managed-bean-class>org.jboss.portal.wsrp.admin.ui.JSFBeanContext</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>consumersMgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.wsrp.admin.ui.ConsumerManagerBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>registry</property-name>
- <property-class>org.jboss.portal.wsrp.consumer.ConsumerRegistry</property-class>
- <value>#{applicationScope.ConsumerRegistry}</value>
- </managed-property>
- <managed-property>
- <property-name>beanContext</property-name>
- <property-class>org.jboss.portal.wsrp.admin.ui.BeanContext</property-class>
- <value>#{beanContext}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>consumer</managed-bean-name>
- <managed-bean-class>org.jboss.portal.wsrp.admin.ui.ConsumerBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>registry</property-name>
- <property-class>org.jboss.portal.wsrp.consumer.ConsumerRegistry</property-class>
- <value>#{applicationScope.ConsumerRegistry}</value>
- </managed-property>
- <managed-property>
- <property-name>id</property-name>
- <value>#{sessionScope.consumerId}</value>
- </managed-property>
- <managed-property>
- <property-name>manager</property-name>
- <value>#{consumersMgr}</value>
- </managed-property>
- <managed-property>
- <property-name>beanContext</property-name>
- <property-class>org.jboss.portal.wsrp.admin.ui.BeanContext</property-class>
- <value>#{beanContext}</value>
- </managed-property>
- </managed-bean>
-
- <navigation-rule>
- <navigation-case>
- <from-outcome>index</from-outcome>
- <to-view-id>/WEB-INF/jsf/consumers/consumers.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>configureConsumer</from-outcome>
- <to-view-id>/WEB-INF/jsf/consumers/editConsumer.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
-</faces-config>
Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/jboss-portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/jboss-portlet.xml 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/jboss-portlet.xml 2007-07-11 21:12:42 UTC (rev 7724)
@@ -1,40 +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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<!DOCTYPE portlet-app PUBLIC "-//JBoss Portal//DTD JBoss Portlet 2.6//EN" "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
-<portlet-app>
- <portlet>
- <portlet-name>WSRPConsumersConfigurationPortlet</portlet-name>
- <transaction>
- <trans-attribute>Required</trans-attribute>
- </transaction>
- <header-content>
- <link rel="stylesheet" type="text/css" href="/style.css" media="screen"/>
- </header-content>
- </portlet>
- <service>
- <service-name>ConsumerRegistry</service-name>
- <service-class>org.jboss.portal.wsrp.consumer.ConsumerRegistry</service-class>
- <service-ref>portal.wsrp:service=ConsumerRegistry</service-ref>
- </service>
-</portlet-app>
-
Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/portlet-instances.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet-instances.xml 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/portlet-instances.xml 2007-07-11 21:12:42 UTC (rev 7724)
@@ -1,38 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<deployments>
- <deployment>
- <instance>
- <instance-id>WSRPConsumersConfigurationPortletInstance</instance-id>
- <portlet-ref>WSRPConsumersConfigurationPortlet</portlet-ref>
- <security-constraint>
- <policy-permission>
- <role-name>Admin</role-name>
- <action-name>view</action-name>
- </policy-permission>
- </security-constraint>
- </instance>
- </deployment>
-</deployments>
\ No newline at end of file
Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/portlet.xml 2007-07-11 21:12:42 UTC (rev 7724)
@@ -1,46 +0,0 @@
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, 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_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
- <portlet>
- <description>Configuration portlet for WSRP remote producers.</description>
- <portlet-name>WSRPConsumersConfigurationPortlet</portlet-name>
- <display-name>WSRP Consumers Configuration</display-name>
- <portlet-class>org.jboss.portal.faces.portlet.JSFMetaBridgePortlet</portlet-class>
- <init-param>
- <name>VIEW</name>
- <value>/WEB-INF/jsf/consumers/consumers.xhtml</value>
- </init-param>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- </supports>
- <portlet-info>
- <title>WSRP Consumers Configuration</title>
- <keywords>management,admin,wsrp</keywords>
- </portlet-info>
- </portlet>
-</portlet-app>
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/web.xml 2007-07-11 21:12:42 UTC (rev 7724)
@@ -108,61 +108,6 @@
<servlet-name>PortletManagementService</servlet-name>
<url-pattern>/PortletManagementService</url-pattern>
</servlet-mapping>
-
- <!-- MyFaces specific configuration -->
- <context-param>
- <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <!-- Facelet configuration -->
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.SKIP_COMMENTS</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <!-- JSF configuration -->
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
-
- <!-- JSF entry point -->
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- The JSF meta bridge bootstrap -->
- <listener>
- <display-name> Faces Meta Bridge Bootstrap</display-name>
- <listener-class>org.jboss.portal.faces.portlet.JSFMetaBridgeBootstrap</listener-class>
- </listener>
</web-app>
Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/wsrp-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/wsrp-object.xml 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB-INF/wsrp-object.xml 2007-07-11 21:12:42 UTC (rev 7724)
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, 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 deployments PUBLIC "-//JBoss Portal//DTD Portal Object 2.6//EN" "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
-
-<deployments>
- <deployment>
- <parent-ref>admin</parent-ref>
- <if-exists>keep</if-exists>
- <page>
- <page-name>WSRP</page-name>
- <security-constraint>
- <policy-permission>
- <action-name>viewrecursive</action-name>
- <role-name>Admin</role-name>
- </policy-permission>
- </security-constraint>
- <window>
- <window-name>WSRPConsumersConfigurationPortletWindow</window-name>
- <instance-ref>WSRPConsumersConfigurationPortletInstance</instance-ref>
- <region>center</region>
- <height>0</height>
- </window>
- </page>
- </deployment>
-</deployments>
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-07-11 21:10:38 UTC (rev 7723)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-07-11 21:12:42 UTC (rev 7724)
@@ -23,7 +23,6 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<server>
-
<!-- Producer interceptor stack -->
<mbean
code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
16 years, 11 months
JBoss Portal SVN: r7723 - in branches/JBoss_Portal_Branch_2_6/core-wsrp: .settings and 18 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 17:10:38 -0400 (Wed, 11 Jul 2007)
New Revision: 7723
Added:
branches/JBoss_Portal_Branch_2_6/core-wsrp/.classpath
branches/JBoss_Portal_Branch_2_6/core-wsrp/.project
branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/
branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/org.eclipse.jdt.core.prefs
branches/JBoss_Portal_Branch_2_6/core-wsrp/build.bat
branches/JBoss_Portal_Branch_2_6/core-wsrp/build.sh
branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/test/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/test/wsrp/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-sar/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-sar/META-INF/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jboss-portlet.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/consumers.xhtml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/editConsumer.xhtml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet-instances.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/wsrp-object.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/style.css
Log:
Initial import.
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/.classpath (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/.classpath 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/wsrp"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/.project
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/.project (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/.project 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>core-wsrp</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/org.eclipse.jdt.core.prefs 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,12 @@
+#Wed Jul 11 10:53:04 CEST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.bat
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/build.bat (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/build.bat 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,54 @@
+@echo off
+rem
+rem Invokes a script of the same name in the 'tools' module.
+rem
+rem The 'tools' module is expected to be a peer directory of the directory
+rem in which this script lives.
+rem
+rem @author Jason Dillon <jason(a)planet57.com>
+rem
+
+rem $Id: build.bat 1015 2005-11-04 20:15:13Z mholzner $
+
+setlocal
+
+set PROGNAME=%~nx0
+set DIRNAME=%~dp0
+
+rem Legacy shell support
+if x%PROGNAME%==x set PROGNAME=build.bat
+if x%DIRNAME%==x set DIRNAME=.\
+
+set MODULE_ROOT=%DIRNAME%
+if x%TOOLS_ROOT%==x set TOOLS_ROOT=%DIRNAME%..\tools
+set TARGET=%TOOLS_ROOT%\bin\build.bat
+set ARGS=%*
+
+rem Start'er up yo
+goto main
+
+:debug
+if not x%DEBUG%==x echo %PROGNAME%: %*
+goto :EOF
+
+:main
+call :debug PROGNAME=%PROGNAME%
+call :debug DIRNAME=%DIRNAME%
+call :debug TOOLS_ROOT=%TOOLS_ROOT%
+call :debug TARGET=%TARGET%
+
+if exist %TARGET% call :call-script & goto :EOF
+rem else fail, we can not go on
+
+echo %PROGNAME%: *ERROR* The target executable does not exist:
+echo %PROGNAME%:
+echo %PROGNAME%: %TARGET%
+echo %PROGNAME%:
+echo %PROGNAME%: Please make sure you have checked out the 'tools' module
+echo %PROGNAME%: and make sure it is up to date.
+goto :EOF
+
+:call-script
+call :debug Executing %TARGET% %ARGS%
+call %TARGET% %ARGS%
+goto :EOF
Property changes on: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.bat
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.sh
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/build.sh (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/build.sh 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,49 @@
+#!/bin/sh
+##
+## Invokes a script of the same name in the 'tools' module.
+##
+## The 'tools' module is expected to be a peer directory of the directory
+## in which this script lives.
+##
+## @author Jason Dillon <jason(a)planet57.com>
+##
+
+# $Id: build.sh 1015 2005-11-04 20:15:13Z mholzner $
+
+PROGNAME=`basename $0`
+DIRNAME=`dirname $0`
+
+# Buss it yo
+main() {
+ if [ "x$TOOLS_ROOT" = "x" ]; then
+ TOOLS_ROOT=`cd $DIRNAME/../tools && pwd`
+ fi
+
+ MODULE_ROOT=`cd $DIRNAME; pwd`
+ export TOOLS_ROOT MODULE_ROOT DEBUG TRACE
+
+ # Where is the target script?
+ target="$TOOLS_ROOT/bin/$PROGNAME"
+ if [ ! -f "$target" ]; then
+ echo "${PROGNAME}: *ERROR* The target executable does not exist:"
+ echo "${PROGNAME}:"
+ echo "${PROGNAME}: $target"
+ echo "${PROGNAME}:"
+ echo "${PROGNAME}: Please make sure you have checked out the 'tools' module"
+ echo "${PROGNAME}: and make sure it is up to date."
+ exit 2
+ fi
+
+ # Get busy yo!
+ if [ "x$DEBUG" != "x" ]; then
+ echo "${PROGNAME}: Executing: /bin/sh $target $@"
+ fi
+ if [ "x$TRACE" = "x" ]; then
+ exec /bin/sh $target "$@"
+ else
+ exec /bin/sh -x $target "$@"
+ fi
+}
+
+# Lets get ready to rumble!
+main "$@"
Property changes on: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,304 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE project [
+ <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
+ <!ENTITY buildmagic SYSTEM "../tools/etc/buildfragments/buildmagic.ent">
+ <!ENTITY tools SYSTEM "../tools/etc/buildfragments/tools.ent">
+ <!ENTITY modules SYSTEM "../tools/etc/buildfragments/modules.ent">
+ <!ENTITY defaults SYSTEM "../tools/etc/buildfragments/defaults.ent">
+ <!ENTITY targets SYSTEM "../tools/etc/buildfragments/targets.ent">
+ ]>
+
+<!--+======================================================================+-->
+<!--| JBoss Portal (The OpenSource Portal) Build File |-->
+<!--| |-->
+<!--| Distributable under LGPL license. |-->
+<!--| See terms of license at http://www.gnu.org. |-->
+<!--| |-->
+<!--| This file has been designed to work with the 'tools' module and |-->
+<!--| Buildmagic extentions. |-->
+<!--+======================================================================+-->
+
+<project default="main" name="JBoss Portal">
+
+ <!--+====================================================================+-->
+ <!--| Setup |-->
+ <!--| |-->
+ <!--| Include the common build elements. |-->
+ <!--| |-->
+ <!--| This defines several different targets, properties and paths. |-->
+ <!--| It also sets up the basic extention tasks amoung other things. |-->
+ <!--+====================================================================+-->
+
+ &buildmagic;
+ &modules;
+ &defaults;
+ &tools;
+ &targets;
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Initialize the build system. Must depend on '_buildmagic:init'.
+ | Other targets should depend on 'init' or things will mysteriously fail.
+ -->
+
+ <target name="init" unless="init.disable" depends="_buildmagic:init">
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Configuration |-->
+ <!--| |-->
+ <!--| This target is invoked by the Buildmagic initialization logic |-->
+ <!--| and should contain module specific configuration elements. |-->
+ <!--+====================================================================+-->
+
+ <target name="configure" unless="configure.disable">
+
+ <!-- Configure some properties -->
+ <property name="jboss-junit-configuration" value=""/>
+ <property name="junit.formatter.usefile" value="true"/>
+
+ <!-- Configure thirdparty libraries -->
+ &libraries;
+
+ <path id="library.classpath">
+ <path refid="jboss.jbossxb.classpath"/>
+ <path refid="jboss.cache.classpath"/>
+ <path refid="jbossas/core.libs.classpath"/>
+ <path refid="hibernate.hibernate.classpath"/>
+ <path refid="apache.myfaces.classpath"/>
+ <path refid="apache.log4j.classpath"/>
+ <path refid="sun.servlet.classpath"/>
+ <path refid="facelets.facelets.classpath"/>
+ <path refid="junit.junit.classpath"/>
+ <path refid="el.el.classpath"/>
+ <pathelement location="${source.etc}/sun-jsf/jsf-example.jar"/>
+ </path>
+
+ <!-- Configure modules -->
+ <call target="configure-modules"/>
+ <path id="dependentmodule.classpath">
+ <path refid="jboss.portal-wsrp.classpath"/>
+ <path refid="jboss.portal-common.classpath"/>
+ <path refid="jboss.portal-faces.classpath"/>
+ <path refid="jboss.portal-bridge.classpath"/>
+ <path refid="jboss.portal-server.classpath"/>
+ <path refid="jboss.portal-registration.classpath"/>
+ <path refid="jboss.portal-portlet.classpath"/>
+ <path refid="jboss.portal-jems.classpath"/>
+ <path refid="jboss.portal-portlet-federation.classpath"/>
+ <path refid="jboss.portal-identity.classpath"/>
+ <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-theme.classpath"/>
+ <path refid="jboss.portal-security.classpath"/>
+ <path refid="jboss.portal-test.classpath"/>
+ <path refid="jboss.portal-core.classpath"/>
+ </path>
+
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
+
+ <!-- Configure defaults & build tools -->
+ <call target="configure-defaults"/>
+ <call target="configure-tools"/>
+ <call target="configure-explode"/>
+
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
+ <property name="javadoc.private" value="true"/>
+ <property name="javadoc.protected" value="false"/>
+
+ <taskdef name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
+ <taskdef name="implode"
+ classname="org.jboss.portal.common.ant.Implode"
+ classpathref="explode.task.classpath"/>
+
+ </target>
+
+ <target name="configure-explode">
+ <path id="explode.task.classpath">
+ <pathelement location="${project.tools}/lib/explode.jar"/>
+ <path refid="apache.ant.classpath"/>
+ </path>
+ <taskdef
+ name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Compile |-->
+ <!--| |-->
+ <!--| This target should depend on other compile-* targets for each |-->
+ <!--| different type of compile that needs to be performed, short of |-->
+ <!--| documentation compiles. |-->
+ <!--+====================================================================+-->
+
+ <target name="compile"
+ description="Compile all source files."
+ depends="_default:compile-classes,
+ _default:compile-etc,
+ _default:compile-resources">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Generate Output |-->
+ <!--| |-->
+ <!--| Generates the target output for this module. Target output is |-->
+ <!--| the output which is ment to be released or used by external |-->
+ <!--| modules. |-->
+ <!--+====================================================================+-->
+
+ <target name="artifacts"
+ description="Generate all target output."
+ depends="compile">
+
+ <mkdir dir="${build.lib}"/>
+
+ <copy todir="${build.resources}">
+ <fileset dir="${source.resources}" includes="**/*"/>
+ </copy>
+
+
+ <!-- portal-core-wsrp-lib.jar -->
+ <jar jarfile="${build.lib}/portal-wsrp-admin-lib.jar">
+ <fileset dir="${build.classes}">
+ </fileset>
+ </jar>
+
+
+ <jar jarfile="${build.lib}/portal-wsrp-admin.war">
+ <fileset dir="${build.resources}/portal-wsrp-admin-war"/>
+ </jar>
+
+ <!-- portal-wsrp-admin.sar -->
+ <copy todir="${build.resources}/portal-wsrp-admin-sar/lib">
+ <fileset dir="${build.lib}" includes="portal-wsrp-admin-lib.jar"/>
+
+ <!-- For JSF -->
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar, myfaces-impl.jar, jstl.jar"/>
+ <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
+ <fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
+ <fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
+ <fileset dir="${el.el.lib}" includes="el-api.jar, el-ri.jar"/>
+ <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
+ </copy>
+
+ <!-- portal-wsrp-admin.sar -->
+ <copy todir="${build.resources}/portal-wsrp-admin-sar">
+ <fileset dir="${build.lib}" includes="portal-wsrp-admin.war"/>
+ </copy>
+
+
+ <jar jarfile="${build.lib}/portal-wsrp-admin.sar">
+ <fileset dir="${build.resources}/portal-wsrp-admin-sar" includes="**/*"/>
+ </jar>
+
+ </target>
+
+ <target name="output" depends="artifacts">
+
+ <!--implode
+ dir="${build.resources}/portal-wsrp-admin-sar"
+ tofile="${build.lib}/portal-wsrp-admin.sar"/-->
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Cleaning -->
+ <!-- ================================================================== -->
+
+ <!-- Clean up all build output -->
+ <target name="clean" depends="_default:clean">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Documents |-->
+ <!--| |-->
+ <!--| Generate all documentation for this module. |-->
+ <!--+====================================================================+-->
+
+ <target name="docs" depends="_default:docs">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Misc. -->
+ <!-- ================================================================== -->
+
+ <target name="main" depends="most"/>
+ <target name="all" depends="_default:all"/>
+ <target name="most" depends="_default:most"/>
+ <target name="help" depends="_default:help"/>
+
+ <!-- ================================================================== -->
+ <!-- Deployment -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Deploy the application
+ -->
+
+ <target name="deploy"
+ description="Deploy."
+ depends="output">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <copy file="${build.lib}/portal-wsrp-admin.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ </target>
+
+ <!--
+ | Undeploy the application
+ -->
+ <target name="undeploy"
+ description="Undeploy."
+ depends="init">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
+ </target>
+
+ <target name="package-tests"/>
+
+
+ <!--
+ Some convenience build targets to help deployment during development
+ -->
+ <target name="deploy-ha"
+ description="Deploy."
+ depends="output">
+ <require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
+ <copy file="${build.lib}/portal-wsrp.sar" todir="${jboss.home}/server/${portal-ha.deploy.dir}" overwrite="true"/>
+ </target>
+</project>
Property changes on: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,95 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, 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.wsrp.other;
+
+import junit.framework.TestCase;
+import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.test.wsrp.framework.support.MockConsumerRegistry;
+import org.jboss.portal.wsrp.admin.ui.BeanContext;
+import org.jboss.portal.wsrp.admin.ui.ConsumerBean;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 7509 $
+ * @since 2.6
+ */
+public class ConsumerBeanTestCase extends TestCase
+{
+ private ConsumerBean bean;
+
+ protected void setUp() throws Exception
+ {
+ bean = new ConsumerBean();
+ bean.setRegistry(new MockConsumerRegistry());
+
+ // consumer associated with bean is null at this point so it should be loaded from the registry
+ bean.setId(MockConsumerRegistry.CONSUMER2);
+ }
+
+ public void testInitialState()
+ {
+ assertEquals(MockConsumerRegistry.CONSUMER2, bean.getId());
+ assertEquals(MockConsumerRegistry.MOCK_MARKUP, bean.getMarkup());
+ assertEquals(MockConsumerRegistry.MOCK_SERVICE_DESCRIPTION, bean.getServiceDescription());
+ assertFalse(bean.isModified());
+ }
+
+ public void testSetId()
+ {
+ String newId = "newId";
+ bean.setId(newId);
+ assertEquals(newId, bean.getId());
+ assertTrue(bean.isModified());
+ }
+
+ public void testSetCache()
+ {
+ bean.setCache(new Integer(300));
+ assertEquals(300, bean.getCache().intValue());
+ assertTrue(bean.isModified());
+ }
+
+ private static class TestBeanContext extends BeanContext
+ {
+ protected String getParameter(String key)
+ {
+ throw new NotYetImplemented();
+ }
+
+ protected void createMessage(String target, String message, Object severity)
+ {
+ // ignore for tests
+ }
+
+ protected Object getErrorSeverity()
+ {
+ return null;
+ }
+
+ protected Object getInfoSeverity()
+ {
+ return null;
+ }
+ }
+}
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, 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.wsrp.admin.ui;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 7509 $
+ * @since 2.6
+ */
+public abstract class BeanContext
+{
+ protected abstract String getParameter(String key);
+
+ protected abstract void createMessage(String target, String message, Object severity);
+
+ protected abstract Object getErrorSeverity();
+
+ protected abstract Object getInfoSeverity();
+
+ protected void createErrorMessage(String message)
+ {
+ createMessage(null, message, getErrorSeverity());
+ }
+
+ protected void createErrorMessage(String target, String message)
+ {
+ createMessage(target, message, getErrorSeverity());
+ }
+
+ protected void createErrorMessageFrom(Exception e)
+ {
+ createErrorMessageFrom(null, e);
+ }
+
+ protected void createErrorMessageFrom(String target, Exception e)
+ {
+ Throwable cause = e.getCause();
+ String localizedMessage = getLocalizedMessageOrExceptionName(e);
+ String message = localizedMessage + (cause != null ? "\nCause: " + getLocalizedMessageOrExceptionName(cause) : "");
+ createErrorMessage(target, message);
+ }
+
+ private String getLocalizedMessageOrExceptionName(Throwable e)
+ {
+ String localizedMessage = e.getLocalizedMessage();
+ if (localizedMessage == null)
+ {
+ localizedMessage = "An unexpected error occured: " + e.getClass().getName();
+ }
+ return localizedMessage;
+ }
+
+ protected void createInfoMessage(String target, String message)
+ {
+ createMessage(target, message, getInfoSeverity());
+ }
+}
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,395 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, 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.wsrp.admin.ui;
+
+import org.jboss.portal.wsrp.WSRPConsumer;
+import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
+import org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo;
+import org.jboss.portal.wsrp.consumer.ProducerInfo;
+import org.jboss.portal.wsrp.consumer.RefreshResult;
+import org.jboss.portal.wsrp.consumer.RegistrationInfo;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 7509 $
+ * @since 2.6
+ */
+public class ConsumerBean extends ManagedBean
+{
+ private WSRPConsumer consumer;
+ private ConsumerRegistry registry;
+ private Boolean useWSDL = null;
+ private ConsumerManagerBean manager;
+ private boolean modified;
+ private boolean registrationModified;
+
+ private String serviceDescription;
+ private String markup;
+ private String portletManagement;
+ private String registration;
+ private String wsdl;
+
+ public void setRegistry(ConsumerRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ public void setManager(ConsumerManagerBean manager)
+ {
+ this.manager = manager;
+ }
+
+ public boolean isModified()
+ {
+ return modified || registrationModified;
+ }
+
+ public boolean isUseWSDL()
+ {
+ if (useWSDL != null)
+ {
+ return useWSDL.booleanValue();
+ }
+
+ return getProducerInfo().getEndpointConfigurationInfo().usesWSDL();
+ }
+
+ public void setUseWSDL(boolean useWSDL)
+ {
+ this.useWSDL = useWSDL ? Boolean.TRUE : Boolean.FALSE;
+ }
+
+ public boolean isRefreshNeeded()
+ {
+ return consumer.isRefreshNeeded();
+ }
+
+ public String getId()
+ {
+ return consumer.getProducerId();
+ }
+
+ public void setId(String id)
+ {
+ if (consumer != null)
+ {
+ ProducerInfo info = getProducerInfo();
+ String oldId = info.getId();
+ info.setId((String)modifyIfNeeded(oldId, id, "id", false));
+ }
+ else
+ {
+ consumer = registry.getConsumer(id);
+ EndpointConfigurationInfo endpoint = getProducerInfo().getEndpointConfigurationInfo();
+ serviceDescription = endpoint.getServiceDescriptionURL();
+ markup = endpoint.getMarkupURL();
+ portletManagement = endpoint.getPortletManagementURL();
+ registration = endpoint.getRegistrationURL();
+ wsdl = endpoint.getWsdlDefinitionURL();
+ }
+ }
+
+ public Integer getCache()
+ {
+ return getProducerInfo().getExpirationCacheSeconds();
+ }
+
+ public void setCache(Integer cache)
+ {
+ getProducerInfo().setExpirationCacheSeconds((Integer)modifyIfNeeded(getCache(), cache, "cache", false));
+ }
+
+ public String getServiceDescription()
+ {
+ return serviceDescription;
+ }
+
+ public void setServiceDescription(String sdURL)
+ {
+ serviceDescription = (String)modifyIfNeeded(serviceDescription, sdURL, "sd", true);
+ }
+
+ public String getMarkup()
+ {
+ return markup;
+ }
+
+ public void setMarkup(String markupURL)
+ {
+ markup = (String)modifyIfNeeded(markup, markupURL, "m", true);
+ }
+
+ public String getPortletManagement()
+ {
+ return portletManagement;
+ }
+
+ public void setPortletManagement(String pmURL)
+ {
+ portletManagement = (String)modifyIfNeeded(portletManagement, pmURL, "pm", true);
+ }
+
+ public String getRegistration()
+ {
+ return registration;
+ }
+
+ public void setRegistration(String rURL)
+ {
+ registration = (String)modifyIfNeeded(registration, rURL, "r", true);
+ }
+
+ public String getWsdl()
+ {
+ return wsdl;
+ }
+
+ public void setWsdl(String wsdlURL)
+ {
+ wsdl = (String)modifyIfNeeded(wsdl, wsdlURL, "wsdl", true);
+ }
+
+ private void internalSetWsdl(String wsdlURL)
+ {
+ try
+ {
+ getProducerInfo().getEndpointConfigurationInfo().setWsdlDefinitionURL(wsdlURL);
+ }
+ catch (Exception e)
+ {
+ registry.deactivateConsumerWith(getId());
+ beanContext.createErrorMessageFrom("wsdl", e);
+ }
+ }
+
+ public boolean isActive()
+ {
+ return consumer.isActive();
+ }
+
+ public boolean isRegistered()
+ {
+ return getProducerInfo().isRegistered();
+ }
+
+ public boolean isRegistrationRequired()
+ {
+ return getProducerInfo().isRegistrationRequired();
+ }
+
+ public boolean isRegistrationCheckNeeded()
+ {
+ RegistrationInfo regInfo = getProducerInfo().getRegistrationInfo();
+ if (regInfo == null)
+ {
+ return true;
+ }
+ else
+ {
+ Boolean consistent = regInfo.isConsistentWithProducerExpectations();
+ return consistent == null || !consistent.booleanValue();
+ }
+ }
+
+ public boolean isRegistrationModified()
+ {
+ return registrationModified;
+ }
+
+ public boolean isRegistrationChecked()
+ {
+ return getProducerInfo().isRegistrationChecked();
+ }
+
+ public boolean isRegistrationValid()
+ {
+ if (isRegistrationChecked())
+ {
+ return getProducerInfo().getRegistrationInfo().isRegistrationValid().booleanValue();
+ }
+ throw new IllegalStateException("Need to check the registration before determining if it's valid!");
+ }
+
+ public ProducerInfo getProducerInfo()
+ {
+ return consumer.getProducerInfo();
+ }
+
+ public boolean isLocalInfoPresent()
+ {
+ return getProducerInfo().hasLocalRegistrationInfo();
+ }
+
+ // Actions
+
+ public String update()
+ {
+ if (consumer != null && modified)
+ {
+ try
+ {
+ // update values
+ ProducerInfo prodInfo = getProducerInfo();
+ EndpointConfigurationInfo endpointInfo = prodInfo.getEndpointConfigurationInfo();
+ endpointInfo.setMarkupURL(markup);
+ endpointInfo.setServiceDescriptionURL(serviceDescription);
+ endpointInfo.setPortletManagementURL(portletManagement);
+ endpointInfo.setRegistrationURL(registration);
+ if (isUseWSDL())
+ {
+ internalSetWsdl(wsdl);
+ }
+
+ registry.updateProducerInfo(prodInfo);
+ modified = false;
+ registrationModified = false;
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+
+ return manager.listConsumers();
+ }
+
+ beanContext.createErrorMessage("Couldn't update Consumer!");
+ return null;
+ }
+
+ public String refreshConsumer()
+ {
+ if (modified)
+ {
+ String updateResult = update();
+ if (updateResult == null)
+ {
+ return null;
+ }
+ }
+
+ return manager.refreshConsumer();
+ }
+
+ public String refreshRegistrationInfo()
+ {
+ if (consumer != null)
+ {
+ String param = beanContext.getParameter("mergeLocalInfo");
+ boolean mergeLocalInfo = Boolean.valueOf(param).booleanValue();
+ try
+ {
+ RefreshResult result = getProducerInfo().refreshRegistrationInfo(mergeLocalInfo);
+ if (result.hasIssues())
+ {
+ beanContext.createErrorMessage(result.getStatus());
+ }
+ else
+ {
+ beanContext.createInfoMessage(null, result.getStatus());
+ }
+
+ registrationModified = false;
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+ return null;
+ }
+
+ beanContext.createErrorMessage("Couldn't refresh Registration info!");
+ return null;
+ }
+
+ public String modifyRegistration()
+ {
+ if (consumer != null)
+ {
+ try
+ {
+ getProducerInfo().modifyRegistration();
+ beanContext.createInfoMessage(null, "Successfully modified Registration!");
+ registrationModified = false;
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+ return null;
+ }
+
+ beanContext.createErrorMessage("Couldn't modify Registration!");
+ return null;
+ }
+
+ private Object modifyIfNeeded(Object oldValue, Object newValue, String target, boolean checkURL)
+ {
+ if ((oldValue != null && !oldValue.equals(newValue)) || (oldValue == null && newValue != null))
+ {
+ if (checkURL)
+ {
+ try
+ {
+ // check that the new value is a valid URL
+ new URL(newValue.toString());
+ }
+ catch (MalformedURLException e)
+ {
+ beanContext.createErrorMessage(target, "'" + newValue + "' is not a valid URL: " + e.getLocalizedMessage());
+ }
+ }
+
+ oldValue = newValue;
+ modified = true;
+ }
+
+ return oldValue;
+ }
+
+ // Listeners
+
+ public void useWSDLListener(ValueChangeEvent event)
+ {
+ useWSDL = (Boolean)modifyIfNeeded(useWSDL, event.getNewValue(), "wsdl", false);
+
+ // bypass the rest of the life cycle and re-display page
+ FacesContext.getCurrentInstance().renderResponse();
+ }
+
+ public void regPropListener(ValueChangeEvent event)
+ {
+ registrationModified = true;
+
+ // bypass the rest of the life cycle and re-display page
+ FacesContext.getCurrentInstance().renderResponse();
+ }
+}
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,291 @@
+/*
+* 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.wsrp.admin.ui;
+
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.wsrp.WSRPConsumer;
+import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
+import org.jboss.portal.wsrp.consumer.RefreshResult;
+
+import javax.faces.context.FacesContext;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 7711 $
+ * @since 2.6
+ */
+public class ConsumerManagerBean extends ManagedBean
+{
+ private ConsumerRegistry registry;
+ private String selectedId;
+ private static final String CONSUMER_ID = "consumerId";
+
+ static final String CONFIGURE_CONSUMER = "configureConsumer";
+ static final String INDEX = "index";
+
+ public ConsumerRegistry getRegistry()
+ {
+ return registry;
+ }
+
+ public void setRegistry(ConsumerRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ public void setSelectedId(String consumerId)
+ {
+ this.selectedId = consumerId;
+ }
+
+ public String getSelectedId()
+ {
+ return selectedId;
+ }
+
+ public WSRPConsumer getSelectedConsumer()
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(selectedId, "consumer id", null);
+ return registry.getConsumer(selectedId);
+ }
+
+ public Collection getConsumers()
+ {
+ return new ArrayList(registry.getConfiguredConsumers());
+ }
+
+ public String activateConsumer()
+ {
+ if (refreshConsumerId() != null)
+ {
+ boolean activate = Boolean.valueOf(beanContext.getParameter("activate")).booleanValue();
+ try
+ {
+ if (activate)
+ {
+ WSRPConsumer consumer = getSelectedConsumer();
+ if (consumer.isRefreshNeeded())
+ {
+ RefreshResult result = internalRefresh(consumer);
+ if (result != null && !result.hasIssues())
+ {
+ registry.activateConsumerWith(selectedId);
+ }
+ }
+ else
+ {
+ registry.activateConsumerWith(selectedId);
+ }
+ }
+ else
+ {
+ registry.deactivateConsumerWith(selectedId);
+ }
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ }
+
+ return listConsumers();
+ }
+ else
+ {
+ noSelectedConsumerError();
+ return listConsumers();
+ }
+ }
+
+ public String registerConsumer()
+ {
+ if (refreshConsumerId() != null)
+ {
+ boolean register = Boolean.valueOf(beanContext.getParameter("register")).booleanValue();
+
+ try
+ {
+ registry.registerOrDeregisterConsumerWith(selectedId, register);
+ // show consumer configuration
+ setConsumerIdInSession(false);
+ return CONFIGURE_CONSUMER;
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+ }
+ else
+ {
+ noSelectedConsumerError();
+ return null;
+ }
+ }
+
+ public String createConsumer()
+ {
+ if (selectedId != null)
+ {
+ try
+ {
+ registry.createConsumer(selectedId, null);
+ setConsumerIdInSession(false);
+ return CONFIGURE_CONSUMER;
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+ }
+ else
+ {
+ beanContext.createErrorMessage("Need a non-null, non-empty name for the new Consumer");
+ return null;
+ }
+ }
+
+ public String destroyConsumer()
+ {
+ if (refreshConsumerId() != null)
+ {
+ try
+ {
+ registry.destroyConsumer(selectedId);
+ return listConsumers();
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+ }
+ else
+ {
+ noSelectedConsumerError();
+ return null;
+ }
+ }
+
+ public String configureConsumer()
+ {
+ if (refreshConsumerId() != null)
+ {
+ setConsumerIdInSession(false);
+ return CONFIGURE_CONSUMER;
+ }
+ else
+ {
+ noSelectedConsumerError();
+ return null;
+ }
+ }
+
+ public String refreshConsumer()
+ {
+ if (refreshConsumerId() != null)
+ {
+ internalRefresh(getSelectedConsumer());
+
+ return configureConsumer();
+ }
+ else
+ {
+ noSelectedConsumerError();
+ return null;
+ }
+ }
+
+ private RefreshResult internalRefresh(WSRPConsumer consumer)
+ {
+ try
+ {
+ RefreshResult result = consumer.refresh(true);
+ if (result.hasIssues())
+ {
+ beanContext.createErrorMessage(result.getStatus());
+
+ // refresh had issues, we should deactivate this consumer
+ registry.deactivateConsumerWith(consumer.getProducerId());
+ }
+ else
+ {
+ // activate the consumer if it's supposed to be active
+ if (consumer.isActive())
+ {
+ registry.activateConsumerWith(consumer.getProducerId());
+ }
+ else
+ {
+ registry.deactivateConsumerWith(consumer.getProducerId());
+ }
+
+ beanContext.createInfoMessage(null, result.getStatus());
+ }
+ return result;
+ }
+ catch (PortletInvokerException e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
+ }
+
+ public String listConsumers()
+ {
+ setConsumerIdInSession(true);
+ selectedId = null;
+ return INDEX;
+ }
+
+ private String refreshConsumerId()
+ {
+ selectedId = beanContext.getParameter("id");
+ return selectedId;
+ }
+
+ private void setConsumerIdInSession(boolean remove)
+ {
+ Map sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
+ String consumerBeanName = "consumer"; // must match ConsumerBean name in faces-config.xml
+ sessionMap.remove(consumerBeanName); // force recreation of ConsumerBean
+
+ if (!remove)
+ {
+ sessionMap.put(CONSUMER_ID, selectedId);
+ }
+ else
+ {
+ sessionMap.remove(CONSUMER_ID);
+ }
+ }
+
+ private void noSelectedConsumerError()
+ {
+ beanContext.createErrorMessage("No Consumer was selected!");
+ }
+}
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, 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.wsrp.admin.ui;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 7509 $
+ * @since 2.6
+ */
+public class JSFBeanContext extends BeanContext
+{
+ protected String getParameter(String key)
+ {
+ Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ return (String)pmap.get(key);
+ }
+
+ protected void createMessage(String target, String message, Object severity)
+ {
+ FacesMessage.Severity jsfSeverity;
+ if (severity instanceof FacesMessage.Severity)
+ {
+ jsfSeverity = (FacesMessage.Severity)severity;
+ }
+ else
+ {
+ jsfSeverity = FacesMessage.SEVERITY_ERROR;
+ }
+
+ FacesMessage msg = new FacesMessage(jsfSeverity, message, message);
+ FacesContext.getCurrentInstance().addMessage(target, msg);
+ }
+
+ protected Object getErrorSeverity()
+ {
+ return FacesMessage.SEVERITY_ERROR;
+ }
+
+ protected Object getInfoSeverity()
+ {
+ return FacesMessage.SEVERITY_INFO;
+ }
+}
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, 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.wsrp.admin.ui;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 7509 $
+ * @since 2.6
+ */
+public class ManagedBean
+{
+ protected BeanContext beanContext;
+
+ public void setBeanContext(BeanContext beanContext)
+ {
+ this.beanContext = beanContext;
+ }
+}
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-sar/META-INF/jboss-service.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-sar/META-INF/jboss-service.xml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,7 @@
+<server>
+
+ <loader-repository>
+ org.jboss.portal:loader=core-wsrp
+ </loader-repository>
+
+</server>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, 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 faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+
+<faces-config>
+
+ <!-- Facelet portlet view handler-->
+ <application>
+ <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
+ </application>
+
+ <managed-bean>
+ <managed-bean-name>beanContext</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.wsrp.admin.ui.JSFBeanContext</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>consumersMgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.wsrp.admin.ui.ConsumerManagerBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>registry</property-name>
+ <property-class>org.jboss.portal.wsrp.consumer.ConsumerRegistry</property-class>
+ <value>#{applicationScope.ConsumerRegistry}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+ <property-class>org.jboss.portal.wsrp.admin.ui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>consumer</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.wsrp.admin.ui.ConsumerBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>registry</property-name>
+ <property-class>org.jboss.portal.wsrp.consumer.ConsumerRegistry</property-class>
+ <value>#{applicationScope.ConsumerRegistry}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>#{sessionScope.consumerId}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>manager</property-name>
+ <value>#{consumersMgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+ <property-class>org.jboss.portal.wsrp.admin.ui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
+ </managed-bean>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>index</from-outcome>
+ <to-view-id>/WEB-INF/jsf/consumers/consumers.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>configureConsumer</from-outcome>
+ <to-view-id>/WEB-INF/jsf/consumers/editConsumer.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jboss-portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jboss-portlet.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jboss-portlet.xml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,40 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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 portlet-app PUBLIC "-//JBoss Portal//DTD JBoss Portlet 2.6//EN" "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+<portlet-app>
+ <portlet>
+ <portlet-name>WSRPConsumersConfigurationPortlet</portlet-name>
+ <transaction>
+ <trans-attribute>Required</trans-attribute>
+ </transaction>
+ <header-content>
+ <link rel="stylesheet" type="text/css" href="/style.css" media="screen"/>
+ </header-content>
+ </portlet>
+ <service>
+ <service-name>ConsumerRegistry</service-name>
+ <service-class>org.jboss.portal.wsrp.consumer.ConsumerRegistry</service-class>
+ <service-ref>portal.wsrp:service=ConsumerRegistry</service-ref>
+ </service>
+</portlet-app>
+
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/consumers.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/consumers.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/consumers.xhtml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,69 @@
+<div class="wsrp-consumers-ui"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core">
+
+ <h:form style="padding: 1em 0;">
+ Create a consumer named: <h:inputText value="#{consumersMgr.selectedId}" id="consumerName"/>
+ <h:message styleClass="error" for="consumerName"/>
+ <h:commandButton action="#{consumersMgr.createConsumer}" value="Create Consumer"
+ styleClass="portlet-form-button"/>
+ </h:form>
+
+ <hr style="margin: 1em 0 2em;"/>
+
+ <h:messages errorClass="error" infoClass="info"/>
+
+ <table width="100%" class="portlet-table-body" style="margin-bottom: 1em;">
+ <thead>
+ <tr class="portlet-table-header">
+ <th>Consumer
+ <div style="font-size: 75%; display:inline; font-weight: normal;">
+ [status: <span class="active">active</span>, <span class="inactive">inactive</span>,
+ <span class="needsRefresh">needs refresh</span>]
+ </div>
+ </th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <h:form>
+ <c:forEach items="#{consumersMgr.consumers}" var="consumer" varStatus="status">
+ <tr>
+ <td
+ class="#{consumer.active ? 'active' : 'inactive'} #{consumer.refreshNeeded ? 'needsRefresh' : ''}">
+ <h:outputText value="#{consumer.producerId} (#{consumer.active ? 'active' : 'inactive'})
+ #{consumer.refreshNeeded ? '(refresh needed)' : ''}"/>
+ </td>
+ <td class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+ <h:commandLink action="#{consumersMgr.configureConsumer}">
+ <f:param name="id" value="#{consumer.producerId}"/>
+ <h:outputText value="Configure"/>
+ </h:commandLink> | <h:commandLink action="#{consumersMgr.refreshConsumer}">
+ <f:param name="id" value="#{consumer.producerId}"/>
+ <h:outputText value="Refresh"/>
+ </h:commandLink> | <h:commandLink action="#{consumersMgr.activateConsumer}">
+ <f:param name="id" value="#{consumer.producerId}"/>
+ <f:param name="activate" value="#{!consumer.active}"/>
+ <h:outputText value="#{consumer.active ? 'Deactivate' : 'Activate'}"/>
+ </h:commandLink>
+ <c:if
+ test="#{!consumer.refreshNeeded and consumer.active and consumer.producerInfo.registrationRequired}">
+ | <h:commandLink action="#{consumersMgr.registerConsumer}">
+ <f:param name="id" value="#{consumer.producerId}"/>
+ <f:param name="register" value="#{!consumer.producerInfo.registered}"/>
+ <h:outputText value="#{consumer.producerInfo.registered ? 'Deregister' : 'Register'}"/>
+ </h:commandLink>
+ </c:if> | <h:commandLink action="#{consumersMgr.destroyConsumer}">
+ <f:param name="id" value="#{consumer.producerId}"/>
+ <h:outputText value="Destroy"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </h:form>
+ </tbody>
+ </table>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/editConsumer.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/editConsumer.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,177 @@
+<div class="wsrp-consumer-ui"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core">
+
+<h1
+ class="portlet-section-header #{consumer.active ? 'active' : 'inactive'} #{consumer.refreshNeeded ? 'needsRefresh' : ''}">
+ Consumer '#{consumer.id}' configuration (#{consumer.active ? 'active' : 'inactive'})
+ #{consumer.refreshNeeded ? '(refresh needed)' : ''}</h1>
+
+<hr/>
+
+<h:form>
+<h:messages errorClass="error" infoClass="info"/>
+<table width="100%" class="portlet-table-body">
+<tr>
+ <th>Producer id:</th>
+ <td>
+ <h:inputText id="id" value="#{consumer.id}"/> <h:message styleClass="error" for="id"/>
+ </td>
+</tr>
+<tr>
+ <th>Cache expiration:</th>
+ <td>
+ <h:inputText id="cache" value="#{consumer.cache}"/> (seconds before expiration) <h:message styleClass="error"
+ for="cache"/>
+ </td>
+</tr>
+<tr>
+ <th>Endpoint configuration:</th>
+ <td>
+ <h:selectBooleanCheckbox id="useWSDL" value="#{consumer.useWSDL}" onchange="this.form.submit()"
+ valueChangeListener="#{consumer.useWSDLListener}" immediate="true"/>Use WSDL?
+ <h:message styleClass="error" for="useWSDL"/>
+ <c:choose>
+ <c:when test="#{consumer.useWSDL}">
+ <h:inputText id="wsdl" size="70" value="#{consumer.wsdl}"/> <h:message styleClass="error" for="wsdl"/>
+ </c:when>
+
+ <c:otherwise>
+ <table border="0" class='portlet-table-body'>
+ <tr>
+ <th>Service Description URL:</th>
+ <td>
+ <h:inputText id="sd" size="70" value="#{consumer.serviceDescription}"/> <h:message
+ styleClass="error" for="sd"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Markup URL:</th>
+ <td>
+ <h:inputText id="m" size="70" value="#{consumer.markup}"/> <h:message styleClass="error" for="m"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Registration URL:</th>
+ <td>
+ <h:inputText id="r" size="70" value="#{consumer.registration}"/> <h:message styleClass="error"
+ for="r"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Portlet Management URL:</th>
+ <td>
+ <h:inputText id="pm" size="70" value="#{consumer.portletManagement}"/> <h:message
+ styleClass="error" for="pm"/>
+ </td>
+ </tr>
+ </table>
+ </c:otherwise>
+ </c:choose>
+ </td>
+</tr>
+<c:if test="#{consumer.localInfoPresent or !consumer.refreshNeeded}">
+ <tr>
+ <th>Registration information</th>
+ <td>
+ <c:choose>
+ <c:when test="#{consumer.localInfoPresent}">
+ <c:choose>
+ <c:when test="#{!empty consumer.producerInfo.registrationInfo.registrationProperties}">
+ <table border='1' cellspacing='0' class='registration-prop-table'>
+ <tr>
+ <th>Name</th>
+ <th>Value</th>
+ </tr>
+ <c:forEach items="#{consumer.producerInfo.registrationInfo.registrationProperties}" var="prop">
+ <tr title="#{prop.description.label.value}">
+ <td>
+ <h:outputText value="#{prop.name}"/>
+ </td>
+ <td>
+ <h:inputText value="#{prop.value}" size="40" onchange="this.form.submit()"
+ immediate="true" valueChangeListener="#{consumer.regPropListener}"/>
+ <h:outputText styleClass="error" value="#{prop.status}"
+ rendered="#{prop.determinedInvalid}"/>
+ </td>
+ </tr>
+ </c:forEach>
+ </table>
+ </c:when>
+ <c:otherwise>
+ Registration is indicated as required without registration properties.
+ </c:otherwise>
+ </c:choose>
+ </c:when>
+ <c:when test="#{consumer.registrationChecked and !consumer.registrationRequired}">
+ Producer doesn't require registration.
+ </c:when>
+ </c:choose>
+ </td>
+ </tr>
+ <c:if test="#{!empty consumer.producerInfo.registrationInfo.registrationHandle}">
+ <tr>
+ <th>Registration context:</th>
+ <td>Handle:
+ <h:outputText value="#{consumer.producerInfo.registrationInfo.registrationHandle}"/>
+ </td>
+ </tr>
+ </c:if>
+ <c:choose>
+ <c:when test="#{consumer.registrationCheckNeeded}">
+ <tr>
+ <td colspan="2">
+ <p class="info">Registration information hasn't been validated with the Producer. You should validate
+ it.</p>
+ <h:commandLink action="#{consumer.refreshRegistrationInfo}" value="Validate"
+ title="Validate registration info from Producer" styleClass="portlet-form-button">
+ <f:param name="mergeLocalInfo" value="true"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:when>
+ <c:otherwise>
+ <c:if
+ test="#{!empty consumer.producerInfo.registrationInfo.registrationHandle and !consumer.registrationValid}">
+ <tr>
+ <td colspan="2">
+ <p class="error">Registration is not valid. You can try to fix the problems and modify the
+ registration.</p>
+ <h:commandLink action="#{consumer.modifyRegistration}" value="Modify registration"
+ title="Modify the registration held with this Producer"
+ styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </c:if>
+ </c:otherwise>
+ </c:choose>
+ <c:if test="#{consumer.registrationModified}">
+ <tr>
+ <td colspan="2">
+ <h:commandLink action="#{consumer.modifyRegistration}" value="Modify registration"
+ title="Modify the registration held with this Producer"
+ styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </c:if>
+</c:if>
+<tr>
+ <td colspan="2" style="padding: 1em 1em 1em 0;">
+ <h:commandButton action="#{consumer.update}" value="Save" title="" styleClass="portlet-form-button">
+ <f:param name="id" value="#{consumer.id}"/>
+ </h:commandButton>
+ <h:commandLink action="#{consumer.refreshConsumer}" value="Save & Refresh"
+ title="Save changes and refresh information from Producer"
+ styleClass="portlet-form-button">
+ <f:param name="id" value="#{consumer.id}"/>
+ </h:commandLink>
+ <h:commandLink action="#{consumersMgr.listConsumers}" value="Cancel" immediate="true"
+ styleClass="portlet-form-button"/>
+ </td>
+</tr>
+</table>
+</h:form>
+</div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet-instances.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet-instances.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet-instances.xml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,38 @@
+<?xml version="1.0" standalone="yes"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<deployments>
+ <deployment>
+ <instance>
+ <instance-id>WSRPConsumersConfigurationPortletInstance</instance-id>
+ <portlet-ref>WSRPConsumersConfigurationPortlet</portlet-ref>
+ <security-constraint>
+ <policy-permission>
+ <role-name>Admin</role-name>
+ <action-name>view</action-name>
+ </policy-permission>
+ </security-constraint>
+ </instance>
+ </deployment>
+</deployments>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,46 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, 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_1_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ version="1.0">
+ <portlet>
+ <description>Configuration portlet for WSRP remote producers.</description>
+ <portlet-name>WSRPConsumersConfigurationPortlet</portlet-name>
+ <display-name>WSRP Consumers Configuration</display-name>
+ <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
+ <init-param>
+ <name>default-view</name>
+ <value>/WEB-INF/jsf/consumers/consumers.xhtml</value>
+ </init-param>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>WSRP Consumers Configuration</title>
+ <keywords>management,admin,wsrp</keywords>
+ </portlet-info>
+ </portlet>
+</portlet-app>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,90 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <!-- MyFaces specific configuration -->
+ <context-param>
+ <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- Facelet configuration -->
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.SKIP_COMMENTS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- JSF configuration -->
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+
+ <!-- JSF entry point -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <context-param>
+ <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ </listener>
+
+</web-app>
+
+
Property changes on: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/wsrp-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/wsrp-object.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/wsrp-object.xml 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, 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 deployments PUBLIC "-//JBoss Portal//DTD Portal Object 2.6//EN" "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <parent-ref>admin</parent-ref>
+ <if-exists>keep</if-exists>
+ <page>
+ <page-name>WSRP</page-name>
+ <security-constraint>
+ <policy-permission>
+ <action-name>viewrecursive</action-name>
+ <role-name>Admin</role-name>
+ </policy-permission>
+ </security-constraint>
+ <window>
+ <window-name>WSRPConsumersConfigurationPortletWindow</window-name>
+ <instance-ref>WSRPConsumersConfigurationPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ </deployment>
+</deployments>
Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/style.css (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/style.css 2007-07-11 21:10:38 UTC (rev 7723)
@@ -0,0 +1,70 @@
+.wsrp-consumers-ui table, .wsrp-consumer-ui table {
+ border: 0;
+ border-collapse: separate;
+}
+
+.wsrp-consumers-ui th {
+ text-align: left;
+ border: 0;
+ border-bottom: 1px solid;
+}
+
+.wsrp-consumers-ui td {
+ border: 0;
+ padding-bottom: 2px;
+ padding-top: 2px;
+}
+
+.wsrp-consumer-ui th {
+ text-align: left;
+ border: 0;
+ vertical-align: top;
+}
+
+.wsrp-consumer-ui td {
+ border: 0;
+ padding-bottom: 2px;
+ padding-top: 2px;
+}
+
+.wsrp-consumers-ui .active, .wsrp-consumer-ui .active {
+ background-color: #C7DDB7;
+ font-weight: bold;
+}
+
+.wsrp-consumers-ui .inactive, .wsrp-consumer-ui .inactive {
+ background-color: #EBD1B8;
+}
+
+.wsrp-consumers-ui .needsRefresh, .wsrp-consumer-ui .needsRefresh {
+ font-style: italic;
+}
+
+.wsrp-consumer-ui .registration-prop-table {
+ text-align: left;
+ border: 0;
+ border-collapse: separate;
+}
+
+.wsrp-consumer-ui .portlet-form-button {
+ padding: .2em;
+ margin: 0 .3em;
+}
+
+.error {
+ font-weight: bold;
+ color: red;
+}
+
+.error:before {
+ content: "Error: "
+}
+
+.info {
+ font-weight: bold;
+ color: green;
+}
+
+.info:before {
+ content: "Info: "
+}
\ No newline at end of file
16 years, 11 months
JBoss Portal SVN: r7721 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-11 11:18:32 -0400 (Wed, 11 Jul 2007)
New Revision: 7721
Modified:
docs/trunk/referenceGuide/en/modules/authentication.xml
Log:
JBPORTAL-1571 - not valid XML in doc example
Modified: docs/trunk/referenceGuide/en/modules/authentication.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/authentication.xml 2007-07-11 15:18:10 UTC (rev 7720)
+++ docs/trunk/referenceGuide/en/modules/authentication.xml 2007-07-11 15:18:32 UTC (rev 7721)
@@ -110,7 +110,7 @@
<module-option name="dsJndiName">java:/PortalDS</module-option>
<module-option name="principalsQuery">
SELECT jbp_password FROM jbp_users WHERE jbp_uname=?
- </module-option
+ </module-option/>
<module-option name="rolesQuery">
SELECT jbp_roles.jbp_name, 'Roles' FROM jbp_role_membership INNER JOIN
jbp_roles ON jbp_role_membership.jbp_rid = jbp_roles.jbp_rid INNER JOIN jbp_users ON
16 years, 11 months
JBoss Portal SVN: r7720 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-11 11:18:10 -0400 (Wed, 11 Jul 2007)
New Revision: 7720
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/authentication.xml
Log:
JBPORTAL-1571 - not valid XML in doc example
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/authentication.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/authentication.xml 2007-07-11 15:05:15 UTC (rev 7719)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/authentication.xml 2007-07-11 15:18:10 UTC (rev 7720)
@@ -110,7 +110,7 @@
<module-option name="dsJndiName">java:/PortalDS</module-option>
<module-option name="principalsQuery">
SELECT jbp_password FROM jbp_users WHERE jbp_uname=?
- </module-option
+ </module-option/>
<module-option name="rolesQuery">
SELECT jbp_roles.jbp_name, 'Roles' FROM jbp_role_membership INNER JOIN
jbp_roles ON jbp_role_membership.jbp_rid = jbp_roles.jbp_rid INNER JOIN jbp_users ON
16 years, 11 months
JBoss Portal SVN: r7719 - in branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google: provider and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-11 11:05:15 -0400 (Wed, 11 Jul 2007)
New Revision: 7719
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java
Log:
JBPORTAL-1555 - use 'synd=jboss' for google gadgets directory rss feed
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-11 14:02:49 UTC (rev 7718)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-11 15:05:15 UTC (rev 7719)
@@ -100,7 +100,7 @@
if (info != null)
{
// Generate base params
- tmp.append("&synd=open");
+ tmp.append("&synd=jboss");
tmp.append("&w=").append(info.getWidth());
tmp.append("&h=").append(info.getHeight());
//don's let to override the title param - proper one will be picked up with i18n support
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java 2007-07-11 14:02:49 UTC (rev 7718)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQuery.java 2007-07-11 15:05:15 UTC (rev 7719)
@@ -115,7 +115,7 @@
URL buildQueryURL() throws MalformedURLException
{
- StringBuffer buffer = new StringBuffer("http://www.google.com/ig/directory?synd=open&output=rss");
+ StringBuffer buffer = new StringBuffer("http://www.google.com/ig/directory?synd=jboss&output=rss");
if (start > 0)
{
buffer.append("&start=").append(start);
16 years, 11 months
JBoss Portal SVN: r7718 - in trunk/identity/src/main/org/jboss/portal: identity/ldap and 1 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-11 10:02:49 -0400 (Wed, 11 Jul 2007)
New Revision: 7718
Modified:
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
Log:
JBPORTAL-1570 - make identity modules implementation handle CachedUserImpl properly
Modified: trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
+++ trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-07-11 14:02:49 UTC (rev 7718)
@@ -27,6 +27,9 @@
import org.jboss.portal.identity.db.HibernateUserImpl;
import org.jboss.portal.identity.db.HibernateRoleImpl;
import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.common.util.Tools;
import org.hibernate.SessionFactory;
import org.hibernate.Session;
@@ -53,6 +56,8 @@
/** . */
protected String sessionFactoryJNDIName;
+ private HibernateUserModuleImpl userModule;
+
protected void startService() throws Exception
{
//
@@ -87,7 +92,23 @@
public Set getRoles(User user) throws IdentityException
{
- //throw new UnsupportedOperationException("Not yet implemented");
+ if (user == null)
+ {
+ throw new IllegalArgumentException("User cannot be null");
+ }
+
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
if (!(user instanceof HibernateUserImpl))
{
throw new IllegalArgumentException("User is not a HibernateUserImpl user");
@@ -137,6 +158,19 @@
for (Iterator i = users.iterator(); i.hasNext();)
{
Object o = i.next();
+
+ if (o instanceof CachedUserImpl)
+ {
+ try
+ {
+ o = getUserModule().findUserById(((User)o).getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ log.error("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
if (o instanceof HibernateUserImpl)
{
HibernateUserImpl user = (HibernateUserImpl)o;
@@ -152,7 +186,24 @@
public void assignRoles(User user, Set roles) throws IdentityException
{
- //throw new UnsupportedOperationException("Not yet implemented");
+
+ if (user == null)
+ {
+ throw new IllegalArgumentException("User cannot be null");
+ }
+
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
if (!(user instanceof HibernateUserImpl))
{
throw new IllegalArgumentException("User is not a HibernateUserImpl user");
@@ -231,13 +282,23 @@
}
}
- /**
- * Process Set of Map objects and returns a Set of HibernateRoleImpl objects
- * @param maps
- * @return
- * @throws Exception
- */
+ protected HibernateUserModuleImpl getUserModule() throws IdentityException
+ {
+ if (userModule == null)
+ {
+ try
+ {
+ this.userModule = (HibernateUserModuleImpl)getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
+ }
+ catch (ClassCastException e)
+ {
+ throw new IdentityException("Not supported object as part of the context - must be HibernateUserModuleImpl", e);
+ }
+ }
+ return userModule;
+ }
+
/** Can be subclasses to provide testing in a non JTA environement. */
protected Session getCurrentSession()
{
Modified: trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
+++ trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-07-11 14:02:49 UTC (rev 7718)
@@ -35,6 +35,9 @@
import javax.naming.InitialContext;
import org.jboss.portal.identity.service.UserProfileModuleService;
import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portal.identity.CachedUserImpl;
import java.util.Map;
import java.util.Set;
@@ -55,6 +58,8 @@
/** . */
protected SessionFactory sessionFactory;
+ protected UserModule userModule;
+
/** . */
protected String sessionFactoryJNDIName;
@@ -196,6 +201,18 @@
protected HibernateUserImpl processUser(User user) throws IdentityException
{
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
if (user instanceof HibernateUserImpl)
{
return (HibernateUserImpl)user;
@@ -341,5 +358,21 @@
{
this.randomSynchronizePassword = randomSynchronizePassword;
}
+
+ protected UserModule getUserModule() throws IdentityException
+ {
+ if (userModule == null)
+ {
+ try
+ {
+ this.userModule = (UserModule)getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
+ }
+ catch (ClassCastException e)
+ {
+ throw new IdentityException("Not supported object as part of the context - must be UserModule", e);
+ }
+ }
+ return userModule;
+ }
}
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-07-11 14:02:49 UTC (rev 7718)
@@ -25,6 +25,8 @@
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.ldap.helper.LDAPTools;
import org.jboss.portal.common.util.Tools;
@@ -60,6 +62,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -242,15 +256,31 @@
{
try
{
- LDAPUserImpl user = (LDAPUserImpl)iterator.next();
+
+ User user = (User)iterator.next();
+
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
+ LDAPUserImpl ldapUser = (LDAPUserImpl)user;
+
if (isUidAttributeIsDN())
{
- member.add(user.getDn());
+ member.add(ldapUser.getDn());
}
else
{
//member.add(user.getId().toString());
- member.add(user.getUserName());
+ member.add(ldapUser.getUserName());
}
}
catch (ClassCastException e)
@@ -283,6 +313,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-07-11 14:02:49 UTC (rev 7718)
@@ -26,6 +26,8 @@
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.NoSuchUserException;
import javax.naming.directory.SearchResult;
import javax.naming.directory.DirContext;
@@ -60,6 +62,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -236,8 +250,23 @@
{
try
{
- LDAPUserImpl user = (LDAPUserImpl)iterator.next();
- userDNsToAdd.add(user.getDn());
+ User user = (User)iterator.next();
+
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
+ LDAPUserImpl ldapUser = (LDAPUserImpl)user;
+
+ userDNsToAdd.add(ldapUser.getDn());
}
catch(ClassCastException e)
{
@@ -324,6 +353,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-07-11 14:02:49 UTC (rev 7718)
@@ -27,6 +27,9 @@
import org.jboss.portal.identity.info.ProfileInfo;
import org.jboss.portal.identity.info.PropertyInfo;
import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.UserModule;
import javax.naming.directory.Attributes;
import javax.naming.directory.Attribute;
@@ -49,6 +52,8 @@
{
private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LDAPUserProfileModuleImpl.class);
+ private UserModule userModule;
+
public Object getProperty(User user, String propertyName) throws IdentityException, IllegalArgumentException
{
if (user == null)
@@ -60,6 +65,18 @@
throw new IllegalArgumentException("Property name need to have value");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -124,6 +141,18 @@
throw new IllegalArgumentException("Property name need to have value");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -184,6 +213,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -306,6 +347,21 @@
return profileInfo;
}
+ protected UserModule getUserModule() throws IdentityException
+ {
+ if (userModule == null)
+ {
+ try
+ {
+ this.userModule = (UserModule)getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
+ }
+ catch (ClassCastException e)
+ {
+ throw new IdentityException("Not supported object as part of the context - must be UserModule", e);
+ }
+ }
+ return userModule;
+ }
}
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-07-11 13:40:02 UTC (rev 7717)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-07-11 14:02:49 UTC (rev 7718)
@@ -10,6 +10,7 @@
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.ProfileMap;
import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.CachedUserImpl;
import org.jboss.portal.common.util.CollectionBuilder;
import org.jboss.portal.common.p3p.P3PConstants;
@@ -188,6 +189,10 @@
u3 = userModule.findUserByUserName("user3");
assertNotNull(u3);
Assert.assertEquals("user3", u3.getUserName());
+
+ //test if CachedUserImpl will be handled properly
+ u3 = new CachedUserImpl(u3.getId(), u3.getUserName());
+
assertNotNull(membershipModule.getRoles(u3));
Assert.assertEquals(1, membershipModule.getRoles(u3).size());
Assert.assertEquals("role1", ((Role)membershipModule.getRoles(u3).iterator().next()).getName());
@@ -418,6 +423,10 @@
//
User user = userModule.createUser("testname", "testpassword");
+
+ //test if CachedUserImpl is handled properly
+ user = new CachedUserImpl(user.getId(), user.getUserName());
+
Map map = userProfileModule.getProperties(user);
//assertEquals("testname", map.get(P3PConstants.INFO_USER_NAME_NICKNAME));
@@ -539,6 +548,14 @@
}
+ public void testFindUserRoles() throws Exception
+ {
+ ctx.begin();
+
+
+ ctx.commit();
+ }
+
public void testGetProperties() throws Exception
{
ctx.begin();
16 years, 11 months
JBoss Portal SVN: r7717 - in branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal: identity/ldap and 1 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-11 09:40:02 -0400 (Wed, 11 Jul 2007)
New Revision: 7717
Modified:
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
Log:
JBPORTAL-1570 - make identity modules implementation handle CachedUserImpl properly
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
@@ -27,6 +27,9 @@
import org.jboss.portal.identity.db.HibernateUserImpl;
import org.jboss.portal.identity.db.HibernateRoleImpl;
import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.common.util.Tools;
import org.hibernate.SessionFactory;
import org.hibernate.Session;
@@ -53,6 +56,8 @@
/** . */
protected String sessionFactoryJNDIName;
+ private HibernateUserModuleImpl userModule;
+
protected void startService() throws Exception
{
//
@@ -87,7 +92,23 @@
public Set getRoles(User user) throws IdentityException
{
- //throw new UnsupportedOperationException("Not yet implemented");
+ if (user == null)
+ {
+ throw new IllegalArgumentException("User cannot be null");
+ }
+
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
if (!(user instanceof HibernateUserImpl))
{
throw new IllegalArgumentException("User is not a HibernateUserImpl user");
@@ -137,6 +158,19 @@
for (Iterator i = users.iterator(); i.hasNext();)
{
Object o = i.next();
+
+ if (o instanceof CachedUserImpl)
+ {
+ try
+ {
+ o = getUserModule().findUserById(((User)o).getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ log.error("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
if (o instanceof HibernateUserImpl)
{
HibernateUserImpl user = (HibernateUserImpl)o;
@@ -152,7 +186,24 @@
public void assignRoles(User user, Set roles) throws IdentityException
{
- //throw new UnsupportedOperationException("Not yet implemented");
+
+ if (user == null)
+ {
+ throw new IllegalArgumentException("User cannot be null");
+ }
+
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
if (!(user instanceof HibernateUserImpl))
{
throw new IllegalArgumentException("User is not a HibernateUserImpl user");
@@ -231,13 +282,23 @@
}
}
- /**
- * Process Set of Map objects and returns a Set of HibernateRoleImpl objects
- * @param maps
- * @return
- * @throws Exception
- */
+ protected HibernateUserModuleImpl getUserModule() throws IdentityException
+ {
+ if (userModule == null)
+ {
+ try
+ {
+ this.userModule = (HibernateUserModuleImpl)getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
+ }
+ catch (ClassCastException e)
+ {
+ throw new IdentityException("Not supported object as part of the context - must be HibernateUserModuleImpl", e);
+ }
+ }
+ return userModule;
+ }
+
/** Can be subclasses to provide testing in a non JTA environement. */
protected Session getCurrentSession()
{
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
@@ -35,6 +35,9 @@
import javax.naming.InitialContext;
import org.jboss.portal.identity.service.UserProfileModuleService;
import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portal.identity.CachedUserImpl;
import java.util.Map;
import java.util.Set;
@@ -55,6 +58,8 @@
/** . */
protected SessionFactory sessionFactory;
+ protected UserModule userModule;
+
/** . */
protected String sessionFactoryJNDIName;
@@ -196,6 +201,18 @@
protected HibernateUserImpl processUser(User user) throws IdentityException
{
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
if (user instanceof HibernateUserImpl)
{
return (HibernateUserImpl)user;
@@ -341,5 +358,21 @@
{
this.randomSynchronizePassword = randomSynchronizePassword;
}
+
+ protected UserModule getUserModule() throws IdentityException
+ {
+ if (userModule == null)
+ {
+ try
+ {
+ this.userModule = (UserModule)getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
+ }
+ catch (ClassCastException e)
+ {
+ throw new IdentityException("Not supported object as part of the context - must be UserModule", e);
+ }
+ }
+ return userModule;
+ }
}
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
@@ -25,6 +25,8 @@
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.ldap.helper.LDAPTools;
import org.jboss.portal.common.util.Tools;
@@ -60,6 +62,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -242,15 +256,31 @@
{
try
{
- LDAPUserImpl user = (LDAPUserImpl)iterator.next();
+
+ User user = (User)iterator.next();
+
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
+ LDAPUserImpl ldapUser = (LDAPUserImpl)user;
+
if (isUidAttributeIsDN())
{
- member.add(user.getDn());
+ member.add(ldapUser.getDn());
}
else
{
//member.add(user.getId().toString());
- member.add(user.getUserName());
+ member.add(ldapUser.getUserName());
}
}
catch (ClassCastException e)
@@ -283,6 +313,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
@@ -26,6 +26,8 @@
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.NoSuchUserException;
import javax.naming.directory.SearchResult;
import javax.naming.directory.DirContext;
@@ -60,6 +62,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -236,8 +250,23 @@
{
try
{
- LDAPUserImpl user = (LDAPUserImpl)iterator.next();
- userDNsToAdd.add(user.getDn());
+ User user = (User)iterator.next();
+
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
+ LDAPUserImpl ldapUser = (LDAPUserImpl)user;
+
+ userDNsToAdd.add(ldapUser.getDn());
}
catch(ClassCastException e)
{
@@ -324,6 +353,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-07-11 13:40:02 UTC (rev 7717)
@@ -27,6 +27,9 @@
import org.jboss.portal.identity.info.ProfileInfo;
import org.jboss.portal.identity.info.PropertyInfo;
import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.UserModule;
import javax.naming.directory.Attributes;
import javax.naming.directory.Attribute;
@@ -49,6 +52,8 @@
{
private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LDAPUserProfileModuleImpl.class);
+ private UserModule userModule;
+
public Object getProperty(User user, String propertyName) throws IdentityException, IllegalArgumentException
{
if (user == null)
@@ -60,6 +65,18 @@
throw new IllegalArgumentException("Property name need to have value");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -124,6 +141,18 @@
throw new IllegalArgumentException("Property name need to have value");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -184,6 +213,18 @@
throw new IllegalArgumentException("User cannot be null");
}
+ if (user instanceof CachedUserImpl)
+ {
+ try
+ {
+ user = getUserModule().findUserById(user.getId());
+ }
+ catch(NoSuchUserException e)
+ {
+ throw new IdentityException("Illegal state - cached user doesn't exist in identity store: ", e);
+ }
+ }
+
LDAPUserImpl ldapUser = null;
if (user instanceof LDAPUserImpl)
@@ -306,6 +347,21 @@
return profileInfo;
}
+ protected UserModule getUserModule() throws IdentityException
+ {
+ if (userModule == null)
+ {
+ try
+ {
+ this.userModule = (UserModule)getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
+ }
+ catch (ClassCastException e)
+ {
+ throw new IdentityException("Not supported object as part of the context - must be UserModule", e);
+ }
+ }
+ return userModule;
+ }
}
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-07-11 06:54:15 UTC (rev 7716)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-07-11 13:40:02 UTC (rev 7717)
@@ -10,6 +10,7 @@
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.ProfileMap;
import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.CachedUserImpl;
import org.jboss.portal.common.util.CollectionBuilder;
import org.jboss.portal.common.p3p.P3PConstants;
@@ -188,6 +189,10 @@
u3 = userModule.findUserByUserName("user3");
assertNotNull(u3);
Assert.assertEquals("user3", u3.getUserName());
+
+ //test if CachedUserImpl will be handled properly
+ u3 = new CachedUserImpl(u3.getId(), u3.getUserName());
+
assertNotNull(membershipModule.getRoles(u3));
Assert.assertEquals(1, membershipModule.getRoles(u3).size());
Assert.assertEquals("role1", ((Role)membershipModule.getRoles(u3).iterator().next()).getName());
@@ -418,6 +423,10 @@
//
User user = userModule.createUser("testname", "testpassword");
+
+ //test if CachedUserImpl is handled properly
+ user = new CachedUserImpl(user.getId(), user.getUserName());
+
Map map = userProfileModule.getProperties(user);
//assertEquals("testname", map.get(P3PConstants.INFO_USER_NAME_NICKNAME));
@@ -539,6 +548,14 @@
}
+ public void testFindUserRoles() throws Exception
+ {
+ ctx.begin();
+
+
+ ctx.commit();
+ }
+
public void testGetProperties() throws Exception
{
ctx.begin();
16 years, 11 months
JBoss Portal SVN: r7716 - in trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf: wizard and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 02:54:15 -0400 (Wed, 11 Jul 2007)
New Revision: 7716
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml
Log:
JBPORTAL-1568: Navigation broken after 120 elements, now it can handle 127*nBelementsPerPage elements.
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-07-11 06:51:09 UTC (rev 7715)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-07-11 06:54:15 UTC (rev 7716)
@@ -49,11 +49,11 @@
</table>
<ul class="pagination">
<c:if test="#{instancemgr.instanceCount > instancemgr.paginationSize}">
- <c:forEach begin="0" end="#{instancemgr.instanceCount - 1}" step="#{instancemgr.paginationSize}"
+ <c:forEach begin="0" end="#{(instancemgr.instanceCount - 1)/ instancemgr.paginationSize}" step="1"
var="index">
<li class="#{index == instancemgr.selectedFrom ? 'selected' : ''}">
- <h:commandLink action="#{instancemgr.selectFrom}"><f:param name="from" value="#{index}"/><h:outputText
- value="#{index}"/></h:commandLink>
+ <h:commandLink action="#{instancemgr.selectFrom}"><f:param name="from" value="#{index * instancemgr.paginationSize}"/><h:outputText
+ value="#{index * instancemgr.paginationSize}"/></h:commandLink>
</li>
</c:forEach>
</c:if>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-07-11 06:51:09 UTC (rev 7715)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-07-11 06:54:15 UTC (rev 7716)
@@ -64,12 +64,12 @@
</table>
<ul class="pagination">
<c:if test="#{portletmgr.portletCount > portletmgr.paginationSize}">
- <c:forEach begin="0" end="#{portletmgr.portletCount - 1}" step="#{portletmgr.paginationSize}"
+ <c:forEach begin="0" end="#{(portletmgr.portletCount - 1) / portletmgr.paginationSize}" step="1"
var="index">
<li class="#{index == portletmgr.selectedFrom ? 'selected' : ''}">
<h:commandLink action="#{portletmgr.selectFrom}"><f:param name="from"
- value="#{index}"/><h:outputText
- value="#{index}"/></h:commandLink>
+ value="#{index * portletmgr.paginationSize}"/><h:outputText
+ value="#{index * portletmgr.paginationSize}"/></h:commandLink>
</li>
</c:forEach>
</c:if>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml 2007-07-11 06:51:09 UTC (rev 7715)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml 2007-07-11 06:54:15 UTC (rev 7716)
@@ -38,12 +38,12 @@
</tbody>
</table>
<ul class="pagination">
- <c:forEach begin="0" end="#{portletmgr.portletCount - 1}" step="#{portletmgr.paginationSize}"
+ <c:forEach begin="0" end="#{(portletmgr.portletCount - 1)/portletmgr.paginationSize}" step="1"
var="index">
<li class="#{index == portletmgr.selectedFrom ? 'selected' : ''}">
<h:commandLink action="#{portletmgr.selectFrom}">
- <f:param name="from" value="#{index}"/>
- <h:outputText value="#{index}"/>
+ <f:param name="from" value="#{index * portletmgr.paginationSize}"/>
+ <h:outputText value="#{index * portletmgr.paginationSize}"/>
</h:commandLink>
</li>
</c:forEach>
16 years, 11 months