JBoss Portal SVN: r7949 - in modules/common/trunk: common/src/main/org/jboss/portal/common/junit/ant and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-08-16 08:04:20 -0400 (Thu, 16 Aug 2007)
New Revision: 7949
Added:
modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableXMLJUnitResultFormatter.java
Modified:
modules/common/trunk/build/build-thirdparty.xml
modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableJUnitTask.java
modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableJUnitTest.java
modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/TestParameter.java
Log:
Improve integration of test parametrization and add the possibility to specify the test id in the zest ant task
Modified: modules/common/trunk/build/build-thirdparty.xml
===================================================================
--- modules/common/trunk/build/build-thirdparty.xml 2007-08-16 11:53:30 UTC (rev 7948)
+++ modules/common/trunk/build/build-thirdparty.xml 2007-08-16 12:04:20 UTC (rev 7949)
@@ -50,7 +50,7 @@
<componentref name="apache-ant" version="1.6.5"/>
<componentref name="apache-httpclient" version="3.0.1"/>
<componentref name="apache-log4j" version="1.2.8"/>
- <componentref name="jbossas/core-libs" version="4.2.0.GA"/>
+ <componentref name="jbossas/core-libs" version="4.0.4.GA"/>
<componentref name="jboss/backport-concurrent" version="2.1.0.GA"/>
<componentref name="jboss/jbossretro-rt" version="1.0.3.GA"/>
<componentref name="jboss/test" version="1.0.0.CR1"/>
Modified: modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableJUnitTask.java
===================================================================
--- modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableJUnitTask.java 2007-08-16 11:53:30 UTC (rev 7948)
+++ modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableJUnitTask.java 2007-08-16 12:04:20 UTC (rev 7949)
@@ -23,7 +23,11 @@
package org.jboss.portal.common.junit.ant;
import org.apache.tools.ant.taskdefs.optional.junit.JUnitTask;
+import org.apache.tools.ant.taskdefs.optional.junit.JUnitTest;
+import org.apache.tools.ant.BuildException;
+import java.io.File;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 7228 $
@@ -40,4 +44,41 @@
test.setTask(this);
addTest(test);
}
+
+ protected void execute(JUnitTest test) throws BuildException
+ {
+ // Delete any existing file
+ File tmp = new File(System.getProperty("java.io.tmpdir"), TestParameter.PARAMETRIZATION_FILE_NAME);
+ if (tmp.exists() && tmp.isFile())
+ {
+ if (!tmp.delete())
+ {
+ throw new Error("Cannot delete previous saved parametrization");
+ }
+ }
+
+ //
+ try
+ {
+ // Basically we are only sure at this time of the execution that the nested parameter map is fully initialized
+ if (test instanceof ConfigurableJUnitTest)
+ {
+ ((ConfigurableJUnitTest)test).saveState();
+ }
+
+ // Let the parent class execute the super class
+ super.execute(test);
+ }
+ finally
+ {
+ // Cleanup any save state
+ if (tmp.exists() && tmp.isFile())
+ {
+ if (!tmp.delete())
+ {
+ tmp.deleteOnExit();
+ }
+ }
+ }
+ }
}
Modified: modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableJUnitTest.java
===================================================================
--- modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableJUnitTest.java 2007-08-16 11:53:30 UTC (rev 7948)
+++ modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableJUnitTest.java 2007-08-16 12:04:20 UTC (rev 7949)
@@ -33,6 +33,8 @@
import java.util.Map;
/**
+ * Used by ant to create a representation of the test to run.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 7228 $
*/
@@ -40,13 +42,13 @@
{
/** . */
- public static final String PARAMETER_PROPERTY_NAME = "test.params";
+ private final ArrayList nestedParameters;
/** . */
- private ArrayList nestedParameters;
+ private ConfigurableJUnitTask task;
/** . */
- private ConfigurableJUnitTask task;
+ private String id;
public ConfigurableJUnitTest()
{
@@ -58,8 +60,34 @@
nestedParameters.add(parameter);
}
- public String getName()
+ public void setTask(ConfigurableJUnitTask task)
{
+ this.task = task;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+
+ //
+ TestParameter parameter = new TestParameter();
+ parameter.setName(TestParameter.TEST_ID_PARAM);
+ parameter.setValue(id);
+ addParameter(parameter);
+ }
+
+ /**
+ * Save the state of the junit test on the disk for reuse later in the forked virtual machine.
+ * As there is not clear life cycle of the usage of this class, we need to save the state initially
+ * and on every update.
+ */
+ public void saveState()
+ {
try
{
Map parameters = new HashMap();
@@ -84,22 +112,17 @@
parameters.put(parameter.name, values);
}
}
- File tmp = new File(System.getProperty("java.io.tmpdir"), "junit.parameters");
+ File tmp = new File(System.getProperty("java.io.tmpdir"), TestParameter.PARAMETRIZATION_FILE_NAME);
tmp.deleteOnExit();
FileOutputStream fos = new FileOutputStream(tmp);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(parameters);
oos.close();
- return super.getName();
+
}
catch (IOException e)
{
throw new Error(e);
}
}
-
- public void setTask(ConfigurableJUnitTask task)
- {
- this.task = task;
- }
}
Added: modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableXMLJUnitResultFormatter.java
===================================================================
--- modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableXMLJUnitResultFormatter.java (rev 0)
+++ modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/ConfigurableXMLJUnitResultFormatter.java 2007-08-16 12:04:20 UTC (rev 7949)
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * 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.common.junit.ant;
+
+import org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter;
+import org.apache.tools.ant.taskdefs.optional.junit.JUnitTest;
+import org.w3c.dom.Element;
+
+import java.lang.reflect.Field;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConfigurableXMLJUnitResultFormatter extends XMLJUnitResultFormatter
+{
+
+ /** . */
+ private static final Field f;
+
+ static
+ {
+ try
+ {
+ f = XMLJUnitResultFormatter.class.getDeclaredField("rootElement");
+ if (!f.isAccessible())
+ {
+ f.setAccessible(true);
+ }
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new Error(e);
+ }
+ }
+
+ public void startTestSuite(JUnitTest suite)
+ {
+ super.startTestSuite(suite);
+
+ //
+ Map parameters = TestParameter.readExternalParameters();
+ if (parameters != null)
+ {
+ String[] values = (String[])parameters.get(TestParameter.TEST_ID_PARAM);
+ if (values != null && values.length > 0)
+ {
+ try
+ {
+ String id = values[0];
+ Element rootElement = (Element)f.get(this);
+ rootElement.setAttribute("name", id);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new Error(e);
+ }
+ }
+ }
+ }
+}
Modified: modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/TestParameter.java
===================================================================
--- modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/TestParameter.java 2007-08-16 11:53:30 UTC (rev 7948)
+++ modules/common/trunk/common/src/main/org/jboss/portal/common/junit/ant/TestParameter.java 2007-08-16 12:04:20 UTC (rev 7949)
@@ -36,6 +36,12 @@
{
/** . */
+ static final String TEST_ID_PARAM = "test.param.id";
+
+ /** . */
+ static final String PARAMETRIZATION_FILE_NAME = "junit.parameters";
+
+ /** . */
protected String name;
/** . */
@@ -63,7 +69,7 @@
{
try
{
- File tmp = new File(System.getProperty("java.io.tmpdir"), "junit.parameters");
+ File tmp = new File(System.getProperty("java.io.tmpdir"), PARAMETRIZATION_FILE_NAME);
if (tmp.exists() && tmp.isFile())
{
FileInputStream fis = new FileInputStream(tmp);
18 years, 8 months
JBoss Portal SVN: r7948 - trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-08-16 07:53:30 -0400 (Thu, 16 Aug 2007)
New Revision: 7948
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
Log:
JBPORTAL-1608: CMS content type always display with no decoration
Now the "DecorateContent" attribute only defines a default behavior, but it can be overridden by portal object properties
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2007-08-16 11:52:20 UTC (rev 7947)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2007-08-16 11:53:30 UTC (rev 7948)
@@ -213,9 +213,18 @@
if (rendition != null && rendition.getControllerResponse() instanceof MarkupResponse && !getDecorateContent())
{
Map props = rendition.getProperties();
- props.put("theme.windowRendererId", "emptyRenderer");
- props.put("theme.decorationRendererId", "emptyRenderer");
- props.put("theme.portletRendererId", "emptyRenderer");
+ if (props.get("theme.windowRendererId") == null)
+ {
+ props.put("theme.windowRendererId", "emptyRenderer");
+ }
+ if (props.get("theme.decorationRendererId") == null)
+ {
+ props.put("theme.decorationRendererId", "emptyRenderer");
+ }
+ if (props.get("theme.portletRendererId") == null)
+ {
+ props.put("theme.portletRendererId", "emptyRenderer");
+ }
}
//
18 years, 8 months
JBoss Portal SVN: r7947 - branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/content/generic.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-08-16 07:52:20 -0400 (Thu, 16 Aug 2007)
New Revision: 7947
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
Log:
JBPORTAL-1608: CMS content type always display with no decoration
Now the "DecorateContent" attribute only defines a default behavior, but it can be overridden by portal object properties
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2007-08-16 11:27:51 UTC (rev 7946)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2007-08-16 11:52:20 UTC (rev 7947)
@@ -213,9 +213,18 @@
if (rendition != null && rendition.getControllerResponse() instanceof MarkupResponse && !getDecorateContent())
{
Map props = rendition.getProperties();
- props.put("theme.windowRendererId", "emptyRenderer");
- props.put("theme.decorationRendererId", "emptyRenderer");
- props.put("theme.portletRendererId", "emptyRenderer");
+ if (props.get("theme.windowRendererId") == null)
+ {
+ props.put("theme.windowRendererId", "emptyRenderer");
+ }
+ if (props.get("theme.decorationRendererId") == null)
+ {
+ props.put("theme.decorationRendererId", "emptyRenderer");
+ }
+ if (props.get("theme.portletRendererId") == null)
+ {
+ props.put("theme.portletRendererId", "emptyRenderer");
+ }
}
//
18 years, 8 months
JBoss Portal SVN: r7946 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-08-16 07:27:51 -0400 (Thu, 16 Aug 2007)
New Revision: 7946
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
Log:
JBPORTAL-1540: Add description column to portlet lists
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-08-16 11:23:40 UTC (rev 7945)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-08-16 11:27:51 UTC (rev 7946)
@@ -25,8 +25,8 @@
<table width="100%">
<thead class="portlet-section-header">
<tr>
- <th>Id</th>
<th>Name</th>
+ <th>Description</th>
<th>Remote</th>
<th>Remotable</th>
<th>Actions</th>
@@ -38,13 +38,15 @@
class="#{portlet.context.id == portletmgr.selectedPortlet.context.id ? 'portlet-section-selected' : (status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate')}">
<td>
<h:commandLink
- action="#{portletmgr.selectPortlet}">
+ action="#{portletmgr.selectPortlet}"
+ title="#{portlet.context.id}">
<f:param name="id" value="#{portlet.context.id}"/>
<f:param name="plugin" value="manager"/>
- #{portlet.context.id}
+ <h:outputText rendered="#{not empty portlet.name.value}">#{portlet.name.value}</h:outputText>
+ <h:outputText title="#{portlet.context.id}" rendered="#{empty portlet.name.value}">#{portlet.context.id}</h:outputText>
</h:commandLink>
</td>
- <td>#{portlet.name.value}</td>
+ <td>#{portlet.description.value}</td>
<td><h:selectBooleanCheckbox disabled="true" value="#{portlet.remote}"/></td>
<td><h:selectBooleanCheckbox disabled="true" value="#{portlet.remotable}"/></td>
<td>
18 years, 8 months
JBoss Portal SVN: r7945 - branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-08-16 07:23:40 -0400 (Thu, 16 Aug 2007)
New Revision: 7945
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
Log:
Made the portlet listing less scary
JBPORTAL-1540: Add description column to portlet lists
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-08-16 09:45:01 UTC (rev 7944)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-08-16 11:23:40 UTC (rev 7945)
@@ -25,8 +25,8 @@
<table width="100%">
<thead class="portlet-section-header">
<tr>
- <th>Id</th>
<th>Name</th>
+ <th>Description</th>
<th>Remote</th>
<th>Remotable</th>
<th>Actions</th>
@@ -38,13 +38,15 @@
class="#{portlet.context.id == portletmgr.selectedPortlet.context.id ? 'portlet-section-selected' : (status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate')}">
<td>
<h:commandLink
- action="#{portletmgr.selectPortlet}">
+ action="#{portletmgr.selectPortlet}"
+ title="#{portlet.context.id}">
<f:param name="id" value="#{portlet.context.id}"/>
<f:param name="plugin" value="manager"/>
- #{portlet.context.id}
+ <h:outputText rendered="#{not empty portlet.name.value}">#{portlet.name.value}</h:outputText>
+ <h:outputText title="#{portlet.context.id}" rendered="#{empty portlet.name.value}">#{portlet.context.id}</h:outputText>
</h:commandLink>
</td>
- <td>#{portlet.name.value}</td>
+ <td>#{portlet.description.value}</td>
<td><h:selectBooleanCheckbox disabled="true" value="#{portlet.remote}"/></td>
<td><h:selectBooleanCheckbox disabled="true" value="#{portlet.remotable}"/></td>
<td>
18 years, 8 months
JBoss Portal SVN: r7944 - in trunk/identity/src: main/org/jboss/portal/test/identity and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-08-16 05:45:01 -0400 (Thu, 16 Aug 2007)
New Revision: 7944
Modified:
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
trunk/identity/src/resources/hibernate/domain-identity.hbm.xml
Log:
More ordering in the identity, bug fix.
Still User.getRoles and Role.getUsers will return an unordered list
Modified: trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-08-16 09:39:35 UTC (rev 7943)
+++ trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-08-16 09:45:01 UTC (rev 7944)
@@ -37,6 +37,8 @@
import org.hibernate.HibernateException;
import javax.naming.InitialContext;
+
+import java.util.LinkedHashSet;
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
@@ -75,11 +77,6 @@
super.stopService();
}
-// public SessionFactory getSessionFactory()
-// {
-// return sessionFactory;
-// }
-
public String getSessionFactoryJNDIName()
{
return sessionFactoryJNDIName;
@@ -245,21 +242,21 @@
userNameFilter = "%" + userNameFilter.replaceAll("%", "") + "%";
//
- query = session.createQuery("from HibernateUserImpl as user left join user.roles role where role.name=:name" + " AND user.userName LIKE :filter");
+ query = session.createQuery("from HibernateUserImpl as user left join user.roles role where role.name=:name" + " AND user.userName LIKE :filter order by user.userName");
query.setString("filter", userNameFilter);
}
else
{
- query = session.createQuery("from HibernateUserImpl as user left join user.roles role where role.name=:name");
+ query = session.createQuery("from HibernateUserImpl as user left join user.roles role where role.name=:name order by user.userName");
}
query.setString("name", roleName);
query.setFirstResult(offset);
query.setMaxResults(limit);
Iterator iterator = query.iterate();
- Set result = Tools.toSet(iterator);
+ Set result = Tools.toSet(iterator, true);
- Set newResult = new HashSet();
+ Set newResult = new LinkedHashSet();
Iterator cleaner = result.iterator();
while (cleaner.hasNext())
{
@@ -299,7 +296,7 @@
return userModule;
}
- /** Can be subclasses to provide testing in a non JTA environement. */
+ /** Can be subclasses to provide testing in a non JTA environment. */
protected Session getCurrentSession()
{
if (sessionFactory == null)
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-08-16 09:39:35 UTC (rev 7943)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-08-16 09:45:01 UTC (rev 7944)
@@ -339,16 +339,11 @@
{
ctx.begin();
Set set1 = membershipModule.findRoleMembers("role1", 0, 10, "user");
- Set nameSet1 = new HashSet();
- for (Iterator i = set1.iterator(); i.hasNext();)
- {
- User user = (User)i.next();
- nameSet1.add(user.getUserName());
- }
- Set expectedNameSet1 = new HashSet();
- expectedNameSet1.add("user1");
- expectedNameSet1.add("user2");
- assertEquals(expectedNameSet1, nameSet1);
+ Iterator i = set1.iterator();
+ User user = (User)i.next();
+ assertEquals("user1", user.getUserName());
+ user = (User)i.next();
+ assertEquals("user2", user.getUserName());
//
Set set2 = membershipModule.findRoleMembers("role1", 0, 10, "blah");
@@ -356,29 +351,20 @@
//
Set set3 = membershipModule.findRoleMembers("role1", 0, 10, "");
- Set nameSet3 = new HashSet();
- for (Iterator i = set3.iterator(); i.hasNext();)
- {
- User user = (User)i.next();
- nameSet3.add(user.getUserName());
- }
- Set expectedNameSet3 = new HashSet();
- expectedNameSet3.add("user1");
- expectedNameSet3.add("user2");
- expectedNameSet3.add("admin");
- assertEquals(expectedNameSet3, nameSet3);
+ i = set3.iterator();
+ user = (User)i.next();
+ assertEquals("admin", user.getUserName());
+ user = (User)i.next();
+ assertEquals("user1", user.getUserName());
+ user = (User)i.next();
+ assertEquals("user2", user.getUserName());
//
Set set4 = membershipModule.findRoleMembers("role1", 0, 10, "user1");
- Set nameSet4 = new HashSet();
- for (Iterator i = set4.iterator(); i.hasNext();)
- {
- User user = (User)i.next();
- nameSet4.add(user.getUserName());
- }
- Set expectedNameSet4 = new HashSet();
- expectedNameSet4.add("user1");
- assertEquals(expectedNameSet4, nameSet4);
+ i = set4.iterator();
+ user = (User)i.next();
+ assertEquals("user1", user.getUserName());
+
ctx.commit();
}
Modified: trunk/identity/src/resources/hibernate/domain-identity.hbm.xml
===================================================================
--- trunk/identity/src/resources/hibernate/domain-identity.hbm.xml 2007-08-16 09:39:35 UTC (rev 7943)
+++ trunk/identity/src/resources/hibernate/domain-identity.hbm.xml 2007-08-16 09:45:01 UTC (rev 7944)
@@ -124,7 +124,7 @@
lazy="false"
inverse="false"
cascade="none"
- sort="name">
+ sort="unsorted">
<!--<cache usage="@portal.hibernate.cache.usage@"/>-->
<key column="jbp_uid"/>
<many-to-many
18 years, 8 months
JBoss Portal SVN: r7943 - in branches/JBoss_Portal_Branch_2_6/identity/src: main/org/jboss/portal/test/identity and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-08-16 05:39:35 -0400 (Thu, 16 Aug 2007)
New Revision: 7943
Modified:
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
branches/JBoss_Portal_Branch_2_6/identity/src/resources/hibernate/domain-identity.hbm.xml
Log:
More ordering in the identity, bug fix.
Still User.getRoles and Role.getUsers will return an unordered list
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-08-15 22:53:02 UTC (rev 7942)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-08-16 09:39:35 UTC (rev 7943)
@@ -37,6 +37,8 @@
import org.hibernate.HibernateException;
import javax.naming.InitialContext;
+
+import java.util.LinkedHashSet;
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
@@ -75,11 +77,6 @@
super.stopService();
}
-// public SessionFactory getSessionFactory()
-// {
-// return sessionFactory;
-// }
-
public String getSessionFactoryJNDIName()
{
return sessionFactoryJNDIName;
@@ -245,21 +242,21 @@
userNameFilter = "%" + userNameFilter.replaceAll("%", "") + "%";
//
- query = session.createQuery("from HibernateUserImpl as user left join user.roles role where role.name=:name" + " AND user.userName LIKE :filter");
+ query = session.createQuery("from HibernateUserImpl as user left join user.roles role where role.name=:name" + " AND user.userName LIKE :filter order by user.userName");
query.setString("filter", userNameFilter);
}
else
{
- query = session.createQuery("from HibernateUserImpl as user left join user.roles role where role.name=:name");
+ query = session.createQuery("from HibernateUserImpl as user left join user.roles role where role.name=:name order by user.userName");
}
query.setString("name", roleName);
query.setFirstResult(offset);
query.setMaxResults(limit);
Iterator iterator = query.iterate();
- Set result = Tools.toSet(iterator);
+ Set result = Tools.toSet(iterator, true);
- Set newResult = new HashSet();
+ Set newResult = new LinkedHashSet();
Iterator cleaner = result.iterator();
while (cleaner.hasNext())
{
@@ -299,7 +296,7 @@
return userModule;
}
- /** Can be subclasses to provide testing in a non JTA environement. */
+ /** Can be subclasses to provide testing in a non JTA environment. */
protected Session getCurrentSession()
{
if (sessionFactory == null)
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-08-15 22:53:02 UTC (rev 7942)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-08-16 09:39:35 UTC (rev 7943)
@@ -339,16 +339,11 @@
{
ctx.begin();
Set set1 = membershipModule.findRoleMembers("role1", 0, 10, "user");
- Set nameSet1 = new HashSet();
- for (Iterator i = set1.iterator(); i.hasNext();)
- {
- User user = (User)i.next();
- nameSet1.add(user.getUserName());
- }
- Set expectedNameSet1 = new HashSet();
- expectedNameSet1.add("user1");
- expectedNameSet1.add("user2");
- assertEquals(expectedNameSet1, nameSet1);
+ Iterator i = set1.iterator();
+ User user = (User)i.next();
+ assertEquals("user1", user.getUserName());
+ user = (User)i.next();
+ assertEquals("user2", user.getUserName());
//
Set set2 = membershipModule.findRoleMembers("role1", 0, 10, "blah");
@@ -356,29 +351,20 @@
//
Set set3 = membershipModule.findRoleMembers("role1", 0, 10, "");
- Set nameSet3 = new HashSet();
- for (Iterator i = set3.iterator(); i.hasNext();)
- {
- User user = (User)i.next();
- nameSet3.add(user.getUserName());
- }
- Set expectedNameSet3 = new HashSet();
- expectedNameSet3.add("user1");
- expectedNameSet3.add("user2");
- expectedNameSet3.add("admin");
- assertEquals(expectedNameSet3, nameSet3);
+ i = set3.iterator();
+ user = (User)i.next();
+ assertEquals("admin", user.getUserName());
+ user = (User)i.next();
+ assertEquals("user1", user.getUserName());
+ user = (User)i.next();
+ assertEquals("user2", user.getUserName());
//
Set set4 = membershipModule.findRoleMembers("role1", 0, 10, "user1");
- Set nameSet4 = new HashSet();
- for (Iterator i = set4.iterator(); i.hasNext();)
- {
- User user = (User)i.next();
- nameSet4.add(user.getUserName());
- }
- Set expectedNameSet4 = new HashSet();
- expectedNameSet4.add("user1");
- assertEquals(expectedNameSet4, nameSet4);
+ i = set4.iterator();
+ user = (User)i.next();
+ assertEquals("user1", user.getUserName());
+
ctx.commit();
}
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/resources/hibernate/domain-identity.hbm.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/resources/hibernate/domain-identity.hbm.xml 2007-08-15 22:53:02 UTC (rev 7942)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/resources/hibernate/domain-identity.hbm.xml 2007-08-16 09:39:35 UTC (rev 7943)
@@ -124,7 +124,7 @@
lazy="false"
inverse="false"
cascade="none"
- sort="name">
+ sort="unsorted">
<!--<cache usage="@portal.hibernate.cache.usage@"/>-->
<key column="jbp_uid"/>
<many-to-many
18 years, 8 months
JBoss Portal SVN: r7942 - in trunk/core/src/main/org/jboss/portal: test/core/model/portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-08-15 18:53:02 -0400 (Wed, 15 Aug 2007)
New Revision: 7942
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectPathTestCase.java
Log:
JBPORTAL-1614: Allow '.' in username, and portal object names.
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2007-08-15 22:48:19 UTC (rev 7941)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2007-08-15 22:53:02 UTC (rev 7942)
@@ -365,7 +365,10 @@
{
break;
}
- length++;
+ if (next > 0 && value.charAt(next-1) != '\\')
+ {
+ length++;
+ }
previous = next + 1;
}
@@ -373,17 +376,26 @@
String[] names = new String[length];
length = 0;
previous = 1;
+ int next = 1;
while (true)
{
- int next = value.indexOf(PATH_SEPARATOR, previous);
+ next = value.indexOf(PATH_SEPARATOR, next);
if (next == -1)
{
break;
}
- names[length++] = value.substring(previous, next);
- previous = next + 1;
+ if (next > 0 && value.charAt(next-1) != '\\')
+ {
+ String name = value.substring(previous, next);
+ name = decodeName(name);
+ names[length++] = name;
+ previous = next + 1;
+ }
+ next++;
}
- names[length] = value.substring(previous);
+ String name = value.substring(previous);
+ name = decodeName(name);
+ names[length] = name;
//
return names;
@@ -406,11 +418,23 @@
{
throw new IllegalArgumentException("No null name expected in the name string array");
}
+ name = encodeName(name);
tmp.append(PATH_SEPARATOR).append(name);
}
return tmp.toString();
}
}
+
+ protected String decodeName(String name)
+ {
+ return name.replace("\\/", "/");
+ }
+
+ protected String encodeName(String name)
+ {
+ return name.replace("/", "\\/");
+ }
+
}
;
@@ -438,18 +462,25 @@
int length = 1;
for (int next = value.indexOf('.'); next != -1; next = value.indexOf('.', next + 1))
{
- length++;
+ if (next > 0 && value.charAt(next-1) != '\\')
+ {
+ length++;
+ }
}
//
String[] names = new String[length];
length = 0;
int previous = 0;
- for (int next = value.indexOf('.'); next != -1; previous = next + 1, next = value.indexOf('.', next + 1))
+ for (int next = value.indexOf('.'); next != -1; next = value.indexOf('.', next + 1))
{
- String name = value.substring(previous, next);
- name = decodeName(name);
- names[length++] = name;
+ if (next > 0 && value.charAt(next-1) != '\\')
+ {
+ String name = value.substring(previous, next);
+ name = decodeName(name);
+ names[length++] = name;
+ previous = next + 1;
+ }
}
String name = value.substring(previous);
name = decodeName(name);
@@ -490,12 +521,12 @@
protected String decodeName(String name)
{
- return name;
+ return name.replace("\\.", ".");
}
protected String encodeName(String name)
{
- return name;
+ return name.replace(".", "\\.");
}
}
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectPathTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectPathTestCase.java 2007-08-15 22:48:19 UTC (rev 7941)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectPathTestCase.java 2007-08-15 22:53:02 UTC (rev 7942)
@@ -141,6 +141,10 @@
assertEquals(new PortalObjectPath(new String[]{}), PortalObjectPath.parse("/", PortalObjectPath.CANONICAL_FORMAT));
assertEquals(new PortalObjectPath(new String[]{"a"}), PortalObjectPath.parse("/a", PortalObjectPath.CANONICAL_FORMAT));
assertEquals(new PortalObjectPath(new String[]{"a","b"}), PortalObjectPath.parse("/a/b", PortalObjectPath.CANONICAL_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{"a.b", "c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"a.b", "c"}).toString(PortalObjectPath.CANONICAL_FORMAT), PortalObjectPath.CANONICAL_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{".a.b", "c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{".a.b", "c"}).toString(PortalObjectPath.CANONICAL_FORMAT), PortalObjectPath.CANONICAL_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{"\\.a.b/", "\\c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"\\.a.b/", "\\c"}).toString(PortalObjectPath.CANONICAL_FORMAT), PortalObjectPath.CANONICAL_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{"/"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"/"}).toString(PortalObjectPath.CANONICAL_FORMAT), PortalObjectPath.CANONICAL_FORMAT));
//
try
@@ -166,6 +170,11 @@
assertEquals(new PortalObjectPath(new String[]{}), PortalObjectPath.parse("", PortalObjectPath.LEGACY_FORMAT));
assertEquals(new PortalObjectPath(new String[]{"a"}), PortalObjectPath.parse("a", PortalObjectPath.LEGACY_FORMAT));
assertEquals(new PortalObjectPath(new String[]{"a","b"}), PortalObjectPath.parse("a.b", PortalObjectPath.LEGACY_FORMAT));
+
+
+ assertEquals(new PortalObjectPath(new String[]{"a.b", "c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"a.b", "c"}).toString(PortalObjectPath.LEGACY_FORMAT), PortalObjectPath.LEGACY_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{".a.b", "c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{".a.b", "c"}).toString(PortalObjectPath.LEGACY_FORMAT), PortalObjectPath.LEGACY_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{"\\.a.b/", "\\c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"\\.a.b/", "\\c"}).toString(PortalObjectPath.LEGACY_FORMAT), PortalObjectPath.LEGACY_FORMAT));
}
public void testEquals()
18 years, 8 months
JBoss Portal SVN: r7941 - in branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal: test/core/model/portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-08-15 18:48:19 -0400 (Wed, 15 Aug 2007)
New Revision: 7941
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectPathTestCase.java
Log:
JBPORTAL-1614: Allow '.' in username, and portal object names.
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2007-08-15 18:09:14 UTC (rev 7940)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2007-08-15 22:48:19 UTC (rev 7941)
@@ -365,7 +365,10 @@
{
break;
}
- length++;
+ if (next > 0 && value.charAt(next-1) != '\\')
+ {
+ length++;
+ }
previous = next + 1;
}
@@ -373,17 +376,26 @@
String[] names = new String[length];
length = 0;
previous = 1;
+ int next = 1;
while (true)
{
- int next = value.indexOf(PATH_SEPARATOR, previous);
+ next = value.indexOf(PATH_SEPARATOR, next);
if (next == -1)
{
break;
}
- names[length++] = value.substring(previous, next);
- previous = next + 1;
+ if (next > 0 && value.charAt(next-1) != '\\')
+ {
+ String name = value.substring(previous, next);
+ name = decodeName(name);
+ names[length++] = name;
+ previous = next + 1;
+ }
+ next++;
}
- names[length] = value.substring(previous);
+ String name = value.substring(previous);
+ name = decodeName(name);
+ names[length] = name;
//
return names;
@@ -406,11 +418,23 @@
{
throw new IllegalArgumentException("No null name expected in the name string array");
}
+ name = encodeName(name);
tmp.append(PATH_SEPARATOR).append(name);
}
return tmp.toString();
}
}
+
+ protected String decodeName(String name)
+ {
+ return name.replace("\\/", "/");
+ }
+
+ protected String encodeName(String name)
+ {
+ return name.replace("/", "\\/");
+ }
+
}
;
@@ -438,18 +462,25 @@
int length = 1;
for (int next = value.indexOf('.'); next != -1; next = value.indexOf('.', next + 1))
{
- length++;
+ if (next > 0 && value.charAt(next-1) != '\\')
+ {
+ length++;
+ }
}
//
String[] names = new String[length];
length = 0;
int previous = 0;
- for (int next = value.indexOf('.'); next != -1; previous = next + 1, next = value.indexOf('.', next + 1))
+ for (int next = value.indexOf('.'); next != -1; next = value.indexOf('.', next + 1))
{
- String name = value.substring(previous, next);
- name = decodeName(name);
- names[length++] = name;
+ if (next > 0 && value.charAt(next-1) != '\\')
+ {
+ String name = value.substring(previous, next);
+ name = decodeName(name);
+ names[length++] = name;
+ previous = next + 1;
+ }
}
String name = value.substring(previous);
name = decodeName(name);
@@ -490,12 +521,12 @@
protected String decodeName(String name)
{
- return name;
+ return name.replace("\\.", ".");
}
protected String encodeName(String name)
{
- return name;
+ return name.replace(".", "\\.");
}
}
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectPathTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectPathTestCase.java 2007-08-15 18:09:14 UTC (rev 7940)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectPathTestCase.java 2007-08-15 22:48:19 UTC (rev 7941)
@@ -141,6 +141,10 @@
assertEquals(new PortalObjectPath(new String[]{}), PortalObjectPath.parse("/", PortalObjectPath.CANONICAL_FORMAT));
assertEquals(new PortalObjectPath(new String[]{"a"}), PortalObjectPath.parse("/a", PortalObjectPath.CANONICAL_FORMAT));
assertEquals(new PortalObjectPath(new String[]{"a","b"}), PortalObjectPath.parse("/a/b", PortalObjectPath.CANONICAL_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{"a.b", "c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"a.b", "c"}).toString(PortalObjectPath.CANONICAL_FORMAT), PortalObjectPath.CANONICAL_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{".a.b", "c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{".a.b", "c"}).toString(PortalObjectPath.CANONICAL_FORMAT), PortalObjectPath.CANONICAL_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{"\\.a.b/", "\\c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"\\.a.b/", "\\c"}).toString(PortalObjectPath.CANONICAL_FORMAT), PortalObjectPath.CANONICAL_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{"/"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"/"}).toString(PortalObjectPath.CANONICAL_FORMAT), PortalObjectPath.CANONICAL_FORMAT));
//
try
@@ -166,6 +170,11 @@
assertEquals(new PortalObjectPath(new String[]{}), PortalObjectPath.parse("", PortalObjectPath.LEGACY_FORMAT));
assertEquals(new PortalObjectPath(new String[]{"a"}), PortalObjectPath.parse("a", PortalObjectPath.LEGACY_FORMAT));
assertEquals(new PortalObjectPath(new String[]{"a","b"}), PortalObjectPath.parse("a.b", PortalObjectPath.LEGACY_FORMAT));
+
+
+ assertEquals(new PortalObjectPath(new String[]{"a.b", "c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"a.b", "c"}).toString(PortalObjectPath.LEGACY_FORMAT), PortalObjectPath.LEGACY_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{".a.b", "c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{".a.b", "c"}).toString(PortalObjectPath.LEGACY_FORMAT), PortalObjectPath.LEGACY_FORMAT));
+ assertEquals(new PortalObjectPath(new String[]{"\\.a.b/", "\\c"}), PortalObjectPath.parse(new PortalObjectPath(new String[]{"\\.a.b/", "\\c"}).toString(PortalObjectPath.LEGACY_FORMAT), PortalObjectPath.LEGACY_FORMAT));
}
public void testEquals()
18 years, 8 months
JBoss Portal SVN: r7940 - in trunk/core-identity: src/main/org/jboss/portal/core/identity and 19 other directories.
by portal-commits@lists.jboss.org
Author: emuckenhuber
Date: 2007-08-15 14:09:14 -0400 (Wed, 15 Aug 2007)
New Revision: 7940
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityConstants.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/UIRole.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/AssignRoleAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityRoleBean.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/workflow/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/emailTemplate.tpl
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/emailTemplate_fr.tpl
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/createRole.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/deleteRole.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleTemplate.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/createUser.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/deleteUser.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/registerConfirm.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/registerRoles.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/userTemplate.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/confirm.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lostTemplate.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/startTemplate.xhtml
Removed:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileBean.java
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/resources/portal-identity-war/WEB-INF/jsf/admin/adminTemplate.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/confirm.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/registerRoles.xhtml
Modified:
trunk/core-identity/.classpath
trunk/core-identity/build.xml
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/ValidateEmailServlet.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/RoleManagementBean.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java
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/validators/CurrentPasswordValidator.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity.properties
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity_de.properties
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/assignRoles.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/index.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/register.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/editRole.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleMembers.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml
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/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/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/registerTemplate.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/portlet.xml
Log:
extending and refactoring of User / Admin Portlet
Modified: trunk/core-identity/.classpath
===================================================================
--- trunk/core-identity/.classpath 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/.classpath 2007-08-15 18:09:14 UTC (rev 7940)
@@ -28,5 +28,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/common"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+ <classpathentry kind="lib" path="/thirdparty/freemarker/lib/freemarker.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/core-identity/build.xml
===================================================================
--- trunk/core-identity/build.xml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/build.xml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -66,7 +66,8 @@
| Initialize the build system. Must depend on '_buildmagic:init'.
| Other targets should depend on 'init' or things will mysteriously fail.
-->
-
+ <import file="../testsuite/imports/server-config.xml"/>
+
<target name="init" unless="init.disable" depends="_buildmagic:init">
</target>
@@ -89,6 +90,7 @@
<path id="library.classpath">
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.cache.classpath"/>
+ <path refid="freemarker.freemarker.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
<path refid="hibernate.hibernate.classpath"/>
<path refid="apache.myfaces.classpath"/>
@@ -96,6 +98,8 @@
<path refid="sun.servlet.classpath"/>
<path refid="facelets.facelets.classpath"/>
<path refid="el.el.classpath"/>
+ <path refid="jakarta.cactus.classpath"/>
+ <path refid="junit.junit.classpath"/>
<pathelement location="${source.etc}/sun-jsf/jsf-example.jar"/>
</path>
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -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.test.validators;
+
+import javax.faces.validator.ValidatorException;
+
+import org.jboss.portal.core.identity.ui.validators.EmailValidator;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class EmailValidatorTest extends TestCase
+{
+ public void test01()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "12.blah(a)foo.com");
+ }
+ catch(ValidatorException e)
+ {
+ fail("12.blah(a)foo.com should be valid");
+ }
+
+ }
+
+ public void test02()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "12.blah@");
+ fail("12.blah@ should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+
+}
+
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -24,31 +24,85 @@
import java.util.HashMap;
+import javax.faces.context.FacesContext;
+
+import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
import org.jboss.portal.faces.el.PropertyValue;
import org.jboss.portal.faces.el.dynamic.DynamicBean;
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
public class DynamicUserAttribute implements DynamicBean
{
- HashMap map = new HashMap();
-
+
+ /** . */
+ private HashMap map;
+
+ /** . */
+ private String username;
+
+ /** . */
+ private IdentityUserBean identityUserBean;
+
+ public DynamicUserAttribute()
+ {
+ this.map = new HashMap();
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ this.identityUserBean = (IdentityUserBean) ctx.getApplication().createValueBinding(("#{identityusermgr}"))
+ .getValue(ctx);
+ }
+
+ public DynamicUserAttribute(String username)
+ {
+ this.map = new HashMap();
+ this.username = username;
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ this.identityUserBean = (IdentityUserBean) ctx.getApplication().createValueBinding(("#{identityusermgr}"))
+ .getValue(ctx);
+ }
+
public Class getType(Object propertyName) throws IllegalArgumentException
{
- //Object o = map.get((String) propertyName);
- return String.class;
+ try
+ {
+ return identityUserBean.getPropertyType((String) propertyName);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw new IllegalArgumentException("Property not found.");
+ }
}
public PropertyValue getValue(Object propertyName) throws IllegalArgumentException
{
- return new PropertyValue((String) map.get((String) propertyName));
+ Object propertyValue = map.get((String) propertyName);
+
+ // Trying to fetch user property
+ if (propertyValue == null)
+ {
+ try
+ {
+ propertyValue = identityUserBean.getUserProperty(this.username, (String) propertyName);
+ }
+ catch (Exception e)
+ {
+ // ok on user register
+ }
+ }
+ return new PropertyValue(propertyValue);
}
public boolean setValue(Object propertyName, Object value) throws IllegalArgumentException
{
- map.put((String) propertyName, (String) value);
+ map.put((String) propertyName, value);
return true;
}
- public HashMap getProfileAttributes() {
+ public HashMap getProfileAttributes()
+ {
return map;
}
}
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityConstants.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityConstants.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityConstants.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * 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 IdentityConstants
+{
+ public static final String SUBSCRIPTIONMODE_AUTOMATIC = "automatic";
+ public static final String SUBSCRIPTIONMODE_EMAILVERIFICATION = "emailVerification";
+}
+
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/IdentityUIUser.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -22,42 +22,48 @@
******************************************************************************/
package org.jboss.portal.core.identity.ui;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.jboss.portal.core.identity.ui.common.MetaDataServiceBean;
-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.IdentityException;
-import org.jboss.portal.identity.NoSuchUserException;
-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 IdentityUIUser
{
+ /** . */
private String username;
+
+ /** . */
private String password;
- private DynamicUserAttribute attribute = new DynamicUserAttribute();
-
+
+ /** . */
+ private DynamicUserAttribute attribute;
+
+ public IdentityUIUser()
+ {
+ this.attribute = new DynamicUserAttribute();
+ }
+
+ public IdentityUIUser(String username)
+ {
+ this.username = username;
+ this.attribute = new DynamicUserAttribute(this.username);
+ }
+
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;
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/UIAttribute.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -28,59 +28,77 @@
*/
public class UIAttribute
{
+ /** . */
private String identifier;
+
+ /** . */
private String name;
+
+ /** . */
private String validator;
+
+ /** . */
private String converter;
+
+ /** . */
private boolean required;
-
- public UIAttribute(String identifier, String name) {
+
+ public UIAttribute(String identifier, String name)
+ {
this.identifier = identifier;
this.name = name;
this.validator = null;
this.converter = null;
- this.required = false;
+ this.required = false;
}
-
+
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/UIRole.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/UIRole.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/UIRole.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -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;
+
+import org.jboss.portal.identity.Role;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class UIRole
+{
+
+ /** . */
+ private Object id;
+
+ /** . */
+ private String name;
+
+ /** . */
+ private String displayName;
+
+ public String getDisplayName()
+ {
+ return this.displayName;
+ }
+
+ public Object getId()
+ {
+ return this.id;
+ }
+
+ public String getName()
+ {
+ return this.name;
+ }
+
+ public void setDisplayName(String displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/AssignRoleAction.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/AssignRoleAction.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/AssignRoleAction.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * 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 java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+import org.jboss.portal.core.identity.ui.IdentityUIUser;
+import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
+import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
+import org.jboss.portal.identity.User;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class AssignRoleAction
+{
+
+ /** . */
+ private String currentUser;
+
+ /** .*/
+ private List roles = new ArrayList();
+
+ /** . */
+ private IdentityUIUser uiUser;
+
+ /** . */
+ private IdentityUserBean identityUserBean;
+
+ /** .*/
+ private IdentityRoleBean identityRoleBean;
+
+ 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 IdentityRoleBean getIdentityRoleBean()
+ {
+ return identityRoleBean;
+ }
+
+ public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
+ {
+ this.identityRoleBean = identityRoleBean;
+ }
+
+ public List getRoles()
+ {
+ return roles;
+ }
+
+ public void setRoles(List roles)
+ {
+ this.roles = roles;
+ }
+
+ public String assignRoles()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ Map params = ectx.getRequestParameterMap();
+ this.currentUser = (String) params.get("currentUser");
+ if (this.currentUser != null)
+ {
+ this.uiUser = new IdentityUIUser(this.currentUser);
+ try
+ {
+ User user = identityUserBean.findUserByUserName(this.currentUser);
+ this.roles = identityRoleBean.getUserRoles(user);
+ return "assignRoles";
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ ctx.addMessage(null, new FacesMessage("Problem while fetching user."));
+ }
+ return "userAdmin";
+ }
+ else
+ {
+ return "userAdmin";
+ }
+ }
+
+ public String updateRoles()
+ {
+ if (this.currentUser != null && this.roles != null)
+ {
+ try
+ {
+ User user = identityUserBean.findUserByUserName(this.currentUser);
+ identityRoleBean.updateRoles(user, this.roles);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ // FacesMessage
+ }
+ }
+ return "userAdmin";
+ }
+}
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * 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 org.jboss.portal.core.identity.ui.UIRole;
+import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CreateRoleAction
+{
+
+ /** .*/
+ private UIRole uiRole = new UIRole();
+
+ /** .*/
+ private IdentityRoleBean identityRoleBean;
+
+ public UIRole getUiRole()
+ {
+ return uiRole;
+ }
+
+ public void setUiRole(UIRole uiRole)
+ {
+ this.uiRole = uiRole;
+ }
+
+ public IdentityRoleBean getIdentityRoleBean()
+ {
+ return identityRoleBean;
+ }
+
+ public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
+ {
+ this.identityRoleBean = identityRoleBean;
+ }
+
+ public String createRole()
+ {
+ try
+ {
+ identityRoleBean.getRoleModule().createRole(this.uiRole.getName(), this.uiRole.getDisplayName());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return "roleAdmin";
+ }
+
+}
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,255 @@
+/******************************************************************************
+ * 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 java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringWriter;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.portal.common.p3p.P3PConstants;
+import org.jboss.portal.core.identity.ui.IdentityConstants;
+import org.jboss.portal.core.identity.ui.IdentityUIUser;
+import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
+import org.jboss.portal.core.modules.MailModule;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.User;
+
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CreateUserAction
+{
+
+ /** . */
+ private User user;
+
+ /** . */
+ private List roles = new ArrayList();
+
+ /** . */
+ private IdentityUIUser uiUser = new IdentityUIUser();
+
+ /** . */
+ private IdentityUserBean identityUserBean;
+
+ /** .*/
+ private MailModule mailModule;
+
+ /** .*/
+ private String subscriptionMode;
+
+ /** . */
+ private String emailDomain;
+
+ /** . */
+ private static final Logger log = Logger.getLogger(CreateUserAction.class);
+
+ public IdentityUIUser getUiUser()
+ {
+ return uiUser;
+ }
+
+ public void setUiUser(IdentityUIUser uiUser)
+ {
+ this.uiUser = uiUser;
+ }
+
+ public IdentityUserBean getIdentityUserBean()
+ {
+ return identityUserBean;
+ }
+
+ public String getSubscriptionMode()
+ {
+ return subscriptionMode;
+ }
+
+ public void setSubscriptionMode(String subscriptionMode)
+ {
+ this.subscriptionMode = subscriptionMode;
+ }
+
+ public String getEmailDomain()
+ {
+ return emailDomain;
+ }
+
+ public void setEmailDomain(String emailDomain)
+ {
+ this.emailDomain = emailDomain;
+ }
+
+ public void setIdentityUserBean(IdentityUserBean identityUserBean)
+ {
+ this.identityUserBean = identityUserBean;
+ }
+
+ public List getRoles()
+ {
+ return roles;
+ }
+
+ public void setRoles(List roles)
+ {
+ this.roles = roles;
+ }
+
+ public MailModule getMailModule() {
+ return mailModule;
+ }
+
+ public void setMailModule(MailModule mailModule)
+ {
+ this.mailModule = mailModule;
+ }
+
+ public String register()
+ {
+ if (uiUser.getUsername() != null && uiUser.getPassword() != null)
+ {
+ log.debug("Creating user account: " + uiUser.getUsername());
+
+ try
+ {
+ Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
+ Class registrationDateClass = uiUser.getAttribute().getType("registrationdate");
+
+ // Create user && assign roles
+ // user = identityUserBean.createUser(uiUser.getUsername(), uiUser.getPassword(), this.roles);
+
+ //
+ if ( registrationDateClass.equals(Date.class))
+ {
+ uiUser.getAttribute().setValue("registrationdate", new Date());
+ }
+ else if (registrationDateClass.equals(String.class) )
+ {
+ uiUser.getAttribute().setValue("registrationdate", (new Date()).toString());
+ }
+ else
+ {
+ log.warn(User.INFO_USER_REGISTRATION_DATE + " property is mapped in not supported type: " + registrationDateClass.toString());
+ }
+
+ if ( subscriptionMode != null && subscriptionMode.equals(IdentityConstants.SUBSCRIPTIONMODE_EMAILVERIFICATION))
+ {
+ uiUser.getAttribute().setValue("enabled", Boolean.FALSE);
+ String emailText = this.generateValidationEmail();
+ String subject = "test"; // TODO
+ String from = "no-reply(a)mucki.at"; // TODO
+ log.debug(emailText);
+// mailModule.send(from, (String) uiUser.getAttribute().getValue("email").getObject() , subject, emailText);
+ }
+ else
+ {
+ uiUser.getAttribute().setValue("enabled", Boolean.TRUE);
+ }
+
+ // Adding dynamically set properties
+ //identityUserBean.updateProfile(user, uiUser.getAttribute().getProfileAttributes());
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Could not register user."));
+ }
+
+ }
+ else
+ {
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Missing required values."));
+ }
+
+ this.user = null;
+ this.uiUser = null;
+
+ return "success";
+ }
+
+ private String generateValidationEmail()
+ {
+ Map modelRoot = new HashMap();
+ modelRoot.put("emailDomain", this.emailDomain);
+ modelRoot.put("id", "userID"); // TODO
+ modelRoot.put("username", uiUser.getUsername());
+ modelRoot.put("password", uiUser.getPassword());
+ modelRoot.put("activationLink", "link"); // TODO
+
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ String message = null;
+ try
+ {
+
+ Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
+ URL config = tcl.getResource("templates/register/emailTemplate_" + locale.getLanguage() + "_" + locale.getCountry()+ ".tpl");
+ if (config == null)
+ {
+ config = tcl.getResource("templates/register/emailTemplate_" + locale.getLanguage() + ".tpl");
+ }
+ if (config == null)
+ {
+ config = tcl.getResource("templates/register/emailTemplate.tpl");
+ }
+ if (config == null)
+ {
+ throw new FileNotFoundException("Cannot load a suitable emailTemplate.tpl in templates/user");
+ }
+ InputStream in = config.openStream();
+ Template tpl = new Template("emailTemplate", new InputStreamReader(in), new Configuration());
+ StringWriter out = new StringWriter();
+ tpl.process(modelRoot, out);
+ out.close();
+ message = out.toString();
+ }
+ catch (IOException e1)
+ {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ catch (TemplateException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return message;
+ }
+}
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,195 @@
+/******************************************************************************
+ * 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 java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.ExternalContext;
+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 EditProfileAction
+{
+ /** . */
+ private String currentUser;
+
+ /** . */
+ private String password;
+
+ /** . */
+ private String email;
+
+ /** . */
+ private IdentityUIUser uiUser;
+
+ /** . */
+ private IdentityUserBean identityUserBean;
+
+ private static final Logger log = Logger.getLogger(EditProfileAction.class);
+
+ public EditProfileAction()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ this.currentUser = ectx.getRemoteUser();
+ this.uiUser = new IdentityUIUser(this.currentUser);
+ }
+
+ public String getCurrentUser()
+ {
+ return currentUser;
+ }
+
+ public void setCurrentUser(String currentUser)
+ {
+ this.currentUser = currentUser;
+ }
+
+ public IdentityUIUser getUiUser()
+ {
+ if (uiUser == null)
+ {
+ this.uiUser = new IdentityUIUser(this.currentUser);
+ }
+ 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 getPassword()
+ {
+ return password;
+ }
+
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+
+ public String editProfile()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ Map params = ectx.getRequestParameterMap();
+ this.currentUser = (String) params.get("currentUser");
+ if (this.currentUser == null)
+ {
+ this.currentUser = ectx.getRemoteUser();
+ }
+ this.uiUser = new IdentityUIUser(this.currentUser);
+ return "editProfile";
+ }
+
+ public String updateProfile()
+ {
+ try
+ {
+ User user = identityUserBean.findUserByUserName(this.currentUser);
+ // 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"));
+ }
+ return "editProfile";
+ }
+
+ public String changePassword()
+ {
+
+ if (this.password != null)
+ {
+ try
+ {
+ this.identityUserBean.updatePassword(this.currentUser, this.password);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Error"));
+ }
+ }
+ return "start";
+ }
+
+ public String changeEmail()
+ {
+ if (this.email != null)
+ {
+ try
+ {
+ HashMap profileMap = new HashMap();
+ User user = this.identityUserBean.findUserByUserName(this.currentUser);
+ profileMap.put("email", email);
+ this.identityUserBean.updateProfile(user, profileMap);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Error"));
+ }
+ }
+ return "start";
+ }
+}
Deleted: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileBean.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileBean.java 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileBean.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -1,164 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.core.identity.ui.actions;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
-
-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.NoSuchUserException;
-import org.jboss.portal.identity.User;
-import org.jboss.portlet.JBossRenderRequest;
-
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class EditProfileBean
-{
- private String currentUser;
- private IdentityUIUser uiUser;
- private IdentityUserBean identityUserBean;
- private String password;
- private String email;
-
- private static final Logger log = Logger.getLogger(UserRegisterBean.class);
-
- public EditProfileBean()
- {
- super();
- this.currentUser = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();
- }
-
- public String getCurrentUser()
- {
- return currentUser;
- }
-
- public void setCurrentUser(String currentUser)
- {
- this.currentUser = currentUser;
- }
-
- public IdentityUIUser getUiUser()
- {
- try
- {
- this.uiUser = identityUserBean.getValues(this.currentUser, null);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- 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 getPassword()
- {
- return password;
- }
-
- public void setPassword(String password)
- {
- this.password = password;
- }
-
- public String updateProfile()
- {
- try
- {
- User user = identityUserBean.findUserByUserName(this.currentUser);
- // 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"));
- }
- return "editProfile";
- }
-
- public void changePassword()
- {
-
- if (this.password != null)
- {
- try
- {
- this.identityUserBean.updatePassword(this.currentUser, this.password);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Error"));
- }
- }
- }
-
- public void changeEmail()
- {
- if (this.email != null)
- {
- try
- {
- HashMap profileMap = new HashMap();
- User user = this.identityUserBean.findUserByUserName(this.currentUser);
- profileMap.put("email", email);
- this.identityUserBean.updateProfile(user, profileMap);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Error"));
- }
- }
- }
-}
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * 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 java.util.Map;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+import org.jboss.portal.core.identity.ui.UIRole;
+import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class EditRoleAction
+{
+
+ /** .*/
+ private String currentRole;
+
+ /** .*/
+ private UIRole uiRole;
+
+ /** .*/
+ private IdentityRoleBean identityRoleBean;
+
+ public UIRole getUiRole()
+ {
+ return uiRole;
+ }
+
+ public void setUiRole(UIRole uiRole)
+ {
+ this.uiRole = uiRole;
+ }
+
+ public IdentityRoleBean getIdentityRoleBean()
+ {
+ return identityRoleBean;
+ }
+
+ public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
+ {
+ this.identityRoleBean = identityRoleBean;
+ }
+
+ public String editRole()
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ Map params = ectx.getRequestParameterMap();
+ this.currentRole = (String) params.get("currentRole");
+ try
+ {
+ this.uiRole = identityRoleBean.getUIRole(this.currentRole);
+ return "editRole";
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return "roleAdmin";
+ }
+
+ public String updateRole()
+ {
+ try
+ {
+ identityRoleBean.updateRoleDisplayName(this.uiRole.getName(), this.uiRole.getDisplayName());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return "roleAdmin";
+ }
+
+}
Copied: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java (from rev 7903, 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/LostPasswordAction.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * 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 javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
+import org.jboss.portal.core.modules.MailModule;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.User;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class LostPasswordAction
+{
+ private String username;
+ private String email;
+
+ private IdentityUserBean identityUserBean;
+ private Session session;
+
+ public LostPasswordAction()
+ {
+ try
+ {
+ SessionFactory sessionFactory = (SessionFactory)new InitialContext().lookup("java:/portal/IdentitySessionFactory");
+ session = sessionFactory.getCurrentSession();
+ }
+ catch (NamingException e)
+ {
+ // FIXME
+ e.printStackTrace();
+ }
+ }
+
+ 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 String doomed()
+ {
+
+ if ( username != null && email == null)
+ {
+ try
+ {
+ User user = identityUserBean.findUserByUserName(username);
+ // Send email with new credentials
+ }
+ catch (NoSuchUserException e)
+ {
+ FacesContext.getCurrentInstance().addMessage("username", new FacesMessage("no account with this username found."));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ FacesContext.getCurrentInstance().addMessage("username", new FacesMessage("Error"));
+ }
+ } else if ( username== null && email != null )
+ {
+ // Search properties
+ // Then send email with new credentials
+
+ } else {
+ return "lostPassword";
+ }
+ return "lostPassword";
+ }
+
+ private String generatePassword()
+ {
+ return "rand0mPa55w0rd";
+ }
+
+ private boolean sendEmail() {
+ return false;
+ }
+
+}
+
Deleted: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordBean.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -1,116 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.core.identity.ui.actions;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
-import org.jboss.portal.core.modules.MailModule;
-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 LostPasswordBean
-{
- private String username;
- private String email;
-
- private IdentityUserBean identityUserBean;
- private Session session;
-
- public LostPasswordBean()
- {
- try
- {
- SessionFactory sessionFactory = (SessionFactory)new InitialContext().lookup("java:/portal/IdentitySessionFactory");
- session = sessionFactory.getCurrentSession();
- }
- catch (NamingException e)
- {
- // FIXME
- e.printStackTrace();
- }
- }
-
- 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 String doomed()
- {
-
- if ( username != null && email == null)
- {
- try
- {
- User user = identityUserBean.findUserByUserName(username);
- // Send Email with new credentials
- }
- catch (NoSuchUserException e)
- {
- FacesContext.getCurrentInstance().addMessage("username", new FacesMessage("no account with this username found."));
- }
- catch (Exception e)
- {
- e.printStackTrace();
- FacesContext.getCurrentInstance().addMessage("username", new FacesMessage("Error"));
- }
- } else if ( username== null && email != null )
- {
- // Search properties
-
- } else {
- return "lostPassword";
- }
- return "lostPassword";
- }
-
- private boolean sendEmail() {
- return false;
- }
-
-}
-
Deleted: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/UserRegisterBean.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -1,120 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.core.identity.ui.actions;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
-import javax.faces.model.SelectItem;
-
-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.Role;
-import org.jboss.portal.identity.User;
-
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class UserRegisterBean
-{
-
- private List roles = new ArrayList();
- 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 List getRoles()
- {
- return roles;
- }
- public void setRoles(List roles)
- {
- this.roles = roles;
- }
-
- 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(), this.roles);
-// uiUser.getAttribute().setValue("", new Date);
-// uiUser.setEnabled
- // 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";
- }
-}
Modified: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/ValidateEmailServlet.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/ValidateEmailServlet.java 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/ValidateEmailServlet.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -31,6 +31,9 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+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.portal.identity.UserProfileModule;
@@ -67,6 +70,27 @@
{
String userId = request.getParameter("uId");
String hash = request.getParameter("hash");
+
+ try
+ {
+ User user = userModule.findUserById(userId);
+ String email = (String) userProfileModule.getProperty(user, User.INFO_USER_EMAIL_REAL);
+ }
+ catch (IllegalArgumentException e)
+ {
+ // FIXME
+ e.printStackTrace();
+ }
+ catch (NoSuchUserException e)
+ {
+ // FIXME
+ e.printStackTrace();
+ }
+ catch (IdentityException e)
+ {
+ // FIXME
+ e.printStackTrace();
+ }
}
}
Modified: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/RoleManagementBean.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/RoleManagementBean.java 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/RoleManagementBean.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -26,14 +26,19 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
import javax.faces.model.ListDataModel;
import javax.faces.model.SelectItem;
+import org.jboss.portal.core.identity.ui.IdentityUIUser;
+import org.jboss.portal.core.identity.ui.UIRole;
+import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.User;
@@ -43,39 +48,84 @@
*/
public class RoleManagementBean
{
+ /** . */
+ private String currentRole;
- private Role role;
+ /** . */
+ private UIRole uiRole;
+
+ /** . */
+ private int page = 1;
+
+ /** . */
+ private int limit = 10;
+
+ /** . */
+ private String userNameFilter = new String();
+
+ /** . */
private ListDataModel roleList;
- private IdentityUserBean identityUserBean;
+ /** . */
+ private IdentityRoleBean identityRoleBean;
- public Role getRole()
+ public IdentityRoleBean getIdentityRoleBean()
{
- return role;
+ return identityRoleBean;
}
- public void setRole(Role role)
+ public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
{
- this.role = role;
+ this.identityRoleBean = identityRoleBean;
}
- public IdentityUserBean getIdentityUserBean()
+ public int getPage()
{
- return identityUserBean;
+ return page;
}
- public void setIdentityUserBean(IdentityUserBean identityUserBean)
+ public void setPage(int page)
{
- this.identityUserBean = identityUserBean;
+ this.page = page;
}
+ public int getLimit()
+ {
+ return limit;
+ }
+
+ public void setLimit(int limit)
+ {
+ this.limit = limit;
+ }
+
+ public String getUserNameFilter()
+ {
+ return userNameFilter;
+ }
+
+ public void setUserNameFilter(String userNameFilter)
+ {
+ this.userNameFilter = userNameFilter;
+ }
+
+ public UIRole getUiRole()
+ {
+ return uiRole;
+ }
+
+ public void setUiRole(UIRole uiRole)
+ {
+ this.uiRole = uiRole;
+ }
+
public ListDataModel getRoleList()
{
List list = new ArrayList();
Set set = new HashSet();
try
{
- set = identityUserBean.getRoleModule().findRoles();
+ set = identityRoleBean.getRoleModule().findRoles();
}
catch (IdentityException e)
{
@@ -92,47 +142,45 @@
return this.roleList;
}
- public List getRoleSelectItems()
+ public String viewRoleMembers()
{
- List list = new ArrayList();
- Set set = new HashSet();
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ Map params = ectx.getRequestParameterMap();
+ String role = (String) params.get("currentRole");
+ this.currentRole = role != null ? role : this.currentRole;
try
{
- set = identityUserBean.getRoleModule().findRoles();
+ this.uiRole = identityRoleBean.getUIRole(this.currentRole);
}
- catch (IdentityException e)
+ catch ( Exception e)
{
- // FIXME
e.printStackTrace();
+ // FacesMessage
}
- Iterator i = set.iterator();
- while (i.hasNext())
- {
- Role role = (Role) i.next();
- list.add(new SelectItem(role.getName()));
- }
- return list;
+ return "viewMembers";
}
-
+
public ListDataModel getRoleMembers()
{
Set members = new HashSet();
List roleMembers = new ArrayList();
try
{
- Role role = this.identityUserBean.getRoleModule().findRoleById(this.role.getId());
- members = identityUserBean.getMembershipModule().getUsers(role);
- } catch (Exception e)
+ int offset = page > 0 ? ((page -1 ) * limit) : 0;
+ members = identityRoleBean.getMembershipModule().findRoleMembers(this.currentRole, offset, limit, userNameFilter);
+ }
+ catch (Exception e)
{
e.printStackTrace();
}
Iterator i = members.iterator();
- while(i.hasNext())
+ while (i.hasNext())
{
User user = (User) i.next();
try
{
- roleMembers.add(identityUserBean.getValues(user.getUserName(), null));
+ roleMembers.add(new IdentityUIUser(user.getUserName()));
}
catch (Exception e)
{
@@ -141,59 +189,43 @@
}
return new ListDataModel(roleMembers);
}
-
- public String viewRoleMembers()
- {
- try
- {
- this.role = identityUserBean.getRoleModule().findRoleById(((Role) this.roleList.getRowData()).getId());
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return "viewMembers";
- }
- public String editRole()
+ public String deleteRole()
{
- try
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ Map params = ectx.getRequestParameterMap();
+ this.currentRole = (String) params.get("currentRole");
+ if (this.currentRole != null)
{
- this.role = identityUserBean.getRoleModule().findRoleById(((Role) this.roleList.getRowData()).getId());
+ try
+ {
+ this.uiRole = identityRoleBean.getUIRole(this.currentRole);
+ return "deleteRole";
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ // FacesMessage
+ }
+
}
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return "editRole";
+ return "roleAdmin";
}
- public String updateRole()
+ public String confirmDelete()
{
- try
- {
- Role uRole = identityUserBean.getRoleModule().findRoleById(this.role.getId());
- uRole.setDisplayName(role.getDisplayName());
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return "success";
- }
-
- public String deleteRole()
- {
Role uRole;
try
{
- uRole = identityUserBean.getRoleModule().findRoleById(this.role.getId());
- this.identityUserBean.getRoleModule().removeRole(uRole);
+ uRole = identityRoleBean.getRoleModule().findRoleByName(this.uiRole.getName());
+ this.identityRoleBean.getRoleModule().removeRole(uRole);
+ this.roleList = null;
}
catch (Exception e)
{
e.printStackTrace();
}
- return "success";
+ return "roleAdmin";
}
}
\ No newline at end of file
Modified: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -23,31 +23,21 @@
package org.jboss.portal.core.identity.ui.admin;
import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
+import java.util.Map;
-import javax.faces.component.UIParameter;
+import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.apache.myfaces.context.portlet.SessionMap;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
import org.jboss.logging.Logger;
import org.jboss.portal.core.identity.ui.IdentityUIUser;
-import org.jboss.portal.core.identity.ui.actions.UserRegisterBean;
+import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
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.portal.portlet.PortletContext;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
@@ -55,36 +45,85 @@
*/
public class UserAdministrationBean
{
+
+ /** . */
private String currentUser;
+
+ /** . */
private ListDataModel userList;
+
+ /** . */
+ private int page = 1;
+
+ /** . */
+ private int limit = 10;
+
+ /** . */
+ private int userCount;
+
+ /** . */
private List roles = new ArrayList();
- private IdentityUIUser uiUser = new IdentityUIUser();
+
+ /** . */
+ private IdentityUIUser uiUser;
+
+ /** . */
private String searchString;
+
+ /** . */
private IdentityUserBean identityUserBean;
-
+
+ /** . */
+ private IdentityRoleBean identityRoleBean;
+
+ /** . */
private static final Logger log = Logger.getLogger(UserAdministrationBean.class);
-
+
public UserAdministrationBean()
{
this.userList = new ListDataModel();
- }
-
+ }
+
public DataModel getUserList()
{
return userList;
}
+
public String getSearchString()
{
return searchString;
}
+
public void setSearchString(String searchString)
{
this.searchString = searchString;
}
+
+ public int getPage()
+ {
+ return page;
+ }
+
+ public void setPage(int page)
+ {
+ this.page = page;
+ }
+
+ public int getLimit()
+ {
+ return limit;
+ }
+
+ public void setLimit(int limit)
+ {
+ this.limit = limit;
+ }
+
public List getRoles()
{
return roles;
}
+
public void setRoles(List roles)
{
this.roles = roles;
@@ -92,38 +131,42 @@
public IdentityUIUser getUiUser()
{
- try
- {
- this.uiUser = identityUserBean.getValues(this.currentUser, null);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
return uiUser;
}
+
public void setUiUser(IdentityUIUser uiUser)
{
this.uiUser = uiUser;
}
+
public IdentityUserBean getIdentityUserBean()
{
return identityUserBean;
}
+
public void setIdentityUserBean(IdentityUserBean identityUserBean)
{
this.identityUserBean = identityUserBean;
}
+ public IdentityRoleBean getIdentityRoleBean()
+ {
+ return identityRoleBean;
+ }
+
+ public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
+ {
+ this.identityRoleBean = identityRoleBean;
+ }
+
public String searchUsers()
{
- if ( this.searchString != null )
+ if (this.searchString != null)
{
try
{
- int offset = 0;
- int limit = 100;
- this.userList = new ListDataModel(identityUserBean.findUsersFilteredByUserName(searchString, offset, limit)) ;
+ int offset = page > 0 ? ((page - 1) * limit) : 0;
+ this.userList = new ListDataModel(identityUserBean.findUsersFilteredByUserName(searchString, offset, limit));
}
catch (IllegalArgumentException e)
{
@@ -143,18 +186,33 @@
}
return "userAdmin";
}
-
- public String viewRoles()
+
+ public String deleteUser()
{
- this.currentUser = ((IdentityUIUser) userList.getRowData()).getUsername();
- return "viewRoles";
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ Map params = ectx.getRequestParameterMap();
+ this.currentUser = (String) params.get("currentUser");
+ if (this.currentUser != null)
+ {
+ this.uiUser = new IdentityUIUser(this.currentUser);
+ return "deleteUser";
+ }
+ return "userAdmin";
}
-
- public String editProfile()
+
+ public String confirmedDelete()
{
- this.currentUser = ((IdentityUIUser) userList.getRowData()).getUsername();
- return "editProfile";
+ try
+ {
+ User user = identityUserBean.findUserByUserName(this.uiUser.getUsername());
+ identityUserBean.getUserModule().removeUser(user.getId());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return "userAdmin";
}
-
+
}
-
Added: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityRoleBean.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityRoleBean.java (rev 0)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityRoleBean.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,189 @@
+/******************************************************************************
+ * 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.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.faces.model.SelectItem;
+
+import org.jboss.portal.core.identity.ui.UIRole;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.User;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class IdentityRoleBean
+{
+ /** . */
+ private RoleModule roleModule;
+
+ /** . */
+ private MembershipModule membershipModule;
+
+ /** . */
+ private String 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 String getDefaultRole()
+ {
+ return defaultRole;
+ }
+
+ public void setDefaultRole(String defaultRole)
+ {
+ this.defaultRole = defaultRole;
+ }
+
+ public void assignRoles(User user, List roles) throws IllegalArgumentException, IdentityException
+ {
+ Set roleSet = this.checkRoles(roles);
+ this.membershipModule.assignRoles(user, roleSet);
+ }
+
+ private Set checkRoles(List roles) throws IllegalArgumentException, IdentityException
+ {
+ Set roleSet = new HashSet();
+ if (roles != null && roles.size() > 0)
+ { // 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
+ {
+ roleSet.add(role);
+ }
+ }
+ return roleSet;
+ }
+ else
+ {
+ Role role = roleModule.findRoleByName(defaultRole);
+
+ if (role != null)
+ {
+ roleSet.add(role);
+ }
+ else
+ {
+ throw new IllegalArgumentException();
+ }
+
+ return roleSet;
+ }
+ }
+
+ public void updateRoleDisplayName(String roleName, String roleDisplayName) throws IllegalArgumentException,
+ IdentityException
+ {
+ Role cRole = roleModule.findRoleByName(roleName);
+ cRole.setDisplayName(roleDisplayName);
+ }
+
+ public void updateRoles(User user, List roles) throws IllegalArgumentException, NoSuchUserException,
+ IdentityException
+ {
+ Set roleSet = this.checkRoles(roles);
+ this.membershipModule.assignRoles(user, roleSet);
+ }
+
+ public UIRole getUIRole(String roleName) throws IllegalArgumentException, IdentityException
+ {
+ UIRole uiRole = new UIRole();
+ Role role = this.roleModule.findRoleByName(roleName);
+ uiRole.setDisplayName(role.getDisplayName());
+ uiRole.setName(role.getName());
+ return uiRole;
+ }
+
+ public List getRoleSelectItems()
+ {
+ List list = new ArrayList();
+ Set set = new HashSet();
+ try
+ {
+ set = roleModule.findRoles();
+ }
+ catch (IdentityException e)
+ {
+ // FIXME
+ e.printStackTrace();
+ }
+ Iterator i = set.iterator();
+ while (i.hasNext())
+ {
+ Role role = (Role) i.next();
+ list.add(new SelectItem(role.getName(), role.getDisplayName()));
+ }
+ return list;
+ }
+
+ public List getUserRoles(User user) throws IllegalArgumentException, NoSuchUserException, IdentityException
+ {
+ List list = new ArrayList();
+ Set roleSet = this.membershipModule.getRoles(user);
+ Iterator i = roleSet.iterator();
+ while (i.hasNext())
+ {
+ list.add(((Role) i.next()).getName());
+ }
+ return list;
+ }
+
+}
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -29,14 +29,10 @@
import java.util.List;
import java.util.Set;
-import javax.faces.context.FacesContext;
-import javax.faces.model.ListDataModel;
-
import org.jboss.logging.Logger;
import org.jboss.portal.core.identity.ui.IdentityUIUser;
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.core.identity.ui.UIRole;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.MembershipModule;
import org.jboss.portal.identity.NoSuchUserException;
@@ -45,7 +41,6 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.UserProfileModule;
-import org.jboss.portal.identity.service.UserProfileModuleService;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
@@ -53,35 +48,22 @@
*/
public class IdentityUserBean
{
- private String defaultRole;
- private Set availableProperties;
+ /** . */
private UserModule userModule;
- private RoleModule roleModule;
- private MembershipModule membershipModule;
+
+ /** . */
private UserProfileModule userProfileModule;
+ /** . */
+ private IdentityRoleBean identityRoleBean;
+
+ /** . */
private MetaDataServiceBean metaDataService;
+ /** . */
private static final Logger log = Logger.getLogger(IdentityUserBean.class);
-
- public IdentityUserBean()
- {
- this.availableProperties = new HashSet();
- availableProperties.add("email");
- availableProperties.add("givenname");
- availableProperties.add("familyname");
- availableProperties.add("skype");
- availableProperties.add("location");
- availableProperties.add("homepage");
- availableProperties.add("icq");
- availableProperties.add("aim");
- availableProperties.add("msnm");
- availableProperties.add("occupation");
- availableProperties.add("interests");
- }
-
public UserModule getUserModule()
{
return userModule;
@@ -92,36 +74,6 @@
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;
@@ -142,51 +94,26 @@
this.metaDataService = metaDataService;
}
- public IdentityUIUser getValues(String username, Set values) throws RuntimeException, NoSuchUserException,
- IdentityException
+ public IdentityRoleBean getIdentityRoleBean()
{
- IdentityUIUser uiUser = new IdentityUIUser();
+ return identityRoleBean;
+ }
- if (username != null)
- {
- Iterator i = this.availableProperties.iterator();
- User user = this.findUserByUserName(username);
- // Setting values
- uiUser.setUsername(user.getUserName());
-
- while (i.hasNext())
- {
- String key = (String) i.next();
- UIAttribute uiAttribute = (UIAttribute) this.metaDataService.getValue(key).getObject();
- try {
- String id = (String) uiAttribute.getIdentifier();
- String value = (String) userProfileModule.getProperty(user, id);
- uiUser.getAttribute().setValue(key, value);
- } catch (IdentityException e) {
- //
- }
-
- }
-
- }
- return uiUser;
+ public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
+ {
+ this.identityRoleBean = identityRoleBean;
}
public User createUser(String username, String password, List roles) throws RuntimeException, IdentityException
{
- // Checking roles
- Set roleSet = new HashSet();
- roleSet = this.checkRoles(roles);
-
- // Create User
+ // Create user
User user = userModule.createUser(username, password);
-
- // Set Membership
- membershipModule.assignRoles(user, roleSet);
+ // Set membership
+ identityRoleBean.assignRoles(user, roles);
return user;
}
- public void updateProfile(User user, HashMap profileMap) throws IdentityException
+ public void updateProfile(User user, HashMap profileMap)
{
Set profileSet = profileMap.keySet();
Iterator i = profileSet.iterator();
@@ -194,98 +121,63 @@
while (i.hasNext())
{
String key = (String) i.next();
- String value = (String) profileMap.get(key);
+ Object value = profileMap.get(key);
UIAttribute uiAttribute = (UIAttribute) this.metaDataService.getValue(key).getObject();
- if (uiAttribute != null )
+ if (uiAttribute != null)
{
- userProfileModule.setProperty(user, uiAttribute.getIdentifier(), value);
+ try
+ {
+ userProfileModule.setProperty(user, uiAttribute.getIdentifier(), value);
+ }
+ catch (IdentityException e)
+ {
+ e.printStackTrace();
+ }
}
}
}
-
- public User findUserByUserName(String username) throws IllegalArgumentException, NoSuchUserException, IdentityException
+
+ public User findUserByUserName(String username) throws IllegalArgumentException, NoSuchUserException,
+ IdentityException
{
return userModule.findUserByUserName(username);
}
-
- public List findUsersFilteredByUserName(String filter, int offset, int limit) throws IllegalArgumentException, IdentityException
+
+ public List findUsersFilteredByUserName(String filter, int offset, int limit)
+ throws IllegalArgumentException, IdentityException
{
Set users = new HashSet();
List list = new ArrayList();
-
+
users = userModule.findUsersFilteredByUserName(filter, offset, limit);
-
+
Iterator i = users.iterator();
-
- while(i.hasNext())
+
+ while (i.hasNext())
{
User u = (User) i.next();
- IdentityUIUser nu = new IdentityUIUser();
- nu.setUsername(u.getUserName());
- list.add(nu);
+ list.add(new IdentityUIUser(u.getUserName()));
}
return list;
}
-
- public void updatePassword(String username, String password) throws IllegalArgumentException, IdentityException, IdentityException
+
+ public void updatePassword(String username, String password)
+ throws IllegalArgumentException, IdentityException, IdentityException
{
User user = userModule.findUserByUserName(username);
- user.updatePassword(password);
+ user.updatePassword(password);
}
- private Set checkRoles(List roles) throws IllegalArgumentException, IdentityException
+ public Class getPropertyType(String propertyName) throws IdentityException
{
- Set roleSet = new HashSet();
- 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
- {
- roleSet.add(role);
- }
- }
- return roleSet;
-
- }
- else
- {
- Role role = roleModule.findRoleByName(defaultRole);
-
- if (role != null)
- {
- roleSet.add(role);
- }
- else
- {
- throw new IllegalArgumentException();
- }
-
- return roleSet;
- }
+ UIAttribute uiAttribute = (UIAttribute) this.metaDataService.getValue(propertyName).getObject();
+ return userProfileModule.getProfileInfo().getPropertyInfo(uiAttribute.getIdentifier()).getClass();
}
- public ListDataModel getFindRoles() {
- Set set = new HashSet();
- try
- {
- set = roleModule.findRoles();
- }
- catch (IdentityException e)
- {
- // FIXME
- e.printStackTrace();
- }
- return new ListDataModel( new ArrayList(set) );
+ public Object getUserProperty(String username, String propertyName) throws IllegalArgumentException, NoSuchUserException, IdentityException
+ {
+ User user = this.findUserByUserName(username);
+ UIAttribute uiAttribute = (UIAttribute) this.metaDataService.getValue(propertyName).getObject();
+ return this.userProfileModule.getProperty(user, uiAttribute.getIdentifier());
}
}
Modified: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java
===================================================================
--- trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -31,13 +31,8 @@
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;
-import org.jboss.portlet.JBossActionRequest;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
@@ -50,7 +45,7 @@
private String currentUser;
private User user;
- private static final Logger log = Logger.getLogger(UserRegisterBean.class);
+ private static final Logger log = Logger.getLogger(CurrentPasswordValidator.class);
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
{
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java 2007-08-15 18:09:14 UTC (rev 7940)
@@ -31,8 +31,6 @@
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;
@@ -48,7 +46,7 @@
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);
+ private static final Logger log = Logger.getLogger(UsernameValidator.class);
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
{
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity.properties
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity.properties 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity.properties 2007-08-15 18:09:14 UTC (rev 7940)
@@ -26,24 +26,28 @@
IDENTITY_LOST_PASSWORD=Lost Password
IDENTITY_NOT_LOGGED_IN=You are currently not logged in.
IDENTITY_CREATE_ACCOUNT=You can create an account.
-IDENTITY_SUCCESS_TITLE=Your account has been sucessfully created.
IDENTITY_BUTTON_SUBMIT=Submit
IDENTITY_BUTTON_EDIT=Edit
+IDENTITY_BUTTON_CANCEL=Cancel
IDENTITY_REGISTER_TITLE=Basic user information
IDENTITY_REGISTER_TITLE_CONFIRM=Confirmation
IDENTITY_REGISTER_PASSWORD_CONFIRM=Confirm Password
+IDENTITY_REGISTER_SUCCESS_TITLE=Your account has been sucessfully created.
IDENTITY_LOST_PASSWORD_TITLE=Forgot your login data?
IDENTITY_LOST_PASSWORD_DESCRIPTION=Please enter your username or email address.
IDENTITY_EDIT_PASSWORD_TITLE=Change your password
-IDENTITY_EDIT_PASSWORD_CURRENT=Current Password
+IDENTITY_EDIT_PASSWORD_CURRENT=Current password
+IDENTITY_EDIT_CHANGE_PASSWORD=Change password
IDENTITY_EDIT_EMAIL_TITLE=Change your email address
IDENTITY_EDIT_EMAIL_NEW=New email address
+IDENTITY_EDIT_CHANGE_EMAIL=Change email
-IDENTITY_EDIT_PROFILE_TITLE=Change your profile
+IDENTITY_EDIT_PROFILE_TITLE=Edit profile
+IDENTITY_VIEW_PROFILE_TITLE=View profile
IDENTITY_USERNAME=Username
IDENTITY_PASSWORD=Password
@@ -71,4 +75,21 @@
IDENTITY_REIGSTRATION_DATE=Registration Date
IDENTITY_ENABLED=Enabled
+IDENTITY_MANAGEMENT_ACTION=Actions
+IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE=Edit user
+IDENTITY_MANAGEMENT_ACTION_ROLES=Roles
+IDENTITY_MANAGEMENT_ACTION_DELETE=Delete
+IDENTITY_MANAGEMENT_USER_MANAGEMENT=User Management
+IDENTITY_MANAGEMENT_ROLE_MANAGEMENT=Role Management
+IDENTITY_MANAGEMENT_SEARCH_USER=Search users
+IDENTITY_MANAGEMENT_CREATE_USER=Create new user account
+IDENTITY_MANAGEMENT_ROLE=Role
+IDENTITY_MANAGEMENT_ROLE_DISPLAY=Display name
+IDENTITY_MANAGEMENT_ROLE_MEMBERS=Members
+IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Assigned roles
+IDENTITY_MANAGEMENT_CREATE_ROLE=Create new role
+IDENTITY_MANAGEMENT_EDIT_ROLE=Edit role
+IDENTITY_MANAGEMENT_CREATE_ROLE=Create role
+IDENTITY_REGISTER_TITLE_CONFIRM_DELETE=Confirmation: Delete Object
+IDENTITY_REGISTER_CONFIRMATIONEMAIL=Confirm your subscription
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity_de.properties
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity_de.properties 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity_de.properties 2007-08-15 18:09:14 UTC (rev 7940)
@@ -22,4 +22,4 @@
################################################################################
IDENTITY_WELCOME=Willkommen
-
\ No newline at end of file
+IDENTITY_VIEW_PROFILE_TITLE=Profilansicht
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/emailTemplate.tpl
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/emailTemplate.tpl (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/emailTemplate.tpl 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,15 @@
+Hello,
+
+you tried to create an account on ${emailDomain}
+
+The user information are written here for your convenience:
+Username: ${username}
+Password: ${password}
+
+At this time, your account is not activated and you will need to access the following URL to be able to login.
+${activationLink}
+
+If you didn't ask to create an account, we apologize and no further action is required.
+
+Best regards,
+${emailDomain}
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/emailTemplate_fr.tpl
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/emailTemplate_fr.tpl (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/templates/register/emailTemplate_fr.tpl 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,15 @@
+Bonjour
+
+vous avez créé un compte sur ${emailDomain}
+
+Voici les informations de connexion relatives a ce compte:
+Identifiant: ${username}
+Mot de passe: ${password}
+
+Votre compte n'est pas actif pour le moment et vous devez vous rendre à l'adresse suivante pour l'activer.
+${activationLink}
+
+Si vous n'avez pas créé de compte, nous vous prions de bien vouloir nous excuser et vous pouvez simplement ignorer cet email.
+
+Cordialement,
+${emailDomain}
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -27,10 +27,10 @@
"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>
- </application>
+ <application>
+ <property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver>
+ <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
+ </application>
<managed-bean>
<managed-bean-name>metadataservice</managed-bean-name>
@@ -38,18 +38,15 @@
<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-name>identityrolemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityRoleBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
+ <!-- defaultRole -->
<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>
@@ -57,7 +54,16 @@
<property-name>membershipModule</property-name>
<value>#{applicationScope.MembershipModule}</value>
</managed-property>
+ </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>userModule</property-name>
+ <value>#{applicationScope.UserModule}</value>
+ </managed-property>
+ <managed-property>
<property-name>userProfileModule</property-name>
<value>#{applicationScope.UserProfileModule}</value>
</managed-property>
@@ -65,10 +71,16 @@
<property-name>metaDataService</property-name>
<value>#{metadataservice}</value>
</managed-property>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
</managed-bean>
+
+
<managed-bean>
- <managed-bean-name>editprofilebean</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditProfileBean</managed-bean-class>
+ <managed-bean-name>editprofilemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditProfileAction</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>identityUserBean</property-name>
@@ -77,14 +89,39 @@
</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-class>org.jboss.portal.core.identity.ui.actions.CreateUserAction</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
+ <property-name>subscriptionMode</property-name>
+ <value>emailVerification</value>
+ </managed-property>
+ <managed-property>
+ <property-name>emailDomain</property-name>
+ <value>Jboss.com</value>
+ </managed-property>
+ <managed-property>
<property-name>identityUserBean</property-name>
<value>#{identityusermgr}</value>
</managed-property>
+ <managed-property>
+ <property-name>mailModule</property-name>
+ <value>#{applicationScope.MailModule}</value>
+ </managed-property>
</managed-bean>
<managed-bean>
+ <managed-bean-name>assignrolemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.AssignRoleAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
<managed-bean-name>useradministrationbean</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.identity.ui.admin.UserAdministrationBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
@@ -92,16 +129,43 @@
<property-name>identityUserBean</property-name>
<value>#{identityusermgr}</value>
</managed-property>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>rolemanagementbean</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.identity.ui.admin.RoleManagementBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
</managed-property>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>editrolemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditRoleAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>lostpasswordmgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.LostPasswordAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>createrolemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateRoleAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ </managed-bean>
<validator>
<validator-id>EmailValidator</validator-id>
@@ -168,13 +232,20 @@
<to-view-id>/WEB-INF/jsf/profile/changeEmail.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
- <navigation-rule>
+<navigation-rule>
<from-view-id>/WEB-INF/jsf/index.xhtml</from-view-id>
<navigation-case>
<from-outcome>editProfile</from-outcome>
<to-view-id>/WEB-INF/jsf/profile/editProfile.xhtml</to-view-id>
</navigation-case>
- </navigation-rule>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/WEB-INF/jsf/profile/*</from-view-id>
+ <navigation-case>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/WEB-INF/jsf/profile/editProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
<navigation-rule>
<from-view-id>/WEB-INF/jsf/admin/*</from-view-id>
@@ -182,6 +253,10 @@
<from-outcome>userAdmin</from-outcome>
<to-view-id>/WEB-INF/jsf/admin/index.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/WEB-INF/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/WEB-INF/jsf/admin/*</from-view-id>
@@ -193,47 +268,66 @@
<navigation-rule>
<from-view-id>/WEB-INF/jsf/admin/index.xhtml</from-view-id>
<navigation-case>
- <from-outcome>create</from-outcome>
- <to-view-id>/WEB-INF/jsf/admin/register.xhtml</to-view-id>
+ <from-outcome>createUser</from-outcome>
+ <to-view-id>/WEB-INF/jsf/admin/user/createUser.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
+ <from-view-id>/WEB-INF/jsf/admin/index.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>deleteUser</from-outcome>
+ <to-view-id>/WEB-INF/jsf/admin/user/deleteUser.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
<from-view-id>/WEB-INF/jsf/admin/*</from-view-id>
<navigation-case>
- <from-action>#{useradministrationbean.editProfile}</from-action>
+ <from-action>#{editprofilemgr.editProfile}</from-action>
<from-outcome>editProfile</from-outcome>
<to-view-id>/WEB-INF/jsf/admin/editProfile.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-action>#{editprofilemgr.updateProfile}</from-action>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/WEB-INF/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/WEB-INF/jsf/admin/*</from-view-id>
<navigation-case>
- <from-action>#{useradministrationbean.viewRoles}</from-action>
- <from-outcome>viewRoles</from-outcome>
+ <from-action>#{assignrolemgr.assignRoles}</from-action>
+ <from-outcome>assignRoles</from-outcome>
<to-view-id>/WEB-INF/jsf/admin/assignRoles.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
- <from-view-id>/WEB-INF/jsf/admin/register.xhtml</from-view-id>
+ <from-view-id>/WEB-INF/jsf/admin/user/createUser.xhtml</from-view-id>
<navigation-case>
<from-outcome>register</from-outcome>
- <to-view-id>/WEB-INF/jsf/admin/assignRoles.xhtml</to-view-id>
+ <to-view-id>/WEB-INF/jsf/admin/user/registerRoles.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
- <from-view-id>/WEB-INF/jsf/admin/assignRoles.xhtml</from-view-id>
+ <from-view-id>/WEB-INF/jsf/admin/user/registerRoles.xhtml</from-view-id>
<navigation-case>
<from-outcome>register</from-outcome>
- <to-view-id>/WEB-INF/jsf/admin/confirm.xhtml</to-view-id>
+ <to-view-id>/WEB-INF/jsf/admin/user/registerConfirm.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
- <from-view-id>/WEB-INF/jsf/admin/confirm.xhtml</from-view-id>
+ <from-view-id>/WEB-INF/jsf/admin/user/registerConfirm.xhtml</from-view-id>
<navigation-case>
<from-outcome>revise</from-outcome>
<to-view-id>/WEB-INF/jsf/admin/register.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <from-view-id>/WEB-INF/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>createRole</from-outcome>
+ <to-view-id>/WEB-INF/jsf/admin/roles/createRole.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
<navigation-rule>
<from-view-id>/WEB-INF/jsf/admin/roles.xhtml</from-view-id>
<navigation-case>
@@ -248,7 +342,13 @@
<to-view-id>/WEB-INF/jsf/admin/roles/roleMembers.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <from-view-id>/WEB-INF/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>deleteRole</from-outcome>
+ <to-view-id>/WEB-INF/jsf/admin/roles/deleteRole.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
-
</faces-config>
Deleted: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/adminTemplate.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/adminTemplate.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/adminTemplate.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -1,31 +0,0 @@
-<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">
-
- <f:loadBundle var="bundle" basename="Identity" />
-
- <h:form>
- <ul class="topnav">
- <li>
- <h:commandLink action="userAdmin">User Management</h:commandLink>
- </li>
- <li>
- <h:commandLink action="roleAdmin">Role Management</h:commandLink>
- </li>
- </ul>
- </h:form>
-
- <!-- Status message -->
- <h:message infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
-
- <!-- Title -->
- <h4><ui:insert name="title">Title</ui:insert></h4>
-
- <!-- Content -->
- <ui:insert name="content">Content</ui:insert>
-
-</div>
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/assignRoles.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/assignRoles.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/assignRoles.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,19 +6,21 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
<ui:define name="title">
- title
+ assign roles for user #{useradministrationbean.uiUser.username}
</ui:define>
<ui:define name="content">
-<h:form>
-<h:selectManyCheckbox id="roles" value="#{userregistermgr.roles}">
- <f:selectItems value="#{rolemanagementbean.roleSelectItems}" />
-</h:selectManyCheckbox>
-<h:commandButton value="Submit" action="register"/>
-</h:form>
+ <h:form>
+ <h:selectManyCheckbox id="roles" value="#{assignrolemgr.roles}">
+ <f:selectItems value="#{identityrolemgr.roleSelectItems}" />
+ </h:selectManyCheckbox>
+ <hr/>
+ <h:commandButton value="Submit" action="#{assignrolemgr.updateRoles}" styleClass="portlet-form-button"/>
+
+ </h:form>
</ui:define>
</ui:composition>
</div>
\ No newline at end of file
Deleted: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/confirm.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/confirm.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/confirm.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -1,41 +0,0 @@
-<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">
-
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
-
-
-<ui:define name="title">#{bundle.IDENTITY_REGISTER_TITLE_CONFIRM}</ui:define>
-<ui:define name="content">
-<h:form>
- <h:panelGrid columns="2">
- <h:outputText for="username" value="#{bundle.IDENTITY_USERNAME}"/>
- <h:outputText id="username" value="#{userregistermgr.uiUser.username}"/>
-
- <h:outputText for="email" value="#{bundle.IDENTITY_EMAIL}"/>
- <h:outputText id="email" value="#{userregistermgr.uiUser.attribute.email}"/>
-
- <h:outputText for="password" value="#{bundle.IDENTITY_PASSWORD}"/>
- <h:outputText id="password">******</h:outputText>
- </h:panelGrid>
- <br/>Assigned Roles:<br/>
- <h:dataTable id="roleslist" value="#{userregistermgr.roles}" var="role">
- <h:column>
- <h:outputText value="#{role}"/>
- </h:column>
- </h:dataTable>
-
- <h:messages />
- <hr/>
- <h:commandButton value="#{bundle.IDENTITY_BUTTON_EDIT}" action="revise" styleClass="portlet-form-button"/>
- <h:commandButton value="#{bundle.IDENTITY_BUTTON_SUBMIT}" action="#{userregistermgr.register}" styleClass="portlet-form-button"/>
-</h:form>
-
-
-</ui:define>
-</ui:composition>
-</div>
\ No newline at end of file
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,16 +6,14 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
-<ui:define name="title">
- asdf
-</ui:define>
+<ui:define name="title" />
<ui:define name="content">
<ui:decorate template="/WEB-INF/jsf/common/profile.xhtml">
- <ui:param name="manager" value="#{useradministrationbean}"/>
+ <ui:param name="manager" value="#{editprofilemgr}"/>
</ui:decorate>
</ui:define>
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/index.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/index.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/index.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,43 +6,70 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
-<ui:define name="title">
- User Management
-</ui:define>
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
+<ui:define name="title"><h:outputText value="#{bundle.IDENTITY_MANAGEMENT_SEARCH_USER}"/></ui:define>
<ui:define name="content">
<h:form>
- <h:outputText for="searchString">Search Users:</h:outputText>
- <h:inputText id="searchString" value="#{useradministrationbean.searchString}" />
- <h:commandButton value="Search" action="#{useradministrationbean.searchUsers}" styleClass="portlet-form-button"/>
+ <h:panelGrid columns="3">
+ <h:inputText id="searchString" value="#{useradministrationbean.searchString}" />
+ <h:commandButton value="Search" action="#{useradministrationbean.searchUsers}" styleClass="portlet-form-button"/>
+ <h:selectOneMenu id="limit" value="#{useradministrationbean.limit}">
+ <f:selectItem id="limit1" itemValue="10"/>
+ <f:selectItem id="limit2" itemValue="20"/>
+ <f:selectItem id="limit5" itemValue="50"/>
+ <f:selectItem id="limit10" itemValue="100"/>
+ </h:selectOneMenu>
+ </h:panelGrid>
</h:form>
+<hr/>
- <h:dataTable id="userlist" value="#{useradministrationbean.userList}" var="uiUser" rendered="#{useradministrationbean.userList.rowCount > 0}">
+ <h:dataTable id="userlist" value="#{useradministrationbean.userList}" var="uiUser" rendered="#{useradministrationbean.userList.rowCount > 0}" rowClasses="portlet-section-body,portlet-section-alternate" headerClass="portlet-section-header" width="100%">
<h:column>
<f:facet name="header">
- <h:outputText>Username</h:outputText>
+ <h:outputText value="#{bundle.IDENTITY_USERNAME}"/>
</f:facet>
<h:outputText value="#{uiUser.username}"/>
</h:column>
<h:column>
<f:facet name="header">
- <h:outputText>Actions</h:outputText>
+ <h:outputText value="#{bundle.IDENTITY_GIVENNAME}"/>
</f:facet>
- <h:commandLink action="#{useradministrationbean.editProfile}">
- <h:outputText value="Edit Profile"/>
- <f:param name="uiUser" value="#{uiUser}"/>
- </h:commandLink>
-
- | <h:commandLink action="#{useradministrationbean.viewRoles}">
- <h:outputText value="Roles"/>
- <f:param name="uiUser" value="#{uiUser}"/>
- </h:commandLink> | <h:commandLink>delete</h:commandLink>
+ <h:outputText value="#{uiUser.attribute.givenname}"/>
</h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{bundle.IDENTITY_FAMILYNAME}"/>
+ </f:facet>
+ <h:outputText value="#{uiUser.attribute.familyname}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{bundle.IDENTITY_ENABLED}"/>
+ </f:facet>
+ <h:selectBooleanCheckbox id="enabled" value="#{uiUser.attribute.enabled}" disabled="true" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION}"/>
+ </f:facet>
+ <h:commandLink action="#{editprofilemgr.editProfile}">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE}"/>
+ <f:param name="currentUser" value="#{uiUser.username}"/>
+ </h:commandLink> |
+ <h:commandLink action="#{assignrolemgr.assignRoles}">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION_ROLES}"/>
+ <f:param name="currentUser" value="#{uiUser.username}"/>
+ </h:commandLink> |
+ <h:commandLink action="#{useradministrationbean.deleteUser}">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION_DELETE}"/>
+ <f:param name="currentUser" value="#{uiUser.username}"/>
+ </h:commandLink>
+ </h:column>
</h:dataTable>
-<hr/>
+
<h:messages />
- <h:commandLink value="create User Account" action="create"/>
+ <p style="text-align: right"><h:commandLink value="#{bundle.IDENTITY_MANAGEMENT_CREATE_USER}" action="createUser"/></p>
</ui:define>
</ui:composition>
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/register.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/register.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/register.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
<ui:define name="title">
#{bundle.IDENTITY_REGISTER_TITLE}
Deleted: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/registerRoles.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/registerRoles.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/registerRoles.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -1,22 +0,0 @@
-<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">
-
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
-
-<ui:define name="title">
- Define Membership
-</ui:define>
-
-<ui:define name="content">
-
- ...
-
-</ui:define>
-
-</ui:composition>
-</div>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/createRole.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/createRole.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/createRole.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,29 @@
+<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">
+
+<ui:composition template="/WEB-INF/jsf/admin/roles/roleTemplate.xhtml">
+
+<ui:define name="title">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_CREATE_ROLE}"/>
+</ui:define>
+
+<ui:define name="content">
+<h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE}"/>
+ <h:inputText id="rolename" value="#{createrolemgr.uiRole.name}" required="true"/>
+
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}"/>
+ <h:inputText id="roledisplayname" value="#{createrolemgr.uiRole.displayName}"/>
+ </h:panelGrid>
+ <hr/>
+ <h:commandButton value="Submit" action="#{createrolemgr.createRole}" styleClass="portlet-form-button"/>
+</h:form>
+</ui:define>
+</ui:composition>
+</div>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/deleteRole.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/deleteRole.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/deleteRole.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -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">
+
+<ui:composition template="/WEB-INF/jsf/admin/roles/roleTemplate.xhtml">
+
+
+<ui:define name="title">#{bundle.IDENTITY_REGISTER_TITLE_CONFIRM_DELETE}</ui:define>
+<ui:define name="content">
+
+<h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE}"/>
+ <h:outputText id="rolename" value="#{rolemanagementbean.uiRole.name}"/>
+
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}"/>
+ <h:outputText id="displayName" value="#{rolemanagementbean.uiRole.displayName}"/>
+ </h:panelGrid>
+ <h:messages />
+ <hr/>
+ <h:commandButton value="#{bundle.IDENTITY_BUTTON_CANCEL}" action="roleAdmin" styleClass="portlet-form-button"/>
+ <h:commandButton value="#{bundle.IDENTITY_BUTTON_SUBMIT}" action="#{rolemanagementbean.confirmedDelete}" styleClass="portlet-form-button"/>
+</h:form>
+
+</ui:define>
+</ui:composition>
+</div>
\ No newline at end of file
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/editRole.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/editRole.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/editRole.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,18 +6,23 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
+<ui:composition template="/WEB-INF/jsf/admin/roles/roleTemplate.xhtml">
<ui:define name="title">
- Edit Role
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_EDIT_ROLE}"/>
</ui:define>
<ui:define name="content">
<h:form>
- <h:outputText value="#{rolemanagementbean.role.name}" /><br/>
- DisplayName: <h:inputText value="#{rolemanagementbean.role.displayName}"/>
+ <h:panelGrid columns="2">
+ <h:outputText for="rolename" value="#{bundle.IDENTITY_MANAGEMENT_ROLE}"/>
+ <h:outputText id="rolename" value="#{editrolemgr.uiRole.name}" />
- <h:commandButton value="Submit" action="rolemanagementbean.updateRole"/>
+ <h:outputText for="roledisplayname" value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}"/>
+ <h:inputText value="#{editrolemgr.uiRole.displayName}"/>
+ </h:panelGrid>
+ <hr/>
+ <h:commandButton value="Submit" action="#{editrolemgr.updateRole}" styleClass="portlet-form-button"/>
</h:form>
</ui:define>
</ui:composition>
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleMembers.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleMembers.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleMembers.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,23 +6,69 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
+<ui:composition template="/WEB-INF/jsf/admin/roles/roleTemplate.xhtml">
<ui:define name="title">
- Edit Role
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_MEMBERS}"/>: <h:outputText value="#{rolemanagementbean.uiRole.name}"/>
</ui:define>
<ui:define name="content">
+<hr/>
<h:form>
- <h:dataTable value="#{rolemanagementbean.roleMembers}" var="uiUser">
+ <h:dataTable value="#{rolemanagementbean.roleMembers}" var="uiUser" rowClasses="portlet-section-body,portlet-section-alternate" headerClass="portlet-section-header" width="100%">
<h:column>
<f:facet name="header">
- <h:outputText value="Username" />
+ <h:outputText value="#{bundle.IDENTITY_USERNAME}"/>
</f:facet>
<h:outputText value="#{uiUser.username}"/>
</h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{bundle.IDENTITY_GIVENNAME}"/>
+ </f:facet>
+ <h:outputText value="#{uiUser.attribute.givenname}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{bundle.IDENTITY_FAMILYNAME}"/>
+ </f:facet>
+ <h:outputText value="#{uiUser.attribute.familyname}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{bundle.IDENTITY_ENABLED}"/>
+ </f:facet>
+ <h:selectBooleanCheckbox id="enabled" value="#{uiUser.attribute.enabled}" disabled="true" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION}"/>
+ </f:facet>
+ <h:commandLink action="#{editprofilemgr.editProfile}">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE}"/>
+ <f:param name="currentUser" value="#{uiUser.username}"/>
+ </h:commandLink> |
+ <h:commandLink action="#{assignrolemgr.assignRoles}">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION_ROLES}"/>
+ <f:param name="currentUser" value="#{uiUser.username}"/>
+ </h:commandLink>
+ </h:column>
</h:dataTable>
</h:form>
+<br/>
+<h:form>
+ <h4><h:outputText value="#{bundle.IDENTITY_MANAGEMENT_SEARCH_USER}"/></h4>
+ <h:panelGrid columns="3">
+ <h:inputText id="searchString" value="#{rolemanagementbean.userNameFilter}" />
+ <h:commandButton value="Search" action="#{rolemanagementbean.viewRoleMembers}" styleClass="portlet-form-button" />
+ <h:selectOneMenu id="limit" value="#{rolemanagementbean.limit}">
+ <f:selectItem id="limit1" itemValue="10"/>
+ <f:selectItem id="limit2" itemValue="20"/>
+ <f:selectItem id="limit5" itemValue="50"/>
+ <f:selectItem id="limit10" itemValue="100"/>
+ </h:selectOneMenu>
+ </h:panelGrid>
+</h:form>
</ui:define>
</ui:composition>
</div>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleTemplate.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleTemplate.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleTemplate.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,29 @@
+<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">
+
+ <f:loadBundle var="bundle" basename="Identity" />
+
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink action="userAdmin" value="#{bundle.IDENTITY_MANAGEMENT_USER_MANAGEMENT}"/>
+ </li>
+ <li id="currentTab"><h:commandLink action="roleAdmin" value="#{bundle.IDENTITY_MANAGEMENT_ROLE_MANAGEMENT}"/></li>
+ </ul>
+ </h:form>
+
+ <!-- Status message -->
+ <h:message infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Title -->
+ <h4><ui:insert name="title">Title</ui:insert></h4>
+
+ <!-- Content -->
+ <ui:insert name="content">Content</ui:insert>
+
+</div>
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,37 +6,45 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/admin/adminTemplate.xhtml">
-<ui:define name="title">
- role Management
-</ui:define>
+<ui:composition template="/WEB-INF/jsf/admin/roles/roleTemplate.xhtml">
+<ui:define name="title" />
<ui:define name="content">
<h:form>
- <h:dataTable id="userlist" value="#{rolemanagementbean.roleList}" var="role">
+ <h:dataTable id="userlist" value="#{rolemanagementbean.roleList}" var="role" rowClasses="portlet-section-body,portlet-section-alternate" headerClass="portlet-section-header" width="100%">
<h:column>
<f:facet name="header">
- <h:outputText>Role Name</h:outputText>
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE}" />
</f:facet>
<h:outputText value="#{role.name}"/>
</h:column>
<h:column>
<f:facet name="header">
- <h:outputText>Actions</h:outputText>
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}" />
</f:facet>
- <h:commandLink action="#{rolemanagementbean.editRole}">
- <h:outputText>Edit Role</h:outputText>
- <f:param name="role" value="#{role}"/>
+ <h:outputText value="#{role.displayName}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION}"/>
+ </f:facet>
+ <h:commandLink action="#{editrolemgr.editRole}">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_EDIT_ROLE}"/>
+ <f:param name="currentRole" value="#{role.name}"/>
</h:commandLink>
| <h:commandLink action="#{rolemanagementbean.viewRoleMembers}">
- <h:outputText value="Members" />
- <f:param name="role" value="#{role}"/>
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_MEMBERS}"/>
+ <f:param name="currentRole" value="#{role.name}"/>
</h:commandLink>
- | Delete
+ | <h:commandLink action="#{rolemanagementbean.deleteRole}">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION_DELETE}"/>
+ <f:param name="currentRole" value="#{role.name}"/>
+ </h:commandLink>
</h:column>
</h:dataTable>
</h:form>
+
+ <p style="text-align: right"><h:commandLink value="Create new role" action="createRole"/></p>
</ui:define>
-
</ui:composition>
</div>
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/createUser.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/createUser.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/createUser.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,24 @@
+<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">
+
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
+
+<ui:define name="title">
+ #{bundle.IDENTITY_REGISTER_TITLE}
+</ui:define>
+
+<ui:define name="content">
+
+ <ui:decorate template="/WEB-INF/jsf/common/register.xhtml">
+ <ui:param name="manager" value="#{userregistermgr}"/>
+ </ui:decorate>
+
+</ui:define>
+
+</ui:composition>
+</div>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/deleteUser.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/deleteUser.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/deleteUser.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -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">
+
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
+
+
+<ui:define name="title">#{bundle.IDENTITY_REGISTER_TITLE_CONFIRM_DELETE}</ui:define>
+<ui:define name="content">
+
+<h:form>
+ <h:panelGrid columns="2">
+ <h:outputText for="username" value="#{bundle.IDENTITY_USERNAME}"/>
+ <h:outputText id="username" value="#{useradministrationbean.uiUser.username}"/>
+
+ <h:outputText for="email" value="#{bundle.IDENTITY_EMAIL}"/>
+ <h:outputText id="email" value="#{useradministrationbean.uiUser.attribute.email}"/>
+ </h:panelGrid>
+ <h:messages />
+ <hr/>
+ <h:commandButton value="#{bundle.IDENTITY_BUTTON_CANCEL}" action="userAdmin" styleClass="portlet-form-button"/>
+ <h:commandButton value="#{bundle.IDENTITY_BUTTON_SUBMIT}" action="#{useradministrationbean.confirmedDelete}" styleClass="portlet-form-button"/>
+</h:form>
+
+</ui:define>
+</ui:composition>
+</div>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/registerConfirm.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/registerConfirm.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/registerConfirm.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -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">
+
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
+
+
+<ui:define name="title">#{bundle.IDENTITY_REGISTER_TITLE_CONFIRM}</ui:define>
+<ui:define name="content">
+ <ui:decorate template="/WEB-INF/jsf/common/confirm.xhtml">
+ <ui:param name="manager" value="#{userregistermgr}"/>
+ <ui:param name="show_roles" value="true"/>
+ </ui:decorate>
+
+
+
+</ui:define>
+</ui:composition>
+</div>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/registerRoles.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/registerRoles.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/registerRoles.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,26 @@
+<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">
+
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
+
+<ui:define name="title">
+ assign roles for user #{userregistermgr.uiUser.username}
+</ui:define>
+
+<ui:define name="content">
+ <h:form>
+ <h:selectManyCheckbox id="roles" value="#{userregistermgr.roles}">
+ <f:selectItems value="#{rolemanagementbean.roleSelectItems}" />
+ </h:selectManyCheckbox>
+ <hr/>
+ <h:commandButton value="Submit" action="register" styleClass="portlet-form-button"/>
+
+ </h:form>
+</ui:define>
+</ui:composition>
+</div>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/userTemplate.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/userTemplate.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/userTemplate.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,29 @@
+<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">
+
+ <f:loadBundle var="bundle" basename="Identity" />
+
+ <h:form>
+ <ul class="topnav">
+ <li id="currentTab"><h:commandLink action="userAdmin" value="#{bundle.IDENTITY_MANAGEMENT_USER_MANAGEMENT}"/></li>
+ <li>
+ <h:commandLink action="roleAdmin" value="#{bundle.IDENTITY_MANAGEMENT_ROLE_MANAGEMENT}"/>
+ </li>
+ </ul>
+ </h:form>
+
+ <!-- Status message -->
+ <h:message infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Title -->
+ <h4><ui:insert name="title">Title</ui:insert></h4>
+
+ <!-- Content -->
+ <ui:insert name="content">Content</ui:insert>
+
+</div>
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/confirm.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/confirm.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/confirm.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -0,0 +1,34 @@
+<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>
+ <h:panelGrid columns="2">
+ <h:outputText for="username" value="#{bundle.IDENTITY_USERNAME}"/>
+ <h:outputText id="username" value="#{manager.uiUser.username}"/>
+
+ <h:outputText for="email" value="#{bundle.IDENTITY_EMAIL}"/>
+ <h:outputText id="email" value="#{manager.uiUser.attribute.email}"/>
+
+ <h:outputText for="password" value="#{bundle.IDENTITY_PASSWORD}"/>
+ <h:outputText id="password">******</h:outputText>
+ </h:panelGrid>
+ <br/>
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_ASSIGNED}" rendered="#{show_roles == true}"/>
+ <h:dataTable id="roleslist" value="#{manager.roles}" var="role" rendered="#{show_roles == true}">
+ <h:column>
+ <h:outputText value="#{role}"/>
+ </h:column>
+ </h:dataTable>
+
+ <h:messages />
+ <hr/>
+ <h:commandButton value="#{bundle.IDENTITY_BUTTON_EDIT}" action="revise" styleClass="portlet-form-button"/>
+ <h:commandButton value="#{bundle.IDENTITY_BUTTON_SUBMIT}" action="#{manager.register}" styleClass="portlet-form-button"/>
+</h:form>
+
+</div>
\ No newline at end of file
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
- <h:form>
+ <h:form>
<h:panelGrid columns="3" cellpadding="3">
<h:outputText for="username" value="#{bundle.IDENTITY_USERNAME}"/>
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/register/registerTemplate.xhtml">
+<ui:composition template="/WEB-INF/jsf/lostPassword/lostTemplate.xhtml">
<ui:define name="title">
#{bundle.IDENTITY_LOST_PASSWORD_TITLE}
@@ -16,15 +16,16 @@
<p>#{bundle.IDENTITY_LOST_PASSWORD_DESCRIPTION}</p>
<h:panelGrid columns="3" cellpadding="3">
<h:outputText for="username" value="#{bundle.IDENTITY_USERNAME}"/>
- <h:inputText id="username" />
+ <h:inputText id="username" value="#{lostpasswordmgr.username}" />
<h:message for="username" />
<h:outputText for="email" value="#{bundle.IDENTITY_EMAIL}"/>
- <h:inputText id="username" />
+ <h:inputText id="email" value="#{lostpasswordmgr.email}" />
<h:message for="email"/>
</h:panelGrid>
+ <h:message />
<hr/>
- <h:commandButton value="#{bundle.IDENTITY_BUTTON_SUBMIT}" styleClass="portlet-form-button"/>
+ <h:commandButton value="#{bundle.IDENTITY_BUTTON_SUBMIT}" action="#{lostpasswordmgr.doomed}" styleClass="portlet-form-button"/>
</h:form>
</ui:define>
</ui:composition>
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lostTemplate.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lostTemplate.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lostTemplate.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -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">
+
+ <f:loadBundle var="bundle" basename="Identity" />
+
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="#{bundle.IDENTITY_WELCOME}" action="start"/>
+ </li>
+ <li>
+ <h:commandLink value="#{bundle.IDENTITY_REGISTER}" action="register"/>
+ </li>
+ <li id="currentTab">
+ <h:commandLink value="#{bundle.IDENTITY_LOST_PASSWORD}" action="lostPassword"/>
+ </li>
+ </ul>
+ </h:form>
+
+ <!-- Status message -->
+ <h:message infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Title -->
+ <h4><ui:insert name="title">Title</ui:insert></h4>
+
+ <!-- Content -->
+ <ui:insert name="content">Content</ui:insert>
+</div>
\ No newline at end of file
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changeEmail.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -9,15 +9,15 @@
<h:form>
<ul class="topnav">
<li>
- <h:commandLink value="View profile" action="start"/>
+ <h:commandLink value="#{bundle.IDENTITY_VIEW_PROFILE_TITLE}" action="start"/>
</li>
<li>
- <h:commandLink value="Edit profile" action="editProfile"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_PROFILE_TITLE}" action="editProfile"/>
</li>
<li>
- <h:commandLink value="Change password" action="changePassword"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_CHANGE_PASSWORD}" action="changePassword"/>
</li>
- <li id="currentTab">Change email</li>
+ <li id="currentTab"><h:outputText value="#{bundle.IDENTITY_EDIT_CHANGE_EMAIL}" /></li>
</ul>
</h:form>
@@ -30,13 +30,13 @@
</h:inputSecret>
<h:message for="currentPassword" />
- <h:outputText for="email">New email address</h:outputText>
- <h:inputText id="email" value="#{editprofilebean.password}" required="true">
+ <h:outputText value="#{bundle.IDENTITY_EDIT_EMAIL_NEW}"/>
+ <h:inputText id="email" value="#{editprofilemgr.email}" required="true">
<f:validator validatorId="EmailValidator" />
</h:inputText>
<h:message for="email" />
</h:panelGrid>
<hr/>
- <h:commandButton value="Submit" styleClass="portlet-form-button"/>
+ <h:commandButton value="Submit" action="#{editprofilemgr.changeEmail}" styleClass="portlet-form-button"/>
</h:form>
</div>
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/changePassword.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -9,14 +9,14 @@
<h:form>
<ul class="topnav">
<li>
- <h:commandLink value="View profile" action="start"/>
+ <h:commandLink value="#{bundle.IDENTITY_VIEW_PROFILE_TITLE}" action="start"/>
</li>
<li>
- <h:commandLink value="Edit profile" action="editProfile"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_PROFILE_TITLE}" action="editProfile"/>
</li>
- <li id="currentTab">Change password</li>
+ <li id="currentTab"><h:outputText value="#{bundle.IDENTITY_EDIT_CHANGE_PASSWORD}" /></li>
<li>
- <h:commandLink value="Change email" action="changeEmail"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_CHANGE_EMAIL}" action="changeEmail"/>
</li>
</ul>
</h:form>
@@ -31,7 +31,7 @@
<h:message for="currentPassword" />
<h:outputText for="password" value="#{bundle.IDENTITY_PASSWORD}"/>
- <h:inputSecret id="password" required="true" value="#{editprofilebean.password}">
+ <h:inputSecret id="password" required="true" value="#{editprofilemgr.password}">
<f:validateLength minimum="6"/>
</h:inputSecret>
<h:message for="password"/>
@@ -44,6 +44,6 @@
</h:panelGrid>
<hr/>
- <h:commandButton value="Submit" styleClass="portlet-form-button"/>
+ <h:commandButton value="Submit" action="#{editprofilemgr.changePassword}" styleClass="portlet-form-button"/>
</h:form>
</div>
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -11,20 +11,20 @@
<h:form>
<ul class="topnav">
<li>
- <h:commandLink value="View profile" action="start"/>
+ <h:commandLink value="#{bundle.IDENTITY_VIEW_PROFILE_TITLE}" action="start"/>
</li>
- <li id="currentTab">Edit profile</li>
+ <li id="currentTab"><h:outputText value="#{bundle.IDENTITY_EDIT_PROFILE_TITLE}" /></li>
<li>
- <h:commandLink value="Change password" action="changePassword"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_CHANGE_PASSWORD}" action="changePassword"/>
</li>
<li>
- <h:commandLink value="Change email" action="changeEmail"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_CHANGE_EMAIL}" action="changeEmail"/>
</li>
</ul>
</h:form>
<ui:decorate template="/WEB-INF/jsf/common/profile.xhtml">
- <ui:param name="manager" value="#{editprofilebean}"/>
+ <ui:param name="manager" value="#{editprofilemgr}"/>
</ui:decorate>
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -10,23 +10,32 @@
<h:form>
<ul class="topnav">
- <li id="currentTab">View profile</li>
+ <li id="currentTab"><h:outputText value="#{bundle.IDENTITY_VIEW_PROFILE_TITLE}" /></li>
<li>
- <h:commandLink value="Edit profile" action="editProfile"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_PROFILE_TITLE}" action="editProfile"/>
</li>
<li>
- <h:commandLink value="Change password" action="changePassword"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_CHANGE_PASSWORD}" action="changePassword"/>
</li>
<li>
- <h:commandLink value="Change email" action="changeEmail"/>
+ <h:commandLink value="#{bundle.IDENTITY_EDIT_CHANGE_EMAIL}" action="changeEmail"/>
</li>
</ul>
</h:form>
<h4>User profile</h4>
- #{bundle.IDENTITY_USERNAME}: #{editprofilebean.currentUser}<br/>
- #{bundle.IDENTITY_EMAIL}: #{editprofilebean.currentUser}<br/>
- #{bundle.IDENTITY_GIVENNAME}: #{editprofilebean.uiUser.attribute.givenname}<br/>
- #{bundle.IDENTITY_FAMILYNAME}: #{editprofilebean.uiUser.attribute.familyname}
-
+
+ <h:panelGrid columns="2">
+ <h:outputText value="#{bundle.IDENTITY_USERNAME}:"/>
+ <h:outputText value="#{editprofilemgr.uiUser.username}"/>
+
+ <h:outputText value="#{bundle.IDENTITY_EMAIL}:"/>
+ <h:outputText value="#{editprofilemgr.uiUser.attribute.email}"/>
+
+ <h:outputText value="#{bundle.IDENTITY_GIVENNAME}:"/>
+ <h:outputText value="#{editprofilemgr.uiUser.attribute.givenname}"/>
+
+ <h:outputText value="#{bundle.IDENTITY_FAMILYNAME}:"/>
+ <h:outputText value="#{editprofilemgr.uiUser.attribute.familyname}"/>
+ </h:panelGrid>
</div>
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/confirm.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -8,28 +8,11 @@
<ui:composition template="/WEB-INF/jsf/register/registerTemplate.xhtml">
-
<ui:define name="title">#{bundle.IDENTITY_REGISTER_TITLE_CONFIRM}</ui:define>
<ui:define name="content">
-<h:form>
- <h:panelGrid columns="2">
- <h:outputText for="username" value="#{bundle.IDENTITY_USERNAME}"/>
- <h:outputText id="username" value="#{userregistermgr.uiUser.username}"/>
-
- <h:outputText for="email" value="#{bundle.IDENTITY_EMAIL}"/>
- <h:outputText id="email" value="#{userregistermgr.uiUser.attribute.email}"/>
-
- <h:outputText for="password" value="#{bundle.IDENTITY_PASSWORD}"/>
- <h:outputText id="password">******</h:outputText>
- </h:panelGrid>
-
- <h:messages />
- <hr/>
- <h:commandButton value="#{bundle.IDENTITY_BUTTON_EDIT}" action="revise" styleClass="portlet-form-button"/>
- <h:commandButton value="#{bundle.IDENTITY_BUTTON_SUBMIT}" action="#{userregistermgr.register}" styleClass="portlet-form-button"/>
-</h:form>
-
-
+ <ui:decorate template="/WEB-INF/jsf/common/confirm.xhtml">
+ <ui:param name="manager" value="#{userregistermgr}"/>
+ </ui:decorate>
</ui:define>
</ui:composition>
</div>
\ No newline at end of file
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/overview.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
-<ui:composition template="/WEB-INF/jsf/register/registerTemplate.xhtml">
+<ui:composition template="/WEB-INF/jsf/startTemplate.xhtml">
<ui:define name="title">
#{bundle.IDENTITY_NOT_LOGGED_IN}
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/registerTemplate.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/registerTemplate.xhtml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/registerTemplate.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -13,8 +13,8 @@
<li>
<h:commandLink value="#{bundle.IDENTITY_WELCOME}" action="start"/>
</li>
- <li>
- <h:commandLink value="#{bundle.IDENTITY_REGISTER}" action="register"/>
+ <li id="currentTab">
+ <h:outputText value="#{bundle.IDENTITY_REGISTER}"/>
</li>
<li>
<h:commandLink value="#{bundle.IDENTITY_LOST_PASSWORD}" action="lostPassword"/>
Modified: 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 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/success.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -9,10 +9,8 @@
<ui:composition template="/WEB-INF/jsf/register/registerTemplate.xhtml">
<ui:define name="title">
- #{bundle.IDENTITY_SUCCESS_TITLE}
+ #{bundle.IDENTITY_REGISTER_SUCCESS_TITLE}
</ui:define>
-<ui:define name="content">
-
-</ui:define>
+<ui:define name="content" />
</ui:composition>
</div>
\ No newline at end of file
Added: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/startTemplate.xhtml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/startTemplate.xhtml (rev 0)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/startTemplate.xhtml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -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">
+
+ <f:loadBundle var="bundle" basename="Identity" />
+
+ <h:form>
+ <ul class="topnav">
+ <li id="currentTab">
+ <h:commandLink value="#{bundle.IDENTITY_WELCOME}" action="start"/>
+ </li>
+ <li>
+ <h:commandLink value="#{bundle.IDENTITY_REGISTER}" action="register"/>
+ </li>
+ <li>
+ <h:commandLink value="#{bundle.IDENTITY_LOST_PASSWORD}" action="lostPassword"/>
+ </li>
+ </ul>
+ </h:form>
+
+ <!-- Status message -->
+ <h:message infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Title -->
+ <h4><ui:insert name="title">Title</ui:insert></h4>
+
+ <!-- Content -->
+ <ui:insert name="content">Content</ui:insert>
+</div>
\ No newline at end of file
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2007-08-15 12:46:17 UTC (rev 7939)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2007-08-15 18:09:14 UTC (rev 7940)
@@ -29,48 +29,51 @@
version="1.0">
<portlet>
- <description>Core Identity User Portlet</description>
+ <description>User portlet</description>
<portlet-name>CoreIdentityUserPortlet</portlet-name>
- <display-name>Core Identity User Portlet</display-name>
+ <display-name>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>
+ <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>
+ <title>User portlet</title>
<keywords>management,user</keywords>
</portlet-info>
</portlet>
<portlet>
- <description>Core Identity Admin Portlet</description>
+ <description>User and role management portlet</description>
<portlet-name>CoreIdentityAdminPortlet</portlet-name>
- <display-name>Core Identity Admin Portlet</display-name>
+ <display-name>User management portlet</display-name>
<portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
<init-param>
<name>default-view</name>
<value>/WEB-INF/jsf/admin/index.xhtml</value>
</init-param>
+ <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 Admin Portlet</title>
+ <title>User management portlet</title>
<keywords>management,admin</keywords>
</portlet-info>
</portlet>
18 years, 8 months