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...
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