[seam-commits] Seam SVN: r12772 - in modules/security/trunk/examples: idmconsole and 17 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sun May 23 04:36:35 EDT 2010


Author: shane.bryzak at jboss.com
Date: 2010-05-23 04:36:33 -0400 (Sun, 23 May 2010)
New Revision: 12772

Added:
   modules/security/trunk/examples/idmconsole/
   modules/security/trunk/examples/idmconsole/pom.xml
   modules/security/trunk/examples/idmconsole/src/
   modules/security/trunk/examples/idmconsole/src/main/
   modules/security/trunk/examples/idmconsole/src/main/java/
   modules/security/trunk/examples/idmconsole/src/main/java/org/
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/action/
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObject.java
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectCredential.java
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectCredentialType.java
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectRelationship.java
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectRelationshipType.java
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectType.java
   modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/util/
   modules/security/trunk/examples/idmconsole/src/main/resources/
   modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/
   modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/idmconsole-ds.xml
   modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/persistence.xml
   modules/security/trunk/examples/idmconsole/src/main/resources/import.sql
   modules/security/trunk/examples/idmconsole/src/main/webapp/
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/kbaseconfig.properties
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/kbuilderconfig.properties
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/security-rules.drl
   modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/web.xml
   modules/security/trunk/examples/idmconsole/src/main/webapp/hashgen.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/home.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/images/
   modules/security/trunk/examples/idmconsole/src/main/webapp/images/bg_button.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/images/checkmark.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/images/cross.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/images/ellipsis.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/images/no_image.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/index.html
   modules/security/trunk/examples/idmconsole/src/main/webapp/profile.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/register.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/register2.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/roledetail.page.xml
   modules/security/trunk/examples/idmconsole/src/main/webapp/roledetail.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/rolemanager.page.xml
   modules/security/trunk/examples/idmconsole/src/main/webapp/rolemanager.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/security.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/security_error.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/advertising.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newpermission.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newrole.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newuser.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/cal-next.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/cal-prev.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/date.css
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/divider.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/manage_roles.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/manage_users.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/padlock.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/seamspace.css
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/seamspace.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/security.css
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/table_header.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/style/trash.png
   modules/security/trunk/examples/idmconsole/src/main/webapp/template.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/test.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/userdetail.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/usermanager.page.xml
   modules/security/trunk/examples/idmconsole/src/main/webapp/usermanager.xhtml
   modules/security/trunk/examples/idmconsole/src/main/webapp/welcome.xhtml
Log:
create new security example, identity management console


