Author: emuckenhuber
Date: 2007-08-08 12:09:16 -0400 (Wed, 08 Aug 2007)
New Revision: 7875
Added:
trunk/core-identity/.classpath
trunk/core-identity/.project
trunk/core-identity/build.bat
trunk/core-identity/build.sh
trunk/core-identity/build.xml
trunk/core-identity/src/
trunk/core-identity/src/bin/
trunk/core-identity/src/bin/portal-identity-war/
trunk/core-identity/src/bin/portal-identity-war/style.css
trunk/core-identity/src/etc/
trunk/core-identity/src/etc/sun-jsf/
trunk/core-identity/src/etc/sun-jsf/jsf-example.jar
trunk/core-identity/src/main/
trunk/core-identity/src/main/org/
trunk/core-identity/src/main/org/jboss/
trunk/core-identity/src/main/org/jboss/portal/
trunk/core-identity/src/main/org/jboss/portal/core/
trunk/core-identity/src/main/org/jboss/portal/core/identity/
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityUIUser.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/UIAttribute.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordBean.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/UserRegisterBean.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/ProfileBean.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
trunk/core-identity/src/resources/
trunk/core-identity/src/resources/portal-identity-sar/
trunk/core-identity/src/resources/portal-identity-sar/META-INF/
trunk/core-identity/src/resources/portal-identity-sar/META-INF/jboss-service.xml
trunk/core-identity/src/resources/portal-identity-war/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jboss-portlet.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/index.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changeEmail.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changePassword.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/confirm.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/overview.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/register.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/success.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portal.taglib.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet-instances.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/web.xml
Log:
Added: trunk/core-identity/.classpath
===================================================================
--- trunk/core-identity/.classpath (rev 0)
+++ trunk/core-identity/.classpath 2007-08-08 16:09:16 UTC (rev 7875)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/api"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/core"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/faces"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/format"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/identity"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/jems"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/portlet"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/security"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/server"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/workflow"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/core-admin"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/commons-beanutils.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/commons-digester.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/commons-el.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/el-api.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/el-ri.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/jsf-example.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/jsf-facelets.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/jstl.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/myfaces-api.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/myfaces-impl.jar"/>
+ <classpathentry kind="lib"
path="output/resources/portal-identity-war/WEB-INF/lib2/portal-faces-lib.jar"/>
+ <classpathentry kind="lib"
path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/core-identity/.project
===================================================================
--- trunk/core-identity/.project (rev 0)
+++ trunk/core-identity/.project 2007-08-08 16:09:16 UTC (rev 7875)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>core-identity</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/core-identity/build.bat
===================================================================
--- trunk/core-identity/build.bat (rev 0)
+++ trunk/core-identity/build.bat 2007-08-08 16:09:16 UTC (rev 7875)
@@ -0,0 +1,54 @@
+@echo off
+rem
+rem Invokes a script of the same name in the 'tools' module.
+rem
+rem The 'tools' module is expected to be a peer directory of the directory
+rem in which this script lives.
+rem
+rem @author Jason Dillon <jason(a)planet57.com>
+rem
+
+rem $Id: build.bat 1015 2005-11-04 20:15:13Z mholzner $
+
+setlocal
+
+set PROGNAME=%~nx0
+set DIRNAME=%~dp0
+
+rem Legacy shell support
+if x%PROGNAME%==x set PROGNAME=build.bat
+if x%DIRNAME%==x set DIRNAME=.\
+
+set MODULE_ROOT=%DIRNAME%
+if x%TOOLS_ROOT%==x set TOOLS_ROOT=%DIRNAME%..\tools
+set TARGET=%TOOLS_ROOT%\bin\build.bat
+set ARGS=%*
+
+rem Start'er up yo
+goto main
+
+:debug
+if not x%DEBUG%==x echo %PROGNAME%: %*
+goto :EOF
+
+:main
+call :debug PROGNAME=%PROGNAME%
+call :debug DIRNAME=%DIRNAME%
+call :debug TOOLS_ROOT=%TOOLS_ROOT%
+call :debug TARGET=%TARGET%
+
+if exist %TARGET% call :call-script & goto :EOF
+rem else fail, we can not go on
+
+echo %PROGNAME%: *ERROR* The target executable does not exist:
+echo %PROGNAME%:
+echo %PROGNAME%: %TARGET%
+echo %PROGNAME%:
+echo %PROGNAME%: Please make sure you have checked out the 'tools' module
+echo %PROGNAME%: and make sure it is up to date.
+goto :EOF
+
+:call-script
+call :debug Executing %TARGET% %ARGS%
+call %TARGET% %ARGS%
+goto :EOF
Property changes on: trunk/core-identity/build.bat
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-identity/build.sh
===================================================================
--- trunk/core-identity/build.sh (rev 0)
+++ trunk/core-identity/build.sh 2007-08-08 16:09:16 UTC (rev 7875)
@@ -0,0 +1,49 @@
+#!/bin/sh
+##
+## Invokes a script of the same name in the 'tools' module.
+##
+## The 'tools' module is expected to be a peer directory of the directory
+## in which this script lives.
+##
+## @author Jason Dillon <jason(a)planet57.com>
+##
+
+# $Id: build.sh 1015 2005-11-04 20:15:13Z mholzner $
+
+PROGNAME=`basename $0`
+DIRNAME=`dirname $0`
+
+# Buss it yo
+main() {
+ if [ "x$TOOLS_ROOT" = "x" ]; then
+ TOOLS_ROOT=`cd $DIRNAME/../tools && pwd`
+ fi
+
+ MODULE_ROOT=`cd $DIRNAME; pwd`
+ export TOOLS_ROOT MODULE_ROOT DEBUG TRACE
+
+ # Where is the target script?
+ target="$TOOLS_ROOT/bin/$PROGNAME"
+ if [ ! -f "$target" ]; then
+ echo "${PROGNAME}: *ERROR* The target executable does not exist:"
+ echo "${PROGNAME}:"
+ echo "${PROGNAME}: $target"
+ echo "${PROGNAME}:"
+ echo "${PROGNAME}: Please make sure you have checked out the 'tools'
module"
+ echo "${PROGNAME}: and make sure it is up to date."
+ exit 2
+ fi
+
+ # Get busy yo!
+ if [ "x$DEBUG" != "x" ]; then
+ echo "${PROGNAME}: Executing: /bin/sh $target $@"
+ fi
+ if [ "x$TRACE" = "x" ]; then
+ exec /bin/sh $target "$@"
+ else
+ exec /bin/sh -x $target "$@"
+ fi
+}
+
+# Lets get ready to rumble!
+main "$@"
Property changes on: trunk/core-identity/build.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-identity/build.xml
===================================================================
--- trunk/core-identity/build.xml (rev 0)
+++ trunk/core-identity/build.xml 2007-08-08 16:09:16 UTC (rev 7875)
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE project [
+ <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
+ <!ENTITY buildmagic SYSTEM
"../tools/etc/buildfragments/buildmagic.ent">
+ <!ENTITY tools SYSTEM "../tools/etc/buildfragments/tools.ent">
+ <!ENTITY modules SYSTEM "../tools/etc/buildfragments/modules.ent">
+ <!ENTITY defaults SYSTEM
"../tools/etc/buildfragments/defaults.ent">
+ <!ENTITY targets SYSTEM "../tools/etc/buildfragments/targets.ent">
+ ]>
+
+<!--+======================================================================+-->
+<!--| JBoss Portal (The OpenSource Portal) Build File |-->
+<!--| |-->
+<!--| Distributable under LGPL license. |-->
+<!--| See terms of license at
http://www.gnu.org. |-->
+<!--| |-->
+<!--| This file has been designed to work with the 'tools' module and
|-->
+<!--| Buildmagic extentions. |-->
+<!--+======================================================================+-->
+
+<project default="main" name="JBoss Portal">
+
+ <!--+====================================================================+-->
+ <!--| Setup |-->
+ <!--| |-->
+ <!--| Include the common build elements. |-->
+ <!--| |-->
+ <!--| This defines several different targets, properties and paths. |-->
+ <!--| It also sets up the basic extention tasks amoung other things. |-->
+ <!--+====================================================================+-->
+
+ &buildmagic;
+ &modules;
+ &defaults;
+ &tools;
+ &targets;
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Initialize the build system. Must depend on '_buildmagic:init'.
+ | Other targets should depend on 'init' or things will mysteriously fail.
+ -->
+
+ <target name="init" unless="init.disable"
depends="_buildmagic:init">
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Configuration |-->
+ <!--| |-->
+ <!--| This target is invoked by the Buildmagic initialization logic |-->
+ <!--| and should contain module specific configuration elements. |-->
+ <!--+====================================================================+-->
+
+ <target name="configure" unless="configure.disable">
+
+ <!-- Configure some properties -->
+ <property name="jboss-junit-configuration" value=""/>
+ <property name="junit.formatter.usefile" value="true"/>
+
+ <!-- Configure thirdparty libraries -->
+ &libraries;
+
+ <path id="library.classpath">
+ <path refid="jboss.jbossxb.classpath"/>
+ <path refid="jboss.cache.classpath"/>
+ <path refid="jbossas/core.libs.classpath"/>
+ <path refid="hibernate.hibernate.classpath"/>
+ <path refid="apache.myfaces.classpath"/>
+ <path refid="apache.log4j.classpath"/>
+ <path refid="sun.servlet.classpath"/>
+ <path refid="facelets.facelets.classpath"/>
+ <path refid="el.el.classpath"/>
+ <pathelement location="${source.etc}/sun-jsf/jsf-example.jar"/>
+ </path>
+
+ <!-- Configure modules -->
+ <call target="configure-modules"/>
+ <path id="dependentmodule.classpath">
+ <path refid="jboss.portal-format.classpath"/>
+ <path refid="jboss.portal-common.classpath"/>
+ <path refid="jboss.portal-faces.classpath"/>
+ <path refid="jboss.portal-bridge.classpath"/>
+ <path refid="jboss.portal-server.classpath"/>
+ <path refid="jboss.portal-registration.classpath"/>
+ <path refid="jboss.portal-portlet.classpath"/>
+ <path refid="jboss.portal-jems.classpath"/>
+ <path refid="jboss.portal-portlet-federation.classpath"/>
+ <path refid="jboss.portal-identity.classpath"/>
+ <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-theme.classpath"/>
+ <path refid="jboss.portal-security.classpath"/>
+ <path refid="jboss.portal-test.classpath"/>
+ <path refid="jboss.portal-core.classpath"/>
+ </path>
+
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
+
+ <!-- Configure defaults & build tools -->
+ <call target="configure-defaults"/>
+ <call target="configure-tools"/>
+ <call target="configure-explode"/>
+
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
+ <property name="javadoc.private" value="true"/>
+ <property name="javadoc.protected" value="false"/>
+
+ <taskdef name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
+ <taskdef name="implode"
+ classname="org.jboss.portal.common.ant.Implode"
+ classpathref="explode.task.classpath"/>
+
+ </target>
+
+ <target name="configure-explode">
+ <path id="explode.task.classpath">
+ <pathelement location="${project.tools}/lib/explode.jar"/>
+ <path refid="apache.ant.classpath"/>
+ </path>
+ <taskdef
+ name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Compile |-->
+ <!--| |-->
+ <!--| This target should depend on other compile-* targets for each |-->
+ <!--| different type of compile that needs to be performed, short of |-->
+ <!--| documentation compiles. |-->
+ <!--+====================================================================+-->
+
+ <target name="compile"
+ description="Compile all source files."
+ depends="_default:compile-classes,
+ _default:compile-etc,
+ _default:compile-resources">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Generate Output |-->
+ <!--| |-->
+ <!--| Generates the target output for this module. Target output is |-->
+ <!--| the output which is ment to be released or used by external |-->
+ <!--| modules. |-->
+ <!--+====================================================================+-->
+
+ <target name="artifacts"
+ description="Generate all target output."
+ depends="compile">
+
+ <mkdir dir="${build.lib}"/>
+
+ <!-- portal-core-identity-lib.jar -->
+ <jar jarfile="${build.lib}/portal-core-identity-lib.jar">
+ <fileset dir="${build.classes}"/>
+ </jar>
+
+ <!-- portal-identity.war -->
+ <copy todir="${build.resources}/portal-identity-war/WEB-INF/lib2">
+ <fileset dir="${apache.myfaces.lib}"
includes="myfaces-api.jar,myfaces-impl.jar,jstl.jar"/>
+ <fileset dir="${build.lib}"
includes="portal-core-identity-lib.jar"/>
+ <fileset dir="${jboss.portal-faces.root}/lib"
includes="portal-faces-lib.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf"
includes="jsf-example.jar"/>
+ <fileset dir="${facelets.facelets.lib}"
includes="jsf-facelets.jar"/>
+ <fileset dir="${el.el.lib}"
includes="el-api.jar,el-ri.jar"/>
+ <fileset dir="${commons.el.lib}"
includes="commons-el.jar"/>
+ <fileset dir="${apache.beanutils.lib}"
includes="commons-beanutils.jar"/>
+ <fileset dir="${apache.digester.lib}"
includes="commons-digester.jar"/>
+ </copy>
+ <copy todir="${build.resources}/portal-identity-war">
+ <fileset dir="${source.bin}/portal-identity-war"/>
+ </copy>
+ <!-- portal-identity.sar -->
+ <copy todir="${build.resources}/portal-identity.sar">
+ <fileset dir="${build.resources}/portal-identity-sar"/>
+ </copy>
+ <copy todir="${build.resources}/portal-identity.sar/lib">
+ <fileset dir="${jboss.portal-faces.root}/lib"
includes="portal-faces-loader-lib.jar"/>
+ </copy>
+
+ <copy
todir="${build.resources}/portal-identity.sar/portal-identity.war">
+ <fileset dir="${build.resources}/portal-identity-war"/>
+ </copy>
+
+ </target>
+
+ <target name="output" depends="artifacts">
+
+ <implode
+ dir="${build.resources}/portal-identity.sar"
+ tofile="${build.lib}/portal-identity.sar"/>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Cleaning -->
+ <!-- ================================================================== -->
+
+ <!-- Clean up all build output -->
+ <target name="clean" depends="_default:clean">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Documents |-->
+ <!--| |-->
+ <!--| Generate all documentation for this module. |-->
+ <!--+====================================================================+-->
+
+ <target name="docs" depends="_default:docs">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Misc. -->
+ <!-- ================================================================== -->
+
+ <target name="main" depends="most"/>
+ <target name="all" depends="_default:all"/>
+ <target name="most" depends="_default:most"/>
+ <target name="help" depends="_default:help"/>
+
+ <!-- ================================================================== -->
+ <!-- Deployment -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Deploy the application
+ -->
+
+ <target name="deploy"
+ description="Deploy."
+ depends="output">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <copy file="${build.lib}/portal-identity.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
+ </target>
+
+ <!--
+ | Undeploy the application
+ -->
+ <target name="undeploy"
+ description="Undeploy."
+ depends="init">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-identity.sar"/>
+ </target>
+
+ <target name="package-tests"/>
+
+
+ <!--
+ Some convenience build targets to help deployment during development
+ -->
+ <target name="deploy-ha"
+ description="Deploy."
+ depends="output">
+ <require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
+ <copy file="${build.lib}/portal-identity.sar"
todir="${jboss.home}/server/${portal-ha.deploy.dir}"
overwrite="true"/>
+ </target>
+</project>
Property changes on: trunk/core-identity/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-identity/src/bin/portal-identity-war/style.css
===================================================================
--- trunk/core-identity/src/bin/portal-identity-war/style.css (rev
0)
+++ trunk/core-identity/src/bin/portal-identity-war/style.css 2007-08-08 16:09:16 UTC (rev
7875)
@@ -0,0 +1,235 @@
+/* Redefine spacing for tables. */
+
+.identity-ui table {
+ border: 0;
+}
+
+.identity-ui th {
+ text-align: left;
+ border: 0;
+ border-bottom: 1px solid;
+ padding-bottom: 2px;
+ padding-top: 2px;
+ font-size: 11px;
+}
+
+.identity-ui td {
+ padding-bottom: 2px;
+ padding-top: 2px;
+}
+
+/* Pagination. */
+
+.identity-ui ul.pagination {
+ margin: 0;
+ padding: .2em;
+}
+
+.identity-ui ul.pagination li {
+ text-align: center;
+ list-style-type: none;
+ display: inline;
+ margin-right: 2px;
+ border: 1px solid;
+}
+
+.identity-ui ul.pagination li.selected {
+ font-weight: bold;
+ background-color: #eef;
+ border: 1px solid black;
+ border-bottom: 3px solid black;
+}
+
+.pagination a, .pagination a:visited, .pagination a:hover {
+ text-decoration: none;
+}
+
+/* Top nav. */
+
+.identity-ui ul.topnav {
+ margin-left: 0;
+ padding: 4px 0px 3px;
+ border-bottom: 1px solid #dfe8ed;
+}
+
+.identity-ui ul.topnav li {
+ list-style-type: none;
+ display: inline;
+ margin: 0;
+ padding: 3px 0.5em;
+ margin-left: 5px;
+ border: 1px solid #dfe8ed;
+ border-bottom: none;
+ background-color: #f2f4f5;
+}
+
+.identity-ui ul.topnav li:hover {
+ background-color: #fff;
+}
+
+.identity-ui ul.topnav li#currentTab {
+ background-color: white;
+ border-bottom: 1px solid white;
+}
+
+.identity-ui ul.topnav li#currentTab a:hover {
+}
+
+/* Object path. */
+
+.identity-ui ul.objectpath {
+ margin: 0;
+ padding: 5px 0px 5px 0px;
+}
+
+.identity-ui ul.objectpath li {
+ list-style-type: none;
+ display: inline;
+ margin-right: 3px;
+}
+
+.identity-ui ul.objectpath li.selected {
+ font-weight: bold;
+}
+
+/* Resize combo lists */
+.identity-ui select {
+ padding: 2px 4px 2px 1px;
+}
+
+.identity-ui select.contentType {
+ width: 8em;
+}
+
+.identity-ui select.instanceList {
+ width: 11em;
+}
+
+.identity-ui select.windowList {
+ width: 95%;
+ overflow: auto;
+}
+
+/* Style a table for form layout */
+.identity-ui table form {
+ margin: 0;
+}
+
+.identity-ui table form td.label {
+ text-align: right;
+ vertical-align: top;
+ padding-top: 0.4em;
+}
+
+.identity-ui table form td.widget {
+ text-align: left;
+}
+
+/* Area header. */
+
+.identity-ui .portlet-area-header {
+ border: 1px solid #54708c;
+ font-weight: bold;
+ color: #fff;
+ font-size: 11px;
+ background-color: #5986b3;
+ padding: 2px;
+ padding-left: 4px;
+ margin: 0;
+}
+
+.identity-ui .portlet-area-body {
+ border: 1px solid #d5d5d5;
+ border-top: 0;
+ background-color: #fff;
+ padding: 4px;
+ margin: 0;
+}
+
+/* Styles updated and enhanced from the main portal css */
+
+.identity-ui th.portlet-section-title {
+ font-weight: bold;
+ color: #656565;
+ font-size: 11px;
+ border: 1px solid #999;
+ background-color: #ebf2f5;
+ padding-left: 6px;
+}
+
+.identity-ui .portlet-content-center {
+ padding: 0;
+ margin: 0;
+}
+
+.identity-ui .portlet-body {
+ padding: 0;
+ margin: 0;
+}
+
+.identity-ui .portlet-content-right {
+ padding: 0;
+ margin: 0;
+}
+
+.identity-ui .portlet-footer-left {
+ padding: 0;
+ margin: 0;
+}
+
+.identity-ui .portlet-table-header {
+ background-color: #eef;
+}
+
+.identity-ui .portlet-section-buttonrow {
+ margin-top: 6px;
+ margin-bottom: 6px;
+ float: right;
+}
+
+/* Change dashed line to solid. */
+
+.identity-ui hr {
+ border-top-style: solid;
+}
+
+.identity-ui .wizardStepBox {
+ display: inline;
+ float: left;
+ border: 1px solid #98B7C6;
+ height: 7em;
+ width: 9em;
+ background-color: #DFE8ED;
+ margin: .5em;
+}
+
+.identity-ui .wizardButtonBox {
+ margin: 1em;
+}
+
+.identity-ui .wizardContent {
+ clear: both;
+}
+
+.identity-ui #selected.wizardStepBox {
+ background-color: #C8DCC4;
+ border: 1px solid black;
+ border-bottom: 5px solid black;
+}
+
+.identity-ui .stepNumber {
+ font-size: 2em;
+ text-align: center;
+ margin-top: 5px;
+ margin-bottom: 0;
+}
+
+.identity-ui .stepText {
+ text-align: center;
+}
+
+.identity-ui .layout-button {
+ width: 50px;
+ margin: 2px;
+ padding: 2px;
+}
Property changes on: trunk/core-identity/src/bin/portal-identity-war/style.css
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core-identity/src/etc/sun-jsf/jsf-example.jar
===================================================================
(Binary files differ)
Property changes on: trunk/core-identity/src/etc/sun-jsf/jsf-example.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -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.identity.ui;
+
+import java.util.HashMap;
+
+import org.jboss.portal.faces.el.PropertyValue;
+import org.jboss.portal.faces.el.dynamic.DynamicBean;
+
+public class DynamicUserAttribute implements DynamicBean
+{
+ HashMap map = new HashMap();
+
+ public Class getType(Object propertyName) throws IllegalArgumentException
+ {
+ return String.class;
+ }
+
+ public PropertyValue getValue(Object propertyName) throws IllegalArgumentException
+ {
+ return new PropertyValue((String) map.get((String) propertyName));
+ }
+
+ public boolean setValue(Object propertyName, Object value) throws
IllegalArgumentException
+ {
+ map.put((String) propertyName, (String) value);
+ return true;
+ }
+
+ public HashMap getProfileAttributes() {
+ return map;
+ }
+}
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityUIUser.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityUIUser.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityUIUser.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.core.identity.ui;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.portal.faces.el.PropertyValue;
+import org.jboss.portal.faces.el.dynamic.AbstractDynamicBean;
+import org.jboss.portal.faces.el.dynamic.DynamicBean;
+import org.jboss.portal.identity.User;
+
+public class IdentityUIUser
+{
+
+ private String username;
+ private String password;
+ private DynamicUserAttribute attribute = new DynamicUserAttribute();
+
+ public String getUsername()
+ {
+ return username;
+ }
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+ public String getPassword()
+ {
+ return password;
+ }
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+ public DynamicUserAttribute getAttribute()
+ {
+ return attribute;
+ }
+}
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/UIAttribute.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/UIAttribute.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/UIAttribute.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * 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.identity.ui;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class UIAttribute
+{
+ private String identifier;
+ private String name;
+ private String validator;
+ private String converter;
+ private boolean required;
+
+ public String getIdentifier()
+ {
+ return identifier;
+ }
+ public void setIdentifier(String identifier)
+ {
+ this.identifier = identifier;
+ }
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ public String getValidator()
+ {
+ return validator;
+ }
+ public void setValidator(String validator)
+ {
+ this.validator = validator;
+ }
+ public boolean isRequired()
+ {
+ return required;
+ }
+ public void setRequired(boolean required)
+ {
+ this.required = required;
+ }
+ public String getConverter()
+ {
+ return converter;
+ }
+ public void setConverter(String converter)
+ {
+ this.converter = converter;
+ }
+}
+
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordBean.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordBean.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordBean.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.identity.ui.actions;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class LostPasswordBean
+{
+ private String username;
+ private String email;
+ public String getUsername()
+ {
+ return username;
+ }
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+ public String getEmail()
+ {
+ return email;
+ }
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+
+ public void doomed()
+ {
+
+ }
+
+
+
+}
+
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/UserRegisterBean.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/UserRegisterBean.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/UserRegisterBean.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,101 @@
+/******************************************************************************
+ * 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.identity.ui.actions;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.portal.core.identity.ui.IdentityUIUser;
+import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.User;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class UserRegisterBean
+{
+
+ private IdentityUIUser uiUser = new IdentityUIUser();
+ private IdentityUserBean identityUserBean;
+
+ private static final Logger log = Logger.getLogger(UserRegisterBean.class);
+
+ // Basic getter and setter
+ public IdentityUIUser getUiUser()
+ {
+ return uiUser;
+ }
+
+ public void setUiUser(IdentityUIUser uiUser)
+ {
+ this.uiUser = uiUser;
+ }
+
+ public IdentityUserBean getIdentityUserBean()
+ {
+ return identityUserBean;
+ }
+
+ public void setIdentityUserBean(IdentityUserBean identityUserBean)
+ {
+ this.identityUserBean = identityUserBean;
+ }
+
+ public String register()
+ {
+ if (uiUser.getUsername() != null && uiUser.getPassword() != null)
+ {
+ log.debug("Creating user account: " + uiUser.getUsername());
+
+ try
+ {
+ User user;
+ // Create user && assign roles
+ user = identityUserBean.createUser(uiUser.getUsername(),
uiUser.getPassword(), null);
+ // Adding dynamically set properties
+ identityUserBean.updateProfile(user,
uiUser.getAttribute().getProfileAttributes());
+ }
+ catch (RuntimeException e)
+ {
+ e.printStackTrace();
+ FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage("RuntimeException"));
+ }
+ catch (IdentityException e)
+ {
+ e.printStackTrace();
+ FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage("IdentityExeption"));
+ }
+
+ }
+ else
+ {
+ FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage("Missing required Values."));
+ }
+
+ return "success";
+ }
+
+}
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,192 @@
+/******************************************************************************
+ * 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.identity.ui.common;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.portal.core.identity.ui.UIAttribute;
+import org.jboss.portal.core.identity.ui.actions.UserRegisterBean;
+import org.jboss.portal.core.ui.portlet.user.UserPortletConstants;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portal.identity.UserProfileModule;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class IdentityUserBean
+{
+ private String defaultRole;
+
+ private UserModule userModule;
+ private RoleModule roleModule;
+ private MembershipModule membershipModule;
+ private UserProfileModule userProfileModule;
+
+ private MetaDataServiceBean metaDataService;
+
+ private static final Logger log = Logger.getLogger(UserRegisterBean.class);
+
+ public UserModule getUserModule()
+ {
+ return userModule;
+ }
+
+ public void setUserModule(UserModule userModule)
+ {
+ this.userModule = userModule;
+ }
+
+ public String getDefaultRole()
+ {
+ return defaultRole;
+ }
+
+ public void setDefaultRole(String defaultRole)
+ {
+ this.defaultRole = defaultRole;
+ }
+
+ public RoleModule getRoleModule()
+ {
+ return roleModule;
+ }
+
+ public void setRoleModule(RoleModule roleModule)
+ {
+ this.roleModule = roleModule;
+ }
+
+ public MembershipModule getMembershipModule()
+ {
+ return membershipModule;
+ }
+
+ public void setMembershipModule(MembershipModule membershipModule)
+ {
+ this.membershipModule = membershipModule;
+ }
+
+ public UserProfileModule getUserProfileModule()
+ {
+ return userProfileModule;
+ }
+
+ public void setUserProfileModule(UserProfileModule userProfileModule)
+ {
+ this.userProfileModule = userProfileModule;
+ }
+
+ public MetaDataServiceBean getMetaDataService()
+ {
+ return metaDataService;
+ }
+
+ public void setMetaDataService(MetaDataServiceBean metaDataService)
+ {
+ this.metaDataService = metaDataService;
+ }
+
+ public User createUser(String username, String password, Set roles) throws
RuntimeException, IdentityException
+ {
+ // Checking roles
+ Set roleSet = new HashSet();
+ roleSet = this.checkRoles(roles);
+
+ // Create User
+ User user = userModule.createUser(username, password);
+
+ // Set Membership
+ membershipModule.assignRoles(user, roleSet);
+ return user;
+ }
+
+ public void updateProfile(User user, HashMap profileMap) throws IdentityException
+ {
+ Set profileSet = profileMap.keySet();
+ Iterator i = profileSet.iterator();
+
+ while (i.hasNext())
+ {
+ String key = (String) i.next();
+ String value = (String) profileMap.get(key);
+ UIAttribute uiAttribute = (UIAttribute)
this.metaDataService.getValue(key).getObject();
+ userProfileModule.setProperty(user, uiAttribute.getIdentifier(), value);
+ }
+
+ }
+
+ private Set checkRoles(Set roles) throws IllegalArgumentException, IdentityException
+ {
+
+ if (roles != null)
+ { // Checking existing roles
+ Iterator i = roles.iterator();
+
+ while (i.hasNext())
+ {
+ String roleName = (String) i.next();
+
+ Role role = roleModule.findRoleByName(roleName);
+
+ if (role == null)
+ {
+ // Create new role ?
+ }
+ else
+ {
+ roles.add(role);
+ }
+ }
+ return roles;
+
+ }
+ else
+ {
+ roles = new HashSet();
+ Role role = roleModule.findRoleByName(defaultRole);
+
+ if (role != null)
+ {
+ roles.add(role);
+ }
+ else
+ {
+ throw new IllegalArgumentException();
+ }
+
+ return roles;
+ }
+ }
+}
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * 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.identity.ui.common;
+
+import java.util.HashMap;
+
+import org.jboss.portal.core.identity.ui.UIAttribute;
+import org.jboss.portal.faces.el.PropertyValue;
+import org.jboss.portal.faces.el.dynamic.DynamicBean;
+import org.jboss.portal.identity.User;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class MetaDataServiceBean implements DynamicBean
+{
+ HashMap map = new HashMap();
+
+ public MetaDataServiceBean() {
+ UIAttribute uiAttribute = new UIAttribute();
+ uiAttribute.setIdentifier(User.INFO_USER_EMAIL_REAL);
+ uiAttribute.setName("email");
+ uiAttribute.setValidator("EmailValidator");
+ uiAttribute.setRequired(true);
+
+ map.put("email", uiAttribute);
+ }
+
+ public Class getType(Object propertyName) throws IllegalArgumentException
+ {
+ return UIAttribute.class;
+ }
+
+ public PropertyValue getValue(Object propertyName) throws IllegalArgumentException
+ {
+ UIAttribute uiAttribute = (UIAttribute) map.get((String) propertyName);
+ return uiAttribute != null ? new PropertyValue(uiAttribute) : null;
+ }
+
+ public boolean setValue(Object propertyName, Object value) throws
IllegalArgumentException
+ {
+ return false;
+ }
+
+}
+
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/ProfileBean.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/ProfileBean.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/ProfileBean.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,72 @@
+/******************************************************************************
+ * 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.identity.ui.common;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portlet.JBossRenderRequest;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ProfileBean
+{
+
+ private User user = null;
+ private UserModule userModule;
+
+ public ProfileBean()
+ {
+ JBossRenderRequest request = (JBossRenderRequest)
FacesContext.getCurrentInstance().getExternalContext()
+ .getRequest();
+ this.user =request.getUser();
+ }
+
+
+ public User getUser()
+ {
+ return user;
+ }
+
+ public void setUser(User user)
+ {
+ this.user = user;
+ }
+
+ public UserModule getUserModule()
+ {
+ return userModule;
+ }
+
+ public void setUserModule(UserModule userModule)
+ {
+ this.userModule = userModule;
+ }
+
+}
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * 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.identity.ui.validators;
+
+import java.util.regex.Pattern;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class EmailValidator implements Validator
+{
+ private static final String EMAIL_VALIDATION =
"^([a-zA-Z0-9]+(([\\.\\-\\_]?[a-zA-Z0-9]+)+)?)\\(a)(([a-zA-Z0-9]+[\\.\\-\\_])+[a-zA-Z]{2,4})$";
+
+ public void validate(FacesContext context, UIComponent component, Object value)
throws ValidatorException
+ {
+ if(value != null)
+ {
+ if (!(value instanceof String)) {
+ throw new IllegalArgumentException("The value must be a
String");
+ }
+
+ if (! Pattern.matches(this.EMAIL_VALIDATION, (String) value))
+ {
+ throw new ValidatorException( new FacesMessage("Invalid EMail
Address"));
+ }
+
+ }
+
+ }
+}
+
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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.identity.ui.validators;
+
+import java.util.regex.Pattern;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlInputSecret;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PasswordValidator implements Validator
+{
+ public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException
+ {
+ UIComponent passwordComponent = component.findComponent("password");
+ if (passwordComponent != null && passwordComponent instanceof
HtmlInputSecret)
+ {
+ String password = (String) ((HtmlInputSecret) passwordComponent).getValue();
+
+ if (! password.equals((String) value))
+ {
+ throw new ValidatorException( new FacesMessage("The passwords
don't match."));
+ }
+
+ } else {
+ throw new ValidatorException( new FacesMessage("Passwords cannot be
checked."));
+ }
+ }
+}
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * 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.identity.ui.validators;
+
+import java.util.regex.Pattern;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+import javax.portlet.PortletContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.portal.core.identity.ui.actions.UserRegisterBean;
+import org.jboss.portal.core.ui.portlet.user.UserPortletConstants;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.UserModule;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+
+public class UsernameValidator implements Validator
+{
+ private static final String NICKNAME_VALIDATION =
"^[a-zA-Z]([a-zA-Z0-9]+(([\\.\\-\\_]?[a-zA-Z0-9]+)+)?)";
+ private UserModule userModule;
+
+ private static final Logger log = Logger.getLogger(UserRegisterBean.class);
+
+ public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException
+ {
+ User u = null;
+ String username = (String) value;
+ PortletContext portletContext = (PortletContext)
context.getExternalContext().getContext();
+ userModule = (UserModule) portletContext.getAttribute("UserModule");
+
+ if (username.length() >= 5 && (Pattern.matches(NICKNAME_VALIDATION,
username)))
+ {
+ try
+ {
+ u = userModule.findUserByUserName(username);
+ throw new ValidatorException(new FacesMessage("This username is already
in use."));
+ }
+ catch (NoSuchUserException e)
+ {
+ // No user found - proceed
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new ValidatorException(new FacesMessage("Error while checking
username (IllegalArgumentException)."));
+ }
+ catch (IdentityException e)
+ {
+ throw new ValidatorException(new FacesMessage("Error while checking
username (IdentityException)."));
+ }
+
+ } else {
+ throw new ValidatorException(new FacesMessage("Invalid Username."));
+ }
+ }
+}
Added: trunk/core-identity/src/resources/portal-identity-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-sar/META-INF/jboss-service.xml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-sar/META-INF/jboss-service.xml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+
+</server>
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,164 @@
+<?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 faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+
+<faces-config>
+ <application>
+
<property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver>
+ <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
+ <locale-config>
+ <default-locale>en</default-locale>
+ <supported-locale>fr</supported-locale>
+ </locale-config>
+ <message-bundle>
+
+ </message-bundle>
+ </application>
+
+ <managed-bean>
+ <managed-bean-name>metadataservice</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.common.MetaDataServiceBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>identityusermgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityUserBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>defaultRole</property-name>
+ <value>User</value>
+ </managed-property>
+ <managed-property>
+ <property-name>userModule</property-name>
+ <value>#{applicationScope.UserModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>roleModule</property-name>
+ <value>#{applicationScope.RoleModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>membershipModule</property-name>
+ <value>#{applicationScope.MembershipModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>userProfileModule</property-name>
+ <value>#{applicationScope.UserProfileModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>metaDataService</property-name>
+ <value>#{metadataservice}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>userregistermgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.actions.UserRegisterBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>profilebean</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.common.ProfileBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>userModule</property-name>
+ <value>#{applicationScope.UserModule}</value>
+ </managed-property>
+ </managed-bean>
+
+ <validator>
+ <validator-id>EmailValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.EmailValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>UsernameValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.UsernameValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>PasswordValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.PasswordValidator</validator-class>
+ </validator>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/WEB-INF/jsf/index.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>lostPassword</from-outcome>
+ <to-view-id>/WEB-INF/jsf/lostPassword/lost.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/WEB-INF/jsf/register/register.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/WEB-INF/jsf/register/register.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/WEB-INF/jsf/register/confirm.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/WEB-INF/jsf/register/confirm.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>revise</from-outcome>
+ <to-view-id>/WEB-INF/jsf/register/register.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/WEB-INF/jsf/register/success.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>changePassword</from-outcome>
+ <to-view-id>/WEB-INF/jsf/profile/changePassword.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>changeEmail</from-outcome>
+ <to-view-id>/WEB-INF/jsf/profile/changeEmail.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/WEB-INF/jsf/profile/editProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+
+</faces-config>
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jboss-portlet.xml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jboss-portlet.xml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,68 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
+<portlet-app>
+ <portlet>
+ <portlet-name>CoreIdentityUserPortlet</portlet-name>
+ <ajax>
+ <partial-refresh>false</partial-refresh>
+ </ajax>
+ <transaction>
+ <trans-attribute>Required</trans-attribute>
+ </transaction>
+ <header-content>
+ <link rel="stylesheet" type="text/css"
href="/style.css" media="screen"/>
+ </header-content>
+ </portlet>
+
+ <!-- Injecting of required services into the portlet context. -->
+ <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>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/index.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/index.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/index.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,17 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core">
+
+ <c:choose>
+ <c:when test="#{facesContext.externalContext.remoteUser != null}">
+ <ui:include src="/WEB-INF/jsf/profile/viewProfile.xhtml"/>
+ </c:when>
+ <c:otherwise>
+ <ui:include src="/WEB-INF/jsf/register/overview.xhtml"/>
+ </c:otherwise>
+ </c:choose>
+ <h:messages />
+</div>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,30 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="Welcome" action="start"/>
+ </li>
+ <li>
+ <h:commandLink value="Register"
action="register"/>
+ </li>
+ <li id="currentTab">Lost Password</li>
+ </ul>
+ </h:form>
+
+<h:form>
+<h4>Forgot your login data?</h4>
+<p>Please enter your username or the email address.</p>
+Username: <h:inputText />
+or E-Mail address: <h:inputText />
+<hr/>
+<h:commandButton value="Submit"
styleClass="portlet-form-button"/>
+</h:form>
+
+</div>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changeEmail.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changeEmail.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changeEmail.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,31 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="View profile"
action="start"/>
+ </li>
+ <li>
+ <h:commandLink value="Edit profile"
action="editProfile"/>
+ </li>
+ <li>
+ <h:commandLink value="Change password"
action="changePassword"/>
+ </li>
+ <li id="currentTab">Change email</li>
+ </ul>
+ </h:form>
+
+ <h:form>
+ <h4>Change your email address</h4>
+ Current password: <h:inputSecret /><br/>
+ New email address: <h:inputText />
+ <hr/>
+ <h:commandButton value="Submit"
styleClass="portlet-form-button"/>
+ </h:form>
+</div>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changePassword.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changePassword.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changePassword.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,33 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="View profile"
action="start"/>
+ </li>
+ <li>
+ <h:commandLink value="Edit profile"
action="editProfile"/>
+ </li>
+ <li id="currentTab">Change password</li>
+ <li>
+ <h:commandLink value="Change email"
action="changeEmail"/>
+ </li>
+ </ul>
+ </h:form>
+
+ <h:form>
+ <h4>Change your password</h4>
+ Current password: <h:inputSecret /><br/>
+ New password: <h:inputText /><br/>
+ Retype password: <h:inputText />
+ <hr/>
+ <h:commandButton value="Submit"
styleClass="portlet-form-button"/>
+ </h:form>
+
+</div>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,53 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="View profile"
action="start"/>
+ </li>
+ <li id="currentTab">Edit profile</li>
+ <li>
+ <h:commandLink value="Change password"
action="changePassword"/>
+ </li>
+ <li>
+ <h:commandLink value="Change email"
action="changeEmail"/>
+ </li>
+ </ul>
+ </h:form>
+
+ <h:form>
+ <h4>Change your profile</h4>
+
+ <h:outputText for="username">Username</h:outputText>
+ <h:outputText value="#{profilebean.user.userName}"/>
+ <br/>
+
+ <ul class="topnav">
+ <li id="currentTab">Personal Information</li>
+ </ul>
+ <br/>
+
+ <h:outputText for="firstname">Firstname</h:outputText>
+ <h:inputText id="firstname" />
+ <h:message for="firstname"/>
+ <br/>
+ <h:outputText for="lastname">Lastname</h:outputText>
+ <h:inputText id="lastname" />
+ <h:message for="lastname"/>
+ <br/>
+ <ul class="topnav">
+ <li id="currentTab">Contact Information</li>
+ </ul>
+ <br/>
+ ....
+
+ <hr/>
+ <h:commandButton value="Submit"
styleClass="portlet-form-button"/>
+ </h:form>
+</div>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,27 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+ <h:form>
+ <ul class="topnav">
+ <li id="currentTab">View profile</li>
+ <li>
+ <h:commandLink value="Edit profile"
action="editProfile"/>
+ </li>
+ <li>
+ <h:commandLink value="Change password"
action="changePassword"/>
+ </li>
+ <li>
+ <h:commandLink value="Change email"
action="changeEmail"/>
+ </li>
+ </ul>
+ </h:form>
+
+ <h4>User profile</h4>
+ Username: #{profilebean.user.userName}
+
+</div>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/confirm.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/confirm.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/confirm.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,39 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="Welcome" action="start"/>
+ </li>
+ <li id="currentTab">Register</li>
+ <li>
+ <h:commandLink value="Lost Password"
action="lostPassword"/>
+ </li>
+ </ul>
+ </h:form>
+
+<h:form>
+ <h4>Confirmation</h4>
+ <h:panelGrid columns="2">
+ <h:outputText for="username">Username</h:outputText>
+ <h:outputText id="username"
value="#{userregistermgr.uiUser.username}"/>
+
+ <h:outputText for="email">EMail</h:outputText>
+ <h:outputText id="email"
value="#{userregistermgr.uiUser.attribute.email}"/>
+
+ <h:outputText for="password">Password</h:outputText>
+ <h:outputText id="password">secret</h:outputText>
+ </h:panelGrid>
+
+ <h:messages />
+ <hr/>
+ <h:commandButton value="Edit" action="revise"
styleClass="portlet-form-button"/>
+ <h:commandButton value="Confirm"
action="#{userregistermgr.register}"
styleClass="portlet-form-button"/>
+</h:form>
+
+</div>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/overview.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/overview.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/overview.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,23 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+ <h:form>
+ <ul class="topnav">
+ <li id="currentTab">Welcome</li>
+ <li>
+ <h:commandLink value="Register"
action="register"/>
+ </li>
+ <li>
+ <h:commandLink value="Lost Password"
action="lostPassword"/>
+ </li>
+ </ul>
+ </h:form>
+
+ <h4>You are currently not logged in.</h4>
+ <h:commandLink action="register">You can create an
account.</h:commandLink>
+</div>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/register.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/register.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/register.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,53 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="Welcome" action="start"/>
+ </li>
+ <li id="currentTab">Register</li>
+ <li>
+ <h:commandLink value="Lost Password"
action="lostPassword"/>
+ </li>
+ </ul>
+ </h:form>
+
+ <h:form>
+ <h4>Basic user Information</h4>
+ <h:panelGrid columns="3">
+
+ <h:outputText for="username">Username</h:outputText>
+ <h:inputText id="username"
value="#{userregistermgr.uiUser.username}" required="true">
+ <f:validator validatorId="UsernameValidator"/>
+ </h:inputText>
+ <h:message for="username"/>
+
+ <h:outputText
for="#{metadataservice.email.name}">E-Mail</h:outputText>
+ <h:inputText id="#{metadataservice.email.name}"
value="#{userregistermgr.uiUser.attribute.email}"
required="#{metadataservice.email.required}">
+ <f:validator validatorId="#{metadataservice.email.validator}"/>
+ </h:inputText>
+ <h:message for="#{metadataservice.email.name}"/>
+
+ <h:outputText for="password">Password</h:outputText>
+ <h:inputSecret id="password"
value="#{userregistermgr.uiUser.password}" required="true">
+ <f:validateLength minimum="6"/>
+ </h:inputSecret>
+ <h:message for="password"/>
+
+ <h:outputText for="passwordCheck">Confirm
Password</h:outputText>
+ <h:inputSecret id="passwordCheck" required="true">
+ <f:validator validatorId="PasswordValidator"/>
+ </h:inputSecret>
+ <h:message for="passwordCheck"/>
+ </h:panelGrid>
+ <hr/>
+ <h:commandButton id="submit" action="register"
value="Register" styleClass="portlet-form-button"/>
+ </h:form>
+
+</div>
\ No newline at end of file
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/success.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/success.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/success.xhtml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,11 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core">
+
+ <p>Thank you for registering!</p>
+ you may now proceed to the login...
+
+</div>
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portal.taglib.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portal.taglib.xml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portal.taglib.xml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib
1.0//EN" "facelet-taglib_1_0.dtd">
+<facelet-taglib>
+ <
namespace>http://www.jboss.org/portal</namespace>
+ <tag>
+ <tag-name>scroller</tag-name>
+ <component>
+ <component-type>org.jboss.portal.Scroller</component-type>
+ <renderer-type>default</renderer-type>
+ </component>
+ </tag>
+ <tag>
+ <tag-name>portlet</tag-name>
+ <component>
+ <component-type>org.jboss.portal.Portlet</component-type>
+ <renderer-type>default</renderer-type>
+
<handler-class>org.jboss.portal.faces.component.portlet.PortletHandler</handler-class>
+ </component>
+ </tag>
+</facelet-taglib>
\ No newline at end of file
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet-instances.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet-instances.xml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet-instances.xml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,36 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portlet Instances 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <instance>
+ <instance-id>CoreIdentityUserPortletInstance</instance-id>
+ <portlet-ref>CoreIdentityUserPortlet</portlet-ref>
+ </instance>
+ </deployment>
+</deployments>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
(rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,57 @@
+<?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>Core Identity User Portlet</description>
+ <portlet-name>CoreIdentityUserPortlet</portlet-name>
+ <display-name>Core Identity User Portlet</display-name>
+
<portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
+ <init-param>
+ <name>default-view</name>
+ <value>/WEB-INF/jsf/index.xhtml</value>
+ </init-param>
+<!-- defaultRole - specified in faces-config.xml -->
+<!-- <init-param>
+ <description>Default role of registered users</description>
+ <name>defaultRole</name>
+ <value>User</value>
+ </init-param>
+-->
+ <expiration-cache>-1</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Core Identity User Portlet</title>
+ <keywords>management,user</keywords>
+ </portlet-info>
+ </portlet>
+</portlet-app>
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/web.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/web.xml
(rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/web.xml 2007-08-08
16:09:16 UTC (rev 7875)
@@ -0,0 +1,84 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app
+
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <!-- MyFaces specific configuration -->
+ <context-param>
+ <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- Facelet configuration -->
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.SKIP_COMMENTS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.LIBRARIES</param-name>
+ <param-value>/WEB-INF/portal.taglib.xml</param-value>
+ </context-param>
+
+ <!-- JSF configuration -->
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+
+ <!-- The JSF servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+
<servlet-class>org.jboss.portal.faces.loader.FacesLoaderServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+</web-app>