From 78af9475a6856d1e7c69266a04508266436ee37d Mon Sep 17 00:00:00 2001 From: Krzysztof Miksa Date: Thu, 9 May 2013 12:44:17 +0000 Subject: [PATCH] created trunk directory and moved whole repo to it --- ear/pom.xml | 443 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ear/src/main/application/META-INF/MANIFEST.MF | 3 +++ ear/src/main/resources/seam-refimpl-ds.xml | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejb/pom.xml | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejb/src/main/java/no/knowit/seam/example/action/MovieHome.java | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejb/src/main/java/no/knowit/seam/example/action/MovieList.java | 31 +++++++++++++++++++++++++++++++ ejb/src/main/java/no/knowit/seam/example/model/Movie.java | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejb/src/main/java/no/knowit/seam/example/security/Authenticator.java | 10 ++++++++++ ejb/src/main/java/no/knowit/seam/example/security/AuthenticatorBean.java | 35 +++++++++++++++++++++++++++++++++++ ejb/src/main/resources/META-INF/MANIFEST.MF | 3 +++ ejb/src/main/resources/META-INF/ejb-jar.xml | 21 +++++++++++++++++++++ ejb/src/main/resources/META-INF/orm.xml | 19 +++++++++++++++++++ ejb/src/main/resources/META-INF/persistence.xml | 259 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejb/src/main/resources/META-INF/security.drl | 25 +++++++++++++++++++++++++ ejb/src/main/resources/import.sql | 6 ++++++ ejb/src/main/resources/seam.properties | 1 + ejb/src/test/java/no/knowit/seam/example/action/MovieTest.java | 309 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejb/src/test/java/no/knowit/seam/example/security/AuthenticatorTest.java | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejb/src/test/resources-openejb/WEB-INF/components.xml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejb/src/test/resources-openejb/WEB-INF/web.xml | 21 +++++++++++++++++++++ ejb/src/test/resources-openejb/jndi.properties | 47 +++++++++++++++++++++++++++++++++++++++++++++++ ejb/src/test/resources/import.sql | 0 ejb/src/test/resources/log4j.properties | 46 ++++++++++++++++++++++++++++++++++++++++++++++ ejb/testng.xml | 17 +++++++++++++++++ pom.xml | 550 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ readme.txt | 2 ++ src/main/dbscripts/001_initial.sql | 7 +++++++ src/main/filters/filter-default.properties | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/test/dbschemaxsd/dataset.xsd | 13 +++++++++++++ src/test/dbschemaxsd/public.xsd | 20 ++++++++++++++++++++ war/nonhotdeployable | 6 ++++++ war/pom.xml | 765 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/readme.txt | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/java/no/knowit/seam/example/model/Movie.java | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/java/no/knowit/seam/example/model/User.java | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/java/no/knowit/seam/example/security/Authenticator.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/resources/messages_bg.properties | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/resources/messages_de.properties | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/resources/messages_en.properties | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/resources/messages_fr.properties | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/resources/messages_it.properties | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/resources/messages_no.properties | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/resources/messages_tr.properties | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/resources/seam.properties | 0 war/src/main/resources/stylesheet/theme.xcss | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/404.xhtml | 14 ++++++++++++++ war/src/main/webapp/META-INF/MANIFEST.MF | 9 +++++++++ war/src/main/webapp/WEB-INF/components.xml | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/WEB-INF/faces-config.xml | 21 +++++++++++++++++++++ war/src/main/webapp/WEB-INF/jboss-web.xml | 12 ++++++++++++ war/src/main/webapp/WEB-INF/pages.xml | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/WEB-INF/web.xml | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/error.xhtml | 19 +++++++++++++++++++ war/src/main/webapp/favicon.ico | Bin 0 -> 1150 bytes war/src/main/webapp/home.xhtml | 36 ++++++++++++++++++++++++++++++++++++ war/src/main/webapp/img/btnmanageroles.png | Bin 0 -> 4478 bytes war/src/main/webapp/img/btnmanageusers.png | Bin 0 -> 4561 bytes war/src/main/webapp/img/btnnewpermission.png | Bin 0 -> 2922 bytes war/src/main/webapp/img/btnnewrole.png | Bin 0 -> 2770 bytes war/src/main/webapp/img/btnnewuser.png | Bin 0 -> 2794 bytes war/src/main/webapp/img/dtpick.gif | Bin 0 -> 127 bytes war/src/main/webapp/img/error.gif | Bin 0 -> 1017 bytes war/src/main/webapp/img/false.png | Bin 0 -> 206 bytes war/src/main/webapp/img/manytoone.gif | Bin 0 -> 149 bytes war/src/main/webapp/img/msgerror.png | Bin 0 -> 718 bytes war/src/main/webapp/img/msginfo.png | Bin 0 -> 795 bytes war/src/main/webapp/img/msgwarn.png | Bin 0 -> 683 bytes war/src/main/webapp/img/onetomany.gif | Bin 0 -> 153 bytes war/src/main/webapp/img/seamlogo.png | Bin 0 -> 10847 bytes war/src/main/webapp/img/true.png | Bin 0 -> 1067 bytes war/src/main/webapp/layout/display.xhtml | 16 ++++++++++++++++ war/src/main/webapp/layout/edit.xhtml | 27 +++++++++++++++++++++++++++ war/src/main/webapp/layout/menu.xhtml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/layout/sort.xhtml | 11 +++++++++++ war/src/main/webapp/layout/template.xhtml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/login.page.xml | 12 ++++++++++++ war/src/main/webapp/login.xhtml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/security_error.xhtml | 24 ++++++++++++++++++++++++ war/src/main/webapp/stylesheet/theme.css | 218 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/stylesheet/theme.xcss | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/stylesheet/useradmin.css | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/view/example/Movie.page.xml | 10 ++++++++++ war/src/main/webapp/view/example/Movie.xhtml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/view/example/MovieEdit.page.xml | 37 +++++++++++++++++++++++++++++++++++++ war/src/main/webapp/view/example/MovieEdit.xhtml | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/main/webapp/view/example/MovieList.page.xml | 15 +++++++++++++++ war/src/main/webapp/view/example/MovieList.xhtml | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorIT.java | 38 ++++++++++++++++++++++++++++++++++++++ war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITC.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++ war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITI.java | 8 ++++++++ war/src/test/java/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase.java | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/test/java/no/knowit/seam/example/test/JSFUnitUtils.java | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/test/resources/cactus-report.xsl | 337 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ war/src/test/resources/no/knowit/seam/example/security/test/AuthenticatorIT.xml | 4 ++++ war/src/test/resources/unitils.properties | 30 ++++++++++++++++++++++++++++++ war/src/test/resources/web.xml | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 96 files changed, 7083 insertions(+), 0 deletions(-) create mode 100644 ear/pom.xml create mode 100644 ear/src/main/application/META-INF/MANIFEST.MF create mode 100644 ear/src/main/resources/seam-refimpl-ds.xml create mode 100644 ejb/pom.xml create mode 100644 ejb/src/main/java/no/knowit/seam/example/action/MovieHome.java create mode 100644 ejb/src/main/java/no/knowit/seam/example/action/MovieList.java create mode 100644 ejb/src/main/java/no/knowit/seam/example/model/Movie.java create mode 100644 ejb/src/main/java/no/knowit/seam/example/security/Authenticator.java create mode 100644 ejb/src/main/java/no/knowit/seam/example/security/AuthenticatorBean.java create mode 100644 ejb/src/main/resources/META-INF/MANIFEST.MF create mode 100644 ejb/src/main/resources/META-INF/ejb-jar.xml create mode 100644 ejb/src/main/resources/META-INF/orm.xml create mode 100644 ejb/src/main/resources/META-INF/persistence.xml create mode 100644 ejb/src/main/resources/META-INF/security.drl create mode 100644 ejb/src/main/resources/import.sql create mode 100644 ejb/src/main/resources/seam.properties create mode 100644 ejb/src/test/java/no/knowit/seam/example/action/MovieTest.java create mode 100644 ejb/src/test/java/no/knowit/seam/example/security/AuthenticatorTest.java create mode 100644 ejb/src/test/resources-openejb/WEB-INF/components.xml create mode 100644 ejb/src/test/resources-openejb/WEB-INF/web.xml create mode 100644 ejb/src/test/resources-openejb/jndi.properties create mode 100644 ejb/src/test/resources/import.sql create mode 100644 ejb/src/test/resources/log4j.properties create mode 100644 ejb/testng.xml create mode 100644 pom.xml create mode 100644 readme.txt create mode 100644 src/main/dbscripts/001_initial.sql create mode 100644 src/main/filters/filter-default.properties create mode 100644 src/test/dbschemaxsd/dataset.xsd create mode 100644 src/test/dbschemaxsd/public.xsd create mode 100644 war/nonhotdeployable create mode 100644 war/pom.xml create mode 100644 war/readme.txt create mode 100644 war/src/main/java/no/knowit/seam/example/model/Movie.java create mode 100644 war/src/main/java/no/knowit/seam/example/model/User.java create mode 100644 war/src/main/java/no/knowit/seam/example/security/Authenticator.java create mode 100644 war/src/main/resources/messages_bg.properties create mode 100644 war/src/main/resources/messages_de.properties create mode 100644 war/src/main/resources/messages_en.properties create mode 100644 war/src/main/resources/messages_fr.properties create mode 100644 war/src/main/resources/messages_it.properties create mode 100644 war/src/main/resources/messages_no.properties create mode 100644 war/src/main/resources/messages_tr.properties create mode 100644 war/src/main/resources/seam.properties create mode 100644 war/src/main/resources/stylesheet/theme.xcss create mode 100644 war/src/main/webapp/404.xhtml create mode 100644 war/src/main/webapp/META-INF/MANIFEST.MF create mode 100644 war/src/main/webapp/WEB-INF/components.xml create mode 100644 war/src/main/webapp/WEB-INF/faces-config.xml create mode 100644 war/src/main/webapp/WEB-INF/jboss-web.xml create mode 100644 war/src/main/webapp/WEB-INF/pages.xml create mode 100644 war/src/main/webapp/WEB-INF/web.xml create mode 100644 war/src/main/webapp/error.xhtml create mode 100644 war/src/main/webapp/favicon.ico create mode 100644 war/src/main/webapp/home.xhtml create mode 100644 war/src/main/webapp/img/btnmanageroles.png create mode 100644 war/src/main/webapp/img/btnmanageusers.png create mode 100644 war/src/main/webapp/img/btnnewpermission.png create mode 100644 war/src/main/webapp/img/btnnewrole.png create mode 100644 war/src/main/webapp/img/btnnewuser.png create mode 100644 war/src/main/webapp/img/dtpick.gif create mode 100644 war/src/main/webapp/img/error.gif create mode 100644 war/src/main/webapp/img/false.png create mode 100644 war/src/main/webapp/img/manytoone.gif create mode 100644 war/src/main/webapp/img/msgerror.png create mode 100644 war/src/main/webapp/img/msginfo.png create mode 100644 war/src/main/webapp/img/msgwarn.png create mode 100644 war/src/main/webapp/img/onetomany.gif create mode 100644 war/src/main/webapp/img/seamlogo.png create mode 100644 war/src/main/webapp/img/true.png create mode 100644 war/src/main/webapp/layout/display.xhtml create mode 100644 war/src/main/webapp/layout/edit.xhtml create mode 100644 war/src/main/webapp/layout/menu.xhtml create mode 100644 war/src/main/webapp/layout/sort.xhtml create mode 100644 war/src/main/webapp/layout/template.xhtml create mode 100644 war/src/main/webapp/login.page.xml create mode 100644 war/src/main/webapp/login.xhtml create mode 100644 war/src/main/webapp/security_error.xhtml create mode 100644 war/src/main/webapp/stylesheet/theme.css create mode 100644 war/src/main/webapp/stylesheet/theme.xcss create mode 100644 war/src/main/webapp/stylesheet/useradmin.css create mode 100644 war/src/main/webapp/view/example/Movie.page.xml create mode 100644 war/src/main/webapp/view/example/Movie.xhtml create mode 100644 war/src/main/webapp/view/example/MovieEdit.page.xml create mode 100644 war/src/main/webapp/view/example/MovieEdit.xhtml create mode 100644 war/src/main/webapp/view/example/MovieList.page.xml create mode 100644 war/src/main/webapp/view/example/MovieList.xhtml create mode 100644 war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorIT.java create mode 100644 war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITC.java create mode 100644 war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITI.java create mode 100644 war/src/test/java/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase.java create mode 100644 war/src/test/java/no/knowit/seam/example/test/JSFUnitUtils.java create mode 100644 war/src/test/resources/cactus-report.xsl create mode 100644 war/src/test/resources/no/knowit/seam/example/security/test/AuthenticatorIT.xml create mode 100644 war/src/test/resources/unitils.properties create mode 100644 war/src/test/resources/web.xml diff --git a/ear/pom.xml b/ear/pom.xml new file mode 100644 index 0000000..31bd4b3 --- /dev/null +++ b/ear/pom.xml @@ -0,0 +1,443 @@ + + + + 4.0.0 + + no.knowit.seam + seam-refimpl + 1.0-SNAPSHOT + ../pom.xml + + + seam-refimpl-ear + ${project.artifactId} : ${project.version} + The Seam Maven reference implementation EAR module + ear + + + + + env-dev + + dev + + + + + env-prod + + true + + + prod + + + + + + explode + + + + maven-antrun-plugin + + + package + package + + + + Exploding to ${deploy-path} + + + + + + + + + + run + + + + + + + + + + + unexplode + + + + maven-antrun-plugin + + + clean + clean + + + + + Unexploding: ${deploy-path} + + + + + + + + run + + + + + + + + + + + + + ${project.groupId} + ${app.context}-war + war + + + + ${project.groupId} + ${app.context}-ejb + ejb + + + + + + + org.jboss.seam + jboss-seam + ejb + + + + org.jboss.el + jboss-el + jar + + + + + org.richfaces.framework + richfaces-api + jar + + + + + + + + commons-beanutils + commons-beanutils + jar + + + + commons-digester + commons-digester + jar + + + + + + + + + + + + + + + + + + + + + org.codehaus.mojo + properties-maven-plugin + + + + + ${basedir}/../src/main/filters/filter-${env}.properties + + + + + + pre-clean + pre-clean + + read-project-properties + + + + ${basedir}/../src/main/filters/filter-${env}.properties + + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-app-ds-xml + initialize + + copy-resources + + + + + ${project.build.directory}/${project.build.finalName}/META-INF/ds + + + + + src/main/resources + true + + ${ds.xml} + + + + + + + + + + + org.apache.maven.plugins + maven-ear-plugin + + ${app.context}-ear + ${app.display.name} + ${app.description} + + + ${as.version} + + + + seam.jboss.org:loader=${app.context}-ear + + + + + META-INF/ds/${ds.xml} + + + + + + ${timestamp} + ${buildNumber} + ${env} + + + + + + ${project.groupId} + ${app.context}-war + /${app.web.context} + ${app.unpack.modules} + + + + ${project.groupId} + ${app.context}-ejb + ${app.unpack.modules} + + + + + + org.jboss.seam + jboss-seam + + + + + + + + + + diff --git a/ear/src/main/application/META-INF/MANIFEST.MF b/ear/src/main/application/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/ear/src/main/application/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/ear/src/main/resources/seam-refimpl-ds.xml b/ear/src/main/resources/seam-refimpl-ds.xml new file mode 100644 index 0000000..5d3d13d --- /dev/null +++ b/ear/src/main/resources/seam-refimpl-ds.xml @@ -0,0 +1,223 @@ + + + + + + + ${ds.jndi.name} + true + ${ds.connection.url} + ${ds.driver.class} + ${ds.user.name} + ${ds.password} + + + + + \ No newline at end of file diff --git a/ejb/pom.xml b/ejb/pom.xml new file mode 100644 index 0000000..e63f945 --- /dev/null +++ b/ejb/pom.xml @@ -0,0 +1,177 @@ + + + + 4.0.0 + + no.knowit.seam + seam-refimpl + 1.0-SNAPSHOT + ../pom.xml + + + seam-refimpl-ejb + ${project.artifactId} : ${project.version} + The Seam Maven reference implementation EJB module + ejb + + + + + env-dev + + dev + + + + + env-prod + + true + + + prod + + + + + explode + + + + maven-antrun-plugin + + + ejb-process-classes + process-classes + + run + + + + + + + + + + + + + + + + + + + + + + no.knowit.seam + seam-utils-ejb + ejb + test + + + no.knowit.seam + seam-utils-openejb + ejb + test + + + + + + + + + src/main/resources + true + + + + + + src/test/resources + true + + + src/test/resources-openejb + true + + + + + + + org.codehaus.mojo + properties-maven-plugin + + + + + ${basedir}/../src/main/filters/filter-${env}.properties + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + testng.xml + + + + + + + org.apache.maven.plugins + maven-ejb-plugin + + + + ${timestamp} + ${buildNumber} + ${env} + + + + + + + + \ No newline at end of file diff --git a/ejb/src/main/java/no/knowit/seam/example/action/MovieHome.java b/ejb/src/main/java/no/knowit/seam/example/action/MovieHome.java new file mode 100644 index 0000000..222fa60 --- /dev/null +++ b/ejb/src/main/java/no/knowit/seam/example/action/MovieHome.java @@ -0,0 +1,63 @@ +package no.knowit.seam.example.action; + +import no.knowit.seam.example.model.Movie; + +import org.jboss.seam.annotations.Name; +import org.jboss.seam.annotations.security.Restrict; +import org.jboss.seam.framework.EntityHome; + +@Name("movieHome") +public class MovieHome extends EntityHome { + + private static final long serialVersionUID = 1L; + + public void setMovieId(Integer id) { + setId(id); + } + + public Integer getMovieId() { + return (Integer) getId(); + } + + @Override + protected Movie createInstance() { + Movie movie = new Movie(); + return movie; + } + + public void load() { + if (isIdDefined()) { + wire(); + } + } + + public void wire() { + getInstance(); + } + + public boolean isWired() { + return true; + } + + public Movie getDefinedInstance() { + return isIdDefined() ? getInstance() : null; + } + + @Override + @Restrict("#{identity.loggedIn}") + public String persist() { + return super.persist(); + } + + @Override + @Restrict("#{identity.loggedIn}") + public String update() { + return super.update(); + } + + @Override + @Restrict("#{identity.loggedIn}") + public String remove() { + return super.remove(); + } +} diff --git a/ejb/src/main/java/no/knowit/seam/example/action/MovieList.java b/ejb/src/main/java/no/knowit/seam/example/action/MovieList.java new file mode 100644 index 0000000..dd60c8c --- /dev/null +++ b/ejb/src/main/java/no/knowit/seam/example/action/MovieList.java @@ -0,0 +1,31 @@ +package no.knowit.seam.example.action; + +import java.util.Arrays; + +import no.knowit.seam.example.model.Movie; + +import org.jboss.seam.annotations.Name; +import org.jboss.seam.framework.EntityQuery; + +@Name("movieList") +public class MovieList extends EntityQuery { + + private static final long serialVersionUID = 1L; + private static final String EJBQL = "select movie from Movie movie"; + + private static final String[] RESTRICTIONS = { + "lower(movie.title) like lower(concat(#{movieList.movie.title},'%'))", + "lower(movie.director) like lower(concat(#{movieList.movie.director},'%'))", }; + + private Movie movie = new Movie(); + + public MovieList() { + setEjbql(EJBQL); + setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS)); + setMaxResults(25); + } + + public Movie getMovie() { + return movie; + } +} diff --git a/ejb/src/main/java/no/knowit/seam/example/model/Movie.java b/ejb/src/main/java/no/knowit/seam/example/model/Movie.java new file mode 100644 index 0000000..df23f8d --- /dev/null +++ b/ejb/src/main/java/no/knowit/seam/example/model/Movie.java @@ -0,0 +1,109 @@ +package no.knowit.seam.example.model; + +import static javax.persistence.GenerationType.IDENTITY; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Version; + +import org.hibernate.validator.Length; +import org.hibernate.validator.NotNull; + +@Entity +public class Movie implements java.io.Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = IDENTITY) + private Integer id; + + @Version + private Long version; + + @org.hibernate.annotations.Index(name="idx_director") + @Column(nullable = false, length = 50) + @NotNull + @Length(max = 50) + private String director; + + @Column(unique = true, nullable = false, length = 60) + @NotNull + @Length(max = 60) + private String title; + + @Column(nullable = false) + @NotNull + private Integer year; + + @Lob + private String plot; + + public Movie() { + } + + public Movie(final String director, final String title, Integer year) { + this.director = director; + this.title = title; + this.year = year; + } + + public Movie(final String director, final String title, Integer year, final String plot) { + this.director = director; + this.title = title; + this.year = year; + this.plot = plot; + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Long getVersion() { + return this.version; + } + + public void setVersion(Long version) { + this.version = version; + } + + public String getDirector() { + return this.director; + } + + public void setDirector(final String director) { + this.director = director; + } + + public String getTitle() { + return this.title; + } + + public void setTitle(final String title) { + this.title = title; + } + + public Integer getYear() { + return this.year; + } + + public void setYear(Integer year) { + this.year = year; + } + + public String getPlot() { + return this.plot; + } + + public void setPlot(final String plot) { + this.plot = plot; + } + +} diff --git a/ejb/src/main/java/no/knowit/seam/example/security/Authenticator.java b/ejb/src/main/java/no/knowit/seam/example/security/Authenticator.java new file mode 100644 index 0000000..b2d5631 --- /dev/null +++ b/ejb/src/main/java/no/knowit/seam/example/security/Authenticator.java @@ -0,0 +1,10 @@ +package no.knowit.seam.example.security; + +import javax.ejb.Local; + +@Local +public interface Authenticator { + + boolean authenticate(); + +} diff --git a/ejb/src/main/java/no/knowit/seam/example/security/AuthenticatorBean.java b/ejb/src/main/java/no/knowit/seam/example/security/AuthenticatorBean.java new file mode 100644 index 0000000..c9e68a1 --- /dev/null +++ b/ejb/src/main/java/no/knowit/seam/example/security/AuthenticatorBean.java @@ -0,0 +1,35 @@ +package no.knowit.seam.example.security; + +import javax.ejb.Stateless; + + +import org.jboss.seam.annotations.In; +import org.jboss.seam.annotations.Logger; +import org.jboss.seam.annotations.Name; +import org.jboss.seam.log.Log; +import org.jboss.seam.security.Credentials; +import org.jboss.seam.security.Identity; + +@Stateless +@Name("authenticator") +public class AuthenticatorBean implements Authenticator { + @Logger + private Log log; + @In + Identity identity; + @In + Credentials credentials; + + public boolean authenticate() { + log.info("Authenticating '{0}'", credentials.getUsername()); + + // write your authentication logic here, + // return true if the authentication was + // successful, false otherwise + if ("admin".equals(credentials.getUsername())) { + identity.addRole("admin"); + return true; + } + return false; + } +} diff --git a/ejb/src/main/resources/META-INF/MANIFEST.MF b/ejb/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/ejb/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/ejb/src/main/resources/META-INF/ejb-jar.xml b/ejb/src/main/resources/META-INF/ejb-jar.xml new file mode 100644 index 0000000..7a7ac18 --- /dev/null +++ b/ejb/src/main/resources/META-INF/ejb-jar.xml @@ -0,0 +1,21 @@ + + + + + + org.jboss.seam.ejb.SeamInterceptor + + + + + + * + org.jboss.seam.ejb.SeamInterceptor + + + + diff --git a/ejb/src/main/resources/META-INF/orm.xml b/ejb/src/main/resources/META-INF/orm.xml new file mode 100644 index 0000000..8789b0c --- /dev/null +++ b/ejb/src/main/resources/META-INF/orm.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/ejb/src/main/resources/META-INF/persistence.xml b/ejb/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..13f8d79 --- /dev/null +++ b/ejb/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,259 @@ + + + + + org.hibernate.ejb.HibernatePersistence + ${pu.jta.data.source} + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ejb/src/main/resources/META-INF/security.drl b/ejb/src/main/resources/META-INF/security.drl new file mode 100644 index 0000000..47a8618 --- /dev/null +++ b/ejb/src/main/resources/META-INF/security.drl @@ -0,0 +1,25 @@ +package Permissions; + +import java.security.Principal; + +import org.jboss.seam.security.permission.PermissionCheck; +import org.jboss.seam.security.Role; +/****************************************************************************************** + This rule supports the administration of users and roles using Seam's identity management. + ******************************************************************************************/ +rule ManageAccount + no-loop + // The first rule in an activation-group to fire will cancel the + // other rules activations (stop them from firing). The activation + // group can be any string, as long as the string is identical for + // all the rules you need to be in the one group. + activation-group "permissions" +when + $perm: PermissionCheck(name == "seam.user" || == "seam.role", granted == false) + Role(name == "admin") +then + $perm.grant(); +end +/****************************************************************************************** + This rules supports the administration of users and roles using Seam's identity management. + ******************************************************************************************/ diff --git a/ejb/src/main/resources/import.sql b/ejb/src/main/resources/import.sql new file mode 100644 index 0000000..1ac3976 --- /dev/null +++ b/ejb/src/main/resources/import.sql @@ -0,0 +1,6 @@ +-- SQL statements which are executed at application startup if hibernate.hbm2ddl.auto is 'create' or 'create-drop' + +insert into Movie (version, director, title, year, plot) values (0, 'Joel Coen', 'The Big Lebowski', 1998, '"Dude" Lebowski, mistaken for a millionaire Lebowski, seeks restitution for his ruined rug and enlists his bowling buddies to help get it.') +insert into Movie (version, director, title, year, plot) values (0, 'Quentin Tarantino', 'Reservoir Dogs', 1992, 'After a simple jewelery heist goes terribly wrong, the surviving criminals begin to suspect that one of them is a police informant.') +insert into Movie (version, director, title, year, plot) values (0, 'Joel Coen', 'Fargo', 1996, 'Jerry Lundegaard''s inept crime falls apart due to his and his henchmen''s bungling and the persistent police work of pregnant Marge Gunderson.') +--insert into Movie (version, director, title, year, plot) values (0, 'Alan Parker', 'The Wall', 1992, 'A troubled rock star descends into madness in the midst of his physical and social isolation from everyone.') diff --git a/ejb/src/main/resources/seam.properties b/ejb/src/main/resources/seam.properties new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ejb/src/main/resources/seam.properties @@ -0,0 +1 @@ + diff --git a/ejb/src/test/java/no/knowit/seam/example/action/MovieTest.java b/ejb/src/test/java/no/knowit/seam/example/action/MovieTest.java new file mode 100644 index 0000000..5ae7dce --- /dev/null +++ b/ejb/src/test/java/no/knowit/seam/example/action/MovieTest.java @@ -0,0 +1,309 @@ +package no.knowit.seam.example.action; + +import java.util.ArrayList; +import java.util.List; + +import no.knowit.crud.CrudService; +import no.knowit.seam.example.model.Movie; +import no.knowit.seam.openejb.mock.SeamOpenEjbTest; + +import org.jboss.seam.Component; +import org.jboss.seam.core.Conversation; +import org.jboss.seam.log.LogProvider; +import org.jboss.seam.log.Logging; +import org.jboss.seam.security.Credentials; +import org.jboss.seam.security.Identity; +import org.testng.Assert; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeSuite; +import org.testng.annotations.Test; + +public class MovieTest extends SeamOpenEjbTest { + + private static final String DIRECTOR_JOEL_COEN = "Joel Coen"; + private static final String THE_BIG_LEBOWSKI_TITLE = "The Big Lebowski"; + private static final Integer THE_BIG_LEBOWSKI_YEAR = 1992; + private static final String THE_BIG_LEBOWSKI_PLOT = + "\"Dude\" Lebowski, mistaken for a millionaire Lebowski, seeks restitution for his " + + "ruined rug and enlists his bowling buddies to help get it."; + + private static final String THE_WALL_DIRECTOR = "Alan Parker"; + private static final String THE_WALL_TITLE = "The Wall"; + private static final Integer THE_WALL_YEAR = 1999; + private static final String THE_WALL_PLOT = + "A troubled rock star descends into madness " + + "in the midst of his physical and social isolation from everyone."; + + private Integer theBigLebowskiId; + private Integer reservoirDogsId; + private Integer theWallId; + + private static final LogProvider log = Logging.getLogProvider(MovieTest.class); + + private boolean mockLogin() { + Credentials credentials = (Credentials)Component.getInstance("org.jboss.seam.security.credentials"); + Identity identity = (Identity)Component.getInstance("org.jboss.seam.security.identity"); + credentials.setUsername("admin"); + identity.addRole("admin"); + return identity.login().equals("loggedIn"); + } + + @Override + @BeforeSuite + public void beforeSuite() throws Exception { + //System.out.println("**** MovieTest.beforeSuite()"); + + // Change some logging, INFO|DEBUG|WARN|ERROR|FATAL + contextProperties.put("log4j.category.org.jboss.seam.Component", "DEBUG"); + contextProperties.put("log4j.category.org.jboss.seam.transaction", "DEBUG"); + contextProperties.put("log4j.category.org.jboss.seam.mock", "DEBUG"); + contextProperties.put("log4j.category.no.knowit.seam.openejb.mock", "DEBUG"); + contextProperties.put("log4j.category.no.knowit.seam.example", "debug"); + + super.beforeSuite(); + } + + @Override + @BeforeClass + public void setupClass() throws Exception { + super.setupClass(); + + // Delete all movies + CrudService crudService = doJndiLookup("crudService"); + crudService.remove(new Movie(), true); + assert crudService.find(Movie.class).size() == 0 : "List.size():"; + + // Persist 3 movies + ArrayList movies = new ArrayList(); + movies.add(new Movie(DIRECTOR_JOEL_COEN, THE_BIG_LEBOWSKI_TITLE, THE_BIG_LEBOWSKI_YEAR, "...")); + + movies.add(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992, + "After a simple jewelery heist goes terribly wrong, the surviving criminals begin " + + "to suspect that one of them is a police informant.")); + + movies.add(new Movie(DIRECTOR_JOEL_COEN, "Fargo", 1996, + "Jerry Lundegaard's inept crime falls apart due to his and his henchmen's bungling " + + "and the persistent police work of pregnant Marge Gunderson.")); + + movies = (ArrayList) crudService.persist(movies); + assert crudService.find(Movie.class).size() == 3 : "List.size():"; + + theBigLebowskiId = movies.get(0).getId(); + reservoirDogsId = movies.get(1).getId(); + } + + @Test + public void newMovie() throws Exception { + + new NonFacesRequest("/view/example/MovieList.xhtml") { + @Override + protected void renderResponse() throws Exception { + int actual = (Integer)getValue("#{movieList.resultList.size}"); + Assert.assertTrue(actual > 0, "movieList.size should be gt. 0"); + } + }.run(); + + new FacesRequest("/login.xhtml") { + @Override + protected void updateModelValues() throws Exception { + assert !isSessionInvalid() : "Invalid session"; + setValue("#{credentials.username}", "admin"); + } + + @Override + protected void invokeApplication() throws Exception { + assert invokeMethod("#{authenticator.authenticate}").equals(true) : "Authentication failed"; + assert invokeMethod("#{identity.login}").equals("loggedIn") : "Login failed"; + setOutcome("/view/example/MovieEdit.xhtml"); + } + }.run(); + + new FacesRequest("/view/example/MovieEdit.xhtml") { + @Override + protected void updateModelValues() throws Exception { + invokeMethod( "#{movieHome.clearInstance}" ); + setValue("#{movieHome.instance.director}", THE_WALL_DIRECTOR); + setValue("#{movieHome.instance.title}", THE_WALL_TITLE); + setValue("#{movieHome.instance.year}", THE_WALL_YEAR); + setValue("#{movieHome.instance.plot}", THE_WALL_PLOT); + } + + @Override + protected void invokeApplication() { + assert invokeMethod("#{movieHome.persist}").equals("persisted"); + theWallId = (Integer)getValue("#{movieHome.movieId}"); + setOutcome("/view/example/Movie.xhtml"); + } + + @Override + protected void afterRequest() { + assert isInvokeApplicationComplete(); + assert !isRenderResponseBegun(); + } + }.run(); + + new NonFacesRequest("/view/example/Movie.xhtml") { + @Override + protected void renderResponse() { + setValue("#{movieHome.movieId}", theWallId); + invokeMethod("#{movieHome.wire}"); + assert getValue("#{movieHome.instance.director}").equals(THE_WALL_DIRECTOR); + assert getValue("#{movieHome.instance.title}").equals(THE_WALL_TITLE); + assert getValue("#{movieHome.instance.year}").equals(THE_WALL_YEAR); + assert getValue("#{movieHome.instance.plot}").equals(THE_WALL_PLOT); + } + }.run(); + + new FacesRequest() { + @Override + protected void invokeApplication() throws Exception { + assert getValue("#{identity.loggedIn}").equals(true) : "Not logged in"; + assert invokeAction("#{identity.logout}") == null; + assert getValue("#{identity.loggedIn}").equals(false) : "Logout failed"; + } + }.run(); + } + + @Test + public void editMovie() throws Exception { + new FacesRequest("/view/example/MovieEdit.xhtml") { + @Override + protected void invokeApplication() throws Exception { + Conversation.instance().begin(); + assert !isSessionInvalid() : "Invalid session"; + assert mockLogin() : "Login failed"; + setValue("#{movieHome.movieId}", theBigLebowskiId); + invokeMethod( "#{movieHome.wire}" ); + setValue("#{movieHome.instance.plot}", THE_BIG_LEBOWSKI_PLOT); + Object result = invokeMethod( "#{movieHome.update}" ); + Assert.assertEquals(result, "updated", "#{movieHome.update}"); + Conversation.instance().end(); + } + }.run(); + } + + @Test + public void unauthorizedAccess() throws Exception { + new FacesRequest("/view/example/MovieEdit.xhtml") { + @Override + protected void invokeApplication() throws Exception { + Conversation.instance().begin(); + assert !isSessionInvalid() : "Invalid session"; + setValue("#{movieHome.movieId}", theBigLebowskiId); + invokeMethod( "#{movieHome.wire}" ); + setValue("#{movieHome.instance.plot}", "Not allowed to edit"); + + try { + invokeMethod( "#{movieHome.update}" ); + assert false : "Expected authentication failed!"; + } + catch (javax.el.ELException e) { + assert e.getCause() instanceof org.jboss.seam.security.NotLoggedInException : + "Expected to fail with: 'org.jboss.seam.security.NotLoggedInException'"; + + log.debug("Passed expected unauthorized access failure: " + e.getMessage()); + } + finally { + Conversation.instance().end(); + } + } + }.run(); + } + + @Test + public void persistWithMissingRequiredFieldValue() throws Exception { + new FacesRequest("/view/example/MovieEdit.xhtml") { + @Override + protected void invokeApplication() throws Exception { + Conversation.instance().begin(); + assert !isSessionInvalid() : "Invalid session"; + assert mockLogin() : "Login failed"; + invokeMethod("#{movieHome.clearInstance}"); + setValue("#{movieHome.instance.director}", DIRECTOR_JOEL_COEN); + setValue("#{movieHome.instance.year}", THE_BIG_LEBOWSKI_YEAR); + // The title field value is missing + + try { + invokeMethod( "#{movieHome.persist}" ); + assert false : "Movie with missing field value persisted!"; + } + catch (javax.el.ELException e) { + assert e.getCause() instanceof javax.persistence.PersistenceException : + "Expected to fail with: 'javax.persistence.PersistenceException'"; + + log.debug("Passed expected missing required field value failure: " + e.getMessage()); + } + finally { + Conversation.instance().end(); + } + } + }.run(); + } + + @Test + public void duplicateUniqueSecondaryIndex() throws Exception { + new FacesRequest("/view/example/MovieEdit.xhtml") { + @Override + protected void invokeApplication() throws Exception { + Conversation.instance().begin(); + assert !isSessionInvalid() : "Invalid session"; + assert mockLogin() : "Login failed"; + invokeMethod("#{movieHome.clearInstance}"); + setValue("#{movieHome.instance.director}", DIRECTOR_JOEL_COEN); + setValue("#{movieHome.instance.title}", THE_BIG_LEBOWSKI_TITLE); + setValue("#{movieHome.instance.year}", THE_BIG_LEBOWSKI_YEAR); + // The title field value must be unique + + try { + invokeMethod( "#{movieHome.persist}" ); + assert false : "Expected to persist a movie with a duplicate unique secondary index!"; + } + catch (javax.el.ELException e) { + assert e.getCause() instanceof javax.persistence.PersistenceException : + "Expected to fail with: 'javax.persistence.PersistenceException'"; + + log.debug("Passed expected duplicate unique secondary index failure: " + e.getMessage()); + } + finally { + Conversation.instance().end(); + } + } + }.run(); + } + + @Test + public void deleteMovie() throws Exception { + new FacesRequest("/view/example/MovieEdit.xhtml") { + @Override + protected void invokeApplication() throws Exception { + Conversation.instance().begin(); + assert !isSessionInvalid() : "Invalid session"; + assert mockLogin() : "Login failed"; + setValue("#{movieHome.movieId}", reservoirDogsId); + invokeMethod( "#{movieHome.wire}" ); + Assert.assertEquals(invokeMethod( "#{movieHome.remove}" ), "removed", "#{movieHome.remove}"); + Conversation.instance().end(); + } + }.run(); + } + + @Test + public void findMoviesDirectedByJoelCoen() throws Exception { + + new FacesRequest("/view/example/MovieList.xhtml") { + @Override + protected void updateModelValues() throws Exception { + setValue("#{movieList.movie.director}", DIRECTOR_JOEL_COEN); + } + + @SuppressWarnings("unchecked") + @Override + protected void renderResponse() throws Exception { + List list= (List) invokeMethod( "#{movieList.getResultList()}" ); + Assert.assertEquals(list.size(), 2, "#{movieList.getResultList()}"); + Movie movie = list.get(0); + Assert.assertEquals(movie.getDirector(), DIRECTOR_JOEL_COEN, "movie.getDirector()"); + } + }.run(); + } +} diff --git a/ejb/src/test/java/no/knowit/seam/example/security/AuthenticatorTest.java b/ejb/src/test/java/no/knowit/seam/example/security/AuthenticatorTest.java new file mode 100644 index 0000000..a3b80a2 --- /dev/null +++ b/ejb/src/test/java/no/knowit/seam/example/security/AuthenticatorTest.java @@ -0,0 +1,88 @@ +package no.knowit.seam.example.security; + +import no.knowit.seam.openejb.mock.SeamOpenEjbTest; + +import org.jboss.seam.core.Manager; +import org.testng.annotations.BeforeSuite; +import org.testng.annotations.Test; + +public class AuthenticatorTest extends SeamOpenEjbTest { + + @Override + @BeforeSuite + public void beforeSuite() throws Exception { + + //System.out.println("**** AuthenticatorTest.beforeSuite()"); + + // Change some logging, INFO|DEBUG|WARN|ERROR|FATAL contextProperties.put("log4j.category.org.jboss.seam.Component", "DEBUG"); + contextProperties.put("log4j.category.org.jboss.seam.transaction", "DEBUG"); + contextProperties.put("log4j.category.org.jboss.seam.mock", "DEBUG"); + contextProperties.put("log4j.category.no.knowit.seam.openejb.mock", "DEBUG"); + contextProperties.put("log4j.category.no.knowit.seam.example", "debug"); + super.beforeSuite(); + } + + + @Test + public void shouldAuthenticate() throws Exception { + new ComponentTest() { + + @Override + protected void testComponents() throws Exception { + assert getValue("#{identity.loggedIn}").equals(false); + + setValue("#{identity.username}", "admin"); + setValue("#{identity.password}", ""); + invokeMethod("#{identity.login}"); + assert getValue("#{identity.loggedIn}").equals(true) : "Login failed"; + + invokeMethod("#{identity.logout}"); + assert getValue("#{identity.loggedIn}").equals(false) : "Logout failed"; + } + }.run(); + } + + @Test + public void shouldLoginThenLogout() throws Exception { + + new NonFacesRequest() { + + @Override + protected void renderResponse() { + assert getValue("#{identity.loggedIn}").equals(false) : "Already logged in"; + } + }.run(); + + new FacesRequest("/login.xhtml") { + @Override + protected void updateModelValues() throws Exception { + assert !isSessionInvalid() : "Invalid session"; + setValue("#{credentials.username}", "admin"); + } + + @Override + protected void invokeApplication() throws Exception { + assert invokeMethod("#{authenticator.authenticate}").equals(true) : "Authentication failed"; + assert invokeMethod("#{identity.login}").equals("loggedIn") : "Login failed"; + } + + @Override + protected void renderResponse() { + assert getValue("#{credentials.username}").equals("admin") : "Wrong user name"; + assert !Manager.instance().isLongRunningConversation() : "!Manager.instance().isLongRunningConversation()"; + assert getValue("#{identity.loggedIn}").equals(true) : "Login failed"; + } + }.run(); + + new FacesRequest() { + @Override + protected void invokeApplication() throws Exception { + assert getValue("#{identity.loggedIn}").equals(true) : "Not logged in"; + invokeMethod("#{identity.logout}"); + assert getValue("#{identity.loggedIn}").equals(false) : "Logout failed"; + } + }.run(); + + } + +} diff --git a/ejb/src/test/resources-openejb/WEB-INF/components.xml b/ejb/src/test/resources-openejb/WEB-INF/components.xml new file mode 100644 index 0000000..d2c79e1 --- /dev/null +++ b/ejb/src/test/resources-openejb/WEB-INF/components.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ejb/src/test/resources-openejb/WEB-INF/web.xml b/ejb/src/test/resources-openejb/WEB-INF/web.xml new file mode 100644 index 0000000..b9f2dd8 --- /dev/null +++ b/ejb/src/test/resources-openejb/WEB-INF/web.xml @@ -0,0 +1,21 @@ + + + + + org.jboss.seam.servlet.SeamListener + + + + Seam Filter + org.jboss.seam.servlet.SeamFilter + + + + Seam Filter + /* + + + \ No newline at end of file diff --git a/ejb/src/test/resources-openejb/jndi.properties b/ejb/src/test/resources-openejb/jndi.properties new file mode 100644 index 0000000..991efa7 --- /dev/null +++ b/ejb/src/test/resources-openejb/jndi.properties @@ -0,0 +1,47 @@ +# OpenEJB jndi properties +# see: http://openejb.apache.org/3.0/embedded-configuration.html +# see: https://blogs.apache.org/openejb/entry/example_common_troubleshooting_flags + +# set the initial context factory +# NOTE: It is important that this line is present in the jndi.properties file. +# Seam does not work without this line! +java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory + +# Corresponds to JBoss JNDI lookup format in ${app.jndi.pattern.test} property +# see: http://openejb.apache.org/3.0/jndi-names.html +openejb.jndiname.format={deploymentId}/{interfaceType.annotationName} + +# Multiple ejb's in classpath, +# see: http://openejb.apache.org/3.0/system-properties.html +openejb.deployments.classpath.ear=true + +# Prefixing configuration files, e.g. persistence.xml ==> openejb.persistence.xml, +# see: http://openejb.apache.org/3.0/alternate-descriptors.html +openejb.altdd.prefix=openejb + +# Uncomment next two lines to get a more detailed log output, see: http://openejb.apache.org/logging.html +#log4j.appender.C.layout=org.apache.log4j.PatternLayout +#log4j.appender.C.layout.ConversionPattern=[%d{HH:mm:ss,SSS}] %5p (%F:%L) - %m%n + +# Database connection (same as *-ds.xml in JBoss), filtered using properties from filter-*.properties during build +${ds.jndi.name} = new://Resource?type=DataSource +${ds.jndi.name}.JdbcDriver=${ds.driver.class.test} +${ds.jndi.name}.JdbcUrl=${ds.connection.url.test} +${ds.jndi.name}.username=${ds.user.name.test} +${ds.jndi.name}.password=${ds.password.test} +${ds.jndi.name}.JtaManaged=true + +${ds.jndi.name}Unmanaged = new://Resource?type=DataSource +${ds.jndi.name}Unmanaged.JdbcDriver=${ds.driver.class.test} +${ds.jndi.name}Unmanaged.JdbcUrl=${ds.connection.url.test} +${ds.jndi.name}Unmanaged.username=${ds.user.name.test} +${ds.jndi.name}Unmanaged.password=${ds.password.test} +${ds.jndi.name}Unmanaged.JtaManaged=false + +# Overriding Persistence Unit (as an alternative to maintaining two persistence units) +# see: http://cwiki.apache.org/OPENEJBx30/configuring-persistenceunits-in-tests.html +${pu.name}.hibernate.dialect=${ds.hibernate.dialect.test} +${pu.name}.hibernate.hbm2ddl.auto=${pu.hibernate.hbm2ddl.auto.test} +${pu.name}.hibernate.default_batch_fetch_size=${pu.hibernate.default_batch_fetch_size.test} +${pu.name}.hibernate.show_sql=${pu.hibernate.show_sql.test} +${pu.name}.hibernate.transaction.manager_lookup_class=${pu.hibernate.transaction.manager_lookup_class.test} diff --git a/ejb/src/test/resources/import.sql b/ejb/src/test/resources/import.sql new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ejb/src/test/resources/import.sql diff --git a/ejb/src/test/resources/log4j.properties b/ejb/src/test/resources/log4j.properties new file mode 100644 index 0000000..f6ba439 --- /dev/null +++ b/ejb/src/test/resources/log4j.properties @@ -0,0 +1,46 @@ +# Set root category priority to INFO and its only appender to CONSOLE. +log4j.rootCategory=INFO, CONSOLE + +# CONSOLE is set to be a ConsoleAppender using a PatternLayout. +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Threshold=DEBUG +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=[%d{HH:mm:ss,SSS}] %5p (%F:%L) - %m%n + +# TODO: Add some properties to filter-*.properties to control log output + +### Project logging ### +#log4j.category.no.knowit=debug + +### Hibernate logging ### + +#log4j.logger.org.hibernate=info +#log4j.logger.org.hibernate=debug + +### log HQL query parser activity +#log4j.logger.org.hibernate.hql.ast.AST=debug + +### log just the SQL +#log4j.logger.org.hibernate.SQL=debug + +### log JDBC bind parameters ### +#log4j.logger.org.hibernate.type=info + +### log schema export/update ### +#log4j.logger.org.hibernate.tool.hbm2ddl=info + +### log HQL parse trees +#log4j.logger.org.hibernate.hql=debug + +### log cache activity ### +#log4j.logger.org.hibernate.cache=info + +### log transaction activity +#log4j.logger.org.hibernate.transaction=debug + +### log JDBC resource acquisition +#log4j.logger.org.hibernate.jdbc=debug + +### enable the following line if you want to track down connection ### +### leakages when using DriverManagerConnectionProvider ### +#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace diff --git a/ejb/testng.xml b/ejb/testng.xml new file mode 100644 index 0000000..f60ef56 --- /dev/null +++ b/ejb/testng.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..85b2aa9 --- /dev/null +++ b/pom.xml @@ -0,0 +1,550 @@ + + + + 4.0.0 + + no.knowit.seam + root + 2.2.0-SNAPSHOT + + + + + no.knowit.seam + seam-refimpl + + 1.0-SNAPSHOT + ${project.artifactId} : ${project.version} + The Seam Maven reference implementation project + http://code.google.com/p/seam-maven-refimpl/ + pom + + + ejb + war + ear + + + + dev + + + refimpl + seam-refimpl + + ${app.context} + Seam Reference Implementation + + The Seam Reference Implementation is a Maven multi module project you can use as a template for your own JBoss Seam project + + UTF-8 + UTF-8 + UTF-8 + false + ${app.context}-ear/#{ejbName}/local + + /#{ejbName}/Local + + + + postgresql + postgresql + 8.3-606.jdbc4 + + + + + + + ${project.groupId} + ${app.context}-ear + ${project.version} + ear + + + + ${project.groupId} + ${app.context}-war + ${project.version} + war + + + + ${project.groupId} + ${app.context}-ejb + ${project.version} + ejb + + + + + + + no.knowit.seam + seam-utils-ejb + 1.0-SNAPSHOT + ejb + + + + + no.knowit.seam + seam-utils-openejb + 1.0-SNAPSHOT + ejb + + + + org.jboss.jsfunit + jboss-jsfunit-core + 1.3.0.Final + + + + org.jboss.jsfunit + jboss-jsfunit-core + 1.3.0.Final + + + + org.unitils + unitils-core + 3.1 + + + junit + junit + + + + + + org.unitils + unitils-dbmaintainer + 3.1 + + + + org.unitils + unitils-dbunit + 3.1 + + + + org.dbmaintain + dbmaintain + 2.1 + + + + ${jdbc.driver.groupId} + ${jdbc.driver.artifactId} + ${jdbc.driver.version} + + + + + + + + + + + org.jboss.seam + jboss-seam + provided + ejb + + + + org.jboss.el + jboss-el + provided + + + + + org.richfaces.framework + richfaces-api + provided + + + + + org.hibernate + hibernate-core + provided + + + + org.hibernate + hibernate-annotations + provided + + + + org.hibernate + hibernate-validator + provided + + + + org.hibernate + hibernate-commons-annotations + provided + + + + + javax.ejb + ejb-api + provided + + + + javax.el + el-api + provided + + + + javax.faces + jsf-api + provided + + + + javax.faces + jsf-impl + provided + + + + javax.persistence + persistence-api + provided + + + + javax.servlet + servlet-api + provided + + + + javax.transaction + jta + provided + + + + javax.jms + jms + provided + + + + + commons-collections + commons-collections + provided + + + + commons-logging + commons-logging + provided + + + + + + org.drools + drools-core + provided + + + + org.drools + drools-compiler + provided + + + + org.drools + drools-api + provided + + + + org.drools + drools-decisiontables + provided + + + + org.drools + drools-templates + provided + + + + com.thoughtworks.xstream + xstream + provided + + + + xpp3 + xpp3_min + provided + + + + + org.antlr + antlr-runtime + provided + + + + + org.jbpm + jbpm-jpdl + provided + + + + + log4j + log4j + provided + + + + + + + + + org.hibernate + hibernate-entitymanager + test + + + javax.persistence + persistence-api + + + javax.transaction + jta + + + + + + + com.h2database + h2 + test + + + + + + + + + junit + junit + test + + + + + + + org.slf4j + slf4j-log4j12 + test + + + + + javassist + javassist + test + + + + + + show-properties + + + + maven-antrun-plugin + + + generate-sources + + run + + + + project.artifactId : ${project.artifactId} + env : ${env} + app.context : ${app.context} + app.unpack.modules : ${app.unpack.modules} + project.parent.basedir : ${project.parent.basedir} + project.basedir : ${project.basedir} + project.build.directory : ${project.build.directory} + jdk.source : ${jdk.source} + jdk.target : ${jdk.target} + jdk.debug : ${jdk.debug} + jdk.optimize : ${jdk.optimize} + as : ${as} + as.version : ${as.version} + as.deploy : ${as.deploy} + ds : ${ds} + ds.connection.url : ${ds.connection.url} + ds.xml : ${ds.xml} + pu.hibernate.dialect : ${pu.hibernate.dialect} + pu.hibernate.show_sql : ${pu.hibernate.show_sql} + ds.test : ${ds.test} + ds.connection.url.test : ${ds.connection.url.test} + pu.hibernate.dialect.test : ${pu.hibernate.dialect.test} + pu.hibernate.show_sql.test: ${pu.hibernate.show_sql.test} + unitils.dbscripts.src: ${unitils.dbscripts.src} + + + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${jdk.source} + ${jdk.target} + ${jdk.debug} + ${jdk.optimize} + + + + + org.codehaus.mojo + buildnumber-maven-plugin + + + {0,date,yyyy-MM-dd HH:mm:ss} + + timestamp + + + + + + + + scm:svn:http://seam-maven-refimpl.googlecode.com/svn/trunk + scm:svn:https://seam-maven-refimpl.googlecode.com/svn/trunk + http://code.google.com/p/seam-maven-refimpl/source/browse/#svn/trunk + + + + + \ No newline at end of file diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..9adb640 --- /dev/null +++ b/readme.txt @@ -0,0 +1,2 @@ +Before you build any projects you'll have to build the root pom and required dependencies, +see: "../readme.txt" \ No newline at end of file diff --git a/src/main/dbscripts/001_initial.sql b/src/main/dbscripts/001_initial.sql new file mode 100644 index 0000000..efc1673 --- /dev/null +++ b/src/main/dbscripts/001_initial.sql @@ -0,0 +1,7 @@ +CREATE TABLE users ( + id bigint PRIMARY KEY, + password_digest character varying(35) NOT NULL, + username character varying(255) NOT NULL, + registration_date date NOT NULL, + active boolean NOT NULL +); \ No newline at end of file diff --git a/src/main/filters/filter-default.properties b/src/main/filters/filter-default.properties new file mode 100644 index 0000000..54eb262 --- /dev/null +++ b/src/main/filters/filter-default.properties @@ -0,0 +1,233 @@ +jdk.debug =true +jdk.optimize=false +jdk.source =1.6 +jdk.target =1.6 + +app.debug =${jdk.debug} +app.unpack.modules=false + +# JBoss 4.2.2 +as =jboss422 +as.version=4.2 +as.home =/home/bernard/jboss-4.2.2.GA +as.deploy =${as.home}/server/default/deploy + +# Datasource +ds =postgres +ds.jndi.name =${app}Database +ds.database.name =${app}_db +ds.server.name = +ds.driver.class =org.postgresql.Driver +ds.connection.url =jdbc:postgresql:seam-refimpl-lite +ds.user.name =seam-refimpl-lite +ds.password =seam-refimpl-lite +ds.schema =public +ds.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +ds.xml =${app.context}-ds.xml + +# Persistence unit +pu.name =${app}-unit +pu.jta.data.source =java:/${ds.jndi.name} +pu.hibernate.dialect =${ds.hibernate.dialect} +pu.hibernate.hbm2ddl.auto =create-drop +pu.hibernate.show_sql =false +pu.hibernate.default_batch_fetch_size =16 +pu.hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup +pu.jboss.entity.manager.factory.jndi.name =java:/${app.context}EntityManagerFactory + +# Properties for running unit/integration tests +ds.test =h2 +ds.database.name.test =${app}_db +ds.server.name.test = +ds.driver.class.test =org.h2.Driver +ds.connection.url.test =jdbc:h2:mem:${ds.database.name.test} +ds.user.name.test =sa +ds.password.test = +ds.hibernate.dialect.test=org.hibernate.dialect.H2Dialect + +pu.hibernate.dialect.test =${ds.hibernate.dialect.test} +pu.hibernate.hbm2ddl.auto.test =create-drop +pu.hibernate.default_batch_fetch_size.test =16 +pu.hibernate.show_sql.test =true +pu.hibernate.transaction.manager_lookup_class.test=org.apache.openejb.hibernate.TransactionManagerLookup + +# Mail server configuration +mail.host= +mail.username= +mail.password= +mail.port= +mail.tls= +mail.sender.email= + +# Site root URL +virtual.host=localhost +app.context.root=${app.context} +urlBase=http://localhost:8080/${app.context.root} + +#JSFUnit +cargo.hostname=localhost +cargo.servlet.port=8080 +cactus.contextURL=http://localhost:${cargo.servlet.port}/${app.context} +jsfunit.context_filter.installed=true + + +# Unitils +unitils.generateDataSetStructure=false +unitils.dbschema=${basedir}/../src/test/dbschemaxsd +unitils.dbscripts.src=${basedir}/../src/main/dbscripts +unitils.dbscripts.output=${basedir}/../src/main/dbscripts +unitils.dialect=postgresql + +#DBmaintain +dbmaintain.excludedQualifiers=dev +dbmaintain.fromScratchEnabled=false +dbmaintain.qualifiers=dev + +# Richfaces +org.ajax4jsf.COMPRESS_SCRIPT=true + + +# Sample as +#---------- + +# JBoss 4.2.3 +#as =jboss423 +#as.version=4.2 +#as.home =C:/dev/server/jboss-4.2.3.GA-jdk6 +#as.deploy =${as.home}/server/default/deploy + +# JBoss 5 +#as =jboss5 +#as.version=5 +#as.home =C:/dev/server/jboss-5.1.0.GA-jdk6 +#as.deploy =${as.home}/server/default/deploy + +# JBoss 6 - See: https://jira.jboss.org/jira/browse/JBSEAM-4192 +#as =jboss6 +#as.version=5 +#as.home =C:/dev/server/jboss-6.0.0.20100216-M2 +#as.deploy =${as.home}/server/default/deploy + +# Sample datasources +#----------------------- + +# MySQL5 +#ds =mysql5 +#ds.jndi.name =${app}Database +#ds.database.name =${app}_db +#ds.server.name =localhost:3306 +#ds.driver.class =com.mysql.jdbc.Driver +#ds.connection.url =jdbc:mysql://${ds.server.name}/${ds.database.name}?characterEncoding=UTF-8 +#ds.user.name =root +#ds.password = +#ds.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect +#ds.xml =${app.context}-ds.xml + +# HSQL memory database +#ds =hsqldb +#ds.jndi.name =${app}Database +#ds.database.name =${app}test_db +#ds.server.name = +#ds.driver.class =org.hsqldb.jdbcDriver +#ds.connection.url =jdbc:hsqldb:mem:${ds.database.name} +#ds.user.name =sa +#ds.password = +#ds.hibernate.dialect=org.hibernate.dialect.HSQLDialect +#ds.xml =${app.context}-ds.xml + +# H2 memory database +#ds =h2 +#ds.jndi.name =${app}Database +#ds.database.name =${app}_db +#ds.server.name = +#ds.driver.class =org.h2.Driver +#ds.connection.url =jdbc:h2:mem:${ds.database.name} +#ds.user.name =sa +#ds.password = +#ds.hibernate.dialect=org.hibernate.dialect.H2Dialect +#ds.xml =${app.context}-ds.xml + +# Postgre SQL +#ds =postgresql +#ds.jndi.name =${app}Database +#ds.driver.class =org.postgresql.Driver +#ds.server.name =localhost:5432 +#ds.database.name =${app}_db +#ds.connection.url =jdbc:postgresql://${ds.server.name}/${ds.database.name}?charSet=UTF8 +#ds.user.name =username +#ds.password =password +#ds.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +#ds.xml =${app.context}-ds.xml + +# Ms SqlServer +#ds =sqlserver +#ds.jndi.name =${app}Database +#ds.driver.class =net.sourceforge.jtds.jdbc.Driver +#ds.server.name =localhost:1433 +#ds.database.name =${app}_db +#ds.connection.url =jdbc:jtds:sqlserver://${ds.server.name}/${ds.database.name};tds=8.0;lastupdatecount=true +#ds.user.name =username +#ds.password =password +#ds.hibernate.dialect=org.hibernate.dialect.SQLServerDialect +#ds.xml =${app.context}-ds.xml + +# Oracle 10g +#ds =oracle10g +#ds.jndi.name =${app}Database +#ds.server.name =ystu066sl:1521 +#ds.database.name =sls09 +#ds.driver.class =oracle.jdbc.driver.OracleDriver +#ds.connection.url =jdbc:oracle:thin:@//${ds.server.name}/${ds.database.name} +#ds.user.name =scott +#ds.password =tiger +#ds.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect + +# ---------------------------------------------------------------------------------------------------------------------------------------------------- +# Property reference: +# ${property} =example value [file] +# ---------------------------------------------------------------------------------------------------------------------------------------------------- +# ${env} =dev [pom.xml, ear/pom.xml, ejb/pom.xml, war/pom.xml] +# +# ${jdk} = [pom.xml] +# ${jdk.source} =1.6 [pom.xml] +# ${jdk.target} =1.6 [pom.xml] +# ${jdk.debug} =true [pom.xml] +# ${jdk.optimize} =false [pom.xml] +# +# ${as} =jboss423 [] +# ${as.version} =4.2 [ear/pom.xml] +# ${as.home} =./target/jboss-4.2.3.GA-jdk6 [] +# ${as.deploy} =${as.home}/server/default/deploy [ear/pom.xml, ejb/pom.xml, war/pom.xml] +# +# ${app} =refimpl [pom.xml] +# ${app.context} =seam-${app} [pom.xml, ear/pom.xml, ejb/pom.xml, war/pom.xml, jboss-web.xml] +# ${app.web.context} =${app.context} [pom.xml. ear/pom.xml] +# ${app.debug} =${jdk.debug} [components.xml, web.xml] +# ${app.unpack.modules} =true [ear/pom.xml] +# ${app.display.name} =Seam Reference Implementation [ear/pom.xml, web.xml] +# ${app.description} =The Seam Refimpl lorem ipsum dolar est... [pom.xml, ear/pom.xml] +# ${app.distributable} =false [components.xml, web.xml] +# ${app.jndi.pattern} =${app.context}-ear/#{ejbName}/local [components.xml] +# +# ${ds} =mysql5 [] +# ${ds.jndi.name} =${app}Database [*-ds.xml, jndi.properties] +# ${ds.database.name} =${app}_db [] +# ${ds.server.name} =localhost:3306 [] +# ${ds.driver.class} =com.mysql.jdbc.Driver [*-ds.xml, jndi.properties] +# ${ds.connection.url} =jdbc:mysql://${ds.server.name}/ +# ${ds.database.name}?characterEncoding=UTF-8 [*-ds.xml, jndi.properties] +# ${ds.user.name} =root [*-ds.xml, jndi.properties] +# ${ds.password} = [*-ds.xml, jndi.properties] +# ${ds.xml} =${app.context}-ds.xml [ear/pom.xml] +# ${ds.hibernate.dialect} =org.hibernate.dialect.MySQL5InnoDBDialect [] +# +# ${pu} = [] +# ${pu.name} =${app}-unit [persistence.xml, components.xml, jndi.properties] +# ${pu.jta.data.source} =java:/${ds.jndi.name} [persistence.xml, jndi.properties] +# ${pu.hibernate.dialect} =${ds.hibernate.dialect} [persistence.xml, jndi.properties] +# ${pu.hibernate.hbm2ddl.auto} =create-drop [persistence.xml, jndi.properties] +# ${pu.hibernate.show_sql} =false [persistence.xml, jndi.properties] +# ${pu.hibernate.default_batch_fetch_size} =16 [persistence.xml, jndi.properties] +# ${pu.jboss.entity.manager.factory.jndi.name} =java:/${app.context}EntityManagerFactory [persistence.xml, components.xml, jndi.properties] +# ${pu.hibernate.transaction.manager_lookup_class} =org.hibernate.transaction. +# JBossTransactionManagerLookup [persistence.xml, jndi.properties] diff --git a/src/test/dbschemaxsd/dataset.xsd b/src/test/dbschemaxsd/dataset.xsd new file mode 100644 index 0000000..7889fe4 --- /dev/null +++ b/src/test/dbschemaxsd/dataset.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/dbschemaxsd/public.xsd b/src/test/dbschemaxsd/public.xsd new file mode 100644 index 0000000..4e79483 --- /dev/null +++ b/src/test/dbschemaxsd/public.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/war/nonhotdeployable b/war/nonhotdeployable new file mode 100644 index 0000000..502afd2 --- /dev/null +++ b/war/nonhotdeployable @@ -0,0 +1,6 @@ +**/*IT.class +**/*IT$*.class +**/*ITI.class +**/no/knowit/seam/example/model/**/*.class +**/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase.class +**/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase$*.class \ No newline at end of file diff --git a/war/pom.xml b/war/pom.xml new file mode 100644 index 0000000..6b2d9c1 --- /dev/null +++ b/war/pom.xml @@ -0,0 +1,765 @@ + + + + 4.0.0 + + no.knowit.seam + seam-refimpl + 1.0-SNAPSHOT + ../pom.xml + + + seam-refimpl-war + + ${project.artifactId} : ${project.version} + The Seam Maven reference implementation WAR module + war + + + ${project.build.finalName}/#{ejbName}/local + + + + + + env-dev + + + ../src/main/filters/filter-dev.properties + + + + dev + + + + + env-default + + true + + + default + + + + + explode + + + + maven-antrun-plugin + + + war-process-classes + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + explodeTestsFast + + + + maven-antrun-plugin + + + process-test-classes + process-test-classes + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unexplode + + + + maven-antrun-plugin + + + clean + clean + + + + + Unexploding: ${deploy-path} + + + + + + + + run + + + + + + + + + + + restart + + + + maven-antrun-plugin + + + war-package + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-app-ds-xml + initialize + + copy-resources + + + ${as.deploy} + + + ../ear/src/main/resources + true + + ${ds.xml} + + + + + + + + + + + + jsfunit + + + org.jboss.jsfunit + jboss-jsfunit-core + compile + + + xerces + xercesImpl + + + xalan + xalan + + + + + + + junit + junit + 3.8.2 + runtime + + + + org.unitils + unitils-core + + + + org.unitils + unitils-dbunit + + + + org.unitils + unitils-dbmaintainer + + + org.hibernate + hibernate + + + + + + org.dbmaintain + dbmaintain + + + + ${jdbc.driver.groupId} + ${jdbc.driver.artifactId} + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + ${cactus.contextURL} + + true + + + + integration-test + integration-test + + integration-test + + + + verify + verify + + verify + + + + + + org.codehaus.cargo + cargo-maven2-plugin + + + jboss42x + remote + + + runtime + + ${cargo.hostname} + ${cargo.servlet.port} + + + + + + + + deploy + pre-integration-test + + undeploy + deploy + + + + + + org.apache.maven.plugins + maven-war-plugin + + + jsfunit + + war + + + + + src/test/resources + WEB-INF + + web.xml + + true + + + ${project.build.testOutputDirectory} + WEB-INF/classes + + **/*.class + + + + ${project.build.testOutputDirectory} + / + + **/*.xsl + + + + ${basedir}/src/test/resources + WEB-INF/classes + true + + + ${unitils.dbscripts.src} + WEB-INF/classes/ + true + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-app-ds-xml + initialize + + copy-resources + + + ${as.home}/server/default/deploy + + + ../ear/src/main/resources + true + + ${ds.xml} + + + + + + + + + + + + + skipSurefire + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + cli + + + + org.twdata.maven + maven-cli-plugin + 1.0.6-SNAPSHOT + + + properties:read-project-properties dbmaintain:disableConstraints + properties:read-project-properties dbmaintain:clearDatabase + properties:read-project-properties dbmaintain:updateDatabase + clean -Punexplode + package -S -Pexplode + package -S -Prestart + + clean properties:read-project-properties dbmaintain:clearDatabase dbmaintain:updateDatabase + dbmaintain:updateSequences dbmaintain:disableConstraints verify -Pjsfunit -Dmaven.test.skip=false + + restart -Pjsfunit -Dmaven.test.skip=false clearDatabase updateDatabase disableConstraints + + test -PexplodeTestsFast,skipSurefire -Dmaven.test.skip=false + + explode -Pjsfunit,skipSurefire -Dmaven.test.skip=false + + + + + + + + + + + + org.jboss.seam + jboss-seam + jar + ${version.seam} + + + + org.jboss.seam + jboss-seam-mail + + + + org.jboss.el + jboss-el + jar + + + + org.richfaces.framework + richfaces-api + jar + + + + commons-beanutils + commons-beanutils + jar + + + + commons-digester + commons-digester + jar + + + + + org.jboss.seam + jboss-seam-ui + + + + + org.jboss.seam + jboss-seam-debug + + + + + + + org.richfaces.framework + richfaces-impl + + + + org.richfaces.ui + richfaces-ui + + + + org.richfaces.samples + glassX + + + + org.richfaces.samples + darkX + + + + + com.sun.facelets + jsf-facelets + + + + + + + + + + org.jboss.jsfunit + jboss-jsfunit-core + test + + + xerces + xercesImpl + + + xalan + xalan + + + + + + org.unitils + unitils-dbunit + test + + + + + + ${app.context} + + + + src/main/resources + true + + + + + src/test/resources + true + + + + + + ${basedir}/../src/main/filters/filter-${env}.properties + + + + + + org.codehaus.mojo + properties-maven-plugin + + + ${basedir}/../src/main/filters/filter-${env}.properties + + + + + + + pre-clean + pre-clean + + read-project-properties + + + + + + + + org.apache.maven.plugins + maven-war-plugin + + + + ${basedir}/src/main/webapp/WEB-INF + WEB-INF + true + + + ${basedir}/../ejb/src/main/resources/META-INF + WEB-INF/classes/META-INF + + persistence.xml + + true + + + + + ${timestamp} + ${buildNumber} + ${env} + + + + + + + org.dbmaintain + dbmaintain-maven-plugin + + + + ${unitils.dialect} + ${ds.driver.class} + ${ds.user.name} + ${ds.password} + ${ds.connection.url} + ${ds.schema} + + + true + false + ${dbmaintain.fromScratchEnabled} + 1000 + false + ${unitils.dbscripts.src} + UTF-8 + ${dbmaintain.qualifiers} + ${dbmaintain.excludedQualifiers} + + + + ${jdbc.driver.groupId} + ${jdbc.driver.artifactId} + ${jdbc.driver.version} + + + + + + + diff --git a/war/readme.txt b/war/readme.txt new file mode 100644 index 0000000..33fd8cd --- /dev/null +++ b/war/readme.txt @@ -0,0 +1,111 @@ +This is WAR only implementation. All maven goals should be run within war directory. +This project configuration supports: + -JSFUnit tests + -hot deployment of Seam components + -hot deployment of JSFUnit tests + -maven-cli-plugin + -Unitils & DBMaintain + +-------------------- +maven-cli-plugin: +-------------------- +This is cool plugin for maven that speeds up execution of maven goals. What is even cooler it allows to alias bunch of goals, i.e.: + + org.twdata.maven + maven-cli-plugin + 1.0.6-SNAPSHOT + + + properties:read-project-properties dbmaintain:disableConstraints + properties:read-project-properties dbmaintain:clearDatabase + properties:read-project-properties dbmaintain:updateDatabase + clean -Punexplode + package -S -Pexplode + package -S -Prestart + + clean properties:read-project-properties dbmaintain:clearDatabase dbmaintain:updateDatabase + dbmaintain:updateSequences dbmaintain:disableConstraints verify -Pjsfunit -Dmaven.test.skip=false + + restart -Pjsfunit -Dmaven.test.skip=false updateDatabase disableConstraints + + test -PexplodeTestsFast,skipSurefire -Dmaven.test.skip=false + + explode -Pjsfunit,skipSurefire -Dmaven.test.skip=false + + + + +To lunch maven cli console run: mvn cli:execute-phase -P cli +From now on you can type i.e. "restart" to restart your exploded deployment on server. Original version of that plugin does not support verify phase which is +required to run JSFUnit tests. Use custom version from +http://bernard.labno.pl/artifactory/plugins-snapshot-local/org/twdata/maven/maven-cli-plugin/1.0.6-SNAPSHOT/maven-cli-plugin-1.0.6-SNAPSHOT.jar + +Project is configured with several useful aliases: + -explode - hot deploys facelets & Seam components + -unexplode - undeploys application from application server and clears target directory + -restart - deploys entire application to app server + -jsfunitRun - runs JSFUnit tests (it is assumed that JBoss is running) + -jsfunitExplode - hot deploys JSFUnit tests and data sets + -jsfunitRestart - deploys entire application with JSFUnit tests to app server + -updateDatabase - updates database using DBMaintain plugin (executes scripts from ../src/main/dbscripts) + +Note that jsfunitRun deploys application via jmx-console so it must be deployed on your server and you should run unexplode first to make sure that no exploded +deployment of the same application is on the server. + +-------------------- +JSFUnit tests: +-------------------- +JSFUnit tests are run by failsafe plugin during integration-test phase (use verify phase). Tests must obey naming convention "*IT". +When you build your application with JSFUnit tests remember that /src/test/resources/web.xml is used in stead of /src/main/webapp/WEB-INF/web.xml. +Always keep those files synchronized (the one used for JSFUnit tests has several additional lines at the bottom). +JSFUnit tests cannot be hot deployed, but they can invoke Seam components which in turn can be hot deployed, so you need to delegate. +See example of AuthenticatorIT, AuthenticatorITI and AuthenticatorITC. AuthenticatorIT is the propper test which will be run by JSFUnit, but it delegates +everything to AuthenticatorITC (c is for component). Because AuthenticatorIT lands in WEB-INF/classes and AuthenticatorITC lands in WEB-INF/dev they are +loaded by different classloaders and AuthenticatorIT cannot see AuthenticatorITC. But AuthenticatorIT can obtain AuthenticatorITC by invoking +Component.getInstance. It will return Object. It cannot be cast to AuthenticatorITC class because that class is not visible by AuthenticatorIT's classloader. +But it can be cast to some interface and thats what AuthenticatorITI is used for. +So, AuthenticatorITC is hot deployable while AuthenticatorIT and AuthenticatorITI are not. + +You can run tests from CLI console with jsfunitRun command (start JBoss before that). +When you develop tests it is better to jsfunitRestart and then lunch each test suite from browser, i.e.: + + http://localhost:8080/seam-refimpl/ServletTestRunner?suite=no.knowit.seam.example.security.test.AuthenticatorIT&xsl=cactus-report.xsl + +the xsl parameter is optional and can be used to transform XML results into human readable HTML form. + +In order to be able to call Component.getInstance from AuthenticatorIT there must be active Seam context. This is done in components.xml: + + + +In production this can be turned off. It maps context-filter to JSFUnit servlets. + +-------------------- +Hot deployment: +-------------------- +Project is configured to support hot deployment. Seam hot deploys stuff that lands in WEB-INF/dev. Nothing that is instantiated by classed from outside of that +directory can be put there (jsf validators, converters, entities, jsfunit test cases etc.). So everything that needs to be done is to copy some classes to WEB-INF/classes +and some classes to WEB-INF/dev. To tell Maven which class goes where use war/nonhotdeployable file. It uses Ant pattern syntax. Example: +**/*IT.class +**/*IT$*.class +**/*ITI.class +**/no/knowit/seam/example/model/**/*.class +**/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase.class +**/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase$*.class + +First line includes JSFUnit tests (IT suffix stands for integration test). +Second line includes any inner classes that could be defined in JSFUnit tests. +Third line includes interfaces of JSFUnit tests. +Fourth line includes entities. (If you scatter entities all over your packages tree then you will be in pain of maintaining this file often). +Fifth and sixth lines include base class used for tests. + +-------------------- +Unitils: +-------------------- +This is cool library for updating your database with data sets before each test. Datasets are defined as XML files in src/test/resources and must +match test's package an class name. Unitils looks cool with JUnit4 but this configuration uses JSFunit+Cactus which enforces JUnit3. +This is what AbstractUnitilisedJSFUnitTestCase is for. It invokes Unitils stuff before each test. +Important: if you want to have your data set inserted annotate your test (*IT) with @DataSet. +If you want XSD schema for your database to be generated just change unitils.generateDataSetStructure propert in filter to true. +It will regenerate src/test/dbschemaxsd/*.xsd. +Important: Under windows do not use ${basedir} in properties related to unitils. You will get problem with backslashes. +Just type full path with slashes, i.e.: d:/documents and settings/tralala/ \ No newline at end of file diff --git a/war/src/main/java/no/knowit/seam/example/model/Movie.java b/war/src/main/java/no/knowit/seam/example/model/Movie.java new file mode 100644 index 0000000..86d4237 --- /dev/null +++ b/war/src/main/java/no/knowit/seam/example/model/Movie.java @@ -0,0 +1,109 @@ +package no.knowit.seam.example.model; + +import org.hibernate.validator.Length; +import org.hibernate.validator.NotNull; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Version; + +import static javax.persistence.GenerationType.IDENTITY; + +@Entity +public class Movie implements java.io.Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = IDENTITY) + private Integer id; + + @Version + private Long version; + + @org.hibernate.annotations.Index(name="idx_director") + @Column(nullable = false, length = 50) + @NotNull + @Length(max = 50) + private String director; + + @Column(unique = true, nullable = false, length = 60) + @NotNull + @Length(max = 60) + private String title; + + @Column(nullable = false) + @NotNull + private Integer year; + + @Lob + private String plot; + + public Movie() { + } + + public Movie(final String director, final String title, Integer year) { + this.director = director; + this.title = title; + this.year = year; + } + + public Movie(final String director, final String title, Integer year, final String plot) { + this.director = director; + this.title = title; + this.year = year; + this.plot = plot; + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Long getVersion() { + return this.version; + } + + public void setVersion(Long version) { + this.version = version; + } + + public String getDirector() { + return this.director; + } + + public void setDirector(final String director) { + this.director = director; + } + + public String getTitle() { + return this.title; + } + + public void setTitle(final String title) { + this.title = title; + } + + public Integer getYear() { + return this.year; + } + + public void setYear(Integer year) { + this.year = year; + } + + public String getPlot() { + return this.plot; + } + + public void setPlot(final String plot) { + this.plot = plot; + } + +} diff --git a/war/src/main/java/no/knowit/seam/example/model/User.java b/war/src/main/java/no/knowit/seam/example/model/User.java new file mode 100644 index 0000000..86266e1 --- /dev/null +++ b/war/src/main/java/no/knowit/seam/example/model/User.java @@ -0,0 +1,102 @@ +package no.knowit.seam.example.model; + +import org.hibernate.validator.Email; +import org.hibernate.validator.Length; +import org.hibernate.validator.NotNull; +import org.jboss.seam.annotations.Name; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import java.io.Serializable; +import java.util.Date; + +@Entity +@Name("user") +@Table(name = "USERS") +public class User implements Serializable { + + @Id + @GeneratedValue + @Column(name = "ID") + private Long id; + + @NotNull + @Length(min = 1, max = 35) + @Column(name = "PASSWORD_DIGEST", nullable = false, length = 35) + private String passwordDigest; + + @NotNull + @Email + @Length(max = 255) + @Column(name = "USERNAME", nullable = false, unique = true) + private String username; + + @NotNull + @Temporal(javax.persistence.TemporalType.DATE) + @Column(name = "REGISTRATION_DATE", nullable = false) + private Date registrationDate; + + @Column(name = "ACTIVE", nullable = false) + private boolean active; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public Date getRegistrationDate() { + return registrationDate; + } + + public void setRegistrationDate(Date registrationDate) { + this.registrationDate = registrationDate; + } + + public String getPasswordDigest() { + return passwordDigest; + } + + public void setPasswordDigest(String passwordDigest) { + this.passwordDigest = passwordDigest; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @Override + public boolean equals(Object object) { + if (!(object instanceof User)) { + return false; + } + User other = (User) object; + return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))); + } + +} diff --git a/war/src/main/java/no/knowit/seam/example/security/Authenticator.java b/war/src/main/java/no/knowit/seam/example/security/Authenticator.java new file mode 100644 index 0000000..11a6a62 --- /dev/null +++ b/war/src/main/java/no/knowit/seam/example/security/Authenticator.java @@ -0,0 +1,48 @@ +package no.knowit.seam.example.security; + +import no.knowit.seam.example.model.User; +import org.jboss.seam.annotations.In; +import org.jboss.seam.annotations.Logger; +import org.jboss.seam.annotations.Name; +import org.jboss.seam.international.StatusMessages; +import org.jboss.seam.log.Log; +import org.jboss.seam.security.Credentials; +import org.jboss.seam.security.Identity; +import org.jboss.seam.security.management.PasswordHash; + +import javax.persistence.EntityManager; +import javax.persistence.NoResultException; + +@Name("authenticator") +public class Authenticator { + + @Logger + Log log; + @In + private EntityManager entityManager; + @In + Identity identity; + @In + Credentials credentials; + @In + StatusMessages statusMessages; + @In + PasswordHash passwordHash; + + /** + * Check user with given username and password exists in database. + * + * @return true if user exist and account is active; false otherwise + */ + public boolean authenticate() { + String passwordDigest = passwordHash.generateHash(credentials.getPassword()); + try { + User user = (User) entityManager.createQuery("from User where active = true and username=:username and passwordDigest=:password") + .setParameter("username", credentials.getUsername()).setParameter("password", passwordDigest).getSingleResult(); + log.info("#0 has logged in", user.getUsername()); + return true; + } catch (NoResultException ex) { + return false; + } + } +} diff --git a/war/src/main/resources/messages_bg.properties b/war/src/main/resources/messages_bg.properties new file mode 100644 index 0000000..3e40603 --- /dev/null +++ b/war/src/main/resources/messages_bg.properties @@ -0,0 +1,89 @@ +down = \u2193 + +javax.faces.component.UIInput.CONVERSION = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430\u043D\u0430 \u043A\u044A\u043C \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u0438\u044F \u0442\u0438\u043F +javax.faces.component.UIInput.REQUIRED = \u043F\u043E\u043B\u0435\u0442\u043E \u0435 \u0437\u0430\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E +javax.faces.component.UIInput.UPDATE = \u0432\u044A\u0437\u043D\u0438\u043A\u043D\u0430\u043B\u0430 \u0435 \u0433\u0440\u0435\u0448\u043A\u0430 \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430 \u043D\u0430 \u0438\u0437\u043F\u0440\u0430\u0442\u0435\u043D\u0430\u0442\u0430 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F +javax.faces.component.UISelectMany.INVALID = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0435 \u043D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 +javax.faces.component.UISelectOne.INVALID = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0435 \u043D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 +javax.faces.converter.BigDecimalConverter.DECIMAL = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.BigDecimalConverter.DECIMAL_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u0441\u044A\u0441 \u0437\u043D\u0430\u043A, \u0441\u044A\u0441\u0442\u043E\u044F\u0449\u043E \u0441\u0435 \u043E\u0442 \u043D\u0443\u043B\u0430 \u0438\u043B\u0438 \u043F\u043E\u0432\u0435\u0447\u0435 \u0446\u0438\u0444\u0440\u0438, \u0441\u043B\u0435\u0434\u0432\u0430\u043D\u043E \u043F\u043E \u0438\u0437\u0431\u043E\u0440 \u043E\u0442 \u0434\u0435\u0441\u0435\u0442\u0438\u0447\u043D\u0430 \u0437\u0430\u043F\u0435\u0442\u0430\u044F \u0438 \u0434\u0440\u043E\u0431\u043D\u0430 \u0447\u0430\u0441\u0442, \u043D\u0430\u043F\u0440. {1} +javax.faces.converter.BigIntegerConverter.BIGINTEGER = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E \u0441\u044A\u0441 \u0437\u043D\u0430\u043A, \u0441\u044A\u0441\u0442\u043E\u044F\u0449\u043E \u0441\u0435 \u043E\u0442 \u043D\u0443\u043B\u0430 \u0438\u043B\u0438 \u043F\u043E\u0432\u0435\u0447\u0435 \u0446\u0438\u0444\u0440\u0438 +javax.faces.converter.BooleanConverter.BOOLEAN = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 'true' \u0438\u043B\u0438 'false' +javax.faces.converter.BooleanConverter.BOOLEAN_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 'true' \u0438\u043B\u0438 'false' (\u0432\u0441\u044F\u043A\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0440\u0430\u0437\u043B\u0438\u0447\u043D\u0430 \u043E\u0442 'true' \u0449\u0435 \u0441\u0435 \u0441\u043C\u044F\u0442\u0430 \u0437\u0430 'false') +javax.faces.converter.ByteConverter.BYTE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0434\u0436\u0443 0 \u0438 255 +javax.faces.converter.ByteConverter.BYTE_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0434\u0436\u0443 0 \u0438 255 +javax.faces.converter.CharacterConverter.CHARACTER = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0437\u043D\u0430\u043A +javax.faces.converter.CharacterConverter.CHARACTER_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0432\u0430\u043B\u0438\u0434\u0435\u043D ASCII \u0437\u043D\u0430\u043A +javax.faces.converter.DateTimeConverter.DATE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0434\u0430\u0442\u0430 +javax.faces.converter.DateTimeConverter.DATETIME = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0434\u0430\u0442\u0430 \u0438 \u0447\u0430\u0441 +javax.faces.converter.DateTimeConverter.DATETIME_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0434\u0430\u0442\u0430 \u0438 \u0447\u0430\u0441, \u043D\u0430\u043F\u0440. {1} +javax.faces.converter.DateTimeConverter.DATE_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0434\u0430\u0442\u0430, \u043D\u0430\u043F\u0440. {1} +javax.faces.converter.DateTimeConverter.PATTERN_TYPE = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0437\u0430\u0434\u0430\u0434\u0435\u043D \u043E\u0431\u0440\u0430\u0437\u0435\u0446 \u0438\u043B\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 type, \u0437\u0430 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 +javax.faces.converter.DateTimeConverter.TIME = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043E\u0442 \u0442\u0438\u043F \u0447\u0430\u0441 +javax.faces.converter.DateTimeConverter.TIME_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043E\u0442 \u0442\u0438\u043F \u0447\u0430\u0441, \u043D\u0430\u043F\u0440. {1} +javax.faces.converter.DoubleConverter.DOUBLE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.DoubleConverter.DOUBLE_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 4.9E-324 \u0438 1.7976931348623157E308 +javax.faces.converter.EnumConverter.ENUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u0434\u043E \u0438\u0437\u0431\u0440\u043E\u0435\u043D \u0442\u0438\u043F +javax.faces.converter.EnumConverter.ENUM_NO_CLASS = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u043E\u0442 \u0438\u043B\u0438 \u0434\u043E \u0438\u0437\u0431\u0440\u043E\u0435\u043D \u0442\u0438\u043F, \u043D\u043E \u043D\u0435 \u0435 \u043F\u043E\u0434\u0430\u0434\u0435\u043D \u043A\u043B\u0430\u0441 \u043E\u0442 \u0442\u0430\u043A\u044A\u0432 \u0442\u0438\u043F +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u043E\u0442 \u0438\u043B\u0438 \u0434\u043E \u0438\u0437\u0431\u0440\u043E\u0435\u043D \u0442\u0438\u043F, \u043D\u043E \u043D\u0435 \u0435 \u043F\u043E\u0434\u0430\u0434\u0435\u043D \u043A\u043B\u0430\u0441 \u043E\u0442 \u0442\u0430\u043A\u044A\u0432 \u0442\u0438\u043F +javax.faces.converter.EnumConverter.ENUM_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u043E\u0442 \u0438\u043B\u0438 \u0434\u043E \u0438\u0437\u0431\u0440\u043E\u0435\u043D \u0442\u0438\u043F, \u043A\u043E\u0439\u0442\u043E \u0441\u044A\u0434\u044A\u0440\u0436\u0430 \u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0430\u0442\u0430 {1} +javax.faces.converter.FloatConverter.FLOAT = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.FloatConverter.FLOAT_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 1.4E-45 \u0438 3.4028235E38 +javax.faces.converter.IntegerConverter.INTEGER = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.IntegerConverter.INTEGER_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 -2147483648 \u0438 2147483647 +javax.faces.converter.LongConverter.LONG = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.LongConverter.LONG_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 -9223372036854775808 \u0438 9223372036854775807 +javax.faces.converter.NumberConverter.CURRENCY = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0441\u0443\u043C\u0430 \u0432\u044A\u0432 \u0432\u0430\u043B\u0443\u0442\u0430 +javax.faces.converter.NumberConverter.CURRENCY_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0441\u0443\u043C\u0430 \u0432\u044A\u0432 \u0432\u0430\u043B\u0443\u0442\u0430, \u043D\u0430\u043F\u0440. {1} +javax.faces.converter.NumberConverter.NUMBER = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.NumberConverter.NUMBER_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.NumberConverter.PATTERN = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.NumberConverter.PATTERN_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.NumberConverter.PERCENT = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u0440\u043E\u0446\u0435\u043D\u0442 +javax.faces.converter.NumberConverter.PERCENT_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u0440\u043E\u0446\u0435\u043D\u0442, \u043D\u0430\u043F\u0440. {1} +javax.faces.converter.STRING = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u0440\u0435\u0432\u044A\u0440\u043D\u0430\u0442\u0430 \u0432 \u043D\u0438\u0437 \u043E\u0442 \u0441\u0438\u043C\u0432\u043E\u043B\u0438 +javax.faces.converter.ShortConverter.SHORT = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E +javax.faces.converter.ShortConverter.SHORT_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 -32768 \u0438 32767 +javax.faces.validator.DoubleRangeValidator.MAXIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u043C\u0430\u043B\u043A\u0430 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u0430 \u043D\u0430 {0} +javax.faces.validator.DoubleRangeValidator.MINIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u0433\u043E\u043B\u044F\u043C\u0430 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u0430 \u043D\u0430 {0} +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043C\u0435\u0436\u0434\u0443 {0} \u0438 {1} +javax.faces.validator.DoubleRangeValidator.TYPE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u043D\u0435 \u0435 \u043E\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u043D\u0438\u044F \u0432\u0438\u0434 +javax.faces.validator.LengthValidator.MAXIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043D\u0435 \u043F\u043E-\u0434\u044A\u043B\u0433\u0430 \u043E\u0442 {0} \u0437\u043D\u0430\u043A\u0430 +javax.faces.validator.LengthValidator.MINIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u0434\u044A\u043B\u0433\u0430 \u043E\u0442 {0} \u0437\u043D\u0430\u043A\u0430 +javax.faces.validator.LongRangeValidator.MAXIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u043C\u0430\u043B\u043A\u0430 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u0430 \u043D\u0430 {0} +javax.faces.validator.LongRangeValidator.MINIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u0433\u043E\u043B\u044F\u043C\u0430 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u0430 \u043D\u0430 {0} +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043C\u0435\u0436\u0434\u0443 {0} \u0438 {1} +javax.faces.validator.LongRangeValidator.TYPE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u043D\u0435 \u0435 \u043E\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u043D\u0438\u044F \u0432\u0438\u0434 +javax.faces.validator.NOT_IN_RANGE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043C\u0435\u0436\u0434\u0443 {0} \u0438 {1} + +left = \u2039 + +org.jboss.seam.IllegalNavigation = \u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044F +org.jboss.seam.NoConversation = \u0420\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u044A\u0442 \u0435 \u043F\u0440\u0438\u043A\u043B\u044E\u0447\u0438\u043B, \u0438\u0437\u0442\u0435\u043A\u043B\u043E \u043C\u0443 \u0435 \u0432\u0440\u0435\u043C\u0435\u0442\u043E \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0432\u0430 \u0434\u0440\u0443\u0433\u0430 \u0437\u0430\u044F\u0432\u043A\u0430 +org.jboss.seam.ProcessEnded = \u041F\u0440\u043E\u0446\u0435\u0441 #0 \u0435 \u043F\u0440\u0438\u043A\u043B\u044E\u0447\u0438\u043B +org.jboss.seam.ProcessNotFound = \u041F\u0440\u043E\u0446\u0435\u0441 #0 \u043D\u0435 \u0435 \u043D\u0430\u043C\u0435\u0440\u0435\u043D +org.jboss.seam.TaskEnded = \u0417\u0430\u0434\u0430\u0447\u0430 #0 \u0435 \u043F\u0440\u0438\u043A\u043B\u044E\u0447\u0438\u043B\u0430 +org.jboss.seam.TaskNotFound = \u0417\u0430\u0434\u0430\u0447\u0430 #0 \u043D\u0435 \u0435 \u043D\u0430\u043C\u0435\u0440\u0435\u043D\u0430 +org.jboss.seam.TransactionFailed = \u0422\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F \u043D\u0435 \u0435 \u0443\u0441\u043F\u044F\u043B\u0430 +org.jboss.seam.NotLoggedIn = \u041C\u043E\u043B\u044F \u043F\u044A\u0440\u0432\u043E \u0441\u0435 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0430\u0439\u0442\u0435 + +org.jboss.seam.loginFailed = \u041D\u0435\u0443\u0441\u043F\u0435\u0448\u0435\u043D \u0432\u0445\u043E\u0434 +org.jboss.seam.loginSuccessful = \u0417\u0434\u0440\u0430\u0432\u0435\u0439, #0 + +right = \u203A + +up = \u2191 + +validator.assertFalse = \u0433\u0440\u0435\u0448\u043A\u0438 \u043F\u0440\u0438 \u0432\u0430\u043B\u0438\u0434\u0430\u0446\u0438\u044F +validator.assertTrue = \u0433\u0440\u0435\u0448\u043A\u0438 \u043F\u0440\u0438 \u0432\u0430\u043B\u0438\u0434\u0430\u0446\u0438\u044F +validator.email = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0432\u0430\u043B\u0438\u0434\u0435\u043D e-mail \u0430\u0434\u0440\u0435\u0441 +validator.future = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0431\u044A\u0434\u0435\u0449\u0430 \u0434\u0430\u0442\u0430 +validator.length = \u0434\u044A\u043B\u0436\u0438\u043D\u0430\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043C\u0435\u0436\u0434\u0443 {min} \u0438 {max} +validator.max = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u043C\u0430\u043B\u043A\u043E \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u043E \u043D\u0430 {value} +validator.min = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u0433\u043E\u043B\u044F\u043C\u043E \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u043E \u043D\u0430 {value} +validator.notNull = \u0435 \u0437\u0430\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E +validator.past = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0435 \u043C\u0438\u043D\u0430\u043B\u0430 \u0434\u0430\u0442\u0430\u0442\u0430 +validator.pattern = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0430 \u043D\u0430 "{regex}" +validator.range = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0435 \u043C\u0435\u0436\u0434\u0443 {min} \u0438 {max} +validator.size = \u0440\u0430\u0437\u043C\u0435\u0440\u044A\u0442 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0435 \u043C\u0435\u0436\u0434\u0443 {min} \u0438 {max} diff --git a/war/src/main/resources/messages_de.properties b/war/src/main/resources/messages_de.properties new file mode 100644 index 0000000..9c57c8d --- /dev/null +++ b/war/src/main/resources/messages_de.properties @@ -0,0 +1,88 @@ +up=\u2191 +down=\u2193 +left=\u2039 +right=\u203A + +validator.assertFalse=Validierung fehlgeschlagen +validator.assertTrue=Validierung fehlgeschlagen +validator.future=muss einem zuk\u00FCnfitigen Datum entsprechen +validator.length=die L\u00E4nge muss zwischen {min} und {max} liegen +validator.max=muss kleiner oder gleich {value} sein +validator.min=muss gr\u00F6\u00DFer oder gleich {value} sein +validator.notNull=darf nicht leer sein +validator.past=muss einem vergangenen Datum entsprechen +validator.pattern=muss dem regul\u00E4ren Ausdruck "{regex}" entsprechen +validator.range=muss im Wertebereich von {min} bis {max} liegen +validator.size=die Gr\u00F6\u00DFe muss zischen {min} und {max} liegen +validator.email=muss einer wohlgeformten E-Mailadresse entsprechen + +org.jboss.seam.loginFailed=Anmeldung fehlgeschlagen +org.jboss.seam.loginSuccessful=Willkommen, #0! + +org.jboss.seam.TransactionFailed=Transaktion fehlgeschlagen +org.jboss.seam.NoConversation=Der Vorgang wurde bereits beendet, verarbeitet eine andere Abfrage oder ergab eine Zeit\u00FCberschreitung +org.jboss.seam.IllegalNavigation=Unzul\u00E4ssige Navigation +org.jboss.seam.ProcessEnded=Prozess #0 wurde bereits beendet +org.jboss.seam.ProcessNotFound=Prozess #0 nicht gefunden +org.jboss.seam.TaskEnded=Funktion #0 wurde bereits beendet +org.jboss.seam.TaskNotFound=Funktion #0 nicht gefunden +org.jboss.seam.NotLoggedIn=Bitte melden Sie sich zun\u00E4chst an + +javax.faces.component.UIInput.CONVERSION=Wert konnte nicht in den erwarteten Typ umgewandelt werden +javax.faces.component.UIInput.REQUIRED=Wert erforderlich +javax.faces.component.UIInput.UPDATE=ein Fehler ist bei der Verarbeitung der von Ihnen gesendeten Daten aufgetreten +javax.faces.component.UISelectOne.INVALID=Wert ung\u00FCltig +javax.faces.component.UISelectMany.INVALID=Wert ung\u00FCltig + +javax.faces.converter.BigDecimalConverter.DECIMAL = ''{0}'' muss eine Dezimalzahl sein. +javax.faces.converter.BigDecimalConverter.DECIMAL_detail = ''{0}'' muss eine Dezimalzahl aus keinem oder mehr Zeichen gefolgt von einem optionalen Punkt und den Nachkommastellen sein. Beispiel: {1} +javax.faces.converter.BigIntegerConverter.BIGINTEGER = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. Beispiel: {1} +javax.faces.converter.BooleanConverter.BOOLEAN = ''{0}'' muss 'true' oder 'false' sein. +javax.faces.converter.BooleanConverter.BOOLEAN_detail = ''{0}'' muss 'true' oder 'false' sein. Jeder Wert au\u00DFer 'true' wird als 'false' interpretiert. +javax.faces.converter.ByteConverter.BYTE = ''{0}'' muss eine Zahl zwischen 0 und 255 sein. +javax.faces.converter.ByteConverter.BYTE_detail = ''{0}'' muss eine Zahl zwischen 0 und 255 sein. Beispiel: {1} +javax.faces.converter.CharacterConverter.CHARACTER = ''{0}'' muss ein g\u00FCltiges Zeichen sein. +javax.faces.converter.CharacterConverter.CHARACTER_detail = ''{0}'' muss ein g\u00FCltiges ASCII Zeichen sein. +javax.faces.converter.DateTimeConverter.DATE = ''{0}'' konnte nicht als Datum erkannt werden. +javax.faces.converter.DateTimeConverter.DATE_detail = ''{0}'' konnte nicht als Datum erkannt werden. Beispiel: {1} +javax.faces.converter.DateTimeConverter.TIME = ''{0}'' konnte nicht als Zeit erkannt werden. +javax.faces.converter.DateTimeConverter.TIME_detail = ''{0}'' konnte nicht als Zeit erkannt werden. Beispiel: {1} +javax.faces.converter.DateTimeConverter.DATETIME = ''{0}'' konnte nicht als Datum und Zeit erkannt werden. +javax.faces.converter.DateTimeConverter.DATETIME_detail = ''{0}'' konnte nicht als Datum und Zeit erkannt werden. Beispiel: {1} +javax.faces.converter.DateTimeConverter.PATTERN_TYPE = Ein 'pattern' oder 'type' Attribut muss angegeben werden um den Wert ''{0}'' zu konvertieren. +javax.faces.converter.DoubleConverter.DOUBLE = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. +javax.faces.converter.DoubleConverter.DOUBLE_detail = ''{0}'' muss eine Zahl zwischen 4.9E-324 und 1.7976931348623157E308 sein. Beispiel: {1} +javax.faces.converter.EnumConverter.ENUM = ''{0}'' muss in eine Enumeration konvertierbar sein. +javax.faces.converter.EnumConverter.ENUM_detail = ''{0}'' muss in eine Enumeration konvertierbar sein, welche die Konstante ''{1}'' enth\u00E4lt. +javax.faces.converter.EnumConverter.ENUM_NO_CLASS = ''{0}'' muss in eine Enumeration konvertierbar sein, aber es wurde keine Klasse des Typs Enum bereitgestellt. +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail = ''{0}'' muss in eine Enumeration konvertierbar sein, aber es wurde keine Klasse des Typs Enum bereitgestellt. +javax.faces.converter.FloatConverter.FLOAT = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. +javax.faces.converter.FloatConverter.FLOAT_detail = ''{0}'' muss eine Zahl zwischen 1.4E-45 und 3.4028235E38 sein. Beispiel: {1} +javax.faces.converter.IntegerConverter.INTEGER = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. +javax.faces.converter.IntegerConverter.INTEGER_detail = ''{0}'' muss eine Zahl zwischen -2147483648 und 2147483647 sein. Beispiel: {1} +javax.faces.converter.LongConverter.LONG = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. +javax.faces.converter.LongConverter.LONG_detail = ''{0}'' muss eine Zahl zwischen -9223372036854775808 und 9223372036854775807 sein. Beispiel: {1} +javax.faces.converter.NumberConverter.CURRENCY = ''{0}'' konnte nicht als ein Geldbetrag erkannt werden. +javax.faces.converter.NumberConverter.CURRENCY_detail = ''{0}'' konnte nicht als ein Geldbetrag erkannt werden. Beispiel: {1} +javax.faces.converter.NumberConverter.PERCENT = ''{0}'' konnte nicht als ein Prozentanteil erkannt werden. +javax.faces.converter.NumberConverter.PERCENT_detail = ''{0}'' konnte nicht als ein Prozentanteil erkannt werden. Beispiel: {1} +javax.faces.converter.NumberConverter.NUMBER = ''{0}'' ist keine Zahl. +javax.faces.converter.NumberConverter.NUMBER_detail = ''{0}'' ist keine Zahl. Beispiel: {1} +javax.faces.converter.NumberConverter.PATTERN = ''{0}'' ist kein Zahlmuster. +javax.faces.converter.NumberConverter.PATTERN_detail = ''{0}'' ist kein Zahlmuster. Beispiel: {1} +javax.faces.converter.ShortConverter.SHORT = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. +javax.faces.converter.ShortConverter.SHORT_detail = ''{0}'' muss eine Zahl zwischen -32768 und 32767 sein. Beispiel: {1} +javax.faces.converter.STRING = Konnte ''{0}'' nicht in eine Zeichenkette konvertieren. + +javax.faces.validator.NOT_IN_RANGE = Validierungsfehler: Der Wert liegt nicht im erwarteten Wertebereich von {0} bis {1}. +javax.faces.validator.DoubleRangeValidator.MAXIMUM = Validierungsfehler: Der Wert ist gr\u00F6\u00DFer als das erlaubte Maximum von ''{0}'' +javax.faces.validator.DoubleRangeValidator.MINIMUM = Validierungsfehler: Der Wert ist kleiner als das erlaubte Minimum von ''{0}'' +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE = Validierungsfehler: Der Wert ist nicht zwischen den erwarteten Werten von {0} und {1} +javax.faces.validator.DoubleRangeValidator.TYPE = Validierungsfehler: Der Wert ist nicht vom korrekten Typ +javax.faces.validator.LengthValidator.MAXIMUM = Validierungsfehler: Der Wert ist gr\u00F6\u00DFer als das erlaubte Maximum von ''{0}'' +javax.faces.validator.LengthValidator.MINIMUM = Validierungsfehler: Der Wert ist kleiner als das erlaubte Minimum von ''{0}'' +javax.faces.validator.LongRangeValidator.MAXIMUM = Validierungsfehler: Der Wert ist gr\u00F6\u00DFer als das erlaubte Maximum von ''{0}'' +javax.faces.validator.LongRangeValidator.MINIMUM = Validation Error: Der Wert ist kleiner als das erlaubte Minimum von ''{0}'' +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE = Validierungsfehler: Der Wert ist nicht zwischen den erwarteten Werten von {0} und {1}. +javax.faces.validator.LongRangeValidator.TYPE = Validierungsfehler: Der Wert ist nicht vom korrekten Typ. diff --git a/war/src/main/resources/messages_en.properties b/war/src/main/resources/messages_en.properties new file mode 100644 index 0000000..fdc41bd --- /dev/null +++ b/war/src/main/resources/messages_en.properties @@ -0,0 +1,90 @@ +up=\u2191 +down=\u2193 +left=\u2039 +right=\u203A + +validator.assertFalse=validation failed +validator.assertTrue=validation failed +validator.future=must be a future date +validator.length=length must be between {min} and {max} +validator.max=must be less than or equal to {value} +validator.min=must be greater than or equal to {value} +validator.notNull=may not be null +validator.past=must be a past date +validator.pattern=must match "{regex}" +validator.range=must be between {min} and {max} +validator.size=size must be between {min} and {max} +validator.email=must be a well-formed email address + +org.jboss.seam.loginFailed=Login failed +org.jboss.seam.loginSuccessful=Welcome, #0! + +org.jboss.seam.TransactionFailed=Transaction failed +org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request +org.jboss.seam.IllegalNavigation=Illegal navigation +org.jboss.seam.ProcessEnded=Process #0 already ended +org.jboss.seam.ProcessNotFound=Process #0 not found +org.jboss.seam.TaskEnded=Task #0 already ended +org.jboss.seam.TaskNotFound=Task #0 not found +org.jboss.seam.NotLoggedIn=Please log in first + +javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type +javax.faces.component.UIInput.REQUIRED=value is required +javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information +javax.faces.component.UISelectOne.INVALID=value is not valid +javax.faces.component.UISelectMany.INVALID=value is not valid + +javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number +javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1} +javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits +javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false +javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false) +javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255 +javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255 +javax.faces.converter.CharacterConverter.CHARACTER=value must be a character +javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character +javax.faces.converter.DateTimeConverter.DATE=value must be a date +javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1} +javax.faces.converter.DateTimeConverter.TIME=value must be a time +javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1} +javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time +javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1} +javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value +javax.faces.converter.DoubleConverter.DOUBLE=value must be a number +javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308 +javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum +javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1} +javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided +javax.faces.converter.FloatConverter.FLOAT=value must be a number +javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38 +javax.faces.converter.IntegerConverter.INTEGER=value must be an integer +javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647 +javax.faces.converter.LongConverter.LONG=value must be an integer +javax.faces.converter.LongConverter.LONG_detail=value must be an integer number between -9223372036854775808 and 9223372036854775807 +javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount +javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1} +javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount +javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1} +javax.faces.converter.NumberConverter.NUMBER=value must be a number +javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number +javax.faces.converter.NumberConverter.PATTERN=value must be a number +javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number +javax.faces.converter.ShortConverter.SHORT=value must be an integer +javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767 + +javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0} +javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0} +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1} +javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type +javax.faces.validator.LengthValidator.MAXIMUM=value must be shorter than or equal to {0} characters +javax.faces.validator.LengthValidator.MINIMUM=value must be longer than or equal to {0} characters +javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0} +javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0} +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1} +javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type + +javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1} +javax.faces.converter.STRING=value could not be converted to a string + diff --git a/war/src/main/resources/messages_fr.properties b/war/src/main/resources/messages_fr.properties new file mode 100644 index 0000000..48b7f0f --- /dev/null +++ b/war/src/main/resources/messages_fr.properties @@ -0,0 +1,98 @@ +up=\u2191 +down=\u2193 +left=\u2039 +right=\u203A + +javax.persistence.EntityNotFoundException = Entité introuvable +javax.persistence.OptimisticLockException = Un autre utilisateur a modifié les mêmes données. Veuillez essayer de nouveau. + +validator.assertFalse = La validation a échoué +validator.assertTrue = La validation a échoué +validator.future = doit être une date à venir. +validator.length = la longueur doit être comprise entre {min} et {max} +validator.max = doit être inférieur(e) ou égal(e) à {value} +validator.min = doit être supérieur(e) ou égal(e) à {value} +validator.notNull = ne peut être nul(le) +validator.past = doit être une date passée +validator.pattern = doit correspondre à "{regex}" +validator.range = doit être compris(e) entre {min} et {max} +validator.size = La taille doit être comprise entre {min} et {max} +validator.email = doit être une adresse email valide + +org.jboss.seam.framework.EntityNotFoundException = Entité introuvable +org.jboss.seam.security.AuthorizationException = Vous n'avez pas les autorisations nécessaires pour effectuer ceci +org.jboss.seam.security.NotLoggedInException = Veuillez d'abord vous connecter +org.jboss.seam.unexpected.error = Erreur inattendue. Veuillez essayez de nouveau. + +org.jboss.seam.loginFailed = La connexion a échoué. +org.jboss.seam.loginSuccessful = Bienvenue, {0}! + +org.jboss.seam.TransactionFailed = La transaction a échoué. +org.jboss.seam.NoConversation = La conversation s'est interrompue, a dépassé les délais ou traite une autre requête. +org.jboss.seam.IllegalNavigation = Navigation illégale +org.jboss.seam.ProcessEnded = Processus #0 déjà achevé +org.jboss.seam.ProcessNotFound = Le processus #0 n'a pas été trouvé. +org.jboss.seam.TaskEnded = Tâche #0 déjà achevée +org.jboss.seam.TaskNotFound = La tâche #0 n'a pas été trouvée. +org.jboss.seam.NotLoggedIn = Veuillez d'abord vous connecter. + +javax.faces.component.UIInput.CONVERSION = La valeur ne peut être convertie dans le type attendu +javax.faces.component.UIInput.REQUIRED = Une valeur est requise. +javax.faces.component.UIInput.UPDATE = Une erreur est survenue lors du traitement de l'information que vous avez fournie +javax.faces.component.UISelectMany.INVALID = La valeur n'est pas valide. +javax.faces.component.UISelectOne.INVALID = La valeur n'est pas valide. + +javax.faces.converter.BigDecimalConverter.DECIMAL = la valeur doit être un nombre +javax.faces.converter.BigDecimalConverter.DECIMAL_detail = la valeur doit être un nombre décimal signé comprenant zéro chiffre ou plus, éventuellement suivi par une virgule décimale et une faction, par ex. {1} +javax.faces.converter.BigIntegerConverter.BIGINTEGER = la valeur doit être un nombre +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail = la valeur doit être un entier signé comprenant zéro chiffre ou plus +javax.faces.converter.BooleanConverter.BOOLEAN = la valeur doit être "vrai" ou "faux" +javax.faces.converter.BooleanConverter.BOOLEAN_detail = la valeur doit être "vrai" ou "faux" (toute valeur autre que "vrai" est évaluée à "faux") +javax.faces.converter.ByteConverter.BYTE = la valeur doit être un nombre entre 0 et 255 +javax.faces.converter.ByteConverter.BYTE_detail = la valeur doit être un nombre entre 0 et 255 +javax.faces.converter.CharacterConverter.CHARACTER = la valeur doit être un caractère +javax.faces.converter.CharacterConverter.CHARACTER_detail = la valeur doit être un caractère ASCII valide +javax.faces.converter.DateTimeConverter.DATE = la valeur doit être une date +javax.faces.converter.DateTimeConverter.DATE_detail = la valeur doit être une date, par ex. {1} +javax.faces.converter.DateTimeConverter.TIME = la valeur doit être une heure +javax.faces.converter.DateTimeConverter.TIME_detail = la valeur doit être une heure, par ex. {1} +javax.faces.converter.DateTimeConverter.DATETIME = la valeur doit être une date et une heure +javax.faces.converter.DateTimeConverter.DATETIME_detail = la valeur doit être une date et une heure, par ex. {1} +javax.faces.converter.DateTimeConverter.PATTERN_TYPE = un attribut doit indiquer le modèle ou le type pour convertir la valeur +javax.faces.converter.DoubleConverter.DOUBLE = la valeur doit être un nombre +javax.faces.converter.DoubleConverter.DOUBLE_detail = la valeur doit être un nombre entre 4,9E-324 et 17976931348623157E308 +javax.faces.converter.EnumConverter.ENUM = la valeur doit être convertible en une énumération +javax.faces.converter.EnumConverter.ENUM_detail = la valeur doit être convertible en une énumération ou depuis l''énumération qui contient la constante {1} +javax.faces.converter.EnumConverter.ENUM_NO_CLASS = la valeur doit être convertible en une énumération ou depuis l'énumération, mais aucune classe d'énumération n'est fournie +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail = la valeur doit être convertible en une énumération ou depuis l'énumération, mais aucune classe d'énumération n'est fournie +javax.faces.converter.FloatConverter.FLOAT = la valeur doit être un nombre +javax.faces.converter.FloatConverter.FLOAT_detail = la valeur doit être un nombre entre 1,4E-45 et 3,4028235E38 +javax.faces.converter.IntegerConverter.INTEGER = la valeur doit être un nombre +javax.faces.converter.IntegerConverter.INTEGER_detail = la valeur doit être un nombre entre -2147483648 et 2147483647 +javax.faces.converter.LongConverter.LONG = la valeur doit être un nombre +javax.faces.converter.LongConverter.LONG_detail = la valeur doit être un nombre entre -9223372036854775808 et 9223372036854775807 +javax.faces.converter.NumberConverter.CURRENCY = la valeur doit être un montant monétaire +javax.faces.converter.NumberConverter.CURRENCY_detail = la valeur doit être un montant monétaire, par ex. {1} +javax.faces.converter.NumberConverter.NUMBER = la valeur doit être un nombre +javax.faces.converter.NumberConverter.NUMBER_detail = la valeur doit être un nombre +javax.faces.converter.NumberConverter.PATTERN = la valeur doit être un nombre +javax.faces.converter.NumberConverter.PATTERN_detail = la valeur doit être un nombre +javax.faces.converter.NumberConverter.PERCENT = la valeur doit être un pourcentage +javax.faces.converter.NumberConverter.PERCENT_detail = la valeur doit être un pourcentage, par ex. {1} +javax.faces.converter.ShortConverter.SHORT = la valeur doit être un nombre +javax.faces.converter.ShortConverter.SHORT_detail = la valeur doit être comprise entre -32768 et 32767 + +javax.faces.validator.DoubleRangeValidator.MAXIMUM = La valeur doit être inférieure ou égale à {0} +javax.faces.validator.DoubleRangeValidator.MINIMUM = La valeur doit être supérieure ou égale à {0} +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE = La valeur doit être comprise entre {0} et {1} +javax.faces.validator.DoubleRangeValidator.TYPE = La valeur n'est pas du type correct +javax.faces.validator.LengthValidator.MAXIMUM = La valeur doit comporter {0} caractères ou moins +javax.faces.validator.LengthValidator.MINIMUM = La valeur doit comporter {0} caractères ou plus +javax.faces.validator.LongRangeValidator.MAXIMUM = La valeur doit être inférieure ou égale à {0} +javax.faces.validator.LongRangeValidator.MINIMUM = La valeur doit être supérieure ou égale à {0} +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE = La valeur doit être comprise entre {0} et {1} +javax.faces.validator.LongRangeValidator.TYPE = La valeur n'est pas du type correct + +javax.faces.validator.NOT_IN_RANGE = La valeur doit être comprise entre {0} et {1} +javax.faces.converter.STRING = La valeur ne peut être convertie en chaîne de caractères + diff --git a/war/src/main/resources/messages_it.properties b/war/src/main/resources/messages_it.properties new file mode 100644 index 0000000..8e76eb1 --- /dev/null +++ b/war/src/main/resources/messages_it.properties @@ -0,0 +1,90 @@ +up=\u2191 +down=\u2193 +left=\u2039 +right=\u203A + +validator.assertFalse=validazione fallita +validator.assertTrue=validazione corretta +validator.future=deve essere una data futura +validator.length=la lunghezza deve essere tra {min} e {max} +validator.max=deve essere minore o uguale a {value} +validator.min=deve essere maggiore o uguale a {value} +validator.notNull=non pu\u00F2 essere nullo +validator.past=deve essere una data passata +validator.pattern=deve corrispondere a "{regex}" +validator.range=deve essere tra {min} e {max} +validator.size=la grandezza deve essere tra {min} e {max} +validator.email=deve essere un indirizzo di posta elettronica + +org.jboss.seam.loginFailed=Autenticazione fallita +org.jboss.seam.loginSuccessful=Benvenuto/a, #0 + +org.jboss.seam.TransactionFailed=Transazione fallita +org.jboss.seam.NoConversation=La conversazione \u00E8 terminata, scaduta oppure \u00E8 stata processata un'altra richiesta +org.jboss.seam.IllegalNavigation=Navigazione illegale +org.jboss.seam.ProcessEnded=Il processo \#0 \u00E8 gi\u00E0\u00A0 terminato +org.jboss.seam.ProcessNotFound=Il processo \#0 non \u00E8 stato trovato +org.jboss.seam.TaskEnded=Il task \#0 \u00E8 gi\u00E0 terminato +org.jboss.seam.TaskNotFound=Il task \#0 non \u00E8 stato trovato +org.jboss.seam.NotLoggedIn=Per favore, eseguire la login + +javax.faces.component.UIInput.CONVERSION=il valore non pu\u00F2 essere convertito +javax.faces.component.UIInput.REQUIRED=\u00C8 richiesto un valore +javax.faces.component.UIInput.UPDATE=Si \u00E8 verificato un errore nell'elaborazione delle informazioni inviate +javax.faces.component.UISelectOne.INVALID=il valore non \u00E8 valido +javax.faces.component.UISelectMany.INVALID=il valore non \u00E8 valido + +javax.faces.converter.BigDecimalConverter.DECIMAL=il valore deve essere un numero +javax.faces.converter.BigDecimalConverter.DECIMAL_detail=il valore deve essere un numero decimale con zero o pi\u00F9 cifre, opzionalmente seguito da un punto e una frazione, es. {1} +javax.faces.converter.BigIntegerConverter.BIGINTEGER=deve essere un intero +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=il valore deve essere un numero intero con zero o pi\u00F9 cifre +javax.faces.converter.BooleanConverter.BOOLEAN=deve essere vero o falso +javax.faces.converter.BooleanConverter.BOOLEAN_detail=il valore deve essere vero o falso (qualsiasi valore diverso da vero \u00E8 considerato falso) +javax.faces.converter.ByteConverter.BYTE=il valore deve essere un numero compreso tra 0 e 255 +javax.faces.converter.ByteConverter.BYTE_detail=il valore deve essere un numero compreso tra 0 e 255 +javax.faces.converter.CharacterConverter.CHARACTER=deve essere un carattere +javax.faces.converter.CharacterConverter.CHARACTER_detail=il valore deve essere un carattere ASCII valido +javax.faces.converter.DateTimeConverter.DATE=deve essere una data +javax.faces.converter.DateTimeConverter.DATE_detail=il valore deve essere una data, es. {1} +javax.faces.converter.DateTimeConverter.TIME=deve essere un orario +javax.faces.converter.DateTimeConverter.TIME_detail=il valore deve essere un orario, es. {1} +javax.faces.converter.DateTimeConverter.DATETIME=deve essere una data ed un orario +javax.faces.converter.DateTimeConverter.DATETIME_detail=il valore deve essere una data e un orario, es. {1} +javax.faces.converter.DateTimeConverter.PATTERN_TYPE=per convetire il valore devono essere specificati un pattern o un attributo tipo +javax.faces.converter.DoubleConverter.DOUBLE=deve essere un numero +javax.faces.converter.DoubleConverter.DOUBLE_detail=il valore deve essere un numero compreso tra 4.9E-324 e 1.7976931348623157E308 +javax.faces.converter.EnumConverter.ENUM=il valore deve essere convertibile in una enum +javax.faces.converter.EnumConverter.ENUM_detail=il valore deve essere convertibile in una enum o da enum che contiene la costante {1} +javax.faces.converter.EnumConverter.ENUM_NO_CLASS=il valore deve essere convertibile in una enum o da enum, ma non \u00E8 stata fornita nessuna classe enum +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=il valore deve essere convertibile in una enum o da enum, ma non \u00E8 stata fornita nessuna classe enum +javax.faces.converter.FloatConverter.FLOAT=deve essere un numero +javax.faces.converter.FloatConverter.FLOAT_detail=il valore deve essere un numero compreso tra 1.4E-45 e 3.4028235E38 +javax.faces.converter.IntegerConverter.INTEGER=deve essere un numero intero +javax.faces.converter.IntegerConverter.INTEGER_detail=il valore deve essere un numero intero compreso tra -2147483648 e 2147483647 +javax.faces.converter.LongConverter.LONG=deve essere un numero intero +javax.faces.converter.LongConverter.LONG_detail=il valore deve essere un numero intero compreso tra -9223372036854775808 e 9223372036854775807 +javax.faces.converter.NumberConverter.CURRENCY=il valore deve essere una valuta +javax.faces.converter.NumberConverter.CURRENCY_detail=il valore deve essere una valuta, es. {1} +javax.faces.converter.NumberConverter.PERCENT=il valore deve essere una percentuale +javax.faces.converter.NumberConverter.PERCENT_detail=il valore deve essere una percentuale, es. {1} +javax.faces.converter.NumberConverter.NUMBER=deve essere un numero +javax.faces.converter.NumberConverter.NUMBER_detail=deve essere un numero +javax.faces.converter.NumberConverter.PATTERN=deve essere un numero +javax.faces.converter.NumberConverter.PATTERN_detail=deve essere un numero +javax.faces.converter.ShortConverter.SHORT=deve essere un numero intero +javax.faces.converter.ShortConverter.SHORT_detail=il valore deve essere un numero intero compreso -32768 e 32767 + +javax.faces.validator.DoubleRangeValidator.MAXIMUM=il valore deve essere minore o uguale a {0} +javax.faces.validator.DoubleRangeValidator.MINIMUM=il valore deve essere maggiore o uguale a {0} +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1} +javax.faces.validator.DoubleRangeValidator.TYPE=il valore non \u00E8 del tipo corretto +javax.faces.validator.LengthValidator.MAXIMUM=il valore deve essere inferiore o uguale {0} caratteri +javax.faces.validator.LengthValidator.MINIMUM=il valore deve essere superiore o uguale {0} caratteri +javax.faces.validator.LongRangeValidator.MAXIMUM=il valore deve essere minore o uguale a {0} +javax.faces.validator.LongRangeValidator.MINIMUM=il valore deve essere superiore o uguale a {0} +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1} +javax.faces.validator.LongRangeValidator.TYPE=il valore non \u00E8 del tipo corretto + +javax.faces.validator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1} +javax.faces.converter.STRING=il valore non pu\u00F2 essere convertito a stringa + diff --git a/war/src/main/resources/messages_no.properties b/war/src/main/resources/messages_no.properties new file mode 100644 index 0000000..f058a3d --- /dev/null +++ b/war/src/main/resources/messages_no.properties @@ -0,0 +1,91 @@ +#TODO: translate into norwegian +up=\u2191 +down=\u2193 +left=\u2039 +right=\u203A + +validator.assertFalse=validering mislyktes +validator.assertTrue=validering mislyktes +validator.future=must be a future date +validator.length=length must be between {min} and {max} +validator.max=must be less than or equal to {value} +validator.min=must be greater than or equal to {value} +validator.notNull=may not be null +validator.past=must be a past date +validator.pattern=must match "{regex}" +validator.range=must be between {min} and {max} +validator.size=size must be between {min} and {max} +validator.email=must be a well-formed email address + +org.jboss.seam.loginFailed=Innlogging mislyktes +org.jboss.seam.loginSuccessful=Velkommen, #0! + +org.jboss.seam.TransactionFailed=Transaction failed +org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request +org.jboss.seam.IllegalNavigation=Illegal navigation +org.jboss.seam.ProcessEnded=Process #0 already ended +org.jboss.seam.ProcessNotFound=Process #0 not found +org.jboss.seam.TaskEnded=Task #0 already ended +org.jboss.seam.TaskNotFound=Task #0 not found +org.jboss.seam.NotLoggedIn=Please log in first + +javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type +javax.faces.component.UIInput.REQUIRED=value is required +javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information +javax.faces.component.UISelectOne.INVALID=value is not valid +javax.faces.component.UISelectMany.INVALID=value is not valid + +javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number +javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1} +javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits +javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false +javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false) +javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255 +javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255 +javax.faces.converter.CharacterConverter.CHARACTER=value must be a character +javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character +javax.faces.converter.DateTimeConverter.DATE=value must be a date +javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1} +javax.faces.converter.DateTimeConverter.TIME=value must be a time +javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1} +javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time +javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1} +javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value +javax.faces.converter.DoubleConverter.DOUBLE=value must be a number +javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308 +javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum +javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1} +javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided +javax.faces.converter.FloatConverter.FLOAT=value must be a number +javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38 +javax.faces.converter.IntegerConverter.INTEGER=value must be an integer +javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647 +javax.faces.converter.LongConverter.LONG=value must be an integer +javax.faces.converter.LongConverter.LONG_detail=value must be an integer number between -9223372036854775808 and 9223372036854775807 +javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount +javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1} +javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount +javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1} +javax.faces.converter.NumberConverter.NUMBER=value must be a number +javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number +javax.faces.converter.NumberConverter.PATTERN=value must be a number +javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number +javax.faces.converter.ShortConverter.SHORT=value must be an integer +javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767 + +javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0} +javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0} +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1} +javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type +javax.faces.validator.LengthValidator.MAXIMUM=value must be shorter than or equal to {0} characters +javax.faces.validator.LengthValidator.MINIMUM=value must be longer than or equal to {0} characters +javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0} +javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0} +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1} +javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type + +javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1} +javax.faces.converter.STRING=value could not be converted to a string + diff --git a/war/src/main/resources/messages_tr.properties b/war/src/main/resources/messages_tr.properties new file mode 100644 index 0000000..f77b056 --- /dev/null +++ b/war/src/main/resources/messages_tr.properties @@ -0,0 +1,90 @@ +up=\u2191 +down=\u2193 +left=\u2039 +right=\u203a + +validator.assertFalse=do\u011frulanamad\u0131 +validator.assertTrue=do\u011frulanamad\u0131 +validator.future=gelecek bir tarih olmal\u0131d\u0131r +validator.length=girilen de\u011ferin uzunlu\u011fu {min} ile {max} aras\u0131nda olmal\u0131d\u0131r +validator.max=girilen de\u011fer {value} ya da daha k\u00fc\u00e7\u00fck olmal\u0131d\u0131r +validator.min=girilen de\u011fer {value} ya da daha b\u00fcy\u00fck olmal\u0131d\u0131r +validator.notNull=bir de\u011fer girilmesi gereklidir +validator.past=ge\u00e7mi\u015f bir tarih girilmelidir +validator.pattern=girilen de\u011fer "{regex}" tan\u0131mlamas\u0131na uymal\u0131d\u0131r +validator.range=girilen de\u011ferin b\u00fcy\u00fckl\u00fc\u011f\u00fc {min} ile {max} aras\u0131nda olmal\u0131d\u0131r +validator.size=girilen de\u011ferin boyut {min} ile {max} aras\u0131nda olmal\u0131d\u0131r +validator.email=girilen de\u011fer e-posta adresi format\u0131na uygun olmal\u0131d\u0131r + +org.jboss.seam.loginFailed=Oturum a\u00e7\u0131lamad\u0131 +org.jboss.seam.loginSuccessful=Ho\u015fgeldiniz, #0! + +org.jboss.seam.TransactionFailed=\u0130\u015flem tamamlanamad\u0131 +org.jboss.seam.NoConversation=Konu\u015fma sonland\u0131, zaman a\u015f\u0131m\u0131na u\u011frad\u0131 ya da ba\u015fka bir talebi i\u015fliyordu +org.jboss.seam.IllegalNavigation=Ge\u00e7ersiz y\u00f6nleme(navigasyon) +org.jboss.seam.ProcessEnded=#0 s\u00fcreci sonlanm\u0131\u015f +org.jboss.seam.ProcessNotFound=#0 s\u00fcreci bulunamad\u0131 +org.jboss.seam.TaskEnded=#0 g\u00f6revi sonlanm\u0131\u015f +org.jboss.seam.TaskNotFound=#0 g\u00f6revi bulunamad\u0131 +org.jboss.seam.NotLoggedIn=L\u00fctfen \u00f6ncelikle oturum a\u00e7\u0131n + +javax.faces.component.UIInput.CONVERSION=girilen de\u011fer, beklenen tipe d\u00f6n\u00fc\u015ft\u00fcr\u00fclemedi +javax.faces.component.UIInput.REQUIRED=bir de\u011fer girilmesi gereklidir +javax.faces.component.UIInput.UPDATE=talebiniz i\u015flenirken bir hata olu\u015ftu +javax.faces.component.UISelectOne.INVALID=ge\u00e7erli bir de\u011fer girilmelidir +javax.faces.component.UISelectMany.INVALID=ge\u00e7erli bir de\u011fer girilmelidir + +javax.faces.converter.BigDecimalConverter.DECIMAL=bir say\u0131 girilmelidir +javax.faces.converter.BigDecimalConverter.DECIMAL_detail=girilen de\u011fer, s\u0131f\u0131r ya da daha fazla basamak i\u00e7eren, ondal\u0131k ayrac\u0131 ve ondal\u0131k basamak i\u00e7erebilen i\u015faretli bir ondal\u0131k say\u0131 olmal\u0131d\u0131r, \u00f6rn. {1} +javax.faces.converter.BigIntegerConverter.BIGINTEGER=bir tamsay\u0131 girilmelidir +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=girilen de\u011fer bir ya da daha fazla basamak i\u00e7eren bir tamsay\u0131 olmal\u0131d\u0131r +javax.faces.converter.BooleanConverter.BOOLEAN=girilen de\u011fer true ya da false olmal\u0131d\u0131r +javax.faces.converter.BooleanConverter.BOOLEAN_detail=girilen de\u011fer true ya da false olmal\u0131d\u0131r (true olmayan her de\u011fer false olarak de\u011ferlendirilecektir) +javax.faces.converter.ByteConverter.BYTE=girilen de\u011fer 0 ile 255 aras\u0131nda bir say\u0131 olmal\u0131d\u0131r +javax.faces.converter.ByteConverter.BYTE_detail=girilen de\u011fer 0 ile 255 aras\u0131nda bir say\u0131 olmal\u0131d\u0131r +javax.faces.converter.CharacterConverter.CHARACTER=girilen de\u011fer bir karakter olmal\u0131d\u0131r +javax.faces.converter.CharacterConverter.CHARACTER_detail=ge\u00e7erli bir ASCII karakter girilmelidir +javax.faces.converter.DateTimeConverter.DATE=girilen de\u011fer bir tarih olmal\u0131d\u0131r +javax.faces.converter.DateTimeConverter.DATE_detail=girilen de\u011fer bir tarih olmal\u0131d\u0131r, \u00f6rn. {1} +javax.faces.converter.DateTimeConverter.TIME=girilen de\u011fer bir zaman olmal\u0131d\u0131r +javax.faces.converter.DateTimeConverter.TIME_detail=girilen de\u011fer bir zaman olmal\u0131d\u0131r, \u00f6rn. {1} +javax.faces.converter.DateTimeConverter.DATETIME=girilen de\u011fer tarih ve zaman i\u00e7ermelidir +javax.faces.converter.DateTimeConverter.DATETIME_detail=girilen de\u011fer tarih ve zaman i\u00e7ermelidir, \u00f6rn. {1} +javax.faces.converter.DateTimeConverter.PATTERN_TYPE=girilen de\u011feri d\u00f6n\u00fc\u015ft\u00fcrebilmek i\u00e7in bir desen(pattern) ya da tip \u00f6zniteli\u011fi(attribute) tan\u0131mlanmal\u0131d\u0131r. +javax.faces.converter.DoubleConverter.DOUBLE=bir say\u0131 girilmelidir +javax.faces.converter.DoubleConverter.DOUBLE_detail=4.9E-324 ile 1.7976931348623157E308 aras\u0131nda bir say\u0131 girilmelidir +javax.faces.converter.EnumConverter.ENUM=girilen de\u011fer enum tipine d\u00f6n\u00fc\u015ft\u00fcr\u00fclebilmelidir +javax.faces.converter.EnumConverter.ENUM_detail=girilen de\u011fer sabit i\u00e7eren bir enum tipinden enum tipine d\u00f6n\u00fc\u015ft\u00fcr\u00fclebilmelidir {1} +javax.faces.converter.EnumConverter.ENUM_NO_CLASS=girilen de\u011fer enum tipinden enum tipine d\u00f6n\u00fc\u015ft\u00fcr\u00fclebilmelidir. Ancak enum s\u0131n\u0131f\u0131(class) bulunamad\u0131 +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=girilen de\u011fer enum tipinden enum tipine d\u00f6n\u00fc\u015ft\u00fcr\u00fclebilmelidir. Ancak enum s\u0131n\u0131f\u0131(class) bulunamad\u0131 +javax.faces.converter.FloatConverter.FLOAT=bir say\u0131 girilmelidir +javax.faces.converter.FloatConverter.FLOAT_detail=1.4E-45 ile 3.4028235E38 aras\u0131nda bir say\u0131 girilmelidir +javax.faces.converter.IntegerConverter.INTEGER=bir tamsay\u0131 girilmelidir +javax.faces.converter.IntegerConverter.INTEGER_detail=-2147483648 ile 2147483647 aras\u0131nda bir tamsay\u0131 girilmelidir +javax.faces.converter.LongConverter.LONG=bir tamsay\u0131 girilmelidir +javax.faces.converter.LongConverter.LONG_detail=-9223372036854775808 ile 9223372036854775807 aras\u0131nda bir tamsay\u0131 girilmelidir +javax.faces.converter.NumberConverter.CURRENCY=para birimi tipinden bir de\u011fer girilmelidir +javax.faces.converter.NumberConverter.CURRENCY_detail=para birimi tipinden bir de\u011fer girilmelidir, \u00f6rn. {1} +javax.faces.converter.NumberConverter.PERCENT=y\u00fczdelik tipinden bir de\u011fer girilmelidir +javax.faces.converter.NumberConverter.PERCENT_detail=y\u00fczdelik tipinden bir de\u011fer girilmelidir, \u00f6rn. {1} +javax.faces.converter.NumberConverter.NUMBER=bir say\u0131 girilmelidir +javax.faces.converter.NumberConverter.NUMBER_detail=bir say\u0131 girilmelidir +javax.faces.converter.NumberConverter.PATTERN=bir say\u0131 girilmelidir +javax.faces.converter.NumberConverter.PATTERN_detail=bir say\u0131 girilmelidir +javax.faces.converter.ShortConverter.SHORT=bir tamsay\u0131 girilmelidir +javax.faces.converter.ShortConverter.SHORT_detail=-32768 ile 32767 aras\u0131nda bir tamsay\u0131 girilmelidir + +javax.faces.validator.DoubleRangeValidator.MAXIMUM=girilen de\u011fer {0} ya da daha k\u00fc\u00e7\u00fck olmal\u0131d\u0131r +javax.faces.validator.DoubleRangeValidator.MINIMUM=girilen de\u011fer {0} ya da daha b\u00fcy\u00fck olmal\u0131d\u0131r +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=girilen de\u011fer {0} ile {1} aras\u0131nda olmal\u0131d\u0131r +javax.faces.validator.DoubleRangeValidator.TYPE=girilen de\u011ferin tipi yanl\u0131\u015f +javax.faces.validator.LengthValidator.MAXIMUM=girilen de\u011fer {0} ya da daha az karakter i\u00e7ermelidir +javax.faces.validator.LengthValidator.MINIMUM=girilen de\u011fer {0} ya da fazla karakter i\u00e7ermelidir +javax.faces.validator.LongRangeValidator.MAXIMUM=girilen de\u011fer {0} ya da daha k\u00fc\u00e7\u00fck olmal\u0131d\u0131r +javax.faces.validator.LongRangeValidator.MINIMUM=girilen de\u011fer {0} ya da daha b\u00fcy\u00fck olmal\u0131d\u0131r +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=girilen de\u011fer {0} ile {1} aral\u0131\u011f\u0131nda olmal\u0131d\u0131r +javax.faces.validator.LongRangeValidator.TYPE=yanl\u0131\u015f tipte bir de\u011fer girildi + +javax.faces.validator.NOT_IN_RANGE=girilen de\u011fer {0} ile {1} aral\u0131\u011f\u0131nda olmal\u0131d\u0131r +javax.faces.converter.STRING=girilen de\u011fer bir dizgiye(string) d\u00f6n\u00fc\u015ft\u00fcr\u00fclemedi + diff --git a/war/src/main/resources/seam.properties b/war/src/main/resources/seam.properties new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/war/src/main/resources/seam.properties diff --git a/war/src/main/resources/stylesheet/theme.xcss b/war/src/main/resources/stylesheet/theme.xcss new file mode 100644 index 0000000..9579e1c --- /dev/null +++ b/war/src/main/resources/stylesheet/theme.xcss @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/war/src/main/webapp/404.xhtml b/war/src/main/webapp/404.xhtml new file mode 100644 index 0000000..5e1a0c5 --- /dev/null +++ b/war/src/main/webapp/404.xhtml @@ -0,0 +1,14 @@ + + + + +

Page not found

+
+ +
diff --git a/war/src/main/webapp/META-INF/MANIFEST.MF b/war/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..c4107b7 --- /dev/null +++ b/war/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Class-Path: jboss-seam-2.2.0.GA.jar xstream-1.1.3.jar jboss-el-1.0_02. + CR4.jar jboss-seam-mail-2.2.0.GA.jar jboss-seam-ui-2.2.0.GA.jar jsf-f + acelets-1.1.15.B1.jar richfaces-api-3.3.3.Final.jar commons-beanutils + -1.8.3.jar commons-digester-1.8.1.jar jboss-seam-debug-2.2.0.GA.jar r + ichfaces-impl-3.3.3.Final.jar richfaces-ui-3.3.3.Final.jar glassX-3.3 + .1.GA.jar darkX-3.3.1.GA.jar surefire-api-2.6.jar testng-5.12.1.jar g + lassX-3.3.3.Final.jar darkX-3.3.3.Final.jar + diff --git a/war/src/main/webapp/WEB-INF/components.xml b/war/src/main/webapp/WEB-INF/components.xml new file mode 100644 index 0000000..3fb6bbb --- /dev/null +++ b/war/src/main/webapp/WEB-INF/components.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + messages + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/war/src/main/webapp/WEB-INF/faces-config.xml b/war/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000..3b353a9 --- /dev/null +++ b/war/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,21 @@ + + + + + com.sun.facelets.FaceletViewHandler + + en + bg + de + en + fr + it + no + tr + + + diff --git a/war/src/main/webapp/WEB-INF/jboss-web.xml b/war/src/main/webapp/WEB-INF/jboss-web.xml new file mode 100644 index 0000000..debe006 --- /dev/null +++ b/war/src/main/webapp/WEB-INF/jboss-web.xml @@ -0,0 +1,12 @@ + + + + + + seam.jboss.org:loader=${app} + java2ParentDelegation=false + + + diff --git a/war/src/main/webapp/WEB-INF/pages.xml b/war/src/main/webapp/WEB-INF/pages.xml new file mode 100644 index 0000000..3f6bf41 --- /dev/null +++ b/war/src/main/webapp/WEB-INF/pages.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Record not found + + + + + + Record not found + + + + + + Duplicate record + + + + + + + Another user changed the same data, please try again + + + + + + The operation failed, please try again + + + + + + + You do not have permission to access this resource + + + + + + #{messages['org.jboss.seam.NotLoggedIn']} + + + + + + Your session has timed out, please try again + + + + + + + + + + Unexpected error, please try again + + + + diff --git a/war/src/main/webapp/WEB-INF/web.xml b/war/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..5ab4c96 --- /dev/null +++ b/war/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,176 @@ + + + + + + ${app.display.name} + + + 404 + /404.xhtml + + + + + org.richfaces.SKIN + glassX + + + + + org.richfaces.CONTROL_SKINNING + disable + + + + org.richfaces.CONTROL_SKINNING_LEVEL + extended + + + + org.richfaces.CONTROL_SKINNING_CLASSES + disable + + + + + org.richfaces.LoadStyleStrategy + DEFAULT + + + + org.richfaces.LoadScriptStrategy + DEFAULT + + + + org.ajax4jsf.COMPRESS_SCRIPT + ${org.ajax4jsf.COMPRESS_SCRIPT} + + + + + org.jboss.seam.servlet.SeamListener + + + + Seam Filter + org.jboss.seam.servlet.SeamFilter + + + + Seam Filter + /* + + + + Seam Resource Servlet + org.jboss.seam.servlet.SeamResourceServlet + + + + Seam Resource Servlet + /seam/resource/* + + + + + + + facelets.DEVELOPMENT + ${app.debug} + + + + + Strip html comments from the page before it is rendred - meaning that you will no longer be bugged down by EL evaluating expressions inside a + comment tag + + facelets.SKIP_COMMENTS + true + + + + + + + javax.faces.DEFAULT_SUFFIX + .xhtml + + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + + Faces Servlet + *.seam + + + + + + + + 10 + + + + + Restrict raw XHTML Documents + + XHTML + *.xhtml + + + + + \ No newline at end of file diff --git a/war/src/main/webapp/error.xhtml b/war/src/main/webapp/error.xhtml new file mode 100644 index 0000000..a4a2af1 --- /dev/null +++ b/war/src/main/webapp/error.xhtml @@ -0,0 +1,19 @@ + + + + + + +

Error

+

Something bad happened :-(

+ + + +
+
diff --git a/war/src/main/webapp/favicon.ico b/war/src/main/webapp/favicon.ico new file mode 100644 index 0000000..224d8f3 Binary files /dev/null and b/war/src/main/webapp/favicon.ico differ diff --git a/war/src/main/webapp/home.xhtml b/war/src/main/webapp/home.xhtml new file mode 100644 index 0000000..c5c6730 --- /dev/null +++ b/war/src/main/webapp/home.xhtml @@ -0,0 +1,36 @@ + + + + +

Welcome to Seam!

+ + + + +

Your seam-gen project is deployed! Here are + some of the features this project provides:

+
    +
  • Ant build script
  • +
  • Deployment to JBoss AS (EAR or WAR)
  • +
  • Development and production profiles
  • +
  • Integration testing using TestNG and Embedded JBoss
  • +
  • JavaBean or EJB 3.0 Seam components
  • +
  • JPA entity classes
  • +
  • A configurable DataSource and JPA EntityManager
  • +
  • Templated Facelets views
  • +
  • RichFaces panels and tables
  • +
  • Default CSS stylesheet
  • +
  • Internationalization support
  • +
+
+
+
+
+
diff --git a/war/src/main/webapp/img/btnmanageroles.png b/war/src/main/webapp/img/btnmanageroles.png new file mode 100644 index 0000000..5a93491 Binary files /dev/null and b/war/src/main/webapp/img/btnmanageroles.png differ diff --git a/war/src/main/webapp/img/btnmanageusers.png b/war/src/main/webapp/img/btnmanageusers.png new file mode 100644 index 0000000..99f7986 Binary files /dev/null and b/war/src/main/webapp/img/btnmanageusers.png differ diff --git a/war/src/main/webapp/img/btnnewpermission.png b/war/src/main/webapp/img/btnnewpermission.png new file mode 100644 index 0000000..3dc495f Binary files /dev/null and b/war/src/main/webapp/img/btnnewpermission.png differ diff --git a/war/src/main/webapp/img/btnnewrole.png b/war/src/main/webapp/img/btnnewrole.png new file mode 100644 index 0000000..326100d Binary files /dev/null and b/war/src/main/webapp/img/btnnewrole.png differ diff --git a/war/src/main/webapp/img/btnnewuser.png b/war/src/main/webapp/img/btnnewuser.png new file mode 100644 index 0000000..b8a7a51 Binary files /dev/null and b/war/src/main/webapp/img/btnnewuser.png differ diff --git a/war/src/main/webapp/img/dtpick.gif b/war/src/main/webapp/img/dtpick.gif new file mode 100644 index 0000000..50dee6e Binary files /dev/null and b/war/src/main/webapp/img/dtpick.gif differ diff --git a/war/src/main/webapp/img/error.gif b/war/src/main/webapp/img/error.gif new file mode 100644 index 0000000..3a2e0c6 Binary files /dev/null and b/war/src/main/webapp/img/error.gif differ diff --git a/war/src/main/webapp/img/false.png b/war/src/main/webapp/img/false.png new file mode 100644 index 0000000..187509e Binary files /dev/null and b/war/src/main/webapp/img/false.png differ diff --git a/war/src/main/webapp/img/manytoone.gif b/war/src/main/webapp/img/manytoone.gif new file mode 100644 index 0000000..5e05f71 Binary files /dev/null and b/war/src/main/webapp/img/manytoone.gif differ diff --git a/war/src/main/webapp/img/msgerror.png b/war/src/main/webapp/img/msgerror.png new file mode 100644 index 0000000..ab33028 Binary files /dev/null and b/war/src/main/webapp/img/msgerror.png differ diff --git a/war/src/main/webapp/img/msginfo.png b/war/src/main/webapp/img/msginfo.png new file mode 100644 index 0000000..7f4522d Binary files /dev/null and b/war/src/main/webapp/img/msginfo.png differ diff --git a/war/src/main/webapp/img/msgwarn.png b/war/src/main/webapp/img/msgwarn.png new file mode 100644 index 0000000..b7e9de5 Binary files /dev/null and b/war/src/main/webapp/img/msgwarn.png differ diff --git a/war/src/main/webapp/img/onetomany.gif b/war/src/main/webapp/img/onetomany.gif new file mode 100644 index 0000000..437f7c6 Binary files /dev/null and b/war/src/main/webapp/img/onetomany.gif differ diff --git a/war/src/main/webapp/img/seamlogo.png b/war/src/main/webapp/img/seamlogo.png new file mode 100644 index 0000000..9b6c915 Binary files /dev/null and b/war/src/main/webapp/img/seamlogo.png differ diff --git a/war/src/main/webapp/img/true.png b/war/src/main/webapp/img/true.png new file mode 100644 index 0000000..b8e1999 Binary files /dev/null and b/war/src/main/webapp/img/true.png differ diff --git a/war/src/main/webapp/layout/display.xhtml b/war/src/main/webapp/layout/display.xhtml new file mode 100644 index 0000000..ea92dee --- /dev/null +++ b/war/src/main/webapp/layout/display.xhtml @@ -0,0 +1,16 @@ + + +
+ + + + + + +
+ +
diff --git a/war/src/main/webapp/layout/edit.xhtml b/war/src/main/webapp/layout/edit.xhtml new file mode 100644 index 0000000..9728c2c --- /dev/null +++ b/war/src/main/webapp/layout/edit.xhtml @@ -0,0 +1,27 @@ + + +
+ + + + * + + + + + + + + + + + + + +
+ +
diff --git a/war/src/main/webapp/layout/menu.xhtml b/war/src/main/webapp/layout/menu.xhtml new file mode 100644 index 0000000..22059f1 --- /dev/null +++ b/war/src/main/webapp/layout/menu.xhtml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/war/src/main/webapp/layout/sort.xhtml b/war/src/main/webapp/layout/sort.xhtml new file mode 100644 index 0000000..cbe30fc --- /dev/null +++ b/war/src/main/webapp/layout/sort.xhtml @@ -0,0 +1,11 @@ + + + + + + diff --git a/war/src/main/webapp/layout/template.xhtml b/war/src/main/webapp/layout/template.xhtml new file mode 100644 index 0000000..63dd960 --- /dev/null +++ b/war/src/main/webapp/layout/template.xhtml @@ -0,0 +1,54 @@ + + + + + + Seam Reference Implementation + + + + + + + + + +
+ + +
+ + + +
diff --git a/war/src/main/webapp/login.page.xml b/war/src/main/webapp/login.page.xml new file mode 100644 index 0000000..3818f57 --- /dev/null +++ b/war/src/main/webapp/login.page.xml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/war/src/main/webapp/login.xhtml b/war/src/main/webapp/login.xhtml new file mode 100644 index 0000000..1f67b6f --- /dev/null +++ b/war/src/main/webapp/login.xhtml @@ -0,0 +1,47 @@ + + + + + + + + + Login + +

Please login here

+ +
+ + Username + + Password + + Remember me + + +
+ +

+ Note - You may login with the username 'admin' and a blank password. +

+ +
+ +
+ +
+ +
+ +
+
diff --git a/war/src/main/webapp/security_error.xhtml b/war/src/main/webapp/security_error.xhtml new file mode 100644 index 0000000..22d591a --- /dev/null +++ b/war/src/main/webapp/security_error.xhtml @@ -0,0 +1,24 @@ + + + + + +

A Security Error has occurred

+ + + + +

#{not empty org.jboss.seam.handledException.message ? + org.jboss.seam.handledException.message : 'The cause of the error is + unknown'}

+
+ +
+
diff --git a/war/src/main/webapp/stylesheet/theme.css b/war/src/main/webapp/stylesheet/theme.css new file mode 100644 index 0000000..6cfc5d5 --- /dev/null +++ b/war/src/main/webapp/stylesheet/theme.css @@ -0,0 +1,218 @@ +html { + overflow-y: scroll; +} + +body { + font-size: 12px; + margin: 0px; +} + +a img { + border: none; +} + +h1 { + font-size: 1.6em; + margin-top: 0; +} + +input[type=submit], input[type=button] { + font-size: 11px; + margin: 5px 5px 5px 0; + cursor: pointer; +} + +input[type=text], input[type=password], textarea { + font-size: 12px; + padding-left: 1px; +} + +select { + font-size: 13px; +} + +.tableControl, .actionButtons { + width: 100%; +} + +.tableControl a { + padding-left: 10px; +} + +.tableControl { + text-align: right; +} + +.footer { + text-align: center; + font-size: 11px; + margin-bottom: 10px; +} + +.rich-table { + width: 100%; +} + +.body { + padding: 30px; +} +.message { + padding: 5px; + list-style: none; + border: 0; + background: none; + padding: 0; + color: #000000; + margin: 5px 0 8px 0; + font-size: 12px; +} + +.message li { + background: no-repeat left center; + padding-top: 1px; + padding-left: 20px; + margin-left: 3px; +} + +.message li.infomsg { + background-image: url(../img/msginfo.png); +} + +.message li.errormsg { + background-image: url(../img/msgerror.png); +} + +.message li.warnmsg { + background-image: url(../img/msgwarn.png); +} + +.name { + vertical-align: top; + font-weight: bold; + width: 115px; + float: left; + padding: 5px; + margin-top: 3px; + clear: left; +} + +.value { + float: left; + padding: 5px; +} + +.error { + float: left; + padding: 5px; +} + +.errors { + color: #FF0000; + vertical-align: middle; +} + +img.errors { + padding-right: 5px; +} + +.errors input, .errors textarea, .errors select { + border: 1px solid red !important; +} + +.required { + color: #FF0000; + padding-left: 2px; +} + +.rich-stglpanel-body { + overflow: auto; +} + +/* the specificity here is necessary to override the defaults */ +/* +.rich-panel .rich-panel-header, +.rich-stglpanel .rich-stglpanel-header { + padding: 2px 3px; +}*/ + +.rich-panel input[type=submit], .rich-panel input[type=button], +.rich-tabpanel input[type=submit], .rich-tabpanel input[type=button] { + margin-bottom: 0; +} + +.tableControl input[type=submit], .tableControl input[type=button], .tableControl select { + margin: 5px 0 5px 5px; +} + +/* I don't know why this is necessary, but the select is off by a pixel on the top and is padding too much on the left */ +.tableControl select { + margin-left: 2px; + position: relative; + top: 1px; +} + +.actionButtons { + padding-left: 1px; +} + +.actionButtons select { + margin: 5px 5px 5px 0; + vertical-align: bottom; +} + +.rich-toolbar-item a { + text-decoration: none; +} + +.rich-toolbar-item a:hover, .rich-ddmenu-label-select { + text-decoration: underline; +} + +.rich-toolbar-item .rich-menu-item a:hover { + text-decoration: none; +} + +.rich-datalist { + list-style: square; + margin: 6px 0 1px 0; + padding-left: 18px; +} + +.rich-list-item { + padding-bottom: 4px; +} + +div.info { + font-size: 1.2em; +} + +ul.bullets { + list-style: square; +} + +ul.bullets li { + padding-bottom: 2px; +} + +td.action { + text-align: center; + width: 8em; + white-space: nowrap; +} + +td.action a { + padding-left: 1px; + padding-right: 1px; +} + +table.radio { + border: 0; +} + +table.radio td { + padding: 0 2px; +} + +table.radio input[type=radio] { + vertical-align: bottom; +} diff --git a/war/src/main/webapp/stylesheet/theme.xcss b/war/src/main/webapp/stylesheet/theme.xcss new file mode 100644 index 0000000..9579e1c --- /dev/null +++ b/war/src/main/webapp/stylesheet/theme.xcss @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/war/src/main/webapp/stylesheet/useradmin.css b/war/src/main/webapp/stylesheet/useradmin.css new file mode 100644 index 0000000..c41b70b --- /dev/null +++ b/war/src/main/webapp/stylesheet/useradmin.css @@ -0,0 +1,112 @@ +input.newuser { + background: url(../img/btnnewuser.png) top left no-repeat; + height: 39px; + width: 113px; + margin: 4px 4px 4px 4px; + border: 0px; + cursor: pointer; +} + +input.newrole { + background: url(../img/btnnewrole.png) top left no-repeat; + height: 39px; + width: 113px; + margin: 4px 4px 4px 4px; + border: 0px; + cursor: pointer; +} + +input.newpermission { + background: url(../img/btnnewpermission.png) top left no-repeat; + height: 39px; + width: 113px; + margin: 4px 4px 4px 4px; + border: 0px; + cursor: pointer; +} + +input.manageusers { + display: block; + background: url(../img/btnmanageusers.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(../img/btnmanageroles.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; +} + +div.selectMany input[type="checkbox"] { + vertical-align: middle; +} + +div.status-true { + background: url(../img/true.png) top left no-repeat; + width: 14px; + height: 15px; + margin-left: auto; + margin-right: auto; +} + +div.status-false { + background: url(../img/false.png) top left no-repeat; + width: 14px; + height: 15px; + margin-left: auto; + margin-right: auto; +} + +table.useradmin, div.useradmin { + width: 500px; +} + +/* +table.useradmin tr.odd { + background-color: #FFFFFF; +} + +table.useradmin tr.even { + background-color: #E9F5FF; +} +*/ + +td.enabled { + text-align: center; +} + +fieldset.roles .roles { + border: none; +} + +table.iceSelMnyCb td { + text-align: left; +} diff --git a/war/src/main/webapp/view/example/Movie.page.xml b/war/src/main/webapp/view/example/Movie.page.xml new file mode 100644 index 0000000..ec64d6d --- /dev/null +++ b/war/src/main/webapp/view/example/Movie.page.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/war/src/main/webapp/view/example/Movie.xhtml b/war/src/main/webapp/view/example/Movie.xhtml new file mode 100644 index 0000000..841253a --- /dev/null +++ b/war/src/main/webapp/view/example/Movie.xhtml @@ -0,0 +1,54 @@ + + + + + + + Movie Details + + + Director + + + + + Title + + + + + Year + + + + + Plot + + + +
+ + + +
+ + + + + +
+ + + + diff --git a/war/src/main/webapp/view/example/MovieEdit.page.xml b/war/src/main/webapp/view/example/MovieEdit.page.xml new file mode 100644 index 0000000..7339eb4 --- /dev/null +++ b/war/src/main/webapp/view/example/MovieEdit.page.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/war/src/main/webapp/view/example/MovieEdit.xhtml b/war/src/main/webapp/view/example/MovieEdit.xhtml new file mode 100644 index 0000000..b19861f --- /dev/null +++ b/war/src/main/webapp/view/example/MovieEdit.xhtml @@ -0,0 +1,96 @@ + + + + + + + + + #{movieHome.managed ? 'Edit' : 'Add'} Movie + + + Director + + + + + + + Title + + + + + + + Year + + + + + + + Plot + + + + +
+ * + required fields +
+ +
+ +
+ + + + + +
+
+ +
+ +
diff --git a/war/src/main/webapp/view/example/MovieList.page.xml b/war/src/main/webapp/view/example/MovieList.page.xml new file mode 100644 index 0000000..0aaec95 --- /dev/null +++ b/war/src/main/webapp/view/example/MovieList.page.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/war/src/main/webapp/view/example/MovieList.xhtml b/war/src/main/webapp/view/example/MovieList.xhtml new file mode 100644 index 0000000..4856793 --- /dev/null +++ b/war/src/main/webapp/view/example/MovieList.xhtml @@ -0,0 +1,157 @@ + + + + + + + + + + + Director + + + + + Title + + + + + Match + + + + + + + + +
+ + +
+ +
+ + + + Movie Search Results (#{empty movieList.resultList ? 0 : (movieList.paginated ? movieList.resultCount : movieList.resultList.size)}) + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Action + + + + #{' '} + + + + +
+
+ +
+ + + + + + + + + + + + +
+ + + + + + + +
+ +
diff --git a/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorIT.java b/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorIT.java new file mode 100644 index 0000000..eba084c --- /dev/null +++ b/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorIT.java @@ -0,0 +1,38 @@ +package no.knowit.seam.example.security.test; + +import no.knowit.seam.example.test.AbstractUnitilisedJSFUnitTestCase; +import org.jboss.jsfunit.jsfsession.JSFClientSession; +import org.jboss.jsfunit.jsfsession.JSFSession; +import org.jboss.seam.Component; +import org.unitils.dbunit.annotation.DataSet; + +import java.io.IOException; + +@DataSet +public class AuthenticatorIT extends AbstractUnitilisedJSFUnitTestCase implements AuthenticatorITI { + + private static final String USERNAME_CLIENT_ID = "loginForm:username"; + private static final String PASSWORD_CLIENT_ID = "loginForm:password"; + private static final String SUBMIT_CLIENT_ID = "loginForm:submit"; + + public void testFineLogin() throws Throwable { + run(new TestComponentRunnable() { + @Override + public void run() throws Throwable { + getTestComponent().testFineLogin(); + } + }); + } + + private AuthenticatorITI getTestComponent() { + return (AuthenticatorITI) Component.getInstance(AuthenticatorITI.COMPONENT_NAME); + } + + private void simulateLogin(JSFSession jsfSession, String email, String password) throws IOException { + JSFClientSession client = jsfSession.getJSFClientSession(); + client.setValue(USERNAME_CLIENT_ID, email); + client.setValue(PASSWORD_CLIENT_ID, password); + client.click(SUBMIT_CLIENT_ID); + } + +} \ No newline at end of file diff --git a/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITC.java b/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITC.java new file mode 100644 index 0000000..52fac12 --- /dev/null +++ b/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITC.java @@ -0,0 +1,47 @@ +package no.knowit.seam.example.security.test; + +import junit.framework.Assert; +import no.knowit.seam.example.test.JSFUnitUtils; +import org.jboss.jsfunit.jsfsession.JSFClientSession; +import org.jboss.jsfunit.jsfsession.JSFServerSession; +import org.jboss.jsfunit.jsfsession.JSFSession; +import org.jboss.seam.annotations.Name; + +import java.io.IOException; + +@Name(AuthenticatorITI.COMPONENT_NAME) +public class AuthenticatorITC implements AuthenticatorITI { + + private static final String USERNAME_CLIENT_ID = "loginForm:username"; + private static final String PASSWORD_CLIENT_ID = "loginForm:password"; + private static final String SUBMIT_CLIENT_ID = "loginForm:submit"; + + public void testFineLogin() throws Exception { + JSFSession jsfSession = new JSFSession("/"); + + JSFServerSession server = jsfSession.getJSFServerSession(); + JSFClientSession client = jsfSession.getJSFClientSession(); + + Assert.assertTrue(!(Boolean) JSFUnitUtils.getELValue(jsfSession, "#{identity.loggedIn}")); + + /** Enter login page */ + client.click("menuLoginId"); + /** Fill the form */ + simulateLogin(jsfSession, "s4237@pjwstk.edu.pl", "aaaaa"); + + JSFUnitUtils.logFacesMessages(jsfSession); + /** Assert propper redirection */ + Assert.assertEquals("/home.xhtml", server.getCurrentViewID()); + /** Assert propper communicate is printed */ + JSFUnitUtils.assertGlobalMessage(jsfSession, "Welcome, s4237@pjwstk.edu.pl!"); + Assert.assertTrue((Boolean) JSFUnitUtils.getELValue(jsfSession, "#{identity.loggedIn}")); + } + + private void simulateLogin(JSFSession jsfSession, String email, String password) throws IOException { + JSFClientSession client = jsfSession.getJSFClientSession(); + client.setValue(USERNAME_CLIENT_ID, email); + client.setValue(PASSWORD_CLIENT_ID, password); + client.click(SUBMIT_CLIENT_ID); + } + +} \ No newline at end of file diff --git a/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITI.java b/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITI.java new file mode 100644 index 0000000..514aa2d --- /dev/null +++ b/war/src/test/java/no/knowit/seam/example/security/test/AuthenticatorITI.java @@ -0,0 +1,8 @@ +package no.knowit.seam.example.security.test; + +public interface AuthenticatorITI { + + String COMPONENT_NAME = "authenticatorIT"; + + void testFineLogin() throws Throwable; +} diff --git a/war/src/test/java/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase.java b/war/src/test/java/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase.java new file mode 100644 index 0000000..0168f54 --- /dev/null +++ b/war/src/test/java/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase.java @@ -0,0 +1,75 @@ +package no.knowit.seam.example.test; + +import org.apache.cactus.ServletTestCase; +import org.apache.commons.lang.StringUtils; +import org.unitils.core.Unitils; +import org.unitils.core.UnitilsException; +import org.unitils.core.dbsupport.DefaultSQLHandler; +import org.unitils.database.DatabaseModule; +import org.unitils.dbmaintainer.DBMaintainer; +import org.unitils.dbmaintainer.structure.DataSetStructureGenerator; +import org.unitils.util.PropertyUtils; + +import javax.sql.DataSource; +import java.lang.reflect.Method; +import java.util.Properties; + +import static org.unitils.dbmaintainer.util.DatabaseModuleConfigUtils.getConfiguredDatabaseTaskInstance; + +public abstract class AbstractUnitilisedJSFUnitTestCase extends ServletTestCase { + + @Override + protected void setUp() throws Exception { + final Unitils unitils = Unitils.getInstance(); + unitils.getTestListener().beforeTestSetUp(this, getCurrentTestMethod()); + final Properties configuration = unitils.getConfiguration(); + boolean generateDtd = PropertyUtils.getBoolean(DBMaintainer.PROPKEY_GENERATE_DATA_SET_STRUCTURE_ENABLED, configuration); + if (generateDtd) { + DataSource dataSource = unitils.getModulesRepository().getModuleOfType(DatabaseModule.class) + .getDataSourceAndActivateTransactionIfNeeded(); + getConfiguredDatabaseTaskInstance(DataSetStructureGenerator.class, + configuration, new DefaultSQLHandler(dataSource)).generateDataSetStructure(); + } + } + + @Override + protected void tearDown() throws Exception { + Unitils.getInstance().getTestListener().afterTestTearDown(this, getCurrentTestMethod()); + } + + /** + * Gets the method that has the same name as the current test. + * + * @return the method, not null + * @throws org.unitils.core.UnitilsException + * if the method could not be found + */ + protected Method getCurrentTestMethod() { + String testName = getName(); + if (StringUtils.isEmpty(testName)) { + throw new UnitilsException("Unable to find current test method. No test name provided (null) for test. Test class: " + getClass()); + } + + try { + return getClass().getMethod(getName()); + + } catch (NoSuchMethodException e) { + throw new UnitilsException("Unable to find current test method. Test name: " + getName() + " , test class: " + getClass(), e); + } + } + + public static void run(TestComponentRunnable runnable) throws Throwable { + try { + runnable.run(); + } catch (Throwable e) { + while (e.getCause() != null) { + e = e.getCause(); + } + throw e; + } + } + + public static interface TestComponentRunnable { + void run() throws Throwable; + } +} diff --git a/war/src/test/java/no/knowit/seam/example/test/JSFUnitUtils.java b/war/src/test/java/no/knowit/seam/example/test/JSFUnitUtils.java new file mode 100644 index 0000000..b2c505a --- /dev/null +++ b/war/src/test/java/no/knowit/seam/example/test/JSFUnitUtils.java @@ -0,0 +1,73 @@ +package no.knowit.seam.example.test; + +import junit.framework.TestCase; +import org.jboss.jsfunit.jsfsession.JSFServerSession; +import org.jboss.jsfunit.jsfsession.JSFSession; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; + +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.persistence.EntityManager; +import java.util.Iterator; + +public class JSFUnitUtils { + public static void logFacesMessages(JSFSession session) { + JSFServerSession server = session.getJSFServerSession(); + Iterator iterator = server.getFacesContext().getMessages(null); + System.out.println("Global messages:"); + while (iterator.hasNext()) { + FacesMessage message = iterator.next(); + System.out.println(message.getSeverity() + ":" + message.getSummary() + " | " + message.getDetail()); + } + Iterator idsWithMessages = server.getFacesContext().getClientIdsWithMessages(); + while (idsWithMessages.hasNext()) { + String id = idsWithMessages.next(); + if (id == null) { + continue; + } + System.out.println("Messages for component " + id + ":"); + iterator = server.getFacesMessages(id); + while (iterator.hasNext()) { + FacesMessage message = iterator.next(); + System.out.println(id + ":" + message.getSeverity() + ":" + message.getSummary() + " | " + message.getDetail()); + } + } + } + + public static void assertGlobalMessage(JSFSession session, String message) { + Element messagesElement = session.getJSFClientSession().getElement("messages"); + TestCase.assertNotNull(messagesElement); + NodeList messagesItems = messagesElement.getElementsByTagName("li"); + TestCase.assertEquals(1, messagesItems.getLength()); + for (int i = 0; i < messagesItems.getLength(); i++) { + TestCase.assertEquals(message, messagesItems.item(i).getTextContent().trim()); + } + } + + public static String messageForKey(JSFSession session, String key) { + final Object value = getELValue(session, "#{messages['" + key + "']}"); + return value == null ? null : value.toString(); + } + + public static Object getELValue(JSFSession session, String expression) { + final FacesContext facesContext = session.getJSFServerSession().getFacesContext(); + return facesContext.getApplication().createValueBinding(expression).getValue(facesContext); + } + + public static void assertMessageForControl(JSFSession session, String controlId, String messageKey, FacesMessage.Severity severity) { + Iterator messageIterator = session.getJSFServerSession().getFacesMessages(controlId); + TestCase.assertTrue(messageIterator.hasNext()); + final FacesMessage message = messageIterator.next(); + TestCase.assertEquals(severity, message.getSeverity()); + TestCase.assertEquals(messageForKey(session, messageKey), message.getSummary()); + } + + public static void assertMessageForControl(JSFSession session, String controlId, String messageKey) { + assertMessageForControl(session, controlId, messageKey, FacesMessage.SEVERITY_ERROR); + } + + public static EntityManager getEntityManager(JSFSession jsfSession) { + return (EntityManager) JSFUnitUtils.getELValue(jsfSession, "#{entityManager}"); + } +} diff --git a/war/src/test/resources/cactus-report.xsl b/war/src/test/resources/cactus-report.xsl new file mode 100644 index 0000000..d207a52 --- /dev/null +++ b/war/src/test/resources/cactus-report.xsl @@ -0,0 +1,337 @@ + + + + + + + + + + + + + + + +
+ + + + +
+ + +

Unit Test Results

+ + + + + +
+ + Designed for use with + Cactus. +
+
+
+ + +

Summary

+ + + + + + + + + + + + + + + + + + + + Failure + Error + + + + + + + + + +
TestsFailuresErrorsSuccess rateTime
+ + + + + + + + + + + + + + +
+ + + + + +
+ Note: + failures + are anticipated and checked for with assertions while + errors + are unanticipated. +
+
+ + + + + + +

TestCase + +

+ + + + + + + + + + + + +
+ +
+

+ Back to top + + + + + + Name + + Tests + Errors + Failures + Time(s) + + + + + + + + Name + Tests + Errors + Failures + Time(s) + + + + + + + + Name + Status + + Type + Time(s) + + + + + + + + + + + Failure + Error + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Error + + + + + + + + + Failure + + + + + + Error + + + + + + + Success + + + + + + + + + + + + + + + + + + + + + + + + + N/A + + + + + + + +

+ + + + + + + + + + + + + +
+ + + + +
+ + + +
+
+ + + + + + + + + + + + + + + diff --git a/war/src/test/resources/no/knowit/seam/example/security/test/AuthenticatorIT.xml b/war/src/test/resources/no/knowit/seam/example/security/test/AuthenticatorIT.xml new file mode 100644 index 0000000..c424a71 --- /dev/null +++ b/war/src/test/resources/no/knowit/seam/example/security/test/AuthenticatorIT.xml @@ -0,0 +1,4 @@ + + + + diff --git a/war/src/test/resources/unitils.properties b/war/src/test/resources/unitils.properties new file mode 100644 index 0000000..f738e1c --- /dev/null +++ b/war/src/test/resources/unitils.properties @@ -0,0 +1,30 @@ +database.driverClassName=${ds.driver.class} +database.url=${ds.connection.url} +database.userName=${ds.user.name} +database.password=${ds.password} +database.schemaNames=${ds.schema} +database.dialect=${unitils.dialect} +DatabaseModule.Transactional.value.default=disabled +# If set to true, the DBMaintainer will be used to update the unit test database schema. This is done once for each +# test run, when creating the DataSource that provides access to the unit test database. +updateDataBaseSchema.enabled=true +# Comma separated list of directories and files in which the database update scripts are located. Directories in this +# list are recursively searched for files. +dbMaintainer.script.locations=${unitils.dbscripts.output} +dbMaintainer.generateDataSetStructure.enabled=${unitils.generateDataSetStructure} +# DbUnit database XSD directory +dataSetStructureGenerator.xsd.dirName=${unitils.dbschema} +# Set this property to true if the dbmaintain_scripts table should be created automatically if not found. +# If false, an exception is thrown when the table is not found, indicating how to create it manually. +# This property is false by default to be sure that a database is cleared by accident. If an executed +# scripts table is available, we assume it to be a database managed by dbmaintain. +dbMaintainer.autoCreateExecutedScriptsTable=true +# If set to true, an implementation of org.unitils.dbmaintainer.sequences.SequenceUpdater will be used to update the +# sequences to a suffiently high value, so that test data can be inserted without problems. +# The SequenceUpdater is configured using the properties specified below. The property with key 'database.dialect' +# specifies which implementation is used. +dbMaintainer.updateSequences.enabled=true +# Lowest acceptable value of a sequence in a unit test database. The SequenceUpdater will make sure all sequences +# have this value or higher before proceeding +sequenceUpdater.sequencevalue.lowestacceptable=1000 + diff --git a/war/src/test/resources/web.xml b/war/src/test/resources/web.xml new file mode 100644 index 0000000..7d808b2 --- /dev/null +++ b/war/src/test/resources/web.xml @@ -0,0 +1,209 @@ + + + + + + + ${app.display.name} + + + 404 + /404.xhtml + + + + + org.richfaces.SKIN + glassX + + + + + org.richfaces.CONTROL_SKINNING + disable + + + + org.richfaces.CONTROL_SKINNING_CLASSES + disable + + + + + org.richfaces.LoadStyleStrategy + DEFAULT + + + + org.richfaces.LoadScriptStrategy + DEFAULT + + + + + org.jboss.seam.servlet.SeamListener + + + + Seam Filter + org.jboss.seam.servlet.SeamFilter + + + + Seam Filter + /* + + + + Seam Resource Servlet + org.jboss.seam.servlet.SeamResourceServlet + + + + Seam Resource Servlet + /seam/resource/* + + + + + + + facelets.DEVELOPMENT + ${app.debug} + + + + + Strip html comments from the page before it is rendred - meaning that you will + no longer be bugged down by EL evaluating expressions inside a comment tag + + facelets.SKIP_COMMENTS + true + + + + + + + + javax.faces.DEFAULT_SUFFIX + .xhtml + + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + + Faces Servlet + *.seam + + + + + + + + + + 10 + + + + + Restrict raw XHTML Documents + + XHTML + *.xhtml + + + + + + + + JSFUnitFilter + org.jboss.jsfunit.framework.JSFUnitFilter + + + + JSFUnitFilter + ServletTestRunner + + + + JSFUnitFilter + ServletRedirector + + + + ServletRedirector + org.apache.cactus.server.ServletTestRedirector + + + + ServletTestRunner + org.apache.cactus.server.runner.ServletTestRunner + + + + ServletRedirector + /ServletRedirector + + + + ServletTestRunner + /ServletTestRunner + + + -- libgit2 0.24.0