Added: modules/security/trunk/examples/idmconsole/pom.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/pom.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/pom.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,132 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+  
+   <parent>
+      <groupId>org.jboss.seam.security</groupId>
+      <artifactId>seam-security-parent</artifactId>
+      <version>3.0.0-SNAPSHOT</version>
+   </parent>
+
+   <groupId>org.jboss.seam.security</groupId>
+   <artifactId>seam-security-idmconsole-example</artifactId>
+   <packaging>war</packaging>
+   <version>3.0.0-SNAPSHOT</version>
+   <name>Seam Security IDM Console Example</name>
+   
+   <dependencies>
+      <!--dependency>
+         <groupId>org.testng</groupId>
+         <artifactId>testng</artifactId>
+         <scope>test</scope>
+         <classifier>jdk15</classifier>
+      </dependency-->
+      
+      <dependency>
+         <groupId>javax.enterprise</groupId>
+         <artifactId>cdi-api</artifactId>
+         <scope>provided</scope>
+         <version>1.0</version>
+      </dependency>
+
+      <dependency>
+         <groupId>javax.faces</groupId>
+         <artifactId>jsf-api</artifactId>
+         <version>2.0.2-FCS</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.hibernate</groupId>
+         <artifactId>hibernate-validator</artifactId>
+         <version>4.0.0.GA</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam.security</groupId>
+         <artifactId>seam-security-api</artifactId>
+         <version>${project.version}</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam.security</groupId>
+         <artifactId>seam-security-impl</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam.xml</groupId>
+         <artifactId>seam-xml-bean-config</artifactId>
+         <version>3.0.0-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+         <groupId>javax.persistence</groupId>
+         <artifactId>persistence-api</artifactId>
+         <version>1.0</version>
+         <scope>provided</scope>
+      </dependency>
+      
+      <dependency>
+      	<groupId>javax.transaction</groupId>
+      	<artifactId>jta</artifactId>
+      	<version>1.1</version>
+      	<scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>javax.validation</groupId>
+         <artifactId>validation-api</artifactId>
+         <version>1.0.0.GA</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>javax.servlet</groupId>
+         <artifactId>servlet-api</artifactId>
+         <version>2.5</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.glassfish.web</groupId>
+         <artifactId>el-impl</artifactId>
+         <scope>runtime</scope>
+         <version>2.1.2-b04</version>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.el</groupId>
+               <artifactId>el-api</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency> 
+
+   </dependencies>
+   
+   <build>    
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration>
+            <source>1.5</source>
+            <target>1.5</target>
+          </configuration>
+        </plugin>
+              
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>2.0</version>
+          <configuration>
+            <warName>idmconsole</warName>
+          </configuration>
+        </plugin>
+
+     </plugins>
+  </build>
+   
+</project>
+

Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObject.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObject.java	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObject.java	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,56 @@
+package org.jboss.seam.security.examples.seamspace.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+import org.picketlink.idm.spi.model.IdentityObjectType;
+
+/**
+ * 
+ * @author Shane Bryzak
+ */
+ at Entity
+public class IdentityObject implements Serializable
+{
+   private static final long serialVersionUID = 9158638400039584710L;
+   
+   private Long id;
+   private String name;
+   private IdentityObjectType type;
+   
+   @Id @GeneratedValue
+   public Long getId()
+   {
+      return id;
+   }
+   
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   @ManyToOne
+   public IdentityObjectType getType()
+   {
+      return type;
+   }
+   
+   public void setIdentityObjectType(IdentityObjectType type)
+   {
+      this.type = type;
+   }
+}

Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectCredential.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectCredential.java	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectCredential.java	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,65 @@
+package org.jboss.seam.security.examples.seamspace.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+/**
+ * 
+ * @author Shane Bryzak
+ */
+ at Entity
+public class IdentityObjectCredential implements Serializable
+{
+   private static final long serialVersionUID = -3322215745174559505L;
+   
+   private Long id;
+   private IdentityObject identityObject;
+   private IdentityObjectCredentialType credentialType;
+   private String value;
+   
+   @Id @GeneratedValue
+   public Long getId()
+   {
+      return id;
+   }
+   
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+   
+   @ManyToOne
+   public IdentityObject getIdentityObject()
+   {
+      return identityObject;
+   }
+   
+   public void setIdentityObject(IdentityObject identityObject)
+   {
+      this.identityObject = identityObject;
+   }
+
+   public IdentityObjectCredentialType getCredentialType()
+   {
+      return credentialType;
+   }
+   
+   public void setCredentialType(IdentityObjectCredentialType credentialType)
+   {
+      this.credentialType = credentialType;
+   }
+   
+   public String getValue()
+   {
+      return value;
+   }
+   
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+}

Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectCredentialType.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectCredentialType.java	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectCredentialType.java	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,41 @@
+package org.jboss.seam.security.examples.seamspace.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * 
+ * @author Shane Bryzak
+ */
+ at Entity
+public class IdentityObjectCredentialType implements Serializable
+{
+   private static final long serialVersionUID = 5838571410529001763L;
+   
+   private Long id;
+   private String name;
+   
+   @Id @GeneratedValue
+   public Long getId()
+   {
+      return id;
+   }
+   
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+}

Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectRelationship.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectRelationship.java	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectRelationship.java	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,78 @@
+package org.jboss.seam.security.examples.seamspace.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+/**
+ * 
+ * @author Shane Bryzak
+ */
+ at Entity
+public class IdentityObjectRelationship implements Serializable
+{
+   private static final long serialVersionUID = -677485940440910431L;
+   
+   private Long id;
+   private String name;
+   private IdentityObjectRelationshipType relationshipType;
+   private IdentityObject fromObject;
+   private IdentityObject toObject;
+   
+   @Id @GeneratedValue
+   public Long getId()
+   {
+      return id;
+   }
+   
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   @ManyToOne
+   public IdentityObjectRelationshipType getRelationshipType()
+   {
+      return relationshipType;
+   }
+   
+   public void setRelationshipType(IdentityObjectRelationshipType relationshipType)
+   {
+      this.relationshipType = relationshipType;
+   }
+   
+   @ManyToOne
+   public IdentityObject getFromObject()
+   {
+      return fromObject;
+   }
+   
+   public void setFromObject(IdentityObject fromObject)
+   {
+      this.fromObject = fromObject;
+   }
+   
+   @ManyToOne
+   public IdentityObject getToObject()
+   {
+      return toObject;
+   }
+   
+   public void setToObject(IdentityObject toObject)
+   {
+      this.toObject = toObject;
+   }
+}

Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectRelationshipType.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectRelationshipType.java	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectRelationshipType.java	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,41 @@
+package org.jboss.seam.security.examples.seamspace.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * 
+ * @author Shane Bryzak
+ */
+ at Entity
+public class IdentityObjectRelationshipType implements Serializable
+{
+   private static final long serialVersionUID = -718615269633367747L;
+   
+   private Long id;
+   private String name;
+   
+   @Id @GeneratedValue
+   public Long getId()
+   {
+      return id;
+   }
+   
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+}

Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectType.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectType.java	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/seamspace/model/IdentityObjectType.java	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,41 @@
+package org.jboss.seam.security.examples.seamspace.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * 
+ * @author Shane Bryzak
+ */
+ at Entity
+public class IdentityObjectType implements Serializable
+{
+   private static final long serialVersionUID = -3128517252383691733L;
+   
+   private Long id;
+   private String name;
+   
+   @Id @GeneratedValue
+   public Long getId()
+   {
+      return id;
+   }
+   
+   public void setId(Long id)
+   {
+      this.id = id;
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+   
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+}

Added: modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/idmconsole-ds.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/idmconsole-ds.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/idmconsole-ds.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources
+   PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+   "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+
+    <local-tx-datasource>
+        <jndi-name>idmconsoleDatasource</jndi-name>
+        <use-java-context>false</use-java-context>
+        <connection-url>jdbc:hsqldb:.</connection-url>
+        <driver-class>org.hsqldb.jdbcDriver</driver-class>
+        <user-name>sa</user-name>
+        <password></password>
+    </local-tx-datasource>
+
+</datasources>

Added: modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/persistence.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/persistence.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/resources/META-INF/persistence.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
+   version="1.0">
+   <persistence-unit name="idmconsole">
+      <jta-data-source>idmconsoleDatasource</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+         <property name="hibernate.show_sql" value="true"/>
+         <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+      </properties>
+   </persistence-unit>
+</persistence>

Added: modules/security/trunk/examples/idmconsole/src/main/resources/import.sql
===================================================================

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:s="urn:java:seam:core"
+       xmlns:security="urn:java:org.jboss.seam.security"
+       xmlns:idm="urn:java:org.jboss.seam.security.management"
+       xmlns:seamspace="urn:java:org.jboss.seam.security.examples.seamspace"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                           http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+                           
+   <!--idm:IdentityManager>
+      <s:extends/>
+      <idm:identityStore>
+         <s:Inject/>
+         <s:New>org.jboss.seam.security.management.JpaIdentityStore</s:New>
+      </idm:identityStore>
+   </idm:IdentityManager-->
+   
+   <interceptors>
+      <class>org.jboss.seam.transaction.JtaTxInterceptor</class>
+   </interceptors>
+   
+</beans>
\ No newline at end of file

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:s="urn:java:seam:core"
+       xmlns:security="urn:java:org.jboss.seam.security"
+       xmlns:idm="urn:java:org.jboss.seam.security.management"
+       xmlns:permission="urn:java:org.jboss.seam.security.permission"
+       xmlns:drools="urn:java:org.jboss.seam.drools"
+       xmlns:seamspace="urn:java:org.jboss.seam.security.examples.seamspace"
+       xmlns:drools-config="urn:java:org.jboss.seam.drools.config"
+       xmlns:drools-qualifier="urn:java:org.jboss.seam.drools.qualifier"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                           http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+                           
+   <!--idm:IdentityManagerImpl>
+      <s:specializes/>
+      <idm:identityStore>
+        <s:Inject/>
+        <s:type>
+           <idm:JpaIdentityStore/>
+        </s:type>
+      </idm:identityStore>
+   </idm:IdentityManagerImpl>
+      
+   <idm:JpaIdentityStore>
+      <s:specializes/>
+      <idm:userEntityClass>org.jboss.seam.security.examples.seamspace.model.MemberAccount</idm:userEntityClass>
+      <idm:roleEntityClass>org.jboss.seam.security.examples.seamspace.model.MemberRole</idm:roleEntityClass>
+   </idm:JpaIdentityStore>
+   
+   <permission:JpaPermissionStore>
+      <s:specializes/>
+      <permission:userPermissionClass>org.jboss.seam.security.examples.seamspace.model.AccountPermission</permission:userPermissionClass>
+   </permission:JpaPermissionStore-->
+   
+   <drools-config:KnowledgeBaseConfig>
+   		<s:overrides/>
+   		<drools-qualifier:KBaseConfig value="security-rules-config"/>
+   		<drools-config:knowledgeBuilderConfig>kbuilderconfig.properties</drools-config:knowledgeBuilderConfig>
+   		<drools-config:knowledgeBaseConfig>kbaseconfig.properties</drools-config:knowledgeBaseConfig>
+   		<drools-config:ruleResources>
+   			<s:value>classpath:security-rules.drl:DRL</s:value>
+   		</drools-config:ruleResources>
+   		<drools-config:eventListeners>
+   			<s:value>org.drools.event.knowledgebase.DefaultKnowledgeBaseEventListener</s:value>
+   		</drools-config:eventListeners>
+   </drools-config:KnowledgeBaseConfig>
+   
+   <drools:KnowledgeBaseProducer>
+   		<s:specializes/>
+   		<drools:produceKBase>
+   		   <drools-qualifier:KBase value="permission-rules"/>
+   		 	 <s:parameters>
+   		 	    <drools-config:KnowledgeBaseConfig>
+   		 	       <s:Inject/>
+   		 	       <drools-qualifier:KBaseConfig value="security-rules-config"/>
+   		 	    </drools-config:KnowledgeBaseConfig>
+   		 	 </s:parameters>
+      </drools:produceKBase>
+   </drools:KnowledgeBaseProducer>
+   
+   <!--permission:RuleBasedPermissionResolver>
+      <s:specializes/>
+      <permission:securityRules>
+        <drools-qualifier:KBase value="permission-rules"/>
+        <s:Inject/>
+      </permission:securityRules>
+   </permission:RuleBasedPermissionResolver-->
+       
+</beans>
\ No newline at end of file

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This file is not required if you don't need any extra configuration. -->
+<faces-config version="2.0"
+   xmlns="http://java.sun.com/xml/ns/javaee"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="
+      http://java.sun.com/xml/ns/javaee
+      http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
+
+   <!-- Write your navigation rules here. You are encouraged to use CDI for creating @Named managed beans. -->
+   
+  <navigation-rule>
+    <from-view-id>/usermanager.xhtml</from-view-id>
+    
+    <navigation-case>
+      <from-action>#{userAction.createUser}</from-action>
+      <if>#{true}</if>
+      <to-view-id>/userdetail.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+ 
+  </navigation-rule>  
+  
+  <navigation-rule>
+    <from-view-id>/userdetail.xhtml</from-view-id>
+    
+    <navigation-case>
+      <from-action>#{userAction.save}</from-action>
+      <from-outcome>success</from-outcome>
+      <if>#{true}</if>
+      <to-view-id>/usermanager.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+    
+  </navigation-rule>
+
+</faces-config>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/kbaseconfig.properties
===================================================================

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/kbuilderconfig.properties
===================================================================

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/security-rules.drl
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/security-rules.drl	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/security-rules.drl	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,247 @@
+package SeamSpacePermissions;
+
+dialect 'mvel'
+
+import java.security.Principal;
+
+import org.jboss.seam.security.permission.PermissionCheck;
+import org.jboss.seam.security.permission.RoleCheck;
+import org.jboss.seam.security.Role;
+
+import org.jboss.seam.security.examples.seamspace.model.BlogComment;
+import org.jboss.seam.security.examples.seamspace.model.Member;
+import org.jboss.seam.security.examples.seamspace.model.MemberAccount;
+import org.jboss.seam.security.examples.seamspace.model.MemberBlog;
+import org.jboss.seam.security.examples.seamspace.model.MemberFriend;
+import org.jboss.seam.security.examples.seamspace.model.MemberImage;
+
+# These rules allow members to manage permissions on their own images
+
+rule ManageImagePermissions
+  no-loop
+  activation-group "permissions"
+when
+  acct: MemberAccount()
+  image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+  check: PermissionCheck(target == image, action == "seam.read-permissions", granted == false)
+then
+  check.grant();
+end
+
+rule GrantImagePermissions
+  no-loop
+  activation-group "permissions"
+when
+  acct: MemberAccount()
+  image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+  check: PermissionCheck(target == image, action == "seam.grant-permission", granted == false)
+then
+  check.grant();
+end
+
+# Allow all users to read the available roles
+
+rule ReadRoles
+  no-loop
+  activation-group "permissions"
+when
+  check: PermissionCheck(target == "seam.role", action == "read", granted == false)
+  Role(name == "user")
+then
+  check.grant();
+end
+
+# This rule allows a member to delete their own images
+
+rule DeleteImage
+  no-loop
+  activation-group "permissions"
+when
+  acct: MemberAccount()
+  image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+  check: PermissionCheck(target == image, action == "delete", granted == false)
+then
+  check.grant();
+end
+
+# This rule allows members to revoke permissions on their images to other users/roles
+
+rule RevokeImagePermissions
+  no-loop
+  activation-group "permissions"
+when
+  acct: MemberAccount()
+  image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+  check: PermissionCheck(target == image, action == "seam.revoke-permission", granted == false)
+then
+  check.grant();
+end
+
+rule ViewProfileImage
+  no-loop
+  activation-group "permissions"
+when
+  image: MemberImage()
+  check: PermissionCheck(target == image, action == "view", granted == false)
+  eval( image.getMember().getPicture() == image )
+then
+  check.grant();
+end
+
+rule FriendViewImage
+  no-loop
+  activation-group "permissions"
+when
+  acct: MemberAccount()
+  image: MemberImage(mbr : member -> (mbr.isFriend(acct.member)))
+  PermissionCheck(target == image, action == "view")
+  role: RoleCheck(name == "friends")
+then
+  role.grant();
+end
+
+rule GuestViewImage
+  no-loop
+  activation-group "permissions"
+when
+  image: MemberImage()
+  PermissionCheck(target == image, action == "view")
+  role: RoleCheck(name == "guest")
+then
+  role.grant();
+end
+
+rule ViewMyImages
+  no-loop
+  activation-group "permissions"
+when
+  acct: MemberAccount()
+  image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+  check: PermissionCheck(target == image, action == "view")
+then
+  check.grant();
+end
+
+rule RestrictCommentPage
+  no-loop
+  activation-group "permissions"
+when
+  check: PermissionCheck(target == "/comment.xhtml", granted == false)
+  Role(name == "user")
+then
+  check.grant();
+end
+
+rule CanCreateBlogComment
+  no-loop
+  activation-group "permissions"
+when
+  blog: MemberBlog()
+  check: PermissionCheck(target == blog, action == "create", granted == false)
+  Role(name == "user")
+then
+  check.grant();
+end
+
+rule CreateBlogComment
+  no-loop
+  activation-group "permissions"
+when
+  check: PermissionCheck(target == "blogComment", action == "insert", granted == false)
+  Role(name == "user")
+then
+  check.grant();
+end
+
+# This rule grants permission for users to create their own blog entries
+rule CreateBlog
+  no-loop
+  activation-group "permissions"
+when
+  mbr: Member()
+  acct: MemberAccount(member.memberId == mbr.memberId)
+  check: PermissionCheck(target.memberId == mbr.memberId, action == "createBlog", granted == false)
+then
+  check.grant();
+end
+
+# This rule grants permission for users to upload pictures to their profile
+rule UploadImage
+  no-loop
+  activation-group "permissions"
+when
+  mbr: Member()
+  acct: MemberAccount(member.memberId == mbr.memberId)
+  check: PermissionCheck(target.memberId == mbr.memberId, action == "uploadImage", granted == false)
+then
+  check.grant();
+end
+
+rule InsertMemberBlog
+  no-loop
+  activation-group "permissions"  
+when
+  acct: MemberAccount()
+  blog: MemberBlog(member == acct.member)
+  check: PermissionCheck(target == blog, action == "insert", granted == false)  
+then
+  check.grant();
+end
+
+rule CreateFriendComment
+  no-loop
+  activation-group "permissions"
+when
+  acct: MemberAccount()
+  member: Member() //friends contains acct.member)
+  check: PermissionCheck(target == member, action == "createFriendComment", granted == false)
+then
+  check.grant();
+end
+
+rule CreateFriendRequest
+  no-loop
+  activation-group "permissions"
+when
+  acct: MemberAccount()
+  member: Member() //friends not contains acct.member)
+  check: PermissionCheck(target == member, action == "createFriendRequest", granted == false)
+then
+  check.grant();
+end
+
+rule CreateAccount
+  no-loop
+  activation-group "permissions"
+when
+  check: PermissionCheck(target == "seam.account", action == "create", granted == false)
+  Role(name == "admin")
+then
+  check.grant();
+end
+
+/*****************************************************************************************
+
+  The Following Rules are for Identity Management
+  
+******************************************************************************************/
+
+rule ManageUsers
+  no-loop
+  activation-group "permissions"
+when
+  check: PermissionCheck(target == "seam.user", granted == false)
+  Role(name == "admin")
+then
+  check.grant();
+end
+
+rule ManageRoles
+  no-loop
+  activation-group "permissions"
+when
+  check: PermissionCheck(target == "seam.role", granted == false)
+  Role(name == "admin")
+then
+  check.grant();
+end

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/web.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/web.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5"
+    xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
+           http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+    <display-name>IDM Console Example</display-name>
+    
+   <!-- JSF -->
+
+   <servlet>
+      <servlet-name>Faces Servlet</servlet-name>
+      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>Faces Servlet</servlet-name>
+      <url-pattern>*.jsf</url-pattern>
+   </servlet-mapping>    
+   
+</web-app>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/hashgen.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/hashgen.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/hashgen.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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:s="http://jboss.com/products/seam/taglib">
+
+  <ui:composition template="template.xhtml">
+    <ui:define name="content">
+      <h1>Password Hash Generator</h1>
+      
+      <p>
+        This page uses the methods in JpaIdentityStore to generate password hash values that you can
+        use in your own application's import.sql to create default accounts for your application. 
+      </p>
+      
+      <p>
+        Please note that you must have a property annotated @PasswordSalt for these hash values to work!
+      </p>
+      
+      <h:form>    
+        
+        <div class="formRow">
+          <h:outputLabel for="password">Enter a password</h:outputLabel>
+          <h:inputText id="password" value="#{hashGenerator.password}" required="true" styleClass="wide"/>
+          <div class="validationError"><h:message for="password"/></div>
+        </div>         
+
+        <div class="formRow">
+          <h:outputLabel for="salt">Password salt</h:outputLabel>
+          <h:inputText id="salt" value="#{hashGenerator.passwordSalt}" required="false" styleClass="wide"/>
+          <span>(Leave blank to generate a random salt)</span>
+          <div class="validationError"><h:message for="salt"/></div>
+        </div>         
+        
+        <h:commandButton action="#{hashGenerator.generate}" value="Generate hash"/>                    
+      
+      </h:form>
+      
+      <h2>Results</h2>
+      
+      <div>Generated hash (hex encoded): <pre>#{hashGenerator.passwordHash}</pre></div>
+      
+      <div>Example SQL:<br/><textarea style="width:640px;height:50px">#{hashGenerator.sql}</textarea></div>
+             
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/home.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/home.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/home.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,68 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:ui="http://java.sun.com/jsf/facelets"
+    xmlns:f="http://java.sun.com/jsf/core"
+    xmlns:h="http://java.sun.com/jsf/html">
+        
+  <ui:composition template="/template.xhtml">
+      
+    <ui:define name="content">
+      <div id="contentMain">
+        <h1>Identity Management Console</h1>
+        
+      </div>
+  
+      <div id="contentDivider">
+      </div>
+  
+      <div id="contentSide">
+        <div class="advertising"></div>
+               
+        <h:form id="loginForm" rendered="#{not identity.loggedIn}">
+          <div class="memberLogin">
+            <div class="loginHeader">Member Login</div>
+            
+            <h:messages id="messages" globalOnly="true"/>
+            
+            <div class="loginRow">
+              <h:outputLabel for="name" value="Username" styleClass="loginLabel"/>
+              <h:inputText id="name" value="#{credentials.username}"/>
+            </div>
+            
+            <div class="validationMsg">
+              <h:message for="name"/>
+            </div>
+            
+            <div class="loginRow">
+              <h:outputLabel for="password" value="Password" styleClass="loginLabel"/>
+              <h:inputSecret id="password" value="#{credentials.password}" redisplay="true"/>
+            </div>
+            
+            <div class="validationMsg">
+              <h:message for="password"/>
+            </div>          
+            
+            <div class="loginRow">
+              <h:outputLabel for="rememberMe" value="Remember me" styleClass="loginLabel"/>
+              <h:selectBooleanCheckbox id="rememberMe" value="#{rememberMe.enabled}"/>
+            </div>
+  
+            <div class="buttons">
+              <h:commandButton id="login" value="LOGIN" action="#{identity.login}" styleClass="loginButton"/>
+            </div>
+  
+            <br class="clear"/>
+          
+          </div>
+          
+          <span>Tip: You can log in using <b>demo/demo</b> as the username/password</span>
+        </h:form>
+        
+      </div>
+     
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/images/bg_button.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/images/bg_button.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/images/checkmark.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/images/checkmark.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/images/cross.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/images/cross.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/images/ellipsis.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/images/ellipsis.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/images/no_image.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/images/no_image.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/index.html
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/index.html	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/index.html	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,5 @@
+<html>
+<head>
+  <meta http-equiv="Refresh" content="0; URL=home.jsf">
+</head>
+</html>
\ No newline at end of file

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/profile.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/profile.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/profile.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,123 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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">
+
+  <ui:composition template="template.xhtml">
+    <ui:define name="content">
+      
+      <div class="errors"><h:messages globalOnly="true"/></div>     
+
+      <ui:fragment rendered="#{profileAction.selectedMember == null}">
+        <div>Sorry, but this member does not exist.</div>
+      </ui:fragment>
+    
+      <ui:fragment rendered="#{profileAction.selectedMember != null}">
+        <div id="memberCard">
+          <h1>#{profileAction.selectedMember.memberName}'s profile</h1>
+           
+          <ui:fragment rendered="#{profileAction.selectedMember.picture ne null}">
+            <div id="memberCardPicture">
+              <h:graphicImage value="/content/images?id=#{profileAction.selectedMember.picture.imageId}&amp;width=170"/>
+            </div>
+          </ui:fragment>
+          
+          <div id="memberCardText">
+            <span class="tagline">"#{profileAction.selectedMember.tagline}"</span><br/><br/>
+            #{profileAction.selectedMember.gender.descr}<br/>
+            #{profileAction.selectedMember.age}<br/>
+            #{profileAction.selectedMember.location}<br/>
+          </div>
+          
+          <br style="clear:both"/>
+          
+          View My: 
+          <h:link outcome="/pictures.xhtml" value="Pics">
+            <f:param name="name" value="#{profileAction.selectedMember.memberName}"/>
+          </h:link>            
+        </div>
+               
+        <div id="memberBlog">
+          <div class="sectionHeader">#{profileAction.selectedMember.memberName}'s latest blog entries</div>
+          
+          <ui:repeat value="#{profileAction.latestBlogs}" var="latestBlog">
+            <div class="blogSummary">#{latestBlog.title} 
+              (<h:link outcome="/blogentry.xhtml" value="view more">
+                 <f:param name="name" value="#{profileAction.selectedMember.memberName}"/>
+                 <f:param name="blogId" value="#{latestBlog.blogId}"/>
+               </h:link>)
+            </div>
+          </ui:repeat>            
+          
+          [<h:link id="viewBlog" outcome="/blog.xhtml" value="View all blog entries" propagation="none">
+             <f:param name="name" value="#{profileAction.selectedMember.memberName}"/>
+           </h:link>]
+          
+          <ui:fragment rendered="#{identity.hasPermission(profileAction.selectedMember, 'createBlog')}">
+            <span>
+              [<h:link id="createBlog" action="#{blog.createEntry}" value="Create new blog entry"/>]
+            </span>
+          </ui:fragment>
+        </div>
+        
+        <div id="memberFriends">
+          <div class="sectionHeader">#{profileAction.selectedMember.memberName}'s friends</div>
+          
+          <ui:repeat value="#{profile.friends}" var="f">
+            <div class="friend">
+              
+              <h:link outcome="/profile.xhtml">
+                <f:param name="name" value="#{f.memberName}"/>
+                #{f.memberName}<br/>
+                <h:graphicImage value="/content/images?id=#{f.picture.imageId}&amp;width=90"/>                
+              </h:link>
+              
+            </div>          
+          </ui:repeat>          
+          
+          <br class="clear"/>
+        
+          <ui:fragment rendered="#{profileAction.selectedMember.memberId != authenticatedMember.memberId and identity.hasPermission(selectedMember, 'createFriendRequest')}">
+            <span>
+              [<h:link outcome="/friendrequest.xhtml" action="#{friendAction.createRequest}" value="Send a friend request"/>]
+            </span>
+          </ui:fragment>
+          
+        </div>
+        
+        <div id="friendComments">
+          <div class="sectionHeader">#{profileAction.selectedMember.memberName}'s friend's comments</div>
+          
+	        <ui:repeat value="#{profile.friendComments}" var="c">
+	          <table class="friendComments">
+	            <tr>
+		            <td class="friendCommentor">					        
+					        <h:link outcome="/profile.xhtml">
+					          <f:param name="name" value="#{c.friend.memberName}"/>
+					          #{c.friend.memberName}<br/>
+                        <h:graphicImage value="/content/images?id=#{c.friend.picture.imageId}&amp;width=90"/>
+					        </h:link>
+		            </td>
+		            
+		            <td style="text-align: left">
+                  <b>#{c.formattedCommentDate}</b><br/>
+		              <p><h:outputText value="#{c.comment}"/></p>
+		            </td>	            
+	            </tr>
+	          </table>	          	          
+	        </ui:repeat>            
+          
+          <ui:fragment rendered="#{identity.hasPermission(profileAction.selectedMember, 'createFriendComment')}">
+            <span>
+              [<h:link outcome="/friendcomment.xhtml" value="Add Comment"/>]
+            </span>          
+          </ui:fragment>
+        </div>
+        
+      </ui:fragment>            
+          
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/register.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/register.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/register.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,103 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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:s="http://jboss.com/products/seam/taglib"
+    xmlns:rich="http://richfaces.org/rich">
+
+  <ui:composition template="template.xhtml">
+    <ui:define name="content">
+      <div id="contentMain">
+        <div class="errors"><h:messages globalOnly="true"/></div> 
+        
+        <p>
+          Already a member? <s:link view="/home.seam" value="Click here to log in" propagation="none"/>
+        </p>        
+        
+        <div id="register">
+          <div class="registerHeader">
+            JOIN SEAMSPACE HERE!
+          </div>
+                   
+          <h:form styleClass="register">
+            <s:validateAll>
+              <div class="formRow">
+                <h:outputLabel for="email">Email address<em>*</em></h:outputLabel>
+                <h:inputText id="email" value="#{register.member.email}" required="true" styleClass="wide"/>
+                <div class="validationError"><h:message for="email"/></div>
+              </div>
+
+              <div class="formRow">
+                <h:outputLabel for="firstName">First name<em>*</em></h:outputLabel>
+                <h:inputText id="firstName" value="#{register.member.firstName}" required="true"/>
+                <div class="validationError"><h:message for="firstName"/></div>
+              </div>
+              
+              <div class="formRow">
+                <h:outputLabel for="lastName">Last name<em>*</em></h:outputLabel>
+                <h:inputText id="lastName" value="#{register.member.lastName}" required="true"/>
+                <div class="validationError"><h:message for="lastName"/></div>
+              </div>    
+              
+              <div class="formRow">
+                <h:outputLabel for="memberName">Nick name<em>*</em></h:outputLabel>
+                <h:inputText id="memberName" value="#{register.member.memberName}" required="true"/>
+                <div class="validationError"><h:message for="memberName"/></div>
+              </div>
+              
+              <div class="formRow">
+                <h:outputLabel for="username">Username<em>*</em></h:outputLabel>
+                <h:inputText id="username" value="#{register.username}" required="true"/>
+                <div class="validationError"><h:message for="username"/></div>
+              </div>
+              
+              <div class="formRow">
+                <h:outputLabel for="password">Password<em>*</em></h:outputLabel>
+                <h:inputSecret id="password" value="#{register.password}" required="true"/>
+                <div class="validationError"><h:message for="password"/></div>
+              </div>   
+              
+              <div class="formRow">
+                <h:outputLabel for="confirmPassword">Confirm password<em>*</em></h:outputLabel>
+                <h:inputSecret id="confirmPassword" value="#{register.confirm}" required="true"/>
+                <div class="validationError"><h:message for="confirmPassword"/></div>
+              </div>         
+              
+              <div class="formRow">
+                <h:outputLabel for="gender">Gender<em>*</em></h:outputLabel>
+                <h:selectOneRadio id="gender" value="#{register.gender}" required="true">
+                  <f:selectItem itemValue="Male" itemLabel="Male" />
+                  <f:selectItem itemValue="Female" itemLabel="Female" />
+                </h:selectOneRadio>
+                <div class="validationError"><h:message for="gender"/></div>
+              </div>                                                   
+
+              <div class="formRow">
+                <h:outputLabel for="dob">Date of birth<em>*</em></h:outputLabel>
+               	<rich:calendar id="dob" value="#{register.member.dob}" required="true" datePattern="MM/dd/yyyy" buttonIcon="images/ellipsis.png" />
+                <div class="validationError"><h:message for="dob"/></div>
+              </div>           
+              
+              <div class="formRow">
+                <h:outputLabel for="verifyCaptcha"><h:graphicImage value="/seam/resource/captcha"/><em>*</em></h:outputLabel>
+                <h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true"/>
+                <div class="validationError"><h:message for="verifyCaptcha"/></div>
+              </div>
+              
+            </s:validateAll>
+            
+            <div class="buttons">
+              <h:commandButton value="Next" action="#{register.next}" styleClass="registerButton"/>            
+            </div>
+          
+          </h:form>
+          
+          <br class="clear"/>
+        </div>
+      </div>
+     
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/register2.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/register2.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/register2.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:ui="http://java.sun.com/jsf/facelets"
+    xmlns:h="http://java.sun.com/jsf/html"
+    xmlns:s="http://jboss.com/products/seam/taglib">
+
+  <ui:composition template="template.xhtml">
+    <ui:define name="content">
+      <div id="contentMain">
+        <div class="errors"><h:messages globalOnly="true"/></div> 
+        
+        <div id="register">
+          <div class="registerHeader">
+            JOIN SEAMSPACE HERE!
+          </div>
+          
+          <h:form styleClass="register" enctype="multipart/form-data">
+            <s:validateAll>
+              
+              <div class="formRow">
+                <h:outputLabel for="picture">Member photo</h:outputLabel>
+                <s:fileUpload id="picture" data="#{register.picture}" accept="image/png"
+                              contentType="#{register.pictureContentType}" />
+                <div class="validationError"><h:message for="picture"/></div>
+              </div>               
+
+            </s:validateAll>
+            
+            <div class="buttons">
+              <h:commandButton value="Upload" action="#{register.uploadPicture}" styleClass="registerButton"/>            
+            </div>
+          
+          </h:form>
+          
+          <br class="clear"/>
+        </div>
+      </div>
+     
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/roledetail.page.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/roledetail.page.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/roledetail.page.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,9 @@
+<page xmlns="http://jboss.com/products/seam/pages"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
+    <navigation from-action="#{roleAction.save}">
+        <rule if-outcome="success">
+            <redirect view-id="/rolemanager.xhtml"/>
+        </rule>
+    </navigation>
+</page>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/roledetail.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/roledetail.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/roledetail.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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:rich="http://richfaces.org/rich"       
+    xmlns:s="http://jboss.com/products/seam/taglib">
+
+  <ui:composition template="template.xhtml">
+  
+    <ui:define name="head">
+      <link href="style/security.css" rel="stylesheet" type="text/css"/>
+    </ui:define>  
+   
+    <ui:define name="content">
+        
+      <div id="contentMain">
+
+  	    <h2>Role Details</h2>  
+  	    
+  	    <h:messages globalOnly="true"/>
+  	    
+  	    <h:form id="role">
+              
+          <div class="formRow">
+            <h:outputLabel for="role" value="Role" styleClass="formLabel"/>
+            <h:inputText id="name" value="#{roleAction.role}" readonly="#{identityManager.userExists(roleAction.role)}"/>
+            <div class="validationError"><h:message for="role"/></div>
+          </div>              
+
+          <div class="formRow">            
+            <h:outputLabel for="groups" value="Member of" styleClass="formLabel"/>
+            <div class="selectMany">
+              <h:selectManyCheckbox id="roles" value="#{roleAction.groups}" layout="pageDirection" styleClass="roles">
+                <s:selectItems value="#{roleAction.assignableRoles}" var="role" label="#{role}"/>
+              </h:selectManyCheckbox>
+            </div>
+            <div class="validationError"><h:message for="groups"/></div>            
+          </div>
+          
+          <div class="formButtons">
+            <h:commandButton id="save" value="Save" action="#{roleAction.save}" styleClass="formButton"/>
+            <s:button id="cancel" view="/rolemanager.xhtml" value="Cancel" propagation="end" styleClass="formButton"/>
+          </div>
+    
+          <br class="clear"/>
+  	    
+  	    </h:form>
+
+	    </div>
+	    
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/rolemanager.page.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/rolemanager.page.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/rolemanager.page.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,14 @@
+<page xmlns="http://jboss.com/products/seam/pages"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"
+    action="#{roleSearch.loadRoles}">
+  <restrict>#{s:hasPermission('seam.role', 'read')}</restrict>    
+  
+  <navigation from-action="#{roleAction.createRole}">
+    <redirect view-id="/roledetail.xhtml"/>
+  </navigation>
+  
+  <navigation from-action="#{roleAction.editRole(roleSearch.selectedRole)}">
+    <redirect view-id="/roledetail.xhtml"/>
+  </navigation>          
+</page>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/rolemanager.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/rolemanager.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/rolemanager.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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:s="http://jboss.com/products/seam/taglib">
+
+  <ui:composition template="template.xhtml">
+   
+    <ui:define name="head">
+      <link href="style/security.css" rel="stylesheet" type="text/css"/>
+    </ui:define>   
+   
+    <ui:define name="content">
+        
+      <script type="text/javascript">
+        function confirmDelete() {
+          return confirm("Are you sure you wish to delete this role? This action cannot be undone.");
+        }
+      </script>
+
+      <div id="contentMain">
+
+  	    <h2>Role Manager</h2>  
+  	    
+        <h:button id="newRole" action="#{roleAction.createRole}" styleClass="newrole" rendered="#{identity.hasPermission('seam.account', 'create')}"/>
+  	    
+        <h:dataTable 
+            id="threads"
+            value="#{roles}" 
+            var="role" 
+            styleClass="security"
+            cellspacing="0"
+            headerClass="header"
+            rowClasses="odd,even"
+            columnClasses=",,action">
+          <h:column width="auto">
+            <f:facet name="header">Role</f:facet>
+            #{role}
+          </h:column>
+          <h:column id="roles" width="auto">
+            <f:facet name="header">Member Of</f:facet>
+            #{roleSearch.getRoleGroups(role)}
+          </h:column>
+          <h:column width="auto">
+            <f:facet name="header">Action</f:facet>          
+            <s:fragment rendered="#{identity.hasPermission('seam.role', 'update')}">
+              <s:link id="edit" value="Edit" action="#{roleAction.editRole(roleSearch.selectedRole)}"/><span> | </span>
+            </s:fragment>
+            <s:link id="delete" value="Delete" action="#{identityManager.deleteRole(roleSearch.selectedRole)}"
+                    rendered="#{identity.hasPermission('seam.role', 'delete')}"
+                    onclick="return confirmDelete()"/>              
+          </h:column>
+  	    </h:dataTable>
+	    </div>
+	    
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/security.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/security.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/security.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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:s="http://jboss.com/products/seam/taglib">
+
+  <ui:composition template="template.xhtml">
+   
+    <ui:define name="head">
+      <link href="style/security.css" rel="stylesheet" type="text/css"/>
+    </ui:define>
+   
+    <ui:define name="content">
+
+      <div id="contentMain">
+
+  	    <h2>Security</h2>  
+  	    
+        <h:button id="manageUsers" outcome="/usermanager.xhtml" styleClass="manageusers" value="Manage Users"/><br/>
+        <h:button id="manageRoles" outcome="/rolemanager.xhtml" styleClass="manageroles" value="Manage Roles"/>  	    
+
+	    </div>
+	    
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/security_error.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/security_error.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/security_error.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:ui="http://java.sun.com/jsf/facelets"
+    xmlns:h="http://java.sun.com/jsf/html"
+    xmlns:s="http://jboss.com/products/seam/taglib">
+
+  <ui:composition template="template.xhtml">
+    <ui:define name="content">
+      
+      <h1>A Security Error has occurred</h1>
+      
+      <div class="errors"><h:messages globalOnly="true"/></div>                      
+          
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/advertising.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/advertising.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newpermission.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newpermission.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newrole.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newrole.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newuser.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/btn_newuser.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/cal-next.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/cal-next.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/cal-prev.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/cal-prev.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/date.css
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/style/date.css	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/style/date.css	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,185 @@
+div.seam-date 
+{
+  margin-top: 5px;
+  border: 1px solid #AAAAAA;
+  background: #fff url(../img/input.bg.gif) 0 0 repeat-x;
+  background-color: #FFFFFF;  
+  color: #505050;
+  font-family: Tahoma, Arial, Helvetica, sans-serif;
+  font-size: 12px;
+}
+
+table.seam-date td {
+  font-family: Tahoma, Arial, Helvetica, sans-serif;
+  font-weight: 11px; 
+}
+
+.seam-date-monthNames
+{
+  width: 70px;
+  border: 1px solid #dddddd;
+  border-right: 3px solid #444444;
+  border-bottom: 3px solid #444444;
+  background-color: #ffffff; 
+  font-size: 12px;
+  cursor: pointer;	
+  font-family: Tahoma, Arial, Helvetica, sans-serif;
+  font-weight: normal;
+}
+
+a.seam-date-monthNameLink, a.seam-date-monthNameLink:visited
+{
+  text-align: center;
+  display: block;
+  color: #555555;  
+}
+
+a.seam-date-monthNameLink:hover
+{ 
+  background-color: #CCCCCC;
+  color: red;  
+}
+
+.seam-date-years
+{
+  height: 10em;
+  overflow: auto;
+  width: 60px;
+  border: 1px solid #dddddd;
+  border-right: 3px solid #444444;
+  border-bottom: 3px solid #444444;
+  background-color: #ffffff; 
+  font-size: 12px;
+  cursor: pointer;	
+  font-family: Tahoma, Arial, Helvetica, sans-serif;
+  font-weight: normal;
+}
+
+a.seam-date-yearLink, a.seam-date-yearLink:visited
+{
+  text-align: center;
+  display: block;
+  color: #555555;    
+}
+
+a.seam-date-yearLink:hover
+{
+  background-color: #CCCCCC;
+  color: red;    
+}  
+
+tr.seam-date-header
+{
+  padding: 2px 0px 2px 0px;
+}
+  
+td.seam-date-header
+{
+  padding: 0px 8px 0px 8px;
+  text-align: center;
+  color: gray;
+  font-family: Tahoma, Arial, Helvetica, sans-serif;
+  font-weight: bold;
+  font-size: 12px;  
+}
+
+td.seam-date-header-prevMonth
+{
+  background-image: url("cal-prev.png");
+  background-repeat: no-repeat;
+  background-position: center;
+  padding: 0px 2px 0px 2px;
+  width: 17px;
+  height: 16px;
+  margin-left: 2px;
+}
+
+td.seam-date-header-nextMonth
+{
+  background-image: url("cal-next.png");
+  background-repeat: no-repeat;
+  background-position: center;
+  padding: 0px 2px 0px 2px;
+  width: 17px;
+  height: 16px;
+  margin-right: 2px;
+}
+
+tr.seam-date-headerDays
+{
+  color: white;
+  font-weight: normal;
+}
+
+tr.seam-date-headerDays > td
+{
+  background-color: #CCCCCC;
+  border: 1px solid #AAAAAA;
+  color: white;
+  text-align: center;
+  width: 26px;   
+}
+
+tr.seam-date-footer
+{
+  background-color: white; 
+  color: #505050;
+  font-weight: bold;
+}
+
+tr.seam-date-footer > td
+{
+  text-align: center;
+}
+
+td.seam-date-inMonth
+{
+  background-color: white; 
+  color: black;
+  font-weight: normal;
+  cursor: pointer;
+  border: 1px solid #ece9d8;
+}
+
+td.seam-date-outMonth
+{
+  background-color: white; 
+  color: #999999;
+  font-weight: normal;
+  cursor: pointer;
+  border: 1px solid #ece9d8;
+}
+
+td.seam-date-selected
+{
+  background-color: #CCCCCC;        
+  border: 1px solid #AAAAAA; 
+  color: black;
+  font-weight: normal;
+}
+
+td.seam-date-dayOff-inMonth
+{
+  background-color: #efefef;
+  color: black;
+  font-weight: normal;
+  cursor: pointer;
+  border: 1px solid #ece9d8;
+}
+
+td.seam-date-dayOff-outMonth
+{
+  background-color: #efefef;
+  color: #999999;
+  font-weight: normal;
+  cursor: pointer;
+  border: 1px solid #ece9d8;
+}
+
+td.seam-date-hover 
+{
+  background-color: #CCCCCC;
+  border: 1px solid #AAAAAA;
+  cursor: pointer;
+  color: red;
+}
\ No newline at end of file

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/divider.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/divider.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/manage_roles.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/manage_roles.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/manage_users.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/manage_users.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/padlock.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/padlock.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/seamspace.css
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/style/seamspace.css	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/style/seamspace.css	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,600 @@
+body {
+  font-family: verdana, arial, sans-serif, helvetica;
+  background-color: #e5e5e5;
+  font-size:11px;
+  margin: 0;
+}
+
+h1, h2, h3 {
+  margin-top: 2px;
+  margin-bottom: 6px;
+}
+
+#header {
+  margin-left: auto;
+  margin-right: auto;
+  background: url(seamspace.png) left top no-repeat;
+  height: 100px;
+  width: 800px;
+  background-color: #003399;
+}
+
+#menubar {
+  margin-left: auto;
+  margin-right: auto;
+  overflow: none;
+  height: 17px;
+  width: 800px;
+  background-color: #5a8cc0;
+  text-align: center;
+  padding-top: 3px;
+}
+
+#content {
+  padding-top: 10px;
+  margin-left: auto;
+  margin-right: auto;
+  width: 800px;
+  background-color: #ffffff;
+  min-height: 800px;
+}
+
+#content a, #content a:visited {
+  font-weight: bold;
+  color: #003399;
+}
+
+#content a:hover {
+  font-weight: bold;
+  color: #7799dd;
+}
+
+#contentMain {
+  float: left;
+  width: 430px;
+  margin-left: 10px;
+  margin-top: 10px;
+}
+
+#contentDivider {
+  float: left;
+  background: url(divider.png) repeat-y top left;
+  height: 100%;
+  width: 10px;
+}
+
+#contentSide {
+  float: left;
+  width: 310px;
+  margin-left: 10px;
+  margin-top: 10px;
+  margin-right: 10px;
+}
+
+#memberCard {
+  width: 350px;
+  float: left;
+  margin-left: 10px;
+  border: 2px solid #eeeeee;
+  background-color: #f5f5f5;
+  padding: 2px;
+}
+
+#memberCardPicture {
+  width: 170px;
+  float: left;
+}
+
+#memberCardText {
+  width: 170px;
+  float: right;
+}
+
+#memberBlog {
+  width: 400px;
+  float: right;
+  margin-right: 10px;
+  border: 2px solid #eeeeee;
+  padding: 2px;
+}
+
+#blogMemberCard {
+  width: 140px;
+  float: left;
+  margin-left: 10px;
+  border: 2px solid #eeeeee;
+  background-color: #f5f5f5;
+  padding: 2px;
+  text-align: center;
+}
+
+#blog {
+  float: right;
+  width: 600px;
+  margin-right: 10px;
+  padding: 2px;  
+}
+
+#memberFriends {
+  width: 400px;
+  float: right;
+  margin-right: 10px;
+  margin-top: 12px;
+  border: 2px solid #eeeeee;
+  padding: 2px;
+}
+
+div.friend {
+  float: left;
+  width: 99px;
+  text-align: center;
+}
+
+#friendComments {
+  width: 400px;
+  float: right;
+  margin-right: 10px;
+  margin-top: 12px;
+  border: 2px solid #eeeeee;
+  padding: 2px;
+}
+
+table.friendComments {
+  width: 100%;
+}
+
+table.friendComments td {
+  border: 1px solid #dddddd;
+  background-color: #eeeeee;
+  text-align: center;
+  vertical-align: top;
+}
+
+td.friendCommentor {
+  width: 100px;
+}
+
+div.friendRequest {
+  background-color: #bbddff;
+  width: 600px;
+  float: right;
+  margin-right: 10px;
+  border: 2px solid #eeeeee;
+  padding: 4px;
+}
+
+div.friendRequest textarea {
+  font-family: verdana, arial, sans-serif, helvetica;
+  font-size:11px;
+  margin: 4px 12px 8px 0px;
+  width: 560px;
+  height: 120px;
+}
+
+div.blogSummary {
+  padding: 0px 2px 4px 2px;
+  margin-bottom: 8px;
+}
+
+div.blogEntry {
+  background-color: #bbddff;
+  padding: 8px 8px 8px 8px;
+  margin-bottom: 12px;
+}
+
+div.blogEntry label {
+  font-weight: bold;
+}
+
+div.blogEntry input.title {
+  width: 560px;
+}
+
+div.blogEntry textarea {
+  font-family: verdana, arial, sans-serif, helvetica;
+  font-size:11px;
+  margin: 4px 12px 8px 0px;
+  width: 560px;
+  height: 120px;
+}
+
+div.blogDate {
+  font-weight: bold;
+  margin-bottom: 8px;
+}
+
+div.blogTitle {
+  font-weight: bold;
+  margin-left: 24px;
+  margin-bottom: 8px;
+}
+
+div.blogText {
+  margin-left: 24px;
+  margin-bottom: 8px;
+  text-align: justify;
+}
+
+div.blogFooter {
+  margin-bottom: 8px;
+}
+
+table.blogComment {
+  margin-bottom: 2px;
+  width: 100%;
+}
+
+td.blogCommentor {
+  width: 160px;
+  background-color: #ff9933;
+  text-align: center;
+  vertical-align: top;
+}
+
+td.blogCommentText {
+  background-color: #ffddbb;
+  padding: 12px 4px 4px 8px;
+}
+
+div.commentEntry {
+  background-color: #ff9933;
+  padding: 4px 4px 4px 4px;
+}
+
+div.commentEntry label {
+  font-weight: bold;
+  color: #ffffff;
+  margin-bottom: 4px;
+}
+
+div.commentEntry textarea {
+  font-family: verdana, arial, sans-serif, helvetica;
+  font-size:11px;
+  margin: 8px 12px 8px 6px;
+  width: 560px;
+  height: 120px;
+}
+
+div.buttons {
+  float: right;
+}
+
+input.action {
+  display: inline;
+  margin-right: 8px;
+  margin-top: 4px;
+  margin-bottom: 4px;  
+  border: 1px solid #003399;
+  background-color: #ffffff;
+  color: #003399;
+  font-size: 10px;
+  padding: 3px 8px 3px 8px;
+}
+
+div.headerRight {
+  float: right;
+  width: 440px;
+  padding-right: 4px;
+  padding-top: 4px;
+}
+
+div.headerMenu {
+  float: right;
+}
+
+div.advertising {
+  background: url(advertising.png) no-repeat top left;
+  width: 307px;
+  height: 86px;  
+}
+
+div.sectionHeader {
+  font-weight: bold;
+  font-size: normal;
+  background-color: #eeeeee;
+  padding: 2px 2px 2px 2px;
+  margin-bottom: 12px;
+}
+
+span.tagline {
+  font-style: italic;
+}
+
+a, a:visited, a:hover {
+  color: #ffffff;
+  text-decoration: none;
+  padding-left: 2px;
+  padding-right: 2px;
+}
+
+#header a:hover {
+  text-decoration: underline;
+}
+
+#search {
+  margin-top: 2px;
+}
+
+#search a:hover {
+  margin-bottom: 4px;
+  text-decoration: none;
+}
+
+input.searchField {
+  width: 290px;
+}
+
+input.searchButton {
+  width: 140px;
+}
+
+#menubar a:hover {
+  color: #003399;
+  text-decoration: underline;
+}
+
+div.memberLogin {
+  margin-top: 16px;
+  width: 300px;
+  border: 1px solid #003399;
+  padding: 0px;
+}
+
+div.loginHeader {
+  color: #ffffff;
+  font-weight: bold;
+  background-color: #003399;
+  height: 18px;
+  padding: 2px 2px 2px 2px;
+}
+
+div.newMembers {
+  width: 300px;
+  margin-top: 8px;
+  border: 1px solid #ffcc99;
+}
+
+div.newMembersHeader {
+  font-weight: bold;
+  background-color: #ffcc99;
+  height: 18px;
+  padding: 2px 2px 2px 2px;
+}
+
+div.newMember {
+  float: left;
+  width: 99px;
+  text-align: center;
+}
+
+div.newMember img {
+  border: none;
+}
+
+div.loginRow {
+  padding-top: 2px;
+  padding-bottom: 2px;
+}
+
+label.loginLabel {
+  float: left;
+  width: 100px; 
+  padding: 2px 2px 2px 2px;
+}
+
+div.buttons {
+  float: right;
+  margin-right: 60px;  
+}
+
+input.loginButton {
+  display: inline;
+  margin-right: 8px;
+  margin-top: 4px;
+  margin-bottom: 4px;  
+  border: 1px solid #003399;
+  background-color: #ffffff;
+  color: #003399;
+  font-size: 10px;
+  padding: 3px 8px 3px 8px;
+}
+
+input.registerButton {
+  display: inline;
+  margin-top: 4px;
+  margin-bottom: 4px;
+  border: 1px solid #ffa76d;
+  background-color: #ff6600;
+  color: #ffffff;
+  font-size: 10px;
+  padding: 3px 8px 3px 8px;
+}
+
+div.loginRow input[type='text'], div.loginRow input[type='password'] {
+  width: 180px;
+}
+
+.clear {
+	clear: both;
+	font-size: 0px;
+}
+
+.divider {
+  color: #aaaaaa;
+}
+
+div.errors {
+  color: #ff0000;
+  font-weight: bold;
+  font-size: normal;
+}
+
+div.errors ul {
+  list-style: none;
+}
+
+#register {
+  float: left;
+  width: 400px;
+  border: 1px solid #5a8cc0;
+}
+
+div.registerHeader {
+  font-size: normal;
+  font-weight: bold;
+  color: #ffffff;
+  background-color: #5a8cc0;
+  padding: 8px 4px 8px 12px;
+}
+
+form.register label {
+  float: left;
+  display: block;
+  vertical-align: top;
+  width: 120px;  
+  margin-top: 2px;
+}
+
+form.register input.wide {
+  width: 240px;
+}
+
+form.register em {
+  font-size: normal;
+  font-weight: bold;
+  color: #ff0000;
+}
+
+form.register div.validationError {
+  margin-left: 120px;
+  font-weight: bold;
+  color: #ff0000;
+}
+
+img.ellipsis {
+  width: 18px;
+  height: 18px;
+  border: none;
+  margin-bottom: 2px;
+  margin-left: 2px;
+  vertical-align: bottom;
+  cursor: pointer;
+}
+
+div.seam-date {
+  background-color: #ffffff;
+  border: 1px solid #5a8cc0;
+}
+
+td.seam-date-hover {
+  background-color: #5a8cc0;
+  color: #ffffff;
+  cursor: pointer;
+}
+
+quote {
+  border: 1px solid #fac289;
+  margin: 4px 8px 4px 8px;
+  padding: 12px 12px 12px 12px;
+  background-color: #fbf4ec;
+  display: block;
+}
+
+/* General form styles */
+
+div.formRow {
+  padding: 3px 4px 3px 2px;  
+  clear: both;
+}
+
+div.formRow label {
+  float: left;
+  width: 120px; 
+  padding: 2px 2px 2px 2px;
+}
+
+div.formRow input[type='text'] {
+  width: 120px;
+}
+
+div.formRow input[type='password'] {
+  width: 120px;
+}
+
+div.validationError {
+  margin-left: 120px;
+  font-weight: bold;
+  color: #ff0000;
+}
+
+.roles {
+  width: 120px;
+  border: 1px solid #7F9DB9;
+  background-color: #E7EDF7;
+}
+
+div.selectMany label {
+  float: none;
+}
+
+.formButton {
+  background: url(../images/bg_button.png) top left repeat-x;
+  border: 1px solid #003399;
+  font-size: small;
+  font-weight: bold;
+  color: #000000; 
+  margin-right: 8px;
+  padding-left: 4px;
+  padding-right: 4px;
+}
+
+div.formButtons {
+  float: right;
+  padding: 4px 8px 16px 2px;
+}
+
+div.memberPictures {
+  float: right;
+  width: 600px;
+  margin-right: 10px;
+  padding: 2px;  
+  background-color: #000000;
+  border: 1px solid #aaaaaa;
+  padding: 8px 8px 8px 8px;
+}
+
+div.memberPictureCard {
+  width: 140px;
+  float: left;
+  margin-left: 10px;
+  border: 2px solid #eeeeee;
+  background-color: #f5f5f5;
+  padding: 2px;
+  text-align: center;
+}
+
+div.thumbnail {
+  width: 110px;
+  background-color: #333333;
+  padding: 10px 10px 10px 10px;
+  margin: 8px 8px 8px 8px;
+  float: left;
+  text-align: center;
+}
+
+input.padlock {
+  background: url(padlock.png) top left no-repeat;
+  width: 14px;
+  height: 20px;
+  float: left;
+  border: 0px;
+  margin-left: 10px;
+}
+
+input.trash {
+  background: url(trash.png) top left no-repeat;
+  width: 20px;
+  height: 20px; 
+  float: left;
+  border: 0px;  
+}
\ No newline at end of file

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/seamspace.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/seamspace.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/security.css
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/style/security.css	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/style/security.css	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,126 @@
+input.newuser {
+  background: url(btn_newuser.png) top left no-repeat;
+  height: 39px;
+  width: 113px;
+  margin: 4px 4px 4px 4px;
+  border: 0px;
+  cursor: pointer;  
+}
+
+input.newrole {
+  background: url(btn_newrole.png) top left no-repeat;
+  height: 39px;
+  width: 113px;
+  margin: 4px 4px 4px 4px;
+  border: 0px;
+  cursor: pointer;  
+}
+
+input.newpermission {
+  background: url(btn_newpermission.png) top left no-repeat;
+  height: 39px;
+  width: 113px;
+  margin: 4px 4px 4px 4px;
+  border: 0px;
+  cursor: pointer;  
+}
+
+input.manageusers {
+  display: block;
+  background: url(manage_users.png) top left no-repeat;
+  height: 88px;
+  width: 300px;
+  padding-left: 10px;
+  font-size: 19px;
+  font-weight: bold;
+  color: #333333;
+  border: 0px;
+  cursor: pointer;
+  margin-top: 20px;
+  margin-left: 20px;
+}
+
+input.manageroles {
+  display: block;
+  background: url(manage_roles.png) top left no-repeat;
+  height: 88px;
+  width: 300px;
+  padding-left: 10px;
+  font-size: 19px;
+  font-weight: bold;
+  color: #333333;
+  border: 0px;
+  cursor: pointer;  
+  margin-top: 20px;
+  margin-left: 20px;
+}
+
+.roles {
+  width: 120px;
+  border: 1px solid #7F9DB9;
+  background-color: #E7EDF7;
+}
+
+div.selectMany label {
+  float: none;
+}
+
+.formButton {
+  background: url(../images/bg_button.png) top left repeat-x;
+  border: 1px solid #003399;
+  font-size: small;
+  font-weight: bold;
+  color: #000000; 
+  margin-right: 8px;
+  padding-left: 4px;
+  padding-right: 4px;
+}
+
+div.formButtons {
+  float: right;
+  padding: 4px 8px 16px 2px;
+}
+
+div.checkmark {
+  background: url(../images/checkmark.png) top left no-repeat;
+  width: 14px;
+  height: 15px;
+  margin-left: auto;
+  margin-right: auto;    
+}
+
+div.cross {
+  background: url(../images/cross.png) top left no-repeat;
+  width: 14px;
+  height: 15px;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+table.security {
+  border: 1px solid black;
+  width: 500px;
+}
+
+th.header {
+  background: url(table_header.png) top left repeat-x;
+  color: #ffffff;
+  padding-top: 3px;
+  padding-bottom: 3px;
+}
+
+tr.odd {
+  background-color: #ffffff;
+}
+
+tr.even {
+  background-color: #E9F5FF;
+}
+
+td.enabled {
+  text-align: center;
+}
+
+td.action {
+  text-align: right;
+}
\ No newline at end of file

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/table_header.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/table_header.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/style/trash.png
===================================================================
(Binary files differ)


Property changes on: modules/security/trunk/examples/idmconsole/src/main/webapp/style/trash.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/template.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/template.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/template.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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">
+
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+    <title>SeamSpace</title>
+    <link href="style/seamspace.css" rel="stylesheet" type="text/css"/>
+    <link href="style/date.css" rel="stylesheet" type="text/css"/>
+    <ui:insert name="head"/>
+  </head>
+  
+  <body>
+  
+    <div id="header">
+      <div class="headerRight">
+        <div class="headerMenu">
+
+          <h:form>  
+            <ui:fragment rendered="#{identity.loggedIn}">
+              <h:link id="profile" outcome="/profile.xhtml" value="My Profile" propagation="none">
+                <f:param name="name" value="#{authenticatedMember.memberName}"/>
+              </h:link>
+              <h:outputText styleClass="divider" value=" | "/>
+            </ui:fragment>
+    
+            <ui:fragment rendered="#{identity.hasRole('admin')}">
+              <h:link id="security" outcome="/security.xhtml" value="Security" propagation="none"/>
+              <h:outputText styleClass="divider" value=" | "/>
+            </ui:fragment>
+            
+            <h:commandLink id="logout" action="#{identity.logout}" value="Log out" rendered="#{identity.loggedIn}"/>
+           
+            <h:outputLink id="login" value="home.seam" rendered="#{not identity.loggedIn}">Log in</h:outputLink>
+          </h:form>
+        </div>
+        <br style="clear:both"/>
+        <h:form>
+          <div>
+            <a href="#">SeamSpace</a><h:outputText styleClass="divider" value=" | "/>
+            <a href="#">People</a><h:outputText styleClass="divider" value=" | "/>
+            <a href="#">Music</a><h:outputText styleClass="divider" value=" | "/>
+            <a href="#">Blogs</a>
+          </div>
+          <div id="search">
+            <h:inputText type="text" styleClass="searchField"/>
+            <h:commandButton value="Search SeamSpace" onclick="javascript:alert('This feature coming soon!');return false" styleClass="searchButton"/>
+          </div>
+        </h:form>
+      </div>
+    </div>
+    
+    <div id="menubar">
+      <h:link outcome="/home.xhtml" value="Home"/><h:outputText styleClass="divider" value=" | "/>
+      <h:link value="Browse" onclick="javascript:alert('This feature coming soon!');return false"/><h:outputText styleClass="divider" value=" | "/>
+      <h:link value="Blog" onclick="javascript:alert('This feature coming soon!');return false"/><h:outputText styleClass="divider" value=" | "/>
+      <h:link value="Music" onclick="javascript:alert('This feature coming soon!');return false"/>
+    </div>
+  
+    <div id="content">
+      <ui:insert name="content"/>
+    </div>
+     
+  </body>
+</html>
+

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/test.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/test.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/test.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:h="http://java.sun.com/jsf/html"
+   xmlns:ui="http://java.sun.com/jsf/facelets">
+   <h:head>
+      <title>Java EE 6 Starter Application</title>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />      
+   </h:head>
+   <h:body>
+      <h:outputLabel value="Hello World!"/>
+   </h:body>
+</html>
\ No newline at end of file

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/userdetail.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/userdetail.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/userdetail.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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">
+
+  <ui:composition template="template.xhtml">
+  
+    <ui:define name="head">
+      <link href="style/security.css" rel="stylesheet" type="text/css"/>
+    </ui:define>  
+   
+    <ui:define name="content">
+        
+      <div id="contentMain">
+
+  	    <h2>User Details</h2>  
+  	    
+  	    <h:messages globalOnly="true"/>
+  	    
+  	    <h:form id="user">
+  	    
+          <div class="formRow">
+            <h:outputLabel for="firstname" value="First name" styleClass="formLabel"/>
+            <h:inputText id="firstname" value="#{userAction.firstname}"/>
+            <div class="validationError"><h:message for="firstname"/></div>
+          </div>  
+          
+          <div class="formRow">
+            <h:outputLabel for="lastname" value="Last name" styleClass="formLabel"/>
+            <h:inputText id="lastname" value="#{userAction.lastname}"/>
+            <div class="validationError"><h:message for="lastname"/></div>
+          </div>            
+              
+          <div class="formRow">
+            <h:outputLabel for="username" value="Username" styleClass="formLabel"/>
+            <h:inputText id="username" value="#{userAction.username}"/>
+            <div class="validationError"><h:message for="username"/></div>
+          </div>              
+
+          <div class="formRow">
+            <h:outputLabel for="password" value="Password" styleClass="formLabel"/>
+            <h:inputSecret id="password" value="#{userAction.password}"/>
+            <div class="validationError"><h:message for="password"/></div>
+          </div>              
+          
+          <div class="formRow">
+            <h:outputLabel for="confirm" value="Confirm password" styleClass="formLabel"/>
+            <h:inputSecret id="confirm" value="#{userAction.confirm}"/>
+          </div>                        
+              
+          <div class="formRow">            
+            <h:outputLabel for="roles" value="Member of" styleClass="formLabel"/>
+            <div class="selectMany">
+              <h:selectManyCheckbox id="roles" value="#{userAction.roles}" layout="pageDirection" styleClass="roles">
+                <f:selectItems value="#{identityManager.grantableRoles}" var="role" label="#{role}"/>
+              </h:selectManyCheckbox>
+            </div>
+            <div class="validationError"><h:message for="roles"/></div>            
+          </div>
+          
+          <div class="formRow">
+            <h:outputLabel for="enabled" value="Account enabled" styleClass="formLabel"/>
+            <h:selectBooleanCheckbox id="enabled" value="#{userAction.enabled}"/>
+          </div>   
+                                      
+          <div class="formButtons">
+            <h:commandButton id="save" value="Save" action="#{userAction.save}" styleClass="formButton"/>
+            <h:button id="cancel" outcome="/usermanager.xhtml" action="#{conversation.end}" value="Cancel" styleClass="formButton"/>
+          </div>
+    
+          <br class="clear"/>
+  	    
+  	    </h:form>
+
+	    </div>
+	    
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/usermanager.page.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/usermanager.page.xml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/usermanager.page.xml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,14 @@
+<page xmlns="http://jboss.com/products/seam/pages"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"
+    action="#{userSearch.loadUsers}">
+  <restrict>#{s:hasPermission('seam.user', 'read')}</restrict>    
+  
+  <navigation from-action="#{userAction.createUser}">
+    <redirect view-id="/userdetail.xhtml"/>
+  </navigation>
+  
+  <navigation from-action="#{userAction.editUser(userSearch.selectedUser)}">
+    <redirect view-id="/userdetail.xhtml"/>
+  </navigation>      
+</page>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/usermanager.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/usermanager.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/usermanager.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,76 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html 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">
+
+  <ui:composition template="template.xhtml">
+  
+    <ui:define name="head">
+      <link href="style/security.css" rel="stylesheet" type="text/css"/>
+    </ui:define>  
+   
+    <ui:define name="content">
+    
+      <f:event type="preRenderView" listener="#{userSearch.loadUsers}"/>
+        
+      <script type="text/javascript">
+        function confirmDelete() {
+          return confirm("Are you sure you wish to delete this user? This action cannot be undone.");
+        }
+      </script>
+
+      <div id="contentMain">
+
+  	    <h2>User Manager</h2>  
+  	    
+  	    <h:form>
+          <h:commandButton id="newUser" action="#{userAction.createUser}" styleClass="newuser" rendered="#{identity.hasPermission('seam.account', 'create')}"/>
+        </h:form>
+  	    
+        <h:dataTable 
+            id="threads"
+            value="#{userSearch.users}" 
+            var="user" 
+            styleClass="security"
+            cellspacing="0"
+            headerClass="header"
+            rowClasses="odd,even"
+            columnClasses=",,enabled,action">
+          <h:column width="auto">
+            <f:facet name="header">
+              User name
+            </f:facet>
+            #{user}
+          </h:column>
+          <h:column width="auto">
+            <f:facet name="header">
+              Member Of
+            </f:facet>
+            #{userSearch.getUserRoles(user)}
+          </h:column>
+          <h:column id="enabled" width="auto">
+            <f:facet name="header">
+              Enabled
+            </f:facet>
+            <div class="#{identityManager.isUserEnabled(user) ? 'checkmark' : 'cross'}"/>
+          </h:column>
+          <h:column id="action" width="auto">
+            <f:facet name="header">
+              Action
+            </f:facet>
+          
+            <ui:fragment rendered="#{identity.hasPermission('seam.user', 'update')}">
+              <h:link id="edit" value="Edit" action="#{userAction.editUser(userSearch.selectedUser)}"/><span> | </span>
+            </ui:fragment>
+            <h:link id="delete" value="Delete" action="#{identityManager.deleteUser(userSearch.selectedUser)}" 
+                    rendered="#{identity.hasPermission('seam.user', 'delete')}"
+                    onclick="return confirmDelete()"/>
+          </h:column>
+  	    </h:dataTable>
+	    </div>
+	    
+    </ui:define>
+    
+  </ui:composition>
+</html>

Added: modules/security/trunk/examples/idmconsole/src/main/webapp/welcome.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/welcome.xhtml	                        (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/welcome.xhtml	2010-05-23 08:36:33 UTC (rev 12772)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	  xmlns:ui="http://java.sun.com/jsf/facelets"
+	  xmlns:h="http://java.sun.com/jsf/html">
+
+<head>
+	<title>SeamSpace</title>
+</head>
+
+<body>
+  <h1>Login successful!</h1>
+
+  <div class="errors"><h:messages globalOnly="true"/></div> 
+
+</body>
+</html>
+



More information about the seam-commits mailing list