Author: shane.bryzak(a)jboss.com
Date: 2010-06-16 00:16:32 -0400 (Wed, 16 Jun 2010)
New Revision: 13175
Added:
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/idmconsole/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObject.java
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectType.java
Removed:
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java
Modified:
modules/security/trunk/examples/idmconsole/pom.xml
Log:
updated dependencies
Modified: modules/security/trunk/examples/idmconsole/pom.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/pom.xml 2010-06-16 03:01:38 UTC (rev
13174)
+++ modules/security/trunk/examples/idmconsole/pom.xml 2010-06-16 04:16:32 UTC (rev
13175)
@@ -7,7 +7,14 @@
<packaging>war</packaging>
<name>idmconsole</name>
<version>3.0.0-SNAPSHOT</version>
-
+
+ <parent>
+ <groupId>org.jboss.seam.security</groupId>
+ <artifactId>seam-security-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
<properties>
<!--
Explicitly declaring the source encoding eliminates the following message:
@@ -17,8 +24,6 @@
<!-- To set the jboss.home environment variable the Maven way, set the
jboss.home property in an active profile in the Maven 2 settings.xml file -->
<jboss.home>${env.JBOSS_HOME}</jboss.home>
<jboss.domain>default</jboss.domain>
- <!-- The version of Weld extensions in use -->
- <weld.extensions.version>1.0.0-CR2</weld.extensions.version>
</properties>
<repositories>
@@ -40,19 +45,6 @@
</pluginRepository>
</pluginRepositories>
- <dependencyManagement>
- <dependencies>
- <!-- Import scope will provide versions for dependencies below. -->
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-extensions-bom</artifactId>
- <version>${weld.extensions.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<!-- Seam Security -->
@@ -80,6 +72,13 @@
<artifactId>jsr250-api</artifactId>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
<!-- Bean Validation (JSR-303) -->
<dependency>
<groupId>javax.validation</groupId>
Deleted:
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java 2010-06-16
03:01:38 UTC (rev 13174)
+++
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java 2010-06-16
04:16:32 UTC (rev 13175)
@@ -1,74 +0,0 @@
-package org.jboss.seam.security;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.inject.Model;
-import javax.validation.constraints.Digits;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Pattern;
-
-import org.hibernate.validator.constraints.Email;
-import org.hibernate.validator.constraints.NotEmpty;
-
-public @Model class HelloWorld
-{
- private final String text = "Hello World!";
-
- private String letters;
-
- private String numbers;
-
- private String email;
-
- public HelloWorld() {}
-
- @PostConstruct
- public void initialize()
- {
- System.out.println(this.getClass().getSimpleName() + " was
constructed");
- }
-
- public String getText()
- {
- return text;
- }
-
- @NotNull
- @NotEmpty
- @Pattern(regexp = "[A-Za-z]*", message = "must contain only
letters")
- public String getLetters()
- {
- return letters;
- }
-
- public void setLetters(String letters)
- {
- this.letters = letters;
- }
-
- @NotNull
- @NotEmpty
- @Digits(fraction = 0, integer = 2)
- public String getNumbers()
- {
- return numbers;
- }
-
- public void setNumbers(String numbers)
- {
- this.numbers = numbers;
- }
-
- @NotNull
- @NotEmpty
- @Email
- public String getEmail()
- {
- return email;
- }
-
- public void setEmail(String email)
- {
- this.email = email;
- }
-
-}
Added:
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObject.java
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObject.java
(rev 0)
+++
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObject.java 2010-06-16
04:16:32 UTC (rev 13175)
@@ -0,0 +1,58 @@
+package org.jboss.seam.security.examples.idmconsole.model;
+
+import java.io.Serializable;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+import org.jboss.seam.security.annotations.management.IdentityProperty;
+import org.jboss.seam.security.annotations.management.PropertyType;
+
+/**
+ * This entity contains identity objects, e.g. users and groups
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityObject implements Serializable
+{
+ private static final long serialVersionUID = -4623023512038059728L;
+
+ 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 @IdentityProperty(PropertyType.TYPE)
+ public IdentityObjectType getType()
+ {
+ return type;
+ }
+
+ public void setType(IdentityObjectType type)
+ {
+ this.type = type;
+ }
+
+}
Added:
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectType.java
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectType.java
(rev 0)
+++
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectType.java 2010-06-16
04:16:32 UTC (rev 13175)
@@ -0,0 +1,46 @@
+package org.jboss.seam.security.examples.idmconsole.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.jboss.seam.security.annotations.management.IdentityProperty;
+import org.jboss.seam.security.annotations.management.PropertyType;
+
+/**
+ *
+ * @author Shane Bryzak
+ *
+ */
+@Entity
+public class IdentityObjectType implements Serializable
+{
+ private static final long serialVersionUID = -8333008038699510742L;
+
+ private Long id;
+ private String name;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ @IdentityProperty(PropertyType.NAME)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Deleted:
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java
===================================================================
---
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java 2010-06-16
03:01:38 UTC (rev 13174)
+++
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java 2010-06-16
04:16:32 UTC (rev 13175)
@@ -1,12 +0,0 @@
-package org.jboss.seam.security;
-
-import org.testng.annotations.Test;
-
-public class HelloWorldTest
-{
- @Test
- public void testGetText() {
- HelloWorld fixture = new HelloWorld();
- assert "Hello World!".equals(fixture.getText());
- }
-}
Show replies by date