Author: julien(a)jboss.com
Date: 2007-01-22 15:55:54 -0500 (Mon, 22 Jan 2007)
New Revision: 6069
Added:
trunk/core-samples/
trunk/core-samples/build.bat
trunk/core-samples/build.sh
trunk/core-samples/build.xml
trunk/core-samples/src/
trunk/core-samples/src/bin/
trunk/core-samples/src/bin/portal-samples-war/
trunk/core-samples/src/bin/portal-samples-war/images/
trunk/core-samples/src/bin/portal-samples-war/images/accessorize.gif
trunk/core-samples/src/bin/portal-samples-war/images/developers_banner.gif
trunk/core-samples/src/bin/portal-samples-war/images/dodemo.gif
trunk/core-samples/src/bin/portal-samples-war/images/getcode.gif
trunk/core-samples/src/bin/portal-samples-war/portlet-styles/
trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.css
trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.js
trunk/core-samples/src/main/
trunk/core-samples/src/main/org/
trunk/core-samples/src/main/org/jboss/
trunk/core-samples/src/main/org/jboss/portal/
trunk/core-samples/src/main/org/jboss/portal/core/
trunk/core-samples/src/main/org/jboss/portal/core/portlet/
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/BasicPortlet.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CounterPortlet.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/EncodingPortlet.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/PortletSessionPortlet.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/TestPortlet.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/URLPortlet.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletA.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletB.java
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/WindowConstraintEventListener.java
trunk/core-samples/src/resources/
trunk/core-samples/src/resources/portal-samples-sar/
trunk/core-samples/src/resources/portal-samples-sar/META-INF/
trunk/core-samples/src/resources/portal-samples-sar/META-INF/jboss-service.xml
trunk/core-samples/src/resources/portal-samples-war/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource.properties
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource_fr.properties
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-app.xml
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/info/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/info/view.jsp
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/news/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/news/edit.jsp
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/theme/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/theme/wsrpSelectorTest.jsp
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/weather/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/weather/edit.jsp
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/web.xml
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss1.xsl
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss2.xsl
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/weather/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/weather/Rss.xsl
Removed:
trunk/core/src/bin/portal-samples-war/
trunk/core/src/main/org/jboss/portal/core/portlet/test/
trunk/core/src/resources/portal-samples-war/
Modified:
trunk/core/build.xml
trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java
Log:
moved samples to core-samples
Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml 2007-01-22 20:08:21 UTC (rev 6068)
+++ trunk/core/build.xml 2007-01-22 20:55:54 UTC (rev 6069)
@@ -305,11 +305,6 @@
<fileset dir="${build.resources}/portal-core-war"/>
<fileset dir="${source.bin}/portal-core-war"/>
</copy>
- <!-- portal-samples.war -->
- <copy todir="${build.resources}/jboss-portal/portal-samples.war">
- <fileset dir="${source.bin}/portal-samples-war"/>
- <fileset dir="${build.resources}/portal-samples-war"/>
- </copy>
<!-- portal-ajax.war -->
<copy todir="${build.resources}/jboss-portal/portal-ajax.war">
<fileset
dir="${jboss.portal-theme.root}/resources/portal-ajax-war"/>
@@ -333,7 +328,6 @@
<fileset dir="${jboss.portlet-api.root}/lib"
includes="portal-api-lib.jar"/>
<fileset dir="${jboss.portal-theme.root}/lib"
includes="portal-theme-lib.jar"/>
<fileset dir="${jboss.portal-security.root}/lib"
includes="portal-security-lib.jar"/>
- <fileset dir="${jboss.portal-samples.root}/lib"
includes="portal-samples-lib.jar"/>
<fileset dir="${jboss.portal-identity.root}/lib"
includes="portal-identity-lib.jar"/>
<fileset dir="${jboss.portal-registration.root}/lib"
includes="portal-registration-lib.jar"/>
<fileset dir="${ehcache.ehcache.lib}"
includes="ehcache.jar"/>
Modified: trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-01-22
20:08:21 UTC (rev 6068)
+++ trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-01-22
20:55:54 UTC (rev 6069)
@@ -480,32 +480,6 @@
<xmbean/>
</mbean>
- <!-- A sample listener -->
- <mbean
- code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
- name="portal:service=ListenerService,type=test_listener"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Registry"
-
proxy-type="attribute">portal:service=ListenerRegistry</depends>
- <attribute name="RegistryId">test_listener</attribute>
- <attribute
name="ListenerClassName">org.jboss.portal.core.portlet.test.event.PortletB$Listener</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
- name="portal:service=ListenerService,type=window_listener"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Registry"
-
proxy-type="attribute">portal:service=ListenerRegistry</depends>
- <attribute
name="RegistryId">window_event_listener</attribute>
- <attribute
name="ListenerClassName">org.jboss.portal.core.portlet.test.event.WindowConstraintEventListener</attribute>
- </mbean>
-
<!-- The different containers -->
<mbean
code="org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer"
Added: trunk/core-samples/build.bat
===================================================================
--- trunk/core-samples/build.bat (rev 0)
+++ trunk/core-samples/build.bat 2007-01-22 20:55:54 UTC (rev 6069)
@@ -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 2 2005-01-14 23:01:32Z vietj $
+
+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: trunk/core-samples/build.bat
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/build.sh
===================================================================
--- trunk/core-samples/build.sh (rev 0)
+++ trunk/core-samples/build.sh 2007-01-22 20:55:54 UTC (rev 6069)
@@ -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 2 2005-01-14 23:01:32Z vietj $
+
+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: trunk/core-samples/build.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/build.xml
===================================================================
--- trunk/core-samples/build.xml (rev 0)
+++ trunk/core-samples/build.xml 2007-01-22 20:55:54 UTC (rev 6069)
@@ -0,0 +1,324 @@
+<?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.ant.classpath"/>
+ <path refid="apache.myfaces.classpath"/>
+ <path refid="apache.tomahawk.classpath"/>
+ <path refid="apache.log4j.classpath"/>
+ <path refid="junit.junit.classpath"/>
+ <path refid="sun.servlet.classpath"/>
+ <path refid="jakarta.cactus.classpath"/>
+ <path refid="apache.fileupload.classpath"/>
+ <path refid="jakarta.io.classpath"/>
+ <path refid="oswego.concurrent.classpath"/>
+ <path refid="sun.javamail.classpath"/>
+ <path refid="jwebunit.jwebunit.classpath"/>
+ <path refid="dbunit.dbunit.classpath"/>
+ <path refid="sun.jaf.classpath"/>
+ <path refid="portals.bridges.classpath"/>
+ <path refid="beanshell.beanshell.classpath"/>
+ <path refid="facelets.facelets.classpath"/>
+ <path refid="dom4j.dom4j.classpath"/>
+ <path refid="jboss.aop.classpath"/>
+ <path refid="trove.trove.classpath"/>
+ <path refid="qdox.qdox.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-common.classpath"/>
+ <path refid="jboss.portal-theme.classpath"/>
+ <path refid="jboss.portal-core.classpath"/>
+ <path refid="jboss.portal-format.classpath"/>
+ <path refid="jboss.portal-identity.classpath"/>
+ <path refid="jboss.portal-portlet.classpath"/>
+ <path refid="jboss.portlet-api.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}"/>
+
+ <!-- portal-samples-lib.jar -->
+ <jar jarfile="${build.lib}/portal-core-samples-lib.jar">
+ <fileset dir="${build.classes}">
+ </fileset>
+ </jar>
+
+ <!-- portal-samples.sar -->
+ <copy todir="${build.resources}/portal-samples">
+ <fileset dir="${build.resources}/portal-samples-sar"/>
+ </copy>
+
+ <!-- portal-samples.war -->
+ <copy
todir="${build.resources}/portal-samples/portal-samples.war">
+ <fileset dir="${source.bin}/portal-samples-war"/>
+ <fileset dir="${build.resources}/portal-samples-war"/>
+ </copy>
+
+ <!-- hibernate configuration for identity -->
+ <copy todir="${build.resources}/portal-samples/lib">
+ <fileset dir="${build.lib}"
includes="portal-core-samples-lib.jar"/>
+ <fileset dir="${jboss.portal-samples.root}/lib"
includes="portal-samples-lib.jar"/>
+ </copy>
+ </target>
+
+ <!-- Build the jboss-portal-ha.sar -->
+ <target name="output-ha" depends="artifacts">
+ <copy todir="${build.resources}/portal-samples-ha.sar">
+ <fileset dir="${build.resources}/portal-samples"
excludes="**/*.xml"/>
+ </copy>
+ <copy todir="${build.resources}/portal-samples-ha.sar">
+ <filterset>
+ <filtersfile file="../build/etc/clustered.properties"/>
+ </filterset>
+ <fileset dir="${build.resources}/portal-samples"
includes="**/*.xml"/>
+ </copy>
+ <implode
+ dir="${build.resources}/portal-samples-ha.sar"
+ tofile="${build.lib}/portal-samples-ha.sar"/>
+ </target>
+
+ <!-- Build the jboss-portal.sar -->
+ <target name="output" depends="artifacts">
+ <copy todir="${build.resources}/portal-samples.sar">
+ <fileset dir="${build.resources}/portal-samples"
excludes="**/*.xml"/>
+ </copy>
+ <copy todir="${build.resources}/portal-samples.sar">
+ <filterset>
+ <filtersfile file="../build/etc/single.properties"/>
+ </filterset>
+ <fileset dir="${build.resources}/portal-samples"
includes="**/*.xml"/>
+ </copy>
+ <implode
+ dir="${build.resources}/portal-samples.sar"
+ tofile="${build.lib}/portal-samples.sar"/>
+ </target>
+
+ <!-- create artifacts for running the portlet tests (except TCK) target output
should have already been executed -->
+ <target name="package-tests" depends="init">
+ </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-samples.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
+ </target>
+
+ <target name="deploy-ha"
+ description="Deploy high availability."
+ depends="output-ha">
+ <require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
+ <copy file="${build.lib}/portal-samples-ha.sar"
todir="${jboss.home}/server/${portal-ha.deploy.dir}"/>
+ </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-samples.sar"/>
+ </target>
+
+ <target name="undeploy-ha"
+ description="Undeploy."
+ depends="init">
+ <require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
+ <delete
file="${jboss.home}/server/${portal-ha.deploy.dir}/portal-samples-ha.sar"/>
+ </target>
+
+ <target name="tests" depends="init,
_buildmagic:configure:deployment">
+ </target>
+</project>
Added: trunk/core-samples/src/bin/portal-samples-war/images/accessorize.gif
===================================================================
(Binary files differ)
Property changes on: trunk/core-samples/src/bin/portal-samples-war/images/accessorize.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/core-samples/src/bin/portal-samples-war/images/developers_banner.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/core-samples/src/bin/portal-samples-war/images/developers_banner.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/core-samples/src/bin/portal-samples-war/images/dodemo.gif
===================================================================
(Binary files differ)
Property changes on: trunk/core-samples/src/bin/portal-samples-war/images/dodemo.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/core-samples/src/bin/portal-samples-war/images/getcode.gif
===================================================================
(Binary files differ)
Property changes on: trunk/core-samples/src/bin/portal-samples-war/images/getcode.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.css
===================================================================
--- trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.css
(rev 0)
+++
trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.css 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,13 @@
+#Introducing-HeaderContent {
+/* Original Logo...*/
+ background-image: url( ../images/developers_banner.gif );
+ background-repeat: no-repeat;
+ width: 187px;
+ height: 120px;
+}
+
+#Introducing-HeaderContentInput {
+ position: relative;
+ top: 85px;
+ left: 3px;
+}
Property changes on:
trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.css
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.js
===================================================================
--- trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.js
(rev 0)
+++
trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.js 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,5 @@
+// simple test java script
+function injectJS()
+{
+ alert('hello from the injected java script!');
+}
Property changes on:
trunk/core-samples/src/bin/portal-samples-war/portlet-styles/HeaderContent.js
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/BasicPortlet.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/BasicPortlet.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/BasicPortlet.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,149 @@
+/******************************************************************************
+ * 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.core.portlet.test;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class BasicPortlet implements Portlet
+{
+
+ private PortletConfig config;
+
+ public void init(PortletConfig config) throws PortletException
+ {
+ this.config = config;
+ }
+
+ public void processAction(ActionRequest request, ActionResponse response) throws
PortletException, PortletSecurityException, IOException
+ {
+ for (Iterator i = request.getParameterMap().entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ String name = (String)entry.getKey();
+ String[] values = (String[])entry.getValue();
+ response.setRenderParameter(name + " from action", values);
+ }
+ response.setWindowState(request.getWindowState());
+ }
+
+ public void render(RenderRequest request, RenderResponse response) throws
PortletException, PortletSecurityException, IOException
+ {
+ response.setContentType("text/html");
+ PrintWriter writer = response.getWriter();
+
+ //
+ writer.write("window state : " + request.getWindowState());
+
writer.write("<table><th><td>name</td><td>value</td></th>");
+ for (Iterator i = request.getParameterMap().entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ String name = (String)entry.getKey();
+ String[] values = (String[])entry.getValue();
+ writer.write("<tr><td>" + name +
"</td><td>" + values[0] + "</td></tr>");
+ }
+ writer.write("</table>");
+
+ //
+ PortletURL renderURL = response.createRenderURL();
+ writeLink(writer, renderURL, "empty");
+
+ //
+ renderURL.setParameter("foo", "bar");
+ writeLink(writer, renderURL, "foo=bar");
+
+ //
+ renderURL.setWindowState(WindowState.MAXIMIZED);
+ writeLink(writer, renderURL, "maximized,foo=bar");
+
+ //
+ renderURL = response.createRenderURL();
+ renderURL.setWindowState(WindowState.MAXIMIZED);
+ writeLink(writer, renderURL, "maximized");
+
+ //
+ renderURL = response.createRenderURL();
+ renderURL.setWindowState(WindowState.NORMAL);
+ writeLink(writer, renderURL, "normal");
+
+ //
+ renderURL.setWindowState(WindowState.NORMAL);
+ renderURL.setParameter("foo", "bar");
+ writeLink(writer, renderURL, "normal,foo=bar");
+
+ PortletURL actionURL = response.createActionURL();
+ writeLink(writer, actionURL, "empty");
+
+ //
+ actionURL.setParameter("foo", "bar");
+ writeLink(writer, actionURL, "foo=bar");
+
+ //
+ actionURL.setWindowState(WindowState.MAXIMIZED);
+ writeLink(writer, actionURL, "maximized,foo=bar");
+
+ //
+ actionURL = response.createRenderURL();
+ actionURL.setWindowState(WindowState.MAXIMIZED);
+ writeLink(writer, actionURL, "maximized");
+
+ //
+ actionURL = response.createRenderURL();
+ actionURL.setWindowState(WindowState.NORMAL);
+ writeLink(writer, actionURL, "normal");
+
+ //
+ actionURL.setWindowState(WindowState.NORMAL);
+ actionURL.setParameter("foo", "bar");
+ writeLink(writer, actionURL, "normal,foo=bar");
+
+ //
+ writer.close();
+ }
+
+ private void writeLink(PrintWriter writer, PortletURL url, String label)
+ {
+ writer.print("<div><a href=\"" + url +
"\">" + label + "</a></div>");
+ }
+
+ public void destroy()
+ {
+ this.config = null;
+ }
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/BasicPortlet.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,183 @@
+/******************************************************************************
+ * 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.core.portlet.test;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.format.util.EntityTable;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * This portlet is used to display a form that helps to test the charset handling by the
portal and the client. When a
+ * fault occurs it may be the client fault (for instance the char with unicode value 160
fail the test in firefox but
+ * succeds in IE6).
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class CharsetPortlet extends GenericPortlet
+{
+
+ private static final Logger log = Logger.getLogger(CharsetPortlet.class);
+
+ public void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, PortletSecurityException, IOException
+ {
+ //
+ String fromString = req.getParameter("from");
+ String toString = req.getParameter("to");
+ int from = 0;
+ int to = 0;
+ try
+ {
+ from = Integer.parseInt(fromString);
+ to = Integer.parseInt(toString);
+ }
+ catch (NumberFormatException ignore)
+ {
+ //
+ }
+
+ //
+ StringBuffer buffer = new StringBuffer();
+ for (int i = from; i < to; i++)
+ {
+ char c = (char)i;
+ buffer.append(c);
+ }
+
+ //
+ String text = req.getParameter("text");
+ boolean same = buffer.toString().equals(text);
+
+ //
+ if (!same)
+ {
+ log.error("The input does not match the expected string");
+ log.error("Expected string " + buffer);
+ log.error("Received string " + text);
+ }
+
+ //
+ resp.setRenderParameter("from", "" + from);
+ resp.setRenderParameter("to", "" + to);
+ resp.setRenderParameter("same", "" + same);
+ }
+
+ protected void doView(RenderRequest req, RenderResponse resp) throws PortletException,
PortletSecurityException, IOException
+ {
+ String sameString = req.getParameter("same");
+ Boolean same = null;
+ if ("true".equalsIgnoreCase(sameString))
+ {
+ same = Boolean.TRUE;
+ }
+ else if ("false".equalsIgnoreCase(sameString))
+ {
+ same = Boolean.FALSE;
+ }
+
+ //
+ String fromString = req.getParameter("from");
+ String toString = req.getParameter("to");
+ int from = 65;
+ int to = 256;
+ try
+ {
+ from = Integer.parseInt(fromString);
+ to = from + 16;
+ to = Integer.parseInt(toString);
+ }
+ catch (NumberFormatException ignore)
+ {
+ //
+ }
+
+ //
+ if (to <= from)
+ {
+ to = from + 16;
+ }
+
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ if (same == Boolean.TRUE)
+ {
+ writer.print("The input matched the expected result");
+ }
+ else if (same == Boolean.FALSE)
+ {
+ writer.print("The input did not matched the expected result");
+ }
+
+ //
+ writer.print(
+ "<div> Testing range : " +
+ "<form action=\"" + resp.createRenderURL() + "\"
method=\"post\"\">" +
+ "<input type=\"text\" name=\"from\"
value=\"" + from + "\"/>" +
+ "<input type=\"text\" name=\"to\"
value=\"" + to + "\"/>" +
+ "<input type=\"submit\"
value=\"change\"/>" +
+ "</form>" +
+ "</div>");
+
+ //
+ writer.println(
+ "<div>" +
+ "<form action=\"" + resp.createActionURL() + "\"
accept-charset=\"" + resp.getCharacterEncoding() + "\"
method=\"post\">" +
+ "<input type=\"hidden\" name=\"from\"
value=\"" + from + "\"/>" +
+ "<input type=\"hidden\" name=\"to\"
value=\"" + to + "\"/>" +
+ "<textarea name=\"text\" cols=\"20\"
rows=\"10\" wrap=\"virtual\">");
+ for (int i = from; i < to; i++)
+ {
+ char c = (char)i;
+ String s = EntityTable.FULL.lookup(c);
+ if (s == null)
+ {
+ writer.print(c);
+ }
+ else
+ {
+ writer.print("&" + s + ";");
+ }
+ }
+ writer.println(
+ "</textarea>" +
+ "<input type=\"submit\"
value=\"check\"/>" +
+ "</form>" +
+ "</div>");
+
+ //
+ writer.close();
+ }
+
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CounterPortlet.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CounterPortlet.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CounterPortlet.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * 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.core.portlet.test;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class CounterPortlet extends GenericPortlet
+{
+
+ public void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, PortletSecurityException, IOException
+ {
+ }
+
+ protected void doView(RenderRequest req, RenderResponse resp) throws PortletException,
PortletSecurityException, IOException
+ {
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ PortletSession session = req.getPortletSession();
+ int count = 0;
+ if (session.getAttribute("count") != null)
+ {
+ count = ((Integer)session.getAttribute("count")).intValue() + 1;
+ }
+ session.setAttribute("count", new Integer(count));
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Render
call count</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div>" + count + "</div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ writer.write("<div class=\"portlet-section-header\">Render
call count</div>");
+ writer.write("<div><a href=\"" + resp.createActionURL() +
"\">action</a></div");
+ writer.write("<div><a href=\"" + resp.createRenderURL() +
"\">render</a></div");
+
+ //
+ writer.close();
+ }
+
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CounterPortlet.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/EncodingPortlet.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/EncodingPortlet.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/EncodingPortlet.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * 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.core.portlet.test;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision: 5448 $
+ */
+public class EncodingPortlet extends GenericPortlet
+{
+
+ public void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, PortletSecurityException, IOException
+ {
+ resp.setRenderParameter("text", req.getParameter("text"));
+ req.getPortletSession().setAttribute("text",
req.getParameter("text"));
+
+ }
+
+ protected void doView(RenderRequest req, RenderResponse resp) throws PortletException,
PortletSecurityException, IOException
+ {
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ String param = req.getParameter("text");
+ String attr = (String)req.getPortletSession().getAttribute("text");
+
+ //
+ writer.print(
+ "<div> Text to pass : " +
+ "<form action=\"" + resp.createRenderURL() + "\"
method=\"post\"\" accept-charset=\"" +
resp.getCharacterEncoding() + "\" >" +
+ "<input type=\"text\" name=\"text\"
value=\"\"/>" +
+ "<input type=\"submit\" value=\"Submit to render
phase\"/>" +
+ "</form>" +
+ "<form action=\"" + resp.createActionURL() + "\"
method=\"post\"\" accept-charset=\"" +
resp.getCharacterEncoding() + "\" >" +
+ "<input type=\"text\" name=\"text\"
value=\"\"/>" +
+ "<input type=\"submit\" value=\"Submit to action
phase\"/>" +
+ "</form>" +
+ "</div>");
+
+ //
+ writer.println(
+ "<div>" + "Text retrieved from request parameter: " +
+ "</div>" +
+ "<div>" +
+ "<textarea name=\"text\" cols=\"20\"
rows=\"4\" wrap=\"virtual\">");
+
+ if (param != null)
+ {
+ writer.println(param);
+ }
+
+ writer.println(
+ "</textarea>" +
+ "</div>");
+
+ writer.println(
+ "<div>" + "Text retrieved from portlet session (value set
during Action Phase): " +
+ "</div>" +
+ "<div>" +
+ "<textarea name=\"text\" cols=\"20\"
rows=\"4\" wrap=\"virtual\">");
+
+ if (attr != null)
+ {
+ writer.println(attr);
+ }
+
+ writer.println(
+ "</textarea>" +
+ "</div>");
+
+ //
+ writer.close();
+ }
+
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/EncodingPortlet.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,93 @@
+/******************************************************************************
+ * 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.core.portlet.test;
+
+import org.jboss.portlet.JBossPortlet;
+import org.jboss.portlet.JBossRenderRequest;
+import org.jboss.portlet.JBossRenderResponse;
+
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.PortletURL;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class ExceptionPortlet extends JBossPortlet
+{
+
+ protected void doView(JBossRenderRequest req, JBossRenderResponse resp) throws
PortletException, PortletSecurityException, IOException
+ {
+ String op = req.getParameter("op");
+
+ // Throw any required exception
+ if ("portletexception".equals(op))
+ {
+ throw new PortletException();
+ }
+ if ("portletsecurityexception".equals(op))
+ {
+ throw new PortletSecurityException("");
+ }
+ if ("ioexception".equals(op))
+ {
+ throw new IOException();
+ }
+ if ("runtimeexception".equals(op))
+ {
+ throw new RuntimeException();
+ }
+
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+ PortletURL renderURL = resp.createRenderURL();
+ PortletURL actionURL = resp.createActionURL();
+
+ //
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Throw
:</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ renderURL.setParameter("op", "portletexception");
+ writer.write("<div><a href=\"" + renderURL +
"\">render PortletException</a></div>");
+ renderURL.setParameter("op", "portletsecurityexception");
+ writer.write("<div><a href=\"" + renderURL +
"\">render PortletSecurityException</a></div>");
+ renderURL.setParameter("op", "ioexception");
+ writer.write("<div><a href=\"" + renderURL +
"\">render IOException</a></div>");
+ renderURL.setParameter("op", "runtimeexception");
+ writer.write("<div><a href=\"" + renderURL +
"\">render RuntimeException</a></div>");
+ actionURL.setParameter("op", "portletexception");
+ writer.write("<div><a href=\"" + actionURL +
"\">action PortletException</a></div>");
+ actionURL.setParameter("op", "portletsecurityexception");
+ writer.write("<div><a href=\"" + actionURL +
"\">action PortletSecurityException</a></div>");
+ actionURL.setParameter("op", "ioexception");
+ writer.write("<div><a href=\"" + actionURL +
"\">action IOException</a></div>");
+ actionURL.setParameter("op", "runtimeexception");
+ writer.write("<div><a href=\"" + actionURL +
"\">action RuntimeException</a></div>");
+ writer.write("</div>");
+ writer.write("</p>");
+ }
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/ExceptionPortlet.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/PortletSessionPortlet.java
===================================================================
---
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/PortletSessionPortlet.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/PortletSessionPortlet.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,113 @@
+/******************************************************************************
+ * 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.core.portlet.test;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class PortletSessionPortlet extends GenericPortlet
+{
+ public void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, IOException
+ {
+ String name = req.getParameter("name");
+ String value = req.getParameter("value");
+ boolean portletScope = req.getParameter("portlet") != null;
+ if (name != null && value != null)
+ {
+ req.getPortletSession().setAttribute(name, value, portletScope ?
PortletSession.PORTLET_SCOPE : PortletSession.APPLICATION_SCOPE);
+ }
+ if (req.getParameter("invalidate") != null)
+ {
+ req.getPortletSession().invalidate();
+ }
+ }
+
+ public void render(RenderRequest req, RenderResponse resp) throws PortletException,
IOException
+ {
+ PortletSession session = req.getPortletSession(false);
+ PortletURL purl = resp.createActionURL();
+
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ if (session == null)
+ {
+ writer.println("No session");
+ }
+ else
+ {
+ writer.println("Session id = " + session.getId());
+ writer.println("<br/>");
+
+ //
+ print(session, PortletSession.PORTLET_SCOPE, writer);
+ writer.println("<br/>");
+
+ //
+ print(session, PortletSession.APPLICATION_SCOPE, writer);
+ writer.println("<br/>");
+
+ }
+
+ //
+ writer.println("<form action=\"" + purl.toString() +
"\" method=\"post\">");
+ writer.println("<input type=\"text\"
name=\"name\"/>");
+ writer.println("<input type=\"text\"
name=\"value\"/>");
+ writer.println("<input type=\"submit\" name=\"portlet\"
value=\"Add to portlet scope\"/>");
+ writer.println("<input type=\"submit\"
name=\"application\" value=\"Add to application scope\"/>");
+ writer.println("</form><br/>");
+
+ //
+ purl.setParameter("invalidate", "true");
+ writer.println("<a href=\"" + purl.toString() +
"\">invalidate</a><br/>");
+ }
+
+ private void print(PortletSession session, int scope, PrintWriter writer)
+ {
+ writer.println("<table>");
+
writer.println("<tr><td>name</td><td>value</td>");
+ for (Enumeration e = session.getAttributeNames(scope); e.hasMoreElements();)
+ {
+ String name = (String)e.nextElement();
+ Object value = session.getAttribute(name, scope);
+ writer.println("<tr><td>" + name +
"</td><td>" + value + "</td>");
+ }
+ writer.println("</table>");
+ }
+
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/PortletSessionPortlet.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/TestPortlet.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/TestPortlet.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/TestPortlet.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,238 @@
+/******************************************************************************
+ * 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.core.portlet.test;
+
+import org.jboss.portal.common.transaction.TransactionManagerProvider;
+import org.jboss.portal.core.CoreConstants;
+import org.jboss.portal.identity.User;
+import org.jboss.portlet.JBossActionRequest;
+import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.JBossPortlet;
+import org.jboss.portlet.JBossRenderRequest;
+import org.jboss.portlet.JBossRenderResponse;
+
+import javax.portlet.PortalContext;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.PortletURL;
+import javax.transaction.Transaction;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5883 $
+ */
+public class TestPortlet extends JBossPortlet
+{
+
+ public void main(JBossActionRequest req, JBossActionResponse resp)
+ {
+ }
+
+ public void addrole(JBossActionRequest req, JBossActionResponse resp)
+ {
+ String role = req.getParameter("role");
+ Set roles = (Set)req.getPortletSession().getAttribute("roles");
+ if (roles == null)
+ {
+ roles = new HashSet();
+ req.getPortletSession().setAttribute("roles", roles);
+ }
+ roles.add(role);
+ }
+
+ public void testaction(JBossActionRequest req, JBossActionResponse resp)
+ {
+ resp.setRenderParameter("name", "value");
+ }
+
+ protected void doView(JBossRenderRequest req, JBossRenderResponse resp) throws
PortletException, PortletSecurityException, IOException
+ {
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ User user = req.getUser();
+ if (user != null)
+ {
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">User
infos</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+
+ //TODO: update this with new Identity API
+ //writer.write("<div>Last visit date : " +
user.getLastVisitDate() + "</div>");
+ writer.write("</div>");
+ writer.write("</p>");
+ }
+
+ //
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Portlet
security infos</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div>RemoteUser : " + req.getRemoteUser() +
"</div>");
+ writer.write("<div>Principal : " + req.getUserPrincipal() +
"</div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ //
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Portlet
security role test</div>");
+ Set roles = (Set)req.getPortletSession().getAttribute("roles");
+ if (roles != null)
+ {
+ writer.write("<div class=\"portlet-section-body\">");
+ for (Iterator i = roles.iterator(); i.hasNext();)
+ {
+ String role = (String)i.next();
+ writer.write("<div>" + role + " " +
req.isUserInRole(role) + "</div>");
+ }
+ writer.write("</div>");
+ }
+ PortletURL roleURL = resp.createActionURL();
+ roleURL.setParameter("op", "addrole");
+ writer.write("<div>" +
+ "<form action=\"" + roleURL + "\"
method=\"post\">" +
+ "<input class=\"portlet-form-input-field\"
type=\"text\" name=\"role\" value=\"\"/>" +
+ "<input class=\"portlet-form-button\"
type=\"submit\" value=\"add role\"/>" +
+ "</form>" +
+ "</div>");
+ writer.write("</p>");
+
+ //
+ writer.write("<p>");
+ writer.write("<div
class=\"portlet-section-header\">Capabilities</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div>Content type " + req.getResponseContentType() +
"</div>");
+ writer.write("<div>Preferred markup " +
req.getProperty(CoreConstants.REQ_PROP_PREFERRED_MARKUP) + "</div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ //
+ PortletURL url = resp.createRenderURL();
+ url.setSecure(false);
+ String httpURL = url.toString();
+ url.setSecure(true);
+ String httpsURL = url.toString();
+ writer.write("<p>");
+ writer.write("<div
class=\"portlet-section-header\">Secure</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div><a href=\"" + httpURL +
"\">http</a></div>");
+ writer.write("<div><a href=\"" + httpsURL +
"\">https</a></div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ writer.write("<p>");
+ writer.write("<div
class=\"portlet-section-header\">Path</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div>portal path info = " +
req.getAttribute("PATH") + "</div>");
+ writer.write("<div>portal path info = " +
req.getParameter("PATH") + "</div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ //
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Portal
infos</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ PortalContext portalCtx = req.getPortalContext();
+ writer.write("<div>version : " + portalCtx.getPortalInfo() +
"</div>");
+ for (Enumeration e = portalCtx.getPropertyNames(); e.hasMoreElements();)
+ {
+ String propertyName = (String)e.nextElement();
+ String propertyValue = portalCtx.getProperty(propertyName);
+ writer.write("<div>" + propertyName + " : " +
propertyValue + "</div>");
+ }
+ writer.write("</div>");
+ writer.write("</p>");
+
+ //
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Request
attributes</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ for (Enumeration e = req.getAttributeNames(); e.hasMoreElements();)
+ {
+ String name = (String)e.nextElement();
+ Object value = req.getAttribute(name);
+ writer.write("<div>" + name + " : " + value +
"</div>");
+ }
+ writer.write("</div>");
+ writer.write("</p>");
+
+ // User properties
+ Map userInfoMap = (Map)req.getAttribute(PortletRequest.USER_INFO);
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">User
properties</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ if (userInfoMap != null)
+ {
+ for (Iterator i = userInfoMap.entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ String key = (String)entry.getKey();
+ String value = (String)entry.getValue();
+ writer.write("<div>" + key + " : " + value +
"</div>");
+ }
+ }
+ writer.write("</div>");
+ writer.write("</p>");
+
+ //
+ PortletURL actionURL = resp.createActionURL();
+ actionURL.setParameter("op", "testaction");
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Test
action</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div><a href=\"" + actionURL +
"\">action</a></div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ //
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Test
current transaction</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div>" + getCurrentTransaction() +
"</div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ //
+ writer.close();
+ }
+
+ private Transaction getCurrentTransaction()
+ {
+ try
+ {
+ return
TransactionManagerProvider.JBOSS_PROVIDER.getTransactionManager().getTransaction();
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/TestPortlet.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/URLPortlet.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/URLPortlet.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/URLPortlet.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * 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.core.portlet.test;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class URLPortlet extends GenericPortlet
+{
+ public void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, IOException
+ {
+ for (Enumeration e = req.getParameterNames(); e.hasMoreElements();)
+ {
+ String name = (String)e.nextElement();
+ String value = req.getParameter(name);
+ if (!"name".equals(name) && !"value".equals(name))
+ {
+ resp.setRenderParameter(name, value);
+ }
+ }
+ String name = req.getParameter("name");
+ String value = req.getParameter("value");
+ if (name != null && value != null)
+ {
+ resp.setRenderParameter(name, value);
+ }
+ }
+
+ public void render(RenderRequest req, RenderResponse resp) throws PortletException,
IOException
+ {
+ String color = req.getParameter("color");
+ if (color == null)
+ {
+ color = "white";
+ }
+
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ PortletURL renderURL = resp.createRenderURL();
+
+ //
+ renderURL.setParameter("color", "blue");
+ String blueURL = renderURL.toString();
+
+ //
+ renderURL.setParameter("color", "red");
+ String redURL = renderURL.toString();
+
+ //
+ renderURL.setParameter("color", "white");
+ String whiteURL = renderURL.toString();
+
+ //
+ writer.print("<a href=\"" + blueURL +
"\">blue</a> -");
+ writer.print("<a href=\"" + redURL +
"\">red</a> -");
+ writer.print("<a href=\"" + whiteURL +
"\">white</a><br/>");
+
+ //
+// PortletURL actionURL = resp.createActionURL();
+ writer.print("Parameters :<br/>");
+ writer.print("<table bgcolor=\"" + color +
"\">");
+
writer.print("<tr><td>Name</td><td>value</td></tr>");
+ for (Enumeration e = req.getParameterNames(); e.hasMoreElements();)
+ {
+ String name = (String)e.nextElement();
+ String value = req.getParameter(name);
+ writer.print("<tr><td>" + name +
"</td><td>" + value + "</td></tr>");
+// actionURL.setParameter(name, value);
+ }
+ writer.print("</table>");
+/*
+ writer.print("<form action=\"" + actionURL.toString() +
"\" method=\"post\">");
+ writer.print("<input type=\"text\"
name=\"name\"/>");
+ writer.print("<input type=\"text\"
name=\"value\"/>");
+ writer.print("<input type=\"submit\"
value=\"add\"/>");
+ writer.print("</form>");
+*/
+
+ //
+ writer.print("<a href=\"" + req.getContextPath() +
"/test.txt\">test</a>");
+
+ writer.close();
+ }
+}
\ No newline at end of file
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/URLPortlet.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletA.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletA.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletA.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * 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.core.portlet.test.event;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class PortletA extends GenericPortlet
+{
+ protected void doView(RenderRequest request, RenderResponse response) throws
PortletException, PortletSecurityException, IOException
+ {
+ response.setContentType("text/html");
+ PrintWriter writer = response.getWriter();
+ writer.println("<form action=\"" + response.createActionURL() +
"\" method=\"post\">");
+ writer.println("<select name=\"color\">");
+ writer.println("<option>blue</option>");
+ writer.println("<option>red</option>");
+ writer.println("<option>black</option>");
+ writer.println("</select>");
+ writer.println("<input type=\"submit\"/>");
+ writer.println("</form>");
+ writer.close();
+ }
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletA.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletB.java
===================================================================
--- trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletB.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletB.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,108 @@
+/******************************************************************************
+ * 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.core.portlet.test.event;
+
+import org.jboss.portal.WindowState;
+import org.jboss.portal.api.node.PortalNode;
+import org.jboss.portal.api.node.event.PortalNodeEvent;
+import org.jboss.portal.api.node.event.PortalNodeEventContext;
+import org.jboss.portal.api.node.event.PortalNodeEventListener;
+import org.jboss.portal.api.node.event.WindowActionEvent;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class PortletB extends GenericPortlet
+{
+
+ public void processAction(ActionRequest request, ActionResponse response) throws
PortletException, PortletSecurityException, IOException
+ {
+ String color = request.getParameter("color");
+ if (color != null)
+ {
+ response.setRenderParameter("color", color);
+ }
+ }
+
+ protected void doView(RenderRequest request, RenderResponse response) throws
PortletException, PortletSecurityException, IOException
+ {
+ String color = request.getParameter("color");
+ response.setContentType("text/html");
+ PrintWriter writer = response.getWriter();
+ writer.println("<div" +
+ (color == null ? "" : " style=\"color:" + color +
";\"") +
+ ">some text in color</div>");
+ writer.close();
+ }
+
+ public static class Listener implements PortalNodeEventListener
+ {
+ public PortalNodeEvent onEvent(PortalNodeEventContext context, PortalNodeEvent
event)
+ {
+ PortalNode node = event.getNode();
+
+ // Get node name
+ String nodeName = node.getName();
+
+ // See if we need to create a new event or not
+ WindowActionEvent newEvent = null;
+ if (nodeName.equals("PortletAWindow") && event instanceof
WindowActionEvent)
+ {
+ // Find window B
+ WindowActionEvent wae = (WindowActionEvent)event;
+ PortalNode windowB = node.resolve("../PortletBWindow");
+ if (windowB != null)
+ {
+ // We can redirect
+ newEvent = new WindowActionEvent(windowB);
+ newEvent.setMode(wae.getMode());
+ newEvent.setWindowState(WindowState.MAXIMIZED);
+ newEvent.setParameters(wae.getParameters());
+ }
+ }
+
+ //
+ if (newEvent != null)
+ {
+ // If we have a new event redirect to it
+ return newEvent;
+ }
+ else
+ {
+ // Otherwise bubble up
+ return context.dispatch();
+ }
+ }
+ }
+}
Property changes on:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/PortletB.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/WindowConstraintEventListener.java
===================================================================
---
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/WindowConstraintEventListener.java
(rev 0)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/event/WindowConstraintEventListener.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,254 @@
+/******************************************************************************
+ * 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.core.portlet.test.event;
+
+import org.jboss.portal.api.node.event.PortalNodeEventListener;
+import org.jboss.portal.api.node.event.PortalNodeEvent;
+import org.jboss.portal.api.node.event.PortalNodeEventContext;
+import org.jboss.portal.api.node.event.PageRenderEvent;
+import org.jboss.portal.api.node.event.WindowNavigationEvent;
+import org.jboss.portal.api.node.PortalNode;
+import org.jboss.portal.theme.ThemeConstants;
+import org.jboss.portal.spi.NavigationalStateContext;
+import org.jboss.portal.WindowState;
+
+import java.util.Map;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.SortedMap;
+import java.util.TreeMap;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WindowConstraintEventListener implements PortalNodeEventListener
+{
+
+ public PortalNodeEvent onEvent(PortalNodeEventContext context, PortalNodeEvent event)
+ {
+ if (event instanceof PageRenderEvent)
+ {
+ PortalNode targetPage = event.getNode();
+ WindowManipulator manipulator = new
WindowManipulator(context.getNavigationalStateContext(), targetPage);
+
+ // Filter window state for normal and minimized
+ for (Iterator i = manipulator.getRegionNames().iterator();i.hasNext();)
+ {
+ boolean foundNormal = false;
+ PortalNode firstWindow = null;
+ String regionName = (String)i.next();
+ for (Iterator j =
manipulator.getWindows(regionName).iterator();j.hasNext();)
+ {
+ PortalNode window = (PortalNode)j.next();
+
+ // Keep a ref on first window which can be used later
+ if (firstWindow == null)
+ {
+ firstWindow = window;
+ }
+
+ //
+ WindowState ws = manipulator.getWindowState(window);
+ if (WindowState.NORMAL.equals(ws))
+ {
+ if (foundNormal)
+ {
+ manipulator.setWindowState(window, WindowState.MINIMIZED);
+ }
+ else
+ {
+ foundNormal = true;
+ }
+ }
+ else if (WindowState.MINIMIZED.equals(ws))
+ {
+ //
+ }
+ else
+ {
+ manipulator.setWindowState(window, WindowState.MINIMIZED);
+ }
+ }
+
+ //
+ if (foundNormal == false && firstWindow != null)
+ {
+ manipulator.setWindowState(firstWindow, WindowState.NORMAL);
+ }
+ }
+ }
+ else if (event instanceof WindowNavigationEvent)
+ {
+ WindowNavigationEvent wne = (WindowNavigationEvent)event;
+ PortalNode targetWindow = event.getNode();
+ WindowManipulator manipulator = new
WindowManipulator(context.getNavigationalStateContext(), targetWindow.getParent());
+
+ //
+ WindowState ws = wne.getWindowState();
+
+ //
+ if (WindowState.NORMAL.equals(ws))
+ {
+ String regionName = manipulator.getRegionName(targetWindow);
+ if (regionName != null)
+ {
+ for (Iterator i =
manipulator.getWindows(regionName).iterator();i.hasNext();)
+ {
+ PortalNode currentWindow = (PortalNode)i.next();
+ if (currentWindow.equals(targetWindow))
+ {
+ // Do nothing
+ }
+ else
+ {
+ manipulator.setWindowState(currentWindow, WindowState.MINIMIZED);
+ }
+ }
+ }
+ }
+ else if (WindowState.MINIMIZED.equals(ws))
+ {
+ String regionName = manipulator.getRegionName(targetWindow);
+ if (regionName != null)
+ {
+ // Find the window following the minimized one
+ PortalNode nextWindow = null;
+ for (Iterator i =
manipulator.getWindows(regionName).iterator();i.hasNext();)
+ {
+ PortalNode currentWindow = (PortalNode)i.next();
+
+ // Keep a ref on the first window for later use
+ if (nextWindow == null)
+ {
+ nextWindow = currentWindow;
+ }
+
+ //
+ if (currentWindow.equals(targetWindow))
+ {
+ // Try to get the next window otherwise it means it's the last
window
+ // and we'll use the window we saved at the first iteration
+ if (i.hasNext())
+ {
+ nextWindow = (PortalNode)i.next();
+ }
+
+ //
+ break;
+ }
+ }
+
+ // Normalize the next window
+ if (nextWindow != null)
+ {
+ manipulator.setWindowState(nextWindow, WindowState.NORMAL);
+ }
+ }
+ }
+ }
+ return context.dispatch();
+ }
+
+ public class WindowManipulator
+ {
+
+ /** . */
+ private Map regionMap;
+
+ /** . */
+ private NavigationalStateContext nsContext;
+
+ public WindowManipulator(NavigationalStateContext nsContext, PortalNode parent)
+ {
+ this.nsContext = nsContext;
+
+ // Build appropriate structure
+ regionMap = new HashMap();
+ for (Iterator i = parent.getChildren().iterator();i.hasNext();)
+ {
+ try
+ {
+ PortalNode object = (PortalNode)i.next();
+ if (object.getType() == PortalNode.TYPE_WINDOW)
+ {
+ String region =
(String)object.getProperties().get(ThemeConstants.PORTAL_PROP_REGION);
+ Integer order = new
Integer((String)object.getProperties().get(ThemeConstants.PORTAL_PROP_ORDER));
+
+ //
+ SortedMap windowMap = (SortedMap)regionMap.get(region);
+ if (windowMap == null)
+ {
+ windowMap = new TreeMap();
+ regionMap.put(region, windowMap);
+ }
+ windowMap.put(order, object);
+ }
+ }
+ catch (NumberFormatException ignore)
+ {
+ }
+ }
+ }
+
+ public String getRegionName(PortalNode window)
+ {
+ for (Iterator i = regionMap.entrySet().iterator();i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ SortedMap windows = (SortedMap)entry.getValue();
+ for (Iterator j = windows.values().iterator();j.hasNext();)
+ {
+ PortalNode window2 = (PortalNode)j.next();
+ if (window.equals(window2))
+ {
+ return (String)entry.getKey();
+ }
+ }
+ }
+ return null;
+ }
+
+ public Set getRegionNames()
+ {
+ return regionMap.keySet();
+ }
+
+ public Collection getWindows(String regionName)
+ {
+ return ((Map)regionMap.get(regionName)).values();
+ }
+
+ public WindowState getWindowState(PortalNode window)
+ {
+ return nsContext.getWindowState(window);
+ }
+
+ public void setWindowState(PortalNode window, WindowState windowState)
+ {
+ nsContext.setWindowState(window, windowState);
+ }
+ }
+}
Added: trunk/core-samples/src/resources/portal-samples-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-sar/META-INF/jboss-service.xml
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-sar/META-INF/jboss-service.xml 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,53 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+
+ <!-- A sample listener -->
+ <mbean
+ code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
+ name="portal:service=ListenerService,type=test_listener"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends
+ optional-attribute-name="Registry"
+
proxy-type="attribute">portal:service=ListenerRegistry</depends>
+ <attribute name="RegistryId">test_listener</attribute>
+ <attribute
name="ListenerClassName">org.jboss.portal.core.portlet.test.event.PortletB$Listener</attribute>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
+ name="portal:service=ListenerService,type=window_listener"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends
+ optional-attribute-name="Registry"
+
proxy-type="attribute">portal:service=ListenerRegistry</depends>
+ <attribute
name="RegistryId">window_event_listener</attribute>
+ <attribute
name="ListenerClassName">org.jboss.portal.core.portlet.test.event.WindowConstraintEventListener</attribute>
+ </mbean>
+
+</server>
Added:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource.properties
===================================================================
---
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource.properties
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource.properties 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,25 @@
+################################################################################
+# 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. #
+################################################################################
+
+javax.portlet.preference.description.RssXml=RSS feed URL
+javax.portlet.preference.description.expires=Expiration time
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource.properties
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource_fr.properties
===================================================================
---
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource_fr.properties
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource_fr.properties 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,25 @@
+################################################################################
+# 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. #
+################################################################################
+
+javax.portlet.preference.description.RssXml=URL du flux RSS
+javax.portlet.preference.description.expires=Temps d'expiration
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/classes/NewsResource_fr.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,273 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<deployments>
+ <deployment>
+ <parent-ref>default</parent-ref>
+ <if-exists>keep</if-exists>
+ <page>
+ <page-name>Test</page-name>
+ <properties>
+ <property>
+ <name>theme.ajax.object_disabled</name>
+ <value>true</value>
+ </property>
+ <property>
+ <name>order</name>
+ <value>3</value>
+ </property>
+ </properties>
+ <window>
+ <window-name>TestPortletWindow</window-name>
+ <instance-ref>TestPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <page>
+ <page-name>event test</page-name>
+ <listener>event_listener</listener>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>PortletAWindow</window-name>
+ <instance-ref>PortletAInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>PortletBWindow</window-name>
+ <instance-ref>PortletBInstance</instance-ref>
+ <region>center</region>
+ <height>1</height>
+ </window>
+ </page>
+ <page>
+ <page-name>page event test</page-name>
+ <listener>window_event_listener</listener>
+ <window>
+ <window-name>CatalogPortletWindow1</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CatalogPortletWindow2</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>1</height>
+ </window>
+ <window>
+ <window-name>CatalogPortletWindow3</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>2</height>
+ </window>
+ <window>
+ <window-name>CatalogPortletWindow4</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CatalogPortletWindow5</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>center</region>
+ <height>1</height>
+ </window>
+ <window>
+ <window-name>CatalogPortletWindow6</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>center</region>
+ <height>2</height>
+ </window>
+ </page>
+ <page>
+ <page-name>secure test</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>SecuredTestPortletWindow</window-name>
+ <instance-ref>SecuredTestPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>exception test</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>ExceptionPortletWindow</window-name>
+ <instance-ref>ExceptionPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>cache test</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CachedCounterPortletWindow</window-name>
+ <instance-ref>CachedCounterPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CounterPortletWindow</window-name>
+ <instance-ref>CounterPortletInstance</instance-ref>
+ <region>center</region>
+ <height>1</height>
+ </window>
+ </page>
+ <page>
+ <page-name>session test</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>PortletSessionPortletWindow</window-name>
+ <instance-ref>PortletSessionPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>missing portlet</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>MissingPortletWindow</window-name>
+ <instance-ref>MissingPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>URL portlet</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>URLPortletWindow</window-name>
+ <instance-ref>URLPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>missing instance</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>MissingInstanceWindow</window-name>
+ <instance-ref>MissingInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>charset test</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CharsetPortletWindow</window-name>
+ <instance-ref>CharsetPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>encoding test</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>EncodingPortletWindow</window-name>
+ <instance-ref>EncodingPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>header test</page-name>
+ <window>
+ <window-name>CatalogPortletWindow</window-name>
+ <instance-ref>CatalogPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>HeaderContentPortletWindow</window-name>
+ <instance-ref>HeaderContentPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ </page>
+ </deployment>
+</deployments>
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-app.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-app.xml
(rev 0)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-app.xml 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,26 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<jboss-app>
+ <app-name>samples</app-name>
+</jboss-app>
\ No newline at end of file
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-app.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,146 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app>
+ <remotable>true</remotable>
+ <portlet>
+ <portlet-name>PortletSessionPortlet</portlet-name>
+ <session-config>
+ <distributed>true</distributed>
+ </session-config>
+ </portlet>
+ <portlet>
+ <portlet-name>HeaderContentPortlet</portlet-name>
+ <remotable>false</remotable>
+ <header-content>
+ <link rel="stylesheet" type="text/css"
href="/portlet-styles/HeaderContent.css" title=""
media="screen"/>
+ <script type="text/javascript"
src="/portlet-styles/HeaderContent.js"/>
+ <meta name="description" content="test"/>
+ </header-content>
+ </portlet>
+
+ <!--All portlets we want to expose in WSRP Producer must be mentioned here-->
+ <portlet>
+ <portlet-name>CounterPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>CachedCounterPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>ExceptionPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>PortletB</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>CharsetPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>EncodingPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>SecuredTestPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>ContentRewritePortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>HintPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>WsrpSelectorTestPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>ThemeSelectorPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>WeatherPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>NewsPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>JSPPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>TestPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>URLPortlet</portlet-name>
+ </portlet>
+ <portlet>
+ <portlet-name>BasicPortlet</portlet-name>
+ </portlet>
+
+ <!-- Service injected in the portlet context. -->
+ <service>
+ <service-name>WebAppRegistry</service-name>
+
<service-class>org.jboss.portal.portlet.container.PortletApplicationRegistry</service-class>
+ <service-ref>:service=WebAppRegistry</service-ref>
+ </service>
+ <service>
+ <service-name>PortalObjectContainer</service-name>
+
<service-class>org.jboss.portal.core.model.portal.PortalObjectContainer</service-class>
+ <service-ref>:container=PortalObject</service-ref>
+ </service>
+ <service>
+ <service-name>InstanceContainer</service-name>
+
<service-class>org.jboss.portal.core.model.instance.InstanceContainer</service-class>
+ <service-ref>:container=Instance</service-ref>
+ </service>
+ <service>
+ <service-name>ThemeService</service-name>
+ <service-class>org.jboss.portal.theme.ThemeService</service-class>
+ <service-ref>:service=ThemeService</service-ref>
+ </service>
+ <service>
+ <service-name>LayoutService</service-name>
+ <service-class>org.jboss.portal.theme.LayoutService</service-class>
+ <service-ref>:service=LayoutService</service-ref>
+ </service>
+ <service>
+ <service-name>UserModule</service-name>
+ <service-class>org.jboss.portal.identity.UserModule</service-class>
+ <service-ref>:service=Module,type=User</service-ref>
+ </service>
+ <service>
+ <service-name>RoleModule</service-name>
+ <service-class>org.jboss.portal.identity.RoleModule</service-class>
+ <service-ref>:service=Module,type=Role</service-ref>
+ </service>
+ <service>
+ <service-name>UserProfileModule</service-name>
+
<service-class>org.jboss.portal.identity.UserProfileModule</service-class>
+ <service-ref>:service=Module,type=UserProfile</service-ref>
+ </service>
+ <service>
+ <service-name>MembershipModule</service-name>
+
<service-class>org.jboss.portal.identity.MembershipModule</service-class>
+ <service-ref>:service=Module,type=Membership</service-ref>
+ </service>
+ <service>
+ <service-name>MailModule</service-name>
+
<service-class>org.jboss.portal.core.modules.MailModule</service-class>
+ <service-ref>:service=Module,type=Mail</service-ref>
+ </service>
+</portlet-app>
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/info/view.jsp
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/info/view.jsp
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/info/view.jsp 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,63 @@
+<%@ page import="org.jboss.portal.server.PortalConstants" %>
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~ 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. ~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+
+<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ page isELIgnored="false" %>
+
+<portlet:defineObjects/>
+
+<table border="0" cellspacing="2" cellpadding="2">
+ <tr>
+ <td align="center"><a
href="http://portal.demo.jboss.com" target="_blank"><img
+ src="<%= renderRequest.getContextPath() %>/images/dodemo.gif"
border="0"
+ alt="Try the latest release of JBoss Portal, live and
online."></a>
+ <a
href="http://labs.jboss.com/portal/jbossportal/download/index.html&q...
target="_blank"><img
+ src="<%= renderRequest.getContextPath()
%>/images/getcode.gif" border="0"
+ alt="Download JBoss Portal and have it up and running in
minutes."></a>
+ <a href="http://www.portletswap.com"
target="_blank"><img
+ src="<%= renderRequest.getContextPath()
%>/images/accessorize.gif" border="0"
+ alt="Download portlets and layouts for your new JBoss Portal
installation."></a></td>
+ </tr>
+ <tr>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate">
+ <font class="portlet-font">This is a basic installation of
<b><%= PortalConstants.VERSION %></b>. You may
+ log in at any time, using the <i>Login</i> link at the top-right
of this page, with the following
+ credentials:</font>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate" align="center">
+ <b>user/user</b> or <b>admin/admin</b>
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ If you are in need of guidance with regards to navigating, configuring, or
operating the portal, please view
+ our <a
href="http://labs.jboss.com/portal/jbossportal/docs/index.html"
target="_blank">online documentation</a>.
+ </td>
+ </tr>
+</table>
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/info/view.jsp
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/news/edit.jsp
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/news/edit.jsp
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/news/edit.jsp 2007-01-22
20:55:54 UTC (rev 6069)
@@ -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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+
+<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ page isELIgnored="false" %>
+
+<portlet:defineObjects/>
+
+<div align="center">
+ <br/>
+ <font class="portlet-font">Change News Feed URL:</font>
+
+ <form method="post" action="
+<portlet:actionURL></portlet:actionURL>">
+ <font class="portlet-font">URL:</font><br/>
+ <input class="portlet-form-input-field" type="text"
value="" size="12" name="newurl">
+ <br/>
+ <input class="portlet-form-input-field" type="submit"
name="submit" value="submit">
+ </form>
+</div>
\ No newline at end of file
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/news/edit.jsp
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/theme/wsrpSelectorTest.jsp
===================================================================
---
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/theme/wsrpSelectorTest.jsp
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/theme/wsrpSelectorTest.jsp 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,142 @@
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+
+<!-- this is static markup to test themes for wsrp css selector support -->
+<div id="wsrp_section_selectors">
+ <table border="0" width="100%" cellpadding="2">
+ <tr>
+ <td
class="portlet-section-header">portlet-section-header</td>
+ </tr>
+ <tr>
+ <td
class="portlet-section-subheader">portlet-section-subheader</td>
+ </tr>
+ <tr>
+ <td
class="portlet-section-body">portlet-section-body</td>
+ </tr>
+ <tr>
+ <td
class="portlet-section-text">portlet-section-text</td>
+ </tr>
+ <tr>
+ <td
class="portlet-section-alternate">portlet-section-alternate</td>
+ </tr>
+ <tr>
+ <td
class="portlet-section-selected">portlet-section-selected</td>
+ </tr>
+ <tr>
+ <td
class="portlet-section-footer">portlet-section-footer</td>
+ </tr>
+ </table>
+</div>
+<br><span
class="portlet-section-body">portlet-horizontal-seperator:</span><br>
+<hr class="portlet-horizontal-separator">
+<br>
+
+<div id="wsrp_table_selectors">
+ <table border="1" width="100%" cellpadding="2"
cellspacing="0">
+ <tr>
+ <td
class="portlet-table-header">portlet-table-header</td>
+ </tr>
+ <tr>
+ <td
class="portlet-table-subheader">portlet-table-subheader</td>
+ </tr>
+ <tr>
+ <td
class="portlet-table-alternate">portlet-table-alternate</td>
+ </tr>
+ <tr>
+ <td
class="portlet-table-selected">portlet-table-selected</td>
+ </tr>
+ <tr>
+ <td class="portlet-table-body">portlet-table-body</td>
+ </tr>
+ <tr>
+ <td class="portlet-table-text">portlet-table-text</td>
+ </tr>
+ <tr>
+ <td
class="portlet-table-footer">portlet-table-footer</td>
+ </tr>
+ </table>
+</div>
+<br>
+
+<div id="wsrp_form_selectors">
+ <form action="">
+ <fieldset>
+ <legend>A Sample Form:</legend>
+ <table border="0" width="100%"
cellpadding="2">
+ <tr>
+ <td class="portlet-form-label"
colspan="2">portlet-form-label</td>
+ </tr>
+ <tr>
+ <td class="portlet-form-field-label"
width="140px"><label class="portlet-form-field-label"
+
for="text-field">
+ portlet-form-field-label:</label></td>
+ <td align="left"><input type="text"
id="text-field" class="portlet-form-input-field"
+ value="portlet-form-input-field"
size="50"/></td>
+ </tr>
+ <tr>
+ <td class="portlet-form-field-label"
width="140px"><label class="portlet-form-field-label"
+
for="select-control">
+ portlet-form-field-label:</label></td>
+ <td>
+ <select id="select-control"
class="portlet-form-field">
+ <option>portlet-form-field</option>
+ <option>
+ Option 2
+ </option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="button"
class="portlet-form-button"
value="portlet-form-button"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"></td>
+ </tr>
+ </table>
+ </fieldset>
+ </form>
+</div>
+<br>
+
+<div id="wsrp_message_selectors">
+ <table border="0" width="100%" cellpadding="2">
+ <tr>
+ <td class="portlet-msg-status">portlet-msg-status</td>
+ </tr>
+ <tr>
+ <td class="portlet-msg-info">portlet-msg-info</td>
+ </tr>
+ <tr>
+ <td class="portlet-msg-error">portlet-msg-error</td>
+ </tr>
+ <tr>
+ <td class="portlet-msg-alert">portlet-msg-alert</td>
+ </tr>
+ <tr>
+ <td class="portlet-font-dim">portlet-font-dim</td>
+ </tr>
+ <tr>
+ <td class="portlet-font">portlet-font</td>
+ </tr>
+ </table>
+</div>
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/theme/wsrpSelectorTest.jsp
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/weather/edit.jsp
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/weather/edit.jsp
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/weather/edit.jsp 2007-01-22
20:55:54 UTC (rev 6069)
@@ -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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+
+<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ page isELIgnored="false" %>
+
+<portlet:defineObjects/>
+
+<div align="center">
+ <br/>
+ <font class="portlet-font">Change Weather Location:</font>
+
+ <form method="post" action="
+<portlet:actionURL></portlet:actionURL>">
+ <font class="portlet-font">Zip Code:</font><br/>
+ <input class="portlet-form-input-field" type="text"
value="" size="12" name="newzip">
+ <br/>
+ <input class="portlet-form-input-field" type="submit"
name="submit" value="submit">
+ </form>
+</div>
\ No newline at end of file
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/weather/edit.jsp
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,139 @@
+<?xml version="1.0" standalone="yes"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<deployments>
+ <deployment>
+ <instance>
+ <instance-id>HeaderContentPortletInstance</instance-id>
+ <portlet-ref>HeaderContentPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>WeatherPortletInstance</instance-id>
+ <portlet-ref>WeatherPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>NewsPortletInstance</instance-id>
+ <portlet-ref>NewsPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>JSPPortletInstance</instance-id>
+ <portlet-ref>JSPPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>URLPortletInstance</instance-id>
+ <portlet-ref>URLPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <if-exists>overwrite</if-exists>
+ <instance>
+ <instance-id>NewsPortletInstance2</instance-id>
+ <portlet-ref>NewsPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>expires</name>
+ <value>180</value>
+ </preference>
+ <preference>
+ <name>RssXml</name>
+ <
value>http://finance.yahoo.com/rss/headline?s=rhat</value>
+ </preference>
+ </preferences>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>TestPortletInstance</instance-id>
+ <portlet-ref>TestPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>PortletAInstance</instance-id>
+ <portlet-ref>PortletA</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>PortletBInstance</instance-id>
+ <portlet-ref>PortletB</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>SecuredTestPortletInstance</instance-id>
+ <portlet-ref>SecuredTestPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>CharsetPortletInstance</instance-id>
+ <portlet-ref>CharsetPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>CounterPortletInstance</instance-id>
+ <portlet-ref>CounterPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>CachedCounterPortletInstance</instance-id>
+ <portlet-ref>CachedCounterPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>ExceptionPortletInstance</instance-id>
+ <portlet-ref>ExceptionPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>PortletSessionPortletInstance</instance-id>
+ <portlet-ref>PortletSessionPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>CharsetPortletInstance</instance-id>
+ <portlet-ref>CharsetPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <instance-id>EncodingPortletInstance</instance-id>
+ <portlet-ref>EncodingPortlet</portlet-ref>
+ </instance>
+ </deployment>
+</deployments>
\ No newline at end of file
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml
(rev 0)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app
+
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_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>Portlet to test modification of head
content.</description>
+ <portlet-name>HeaderContentPortlet</portlet-name>
+ <display-name>Header Content Portlet</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.plugins.HeaderContentPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <portlet-info>
+ <title>Header Content portlet</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>This is a test portlet</description>
+ <description xml:lang="fr">C'est une portlet de
test</description>
+ <portlet-name>TestPortlet</portlet-name>
+ <display-name>Test Portlet</display-name>
+ <display-name xml:lang="fr">Portlet Test</display-name>
+
<portlet-class>org.jboss.portal.core.portlet.test.TestPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Test portlet</title>
+ </portlet-info>
+ <portlet-preferences>
+ <preference>
+ <name>read-write foo</name>
+ <value>bar</value>
+ </preference>
+ <preference>
+ <name>read-only foo</name>
+ <value>bar</value>
+ <read-only>true</read-only>
+ </preference>
+ <preference>
+ <name>read-write foo[]</name>
+ <value>bar0</value>
+ <value>bar1</value>
+ </preference>
+ <preference>
+ <name>html chars</name>
+ <value><![CDATA[<&>"]]></value>
+ </preference>
+ </portlet-preferences>
+ <security-role-ref>
+ <role-name>Admin</role-name>
+ </security-role-ref>
+ <security-role-ref>
+ <role-name>User</role-name>
+ </security-role-ref>
+ <security-role-ref>
+ <role-name>Authenticated</role-name>
+ </security-role-ref>
+ </portlet>
+ <portlet>
+ <description>Portlet counting and displaying number of it's action/render
calls - demonstrating session
+ behaviour</description>
+ <portlet-name>CounterPortlet</portlet-name>
+ <display-name>Counter Portlet</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.CounterPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <portlet-info>
+ <title>Counter portlet</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Counter Portlet with cache support</description>
+ <portlet-name>CachedCounterPortlet</portlet-name>
+ <display-name>Cached Counter Portlet</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.CounterPortlet</portlet-class>
+ <expiration-cache>60</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <portlet-info>
+ <title>Cached Counter portlet</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Portlet for testing behaviour on exceptions</description>
+ <portlet-name>ExceptionPortlet</portlet-name>
+ <display-name>Exception Portlet</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.ExceptionPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <portlet-info>
+ <title>Exception portlet</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Portlet using portlet session - demo
purposes</description>
+ <portlet-name>PortletSessionPortlet</portlet-name>
+ <display-name>Porltet Session Portlet</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.PortletSessionPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <portlet-info>
+ <title>Portlet session portlet</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Portlet for demonstrating IPC</description>
+ <portlet-name>PortletA</portlet-name>
+ <display-name>Portlet A</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.event.PortletA</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Test Event A</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Portlet for demonstrating IPC</description>
+ <portlet-name>PortletB</portlet-name>
+ <display-name>Portlet B</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.event.PortletB</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Test Event B</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Portlet for testing charset</description>
+ <portlet-name>CharsetPortlet</portlet-name>
+ <display-name>Charset Portlet</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.CharsetPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Test charset</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Portlet for testing encoding</description>
+ <portlet-name>EncodingPortlet</portlet-name>
+ <display-name>Encoding Portlet</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.EncodingPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Test charset</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Secured Test Portlet</description>
+ <portlet-name>SecuredTestPortlet</portlet-name>
+ <display-name>Secured Test Portlet</display-name>
+
+
<portlet-class>org.jboss.portal.core.portlet.test.TestPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Secured test portlet</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Portlet providing weather forecast</description>
+ <portlet-name>WeatherPortlet</portlet-name>
+ <display-name>Weather Portlet</display-name>
+
+
<portlet-class>org.jboss.samples.portlet.weather.WeatherPortlet</portlet-class>
+ <init-param>
+ <name>default_zipcode</name>
+ <value>33145</value>
+ </init-param>
+ <init-param>
+ <name>RSS_XSL</name>
+ <value>/WEB-INF/xsl/weather/Rss.xsl</value>
+ </init-param>
+ <init-param>
+ <name>base_url</name>
+ <
value>http://xml.weather.yahoo.com/forecastrss?p=</value>
+ </init-param>
+ <expiration-cache>180</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Weather Portlet</title>
+ </portlet-info>
+ <portlet-preferences>
+ <preference>
+ <name>expires</name>
+ <value>180</value>
+ </preference>
+ <preference>
+ <name>RssXml</name>
+ <
value>http://xml.weather.yahoo.com/forecastrss?p=33145</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+ </portlet>
+ <portlet>
+ <description>Portlet aggregating news from different
feeds</description>
+ <portlet-name>NewsPortlet</portlet-name>
+ <display-name>News Portlet</display-name>
+
<portlet-class>org.jboss.samples.portlet.news.NewsPortlet</portlet-class>
+ <init-param>
+ <name>RSS1_XSL</name>
+ <value>/WEB-INF/Rss1.xsl</value>
+ </init-param>
+ <init-param>
+ <name>RSS2_XSL</name>
+ <value>/WEB-INF/Rss2.xsl</value>
+ </init-param>
+ <init-param>
+ <name>base_url</name>
+ <
value>http://jboss.org/jbossBlog/blog/?flavor=rss2</value>
+ </init-param>
+ <expiration-cache>180</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <supported-locale>fr</supported-locale>
+ <resource-bundle>NewsResource</resource-bundle>
+ <portlet-info>
+ <title>News Feeds</title>
+ </portlet-info>
+ <portlet-preferences>
+ <preference>
+ <name>expires</name>
+ <value>180</value>
+ </preference>
+ <preference>
+ <name>RssXml</name>
+ <
value>http://jboss.org/jbossBlog/blog/?flavor=rss2</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+ </portlet>
+ <portlet>
+ <description>Simple JSP portlet</description>
+ <portlet-name>JSPPortlet</portlet-name>
+ <display-name>JSP Portlet</display-name>
+
<portlet-class>org.jboss.samples.portlet.jsp.JSPPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Greetings!</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>URL Portlet</description>
+ <portlet-name>URLPortlet</portlet-name>
+ <display-name>URL Portlet</display-name>
+
<portlet-class>org.jboss.portal.core.portlet.test.URLPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>URL Portlet</title>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <portlet-name>BasicPortlet</portlet-name>
+
<portlet-class>org.jboss.portal.core.portlet.test.BasicPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Basic Portlet</title>
+ </portlet-info>
+ </portlet>
+ <user-attribute>
+ <name>user.name.nickName</name>
+ </user-attribute>
+ <user-attribute>
+ <name>user.business-info.online.email</name>
+ </user-attribute>
+ <user-attribute>
+ <name>user.name.given</name>
+ </user-attribute>
+ <user-attribute>
+ <name>user.name.family</name>
+ </user-attribute>
+ <user-attribute>
+ <name>portal.user.locale</name>
+ </user-attribute>
+ <user-attribute>
+ <name>portal.user.signature</name>
+ </user-attribute>
+ <user-attribute>
+ <name>portal.user.last-login-date</name>
+ </user-attribute>
+ <security-constraint>
+ <portlet-collection>
+ <portlet-name>SecuredTestPortlet</portlet-name>
+ </portlet-collection>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+</portlet-app>
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/web.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/web.xml
(rev 0)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/web.xml 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <listener>
+ <listener-class> org.jboss.portal.portlet.session.SessionListener
</listener-class>
+ </listener>
+</web-app>
Property changes on: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss1.xsl
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss1.xsl
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss1.xsl 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<xsl:stylesheet
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <xsl:output method="html"/>
+
+ <xsl:template match="/">
+ <TABLE WIDTH="100%" BORDER="0" CELLPADDING="2"
CELLSPACING="0">
+ <xsl:apply-templates/>
+ </TABLE>
+ </xsl:template>
+
+ <xsl:template match="item">
+ <TR>
+ <TD>
+ -
+ <A TARGET="_popup" STYLE="text-decoration: none;">
+ <xsl:attribute name="HREF">
+ <xsl:value-of select="link"/>
+ </xsl:attribute>
+ <xsl:value-of select="title"/>
+ </A>
+ </TD>
+ </TR>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="text()"/>
+</xsl:stylesheet>
\ No newline at end of file
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss1.xsl
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss2.xsl
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss2.xsl
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss2.xsl 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,54 @@
+<?xml version="1.0" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+ <xsl:output method="xml" omit-xml-declaration="yes"
indent="yes"/>
+ <xsl:variable name="link-path">
+ <xsl:value-of select="rss/channel/link"/>
+ </xsl:variable>
+ <xsl:template match="/">
+ <div align="center">
+ <a href="{$link-path}" target="_blank">
+ <xsl:value-of select="rss/channel/title"/>
+ </a>
+ </div>
+ <ul>
+ <xsl:for-each select="rss/channel/item">
+ <xsl:variable name="this-link">
+ <xsl:value-of select="link"/>
+ </xsl:variable>
+ <li>
+ <a href="{$this-link}" target="_blank">
+ <xsl:value-of select="title"/>
+ </a>
+ </li>
+ <!-- <xsl:value-of select="description"
disable-output-escaping="yes"/>
+ <br/>-->
+ </xsl:for-each>
+ </ul>
+ <br/>
+ <br/>
+ <xsl:value-of select="rss/channel/copyright"/>
+ </xsl:template>
+</xsl:stylesheet>
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/news/Rss2.xsl
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/weather/Rss.xsl
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/weather/Rss.xsl
(rev 0)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/weather/Rss.xsl 2007-01-22
20:55:54 UTC (rev 6069)
@@ -0,0 +1,100 @@
+<?xml version="1.0" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+ <xsl:output method="xml" omit-xml-declaration="yes"
indent="yes"/>
+ <xsl:variable
name="image-path">http://us.i1.yimg.com/us.yimg.com/i/us/we/...
+ <xsl:variable name="link-path">
+ <xsl:value-of select="rss/channel/link"/>
+ </xsl:variable>
+ <xsl:template match="/">
+ <br/>
+ <div align="center">
+ <font>
+ <b>
+ <xsl:for-each select="rss/channel/location">
+ <xsl:value-of select="@city"/>, <xsl:value-of
select="@region"/>, <xsl:value-of
+ select="@country"/>
+ </xsl:for-each>
+ </b>
+ </font>
+ <br/>
+ <br/>
+ <table width="130" border="0">
+ <tr>
+ <xsl:for-each select="rss/channel/item/condition">
+ <td>
+ <table border="0" height="130">
+ <tr>
+ <td class="portlet-section-header"
align="center">Currently</td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <img src="{$image-path}/{(a)code}.gif"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <xsl:value-of select="@text"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <xsl:value-of select="@temp"/>F</td>
+ </tr>
+ </table>
+ </td>
+ </xsl:for-each>
+ <xsl:for-each select="rss/channel/item/forecast">
+ <td>
+ <table border="0" height="130">
+ <tr>
+ <td class="portlet-section-header"
align="center" valign="top">
+ <xsl:value-of select="@day"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <img src="{$image-path}/{(a)code}.gif"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <xsl:value-of select="@text"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <xsl:value-of
select="@low"/>F/<xsl:value-of select="@high"/>F</td>
+ </tr>
+ </table>
+ </td>
+ </xsl:for-each>
+ </tr>
+ </table>
+ <br/>
+ <a href="{$link-path}" target="_blank">Complete
Forecast</a>
+ </div>
+ </xsl:template>
+</xsl:stylesheet>
Property changes on:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/xsl/weather/Rss.xsl
___________________________________________________________________
Name: svn:executable
+ *
Modified:
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java 2007-01-22
20:08:21 UTC (rev 6068)
+++
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java 2007-01-22
20:55:54 UTC (rev 6069)
@@ -24,7 +24,6 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
-import org.jboss.portal.identity.db.HibernateUserImpl;
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.identity.service.UserModuleService;
import org.hibernate.SessionFactory;
@@ -37,6 +36,8 @@
import java.util.Set;
import java.util.Iterator;
+import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet </a>
* @version $Revision: 5448 $
@@ -46,46 +47,41 @@
{
/** . */
- private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(HibernateUserModuleImpl.class);
- /** . */
- protected SessionFactory sessionFactory;
+ private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(HibernateUserModuleImpl.class);
- /** . */
- protected String sessionFactoryJNDIName;
+ /** . */
+ protected SessionFactory sessionFactory;
- protected void startService() throws Exception
- {
- //
- sessionFactory = (SessionFactory)new
InitialContext().lookup(sessionFactoryJNDIName);
+ /** . */
+ protected String sessionFactoryJNDIName;
- super.startService();
- }
+ protected void startService() throws Exception
+ {
+ //
+ sessionFactory = (SessionFactory)new
InitialContext().lookup(sessionFactoryJNDIName);
- protected void stopService() throws Exception
- {
+ super.startService();
+ }
- //
- sessionFactory = null;
+ protected void stopService() throws Exception
+ {
- super.stopService();
- }
+ //
+ sessionFactory = null;
-// public SessionFactory getSessionFactory()
-// {
-// return sessionFactory;
-// }
+ super.stopService();
+ }
- public String getSessionFactoryJNDIName()
- {
- return sessionFactoryJNDIName;
- }
+ public String getSessionFactoryJNDIName()
+ {
+ return sessionFactoryJNDIName;
+ }
- public void setSessionFactoryJNDIName(String sessionFactoryJNDIName)
- {
- this.sessionFactoryJNDIName = sessionFactoryJNDIName;
- }
+ public void setSessionFactoryJNDIName(String sessionFactoryJNDIName)
+ {
+ this.sessionFactoryJNDIName = sessionFactoryJNDIName;
+ }
-
public User findUserByUserName(String userName) throws IdentityException
{
if (userName != null)