Seam SVN: r14309 - branches/community/Seam_2_3/examples-ee6/booking/booking-web.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-02-08 11:59:14 -0500 (Wed, 08 Feb 2012)
New Revision: 14309
Modified:
branches/community/Seam_2_3/examples-ee6/booking/booking-web/pom.xml
Log:
examples-ee6 wrong groupId
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-web/pom.xml 2012-02-08 16:57:58 UTC (rev 14308)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-web/pom.xml 2012-02-08 16:59:14 UTC (rev 14309)
@@ -122,7 +122,7 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.seam.examples-ee6</groupId>
+ <groupId>org.jboss.seam.examples-ee6.booking</groupId>
<artifactId>booking-ejb</artifactId>
<type>ejb</type>
<scope>compile</scope>
12 years, 10 months
Seam SVN: r14308 - branches/community/Seam_2_3/examples-ee6/booking/booking-web.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-02-08 11:57:58 -0500 (Wed, 08 Feb 2012)
New Revision: 14308
Modified:
branches/community/Seam_2_3/examples-ee6/booking/booking-web/pom.xml
Log:
examples-ee6 wrong groupId
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-web/pom.xml 2012-02-08 16:55:57 UTC (rev 14307)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-web/pom.xml 2012-02-08 16:57:58 UTC (rev 14308)
@@ -122,7 +122,7 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>booking-ejb</artifactId>
<type>ejb</type>
<scope>compile</scope>
12 years, 10 months
Seam SVN: r14307 - branches/community/Seam_2_3/examples-ee6.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-02-08 11:55:57 -0500 (Wed, 08 Feb 2012)
New Revision: 14307
Modified:
branches/community/Seam_2_3/examples-ee6/pom.xml
Log:
examples-ee6 remove the deploy/undeploy executions from the ftest profile
Modified: branches/community/Seam_2_3/examples-ee6/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/pom.xml 2012-02-08 15:09:20 UTC (rev 14306)
+++ branches/community/Seam_2_3/examples-ee6/pom.xml 2012-02-08 16:55:57 UTC (rev 14307)
@@ -223,30 +223,8 @@
<skip>true</skip>
</configuration>
</plugin>
-<!-- this requires to be changed to AS7 plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>deploy</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>hard-deploy</goal>
- </goals>
- </execution>
- <execution>
- <id>undeploy</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>hard-undeploy</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-<!-- this above requires to be changed to AS7 plugin -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.1</version>
<executions>
12 years, 10 months
Seam SVN: r14306 - in branches/community/Seam_2_3/examples-ee6: mail and 4 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-02-08 10:09:20 -0500 (Wed, 08 Feb 2012)
New Revision: 14306
Modified:
branches/community/Seam_2_3/examples-ee6/mail/mail-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/mail/mail-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/mail/mail-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/mail/mail-web/pom.xml
branches/community/Seam_2_3/examples-ee6/mail/pom.xml
branches/community/Seam_2_3/examples-ee6/pom.xml
Log:
fixed wrong groupId in examples-ee6/mail and added dependency mgmt for hibernate-validator into examples-ee6
Modified: branches/community/Seam_2_3/examples-ee6/mail/mail-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/mail/mail-ear/pom.xml 2012-02-08 13:28:15 UTC (rev 14305)
+++ branches/community/Seam_2_3/examples-ee6/mail/mail-ear/pom.xml 2012-02-08 15:09:20 UTC (rev 14306)
@@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>mail</artifactId>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<version>2.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.jboss.seam.examples.mail</groupId>
+ <groupId>org.jboss.seam.examples-ee6.mail</groupId>
<artifactId>mail-ear</artifactId>
<packaging>ear</packaging>
<name>Mail EAR Module (EE6)</name>
Modified: branches/community/Seam_2_3/examples-ee6/mail/mail-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/mail/mail-ejb/pom.xml 2012-02-08 13:28:15 UTC (rev 14305)
+++ branches/community/Seam_2_3/examples-ee6/mail/mail-ejb/pom.xml 2012-02-08 15:09:20 UTC (rev 14306)
@@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>mail</artifactId>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<version>2.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.jboss.seam.examples.mail</groupId>
+ <groupId>org.jboss.seam.examples-ee6.mail</groupId>
<artifactId>mail-ejb</artifactId>
<packaging>ejb</packaging>
<name>Mail EJB Module (EE6)</name>
@@ -40,13 +40,4 @@
</dependency>
</dependencies>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>3.1.0.GA</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
</project>
Modified: branches/community/Seam_2_3/examples-ee6/mail/mail-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/mail/mail-tests/pom.xml 2012-02-08 13:28:15 UTC (rev 14305)
+++ branches/community/Seam_2_3/examples-ee6/mail/mail-tests/pom.xml 2012-02-08 15:09:20 UTC (rev 14306)
@@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>mail</artifactId>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<version>2.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.jboss.seam.examples.mail</groupId>
+ <groupId>org.jboss.seam.examples-ee6.mail</groupId>
<artifactId>mail-tests</artifactId>
<name>Mail Integration Tests Module (EE6)</name>
Modified: branches/community/Seam_2_3/examples-ee6/mail/mail-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/mail/mail-web/pom.xml 2012-02-08 13:28:15 UTC (rev 14305)
+++ branches/community/Seam_2_3/examples-ee6/mail/mail-web/pom.xml 2012-02-08 15:09:20 UTC (rev 14306)
@@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>mail</artifactId>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<version>2.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.jboss.seam.examples.mail</groupId>
+ <groupId>org.jboss.seam.examples-ee6.mail</groupId>
<artifactId>mail-web</artifactId>
<packaging>war</packaging>
<name>Mail Web Module (EE6)</name>
Modified: branches/community/Seam_2_3/examples-ee6/mail/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/mail/pom.xml 2012-02-08 13:28:15 UTC (rev 14305)
+++ branches/community/Seam_2_3/examples-ee6/mail/pom.xml 2012-02-08 15:09:20 UTC (rev 14306)
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
- <groupId>org.jboss.seam.examples</groupId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>mail</artifactId>
<parent>
<groupId>org.jboss.seam</groupId>
- <artifactId>examples</artifactId>
+ <artifactId>examples-ee6</artifactId>
<version>2.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<packaging>pom</packaging>
<name>Seam Mail Example (EE6)</name>
Modified: branches/community/Seam_2_3/examples-ee6/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/pom.xml 2012-02-08 13:28:15 UTC (rev 14305)
+++ branches/community/Seam_2_3/examples-ee6/pom.xml 2012-02-08 15:09:20 UTC (rev 14306)
@@ -106,13 +106,19 @@
<version>6.0</version>
<scope>provided</scope>
</dependency>
+
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>${hibernate-em.version}</version>
- <scope>provided</scope>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>4.0.1.Final</version>
</dependency>
-
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.2.0.Final</version>
+ </dependency>
+
<!-- common test scope dependencies -->
<dependency>
<groupId>org.testng</groupId>
12 years, 10 months
Seam SVN: r14305 - branches/community/Seam_2_3/examples-ee6/booking/booking-tests/src/test/resources.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-02-08 08:28:15 -0500 (Wed, 08 Feb 2012)
New Revision: 14305
Modified:
branches/community/Seam_2_3/examples-ee6/booking/booking-tests/src/test/resources/booking.properties
Log:
examples-ee6 booking fix properties re new bean validation messages (length to size)
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-tests/src/test/resources/booking.properties
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-tests/src/test/resources/booking.properties 2012-02-07 14:55:00 UTC (rev 14304)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-tests/src/test/resources/booking.properties 2012-02-08 13:28:15 UTC (rev 14305)
@@ -29,7 +29,7 @@
PASSWORD_UPDATED_MESSAGE Password updated
PASSWORD_REENTER_MESSAGE Re-enter new password
PASSWORD_VALUE_REQUIRED_MESSAGE //span[text() = 'value is required']
-PASSWORD_LENGTH_MESSAGE length must be between
+PASSWORD_LENGTH_MESSAGE size must be between
PASSWORD_PASSWORD id=setpassword:PasswordDecorate:password
PASSWORD_VERIFY id=setpassword:VerifyDecorate:verify
PASSWORD_SUBMIT id=setpassword:change
@@ -66,7 +66,7 @@
REGISTRATION_VERIFY_MESSAGE id=registration:verifyDecorate:message
REGISTRATION_SUBMIT id=registration:register
REGISTRATION_REENTER_MESSAGE Re-enter your password
-REGISTRATION_LENGTH_MESSAGE length must be between
+REGISTRATION_LENGTH_MESSAGE size must be between
REGISTRATION_SUCCESSFUL_MESSAGE Successfully registered as {0}
REGISTRATION_USER_EXISTS_MESSAGE Username {0} already exists
NOT_LOGGED_IN_MESSAGE Please log in first
@@ -81,4 +81,4 @@
WORKSPACE_VIEW_TEXT View hotel: {0}
WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
WORKSPACE_TABLE_ROW_COUNT = //table[@id='ConversationListForm:ConversationListDataTable']/tbody/tr
-SPINNER id\=searchCriteria\:SpinnerGif
\ No newline at end of file
+SPINNER id\=searchCriteria\:SpinnerGif
12 years, 10 months
Seam SVN: r14304 - branches/community/Seam_2_3/seam-integration-tests.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-02-07 09:55:00 -0500 (Tue, 07 Feb 2012)
New Revision: 14304
Modified:
branches/community/Seam_2_3/seam-integration-tests/pom.xml
Log:
disabling temporary seam integration testsuite for jsf2 profile
Modified: branches/community/Seam_2_3/seam-integration-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/pom.xml 2012-02-07 14:40:58 UTC (rev 14303)
+++ branches/community/Seam_2_3/seam-integration-tests/pom.xml 2012-02-07 14:55:00 UTC (rev 14304)
@@ -246,6 +246,36 @@
<version>${project.version}</version>
</dependency>
</dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
</project>
12 years, 10 months
Seam SVN: r14303 - in branches/community/Seam_2_3/jboss-seam-jsf2/src: test/java/org/jboss/seam/test/unit and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-02-07 09:40:58 -0500 (Tue, 07 Feb 2012)
New Revision: 14303
Removed:
branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/Meldware.java
branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/MeldwareUser.java
Modified:
branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MailTest.java
Log:
Removed Meldware from code
Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/Meldware.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/Meldware.java 2012-02-07 14:40:37 UTC (rev 14302)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/Meldware.java 2012-02-07 14:40:58 UTC (rev 14303)
@@ -1,79 +0,0 @@
-package org.jboss.seam.mail;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.List;
-
-import org.buni.meldware.mail.management.AdminTool;
-import org.buni.meldware.mail.util.MMJMXUtil;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-
-/**
- * Creates meldware users, mailboxes and aliases
- *
- */
-@Name("org.jboss.seam.mail.meldware")
-@Startup
-@Scope(APPLICATION)
-@BypassInterceptors
-@Install(precedence=BUILT_IN, classDependencies="org.buni.meldware.mail.mailbox.Mailbox", value=false)
-public class Meldware
-{
-
- private List<MeldwareUser> users;
-
- private List<String> domains;
-
- private Log log = Logging.getLog(Meldware.class);
-
- @Create
- public void create()
- {
- // TODO Support domain creation as well. Currently they are written out to file.
-
- log.debug("Creating users and mailboxes");
- //MailboxService ms = MMJMXUtil.getMBean("meldware.mail:type=MailboxManager,name=MailboxManager", MailboxService.class);
- AdminTool at = MMJMXUtil.getMBean("meldware.mail:type=MailServices,name=AdminTool", AdminTool.class);
-
- for (MeldwareUser meldwareUser : getUsers())
- {
- at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());
- // TODO This won't work on AS 4.2
- /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());
- for (String alias : meldwareUser.getAliases())
- {
- ms.createAlias(mbox.getId(), alias);
- }*/
- log.debug("Created #0 #1 #2", meldwareUser.isAdministrator() ? "administrator" : "user", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? "" : "with aliases " + meldwareUser.getAliases());
- }
- }
-
- public List<MeldwareUser> getUsers()
- {
- return users;
- }
-
- public void setUsers(List<MeldwareUser> users)
- {
- this.users = users;
- }
-
- public List<String> getDomains()
- {
- return domains;
- }
-
- public void setDomains(List<String> domains)
- {
- this.domains = domains;
- }
-
-}
Deleted: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/MeldwareUser.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/MeldwareUser.java 2012-02-07 14:40:37 UTC (rev 14302)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mail/MeldwareUser.java 2012-02-07 14:40:58 UTC (rev 14303)
@@ -1,84 +0,0 @@
-package org.jboss.seam.mail;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-@Name("org.jboss.seam.mail.meldwareUser")
-@Scope(APPLICATION)
-@BypassInterceptors
-@Install(precedence=BUILT_IN, dependencies="org.jboss.seam.mail.meldware", value=false)
-public class MeldwareUser
-{
-
- private String username;
- private String password;
-
- private boolean administrator;
-
- private List<String> aliases = new ArrayList<String>();
-
- public boolean isAdministrator()
- {
- return administrator;
- }
-
- public void setAdministrator(boolean admin)
- {
- this.administrator = admin;
- }
-
- public List<String> getAliases()
- {
- return aliases;
- }
-
- public void setAliases(List<String> aliases)
- {
- this.aliases = aliases;
- }
-
- public String getPassword()
- {
- return password;
- }
-
- public void setPassword(String password)
- {
- this.password = password;
- }
-
- public String getUsername()
- {
- return username;
- }
-
- public void setUsername(String username)
- {
- this.username = username;
- }
-
- public List<String> getRoles()
- {
- return getRoles(this);
- }
-
- private static List<String> getRoles(MeldwareUser user)
- {
- List<String> roles = new ArrayList<String>();
- roles.add("calendaruser");
- if (user.isAdministrator())
- {
- roles.add("adminuser");
- }
- return roles;
- }
-
-}
Modified: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MailTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MailTest.java 2012-02-07 14:40:37 UTC (rev 14302)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/MailTest.java 2012-02-07 14:40:58 UTC (rev 14303)
@@ -1,13 +1,10 @@
package org.jboss.seam.test.unit;
-import java.util.ArrayList;
-
import javax.mail.NoSuchProviderException;
import javax.mail.Session;
import javax.naming.NamingException;
import org.jboss.seam.mail.MailSession;
-import org.jboss.seam.mail.MeldwareUser;
import org.testng.annotations.Test;
import com.sun.mail.smtp.SMTPSSLTransport;
@@ -366,36 +363,5 @@
assert failure;
}
-
- @Test
- public void testMeldwareUser()
- {
- MeldwareUser meldwareUser = new MeldwareUser();
- meldwareUser.setUsername(USERNAME);
- meldwareUser.setPassword(PASSWORD);
- meldwareUser.getAliases().add(EMAIL);
-
- assert USERNAME.equals(meldwareUser.getUsername());
- assert PASSWORD.equals(meldwareUser.getPassword());
- assert meldwareUser.getAliases() != null;
- assert meldwareUser.getAliases().contains(EMAIL);
- assert meldwareUser.getRoles().contains("calendaruser");
- assert !meldwareUser.getRoles().contains("adminuser");
-
- meldwareUser.setAliases(new ArrayList<String>());
- assert meldwareUser.getAliases().isEmpty();
- }
-
- @Test
- public void testAdminMeldwareUser()
- {
- MeldwareUser meldwareUser = new MeldwareUser();
- meldwareUser.setAdministrator(true);
-
- assert meldwareUser.getRoles().contains("calendaruser");
- assert meldwareUser.getRoles().contains("adminuser");
- }
-
- // TODO Write tests for Meldware
}
12 years, 10 months
Seam SVN: r14302 - in branches/community/Seam_2_3/examples-ee6/booking: booking-ear and 3 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-02-07 09:40:37 -0500 (Tue, 07 Feb 2012)
New Revision: 14302
Modified:
branches/community/Seam_2_3/examples-ee6/booking/booking-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/Booking.java
branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/Hotel.java
branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/User.java
branches/community/Seam_2_3/examples-ee6/booking/booking-web/src/main/webapp/WEB-INF/web.xml
branches/community/Seam_2_3/examples-ee6/booking/pom.xml
Log:
JBSEAM-4891 added bean validation into booking example
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-ear/pom.xml 2012-02-07 14:39:58 UTC (rev 14301)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-ear/pom.xml 2012-02-07 14:40:37 UTC (rev 14302)
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
- <scope>compile</scope>
+ <scope>provided</scope>
<exclusions>
<exclusion>
<groupId>antlr</groupId>
@@ -65,23 +65,8 @@
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>ejb3-persistence</artifactId>
- </exclusion>
- <exclusion>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
- <scope>compile</scope>
+ <scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
@@ -104,12 +89,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <scope>compile</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <scope>compile</scope>
+ <scope>provided</scope>
</dependency>
</dependencies>
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/pom.xml 2012-02-07 14:39:58 UTC (rev 14301)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/pom.xml 2012-02-07 14:40:37 UTC (rev 14302)
@@ -25,10 +25,6 @@
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/Booking.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/Booking.java 2012-02-07 14:39:58 UTC (rev 14301)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/Booking.java 2012-02-07 14:40:37 UTC (rev 14302)
@@ -15,15 +15,18 @@
import javax.persistence.TemporalType;
import javax.persistence.Transient;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Pattern;
+import javax.validation.constraints.Size;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
import org.jboss.seam.annotations.Name;
@Entity
@Name("booking")
public class Booking implements Serializable
{
+
+ private static final long serialVersionUID = 1L;
+
private Long id;
private User user;
private Hotel hotel;
@@ -109,8 +112,8 @@
}
@NotNull(message="Credit card number is required")
- @Length(min=16, max=16, message="Credit card number must 16 digits long")
- @Pattern(regex="^\\d*$", message="Credit card number must be numeric")
+ @Size(min=16, max=16, message="Credit card number must 16 digits long")
+ @Pattern(regexp="^\\d*$", message="Credit card number must be numeric")
public String getCreditCard()
{
return creditCard;
@@ -150,7 +153,7 @@
this.beds = beds;
}
@NotNull(message="Credit card name is required")
- @Length(min=3, max=70, message="Credit card name is required")
+ @Size(min=3, max=70, message="Credit card name is required")
public String getCreditCardName()
{
return creditCardName;
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/Hotel.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/Hotel.java 2012-02-07 14:39:58 UTC (rev 14301)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/Hotel.java 2012-02-07 14:40:37 UTC (rev 14302)
@@ -8,15 +8,18 @@
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotNull;
import org.jboss.seam.annotations.Name;
@Entity
@Name("hotel")
public class Hotel implements Serializable
{
+
+ private static final long serialVersionUID = 4718338262521261442L;
+
private Long id;
private String name;
private String address;
@@ -36,7 +39,7 @@
this.id = id;
}
- @Length(max=50) @NotNull
+ @Size(max=50) @NotNull
public String getName()
{
return name;
@@ -46,7 +49,7 @@
this.name = name;
}
- @Length(max=100) @NotNull
+ @Size(max=100) @NotNull
public String getAddress()
{
return address;
@@ -56,7 +59,7 @@
this.address = address;
}
- @Length(max=40) @NotNull
+ @Size(max=40) @NotNull
public String getCity()
{
return city;
@@ -66,7 +69,7 @@
this.city = city;
}
- @Length(min=4, max=6) @NotNull
+ @Size(min=4, max=6) @NotNull
public String getZip()
{
return zip;
@@ -76,7 +79,7 @@
this.zip = zip;
}
- @Length(min=2, max=10) @NotNull
+ @Size(min=2, max=10) @NotNull
public String getState()
{
return state;
@@ -86,7 +89,7 @@
this.state = state;
}
- @Length(min=2, max=40) @NotNull
+ @Size(min=2, max=40) @NotNull
public String getCountry()
{
return country;
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/User.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/User.java 2012-02-07 14:39:58 UTC (rev 14301)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-ejb/src/main/java/org/jboss/seam/example/booking/User.java 2012-02-07 14:40:37 UTC (rev 14302)
@@ -9,9 +9,7 @@
import javax.persistence.Id;
import javax.persistence.Table;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotNull;
-import org.hibernate.validator.Pattern;
+import javax.validation.constraints.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -21,6 +19,8 @@
@Table(name="Customer")
public class User implements Serializable
{
+ private static final long serialVersionUID = 4818188553954060410L;
+
private String username;
private String password;
private String name;
@@ -35,7 +35,7 @@
public User() {}
@NotNull
- @Length(max=100)
+ @Size(max=100)
public String getName()
{
return name;
@@ -46,7 +46,7 @@
}
@NotNull
- @Length(min=5, max=15)
+ @Size(min=5, max=15)
public String getPassword()
{
return password;
@@ -57,8 +57,8 @@
}
@Id
- @Length(min=4, max=15)
- @Pattern(regex="^\\w*$", message="not a valid username")
+ @Size(min=4, max=15)
+ @Pattern(regexp="^\\w*$", message="not a valid username")
public String getUsername()
{
return username;
Modified: branches/community/Seam_2_3/examples-ee6/booking/booking-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/booking-web/src/main/webapp/WEB-INF/web.xml 2012-02-07 14:39:58 UTC (rev 14301)
+++ branches/community/Seam_2_3/examples-ee6/booking/booking-web/src/main/webapp/WEB-INF/web.xml 2012-02-07 14:40:37 UTC (rev 14302)
@@ -38,6 +38,11 @@
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
+
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinning</param-name>
+ <param-value>false</param-value>
+ </context-param>
<!-- <context-param> -->
<!-- <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name> -->
@@ -54,7 +59,7 @@
<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>*.seam</url-pattern>
Modified: branches/community/Seam_2_3/examples-ee6/booking/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/booking/pom.xml 2012-02-07 14:39:58 UTC (rev 14301)
+++ branches/community/Seam_2_3/examples-ee6/booking/pom.xml 2012-02-07 14:40:37 UTC (rev 14302)
@@ -42,6 +42,26 @@
<artifactId>booking-ear</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.2.0.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>4.0.1.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.1</version>
+ </dependency>
</dependencies>
</dependencyManagement>
</project>
12 years, 10 months