Permalink
Browse files

moved sample applications to http://github.com/grails-samples

  • Loading branch information...
jeffbrown committed Feb 14, 2011
1 parent b17fc37 commit 3b5c7f194100e05b3111055409eb478ef7637f54
Showing 4,641 changed files with 11 additions and 1,853,451 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
View
@@ -0,0 +1 @@
+The Grails sample applications have moved to https://github.com/grails-samples/.
View
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-<classpathentry kind="src" path="src/java"/>
-<classpathentry kind="src" path="src/groovy"/>
-<classpathentry kind="src" path="grails-app/conf"/>
-<classpathentry kind="src" path="grails-app/controllers"/>
-<classpathentry kind="src" path="grails-app/domain"/>
-<classpathentry kind="src" path="grails-app/services"/>
-<classpathentry kind="src" path="grails-app/taglib"/>
-<classpathentry kind="src" path="test/integration"/>
-<classpathentry kind="src" path="test/unit"/>
-<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-<classpathentry kind="output" path="web-app/WEB-INF/classes"/>
-<classpathentry kind="var" path="GRAILS_HOME/ant/lib/ant.jar"/>
-<classpathentry kind="var" path="GRAILS_HOME/lib/ant-junit.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ant-nodeps.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ant.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/antlr-2.7.6.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/bsf-2.3.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/cglib-nodep-2.1_3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-beanutils-1.7.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-cli-1.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-collections-3.2.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-dbcp-1.2.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-el-1.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-fileupload-1.1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-io-1.2.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-lang-2.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-logging-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-pool-1.2.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-validator-1.3.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/dom4j-1.6.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ehcache-1.2.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ejb3-persistence.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/gant-0.2.5-SNAPSHOT.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/groovy-all-1.1-beta-2-snapshot.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/groovy-starter.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/hibernate-annotations.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/hibernate3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/hsqldb-1.8.0.5.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-compiler.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-runtime.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jaxen-1.1-beta-11.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jdbc2_0-stdext.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-6.1.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-util-6.1.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jsp-api-2.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jstl-2.3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jstl-2.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jta.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/junit-3.8.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/log4j-1.2.8.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ognl-2.6.9.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/oro-2.0.8.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/serializer.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/servlet-api-2.5-6.1.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/sitemesh-2.3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/spring-2.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/spring-binding-1.1-SNAPSHOT-20070611011605.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/spring-mock.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/spring-webflow-1.1-SNAPSHOT-20070611011610.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/springmodules-sandbox.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/standard-2.3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/standard-2.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/start.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/svnkit.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/xalan.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/xerces-2.6.2.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/xml-apis.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-config-0.6-SNAPSHOT.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-core-0.6-SNAPSHOT.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-crud-0.6-SNAPSHOT.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-gorm-0.6-SNAPSHOT.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-web-0.6-SNAPSHOT.jar" />
-</classpath>
View
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>book-flow</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.codehaus.groovy.eclipse.groovyBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.codehaus.groovy.eclipse.groovyNature</nature>
- </natures>
-</projectDescription>
View
@@ -0,0 +1 @@
+The book-flow source code has moved to https://github.com/grails-samples/book-flow.
@@ -1,5 +0,0 @@
-#Do not edit app.grails.* properties, they may change automatically. DO NOT put application configuration in here, it is not the right place!
-#Mon Jul 09 17:28:25 BST 2007
-app.version=0.1
-app.grails.version=0.6-SNAPSHOT
-app.name=bookflow
View
@@ -1,41 +0,0 @@
-<project name="addressbook" default="test">
-
- <condition property="grails" value="grails.bat">
- <os family="windows"/>
- </condition>
- <property name="grails" value="grails" />
-
- <!-- =================================
- target: clean
- ================================= -->
- <target name="clean" description="--> Cleans a Grails application">
- <exec executable="${grails}" failonerror="true">
- <arg value="clean"/>
- </exec>
- </target>
-
- <!-- =================================
- target: war
- ================================= -->
- <target name="war" description="--> Creates a WAR of a Grails application">
- <exec executable="${grails}" failonerror="true">
- <arg value="war"/>
- </exec>
- </target>
-
- <!-- =================================
- target: test
- ================================= -->
- <target name="test" description="--> Run a Grails applications unit tests">
- <exec executable="${grails}" failonerror="true">
- <arg value="test-app"/>
- </exec>
- </target>
-
- <!-- =================================
- target: deploy
- ================================= -->
- <target name="deploy" depends="war" description="--> The deploy target (initially empty)">
- <!-- TODO -->
- </target>
-</project>
@@ -1,11 +0,0 @@
-class ApplicationBootStrap {
-
- def init = { servletContext ->
- new Book(title:"Groovy in Action", author: "Dierk Koenig", price: 35.00 as Double).save()
- new Book(title:"The Definition Guide to Grails", author:"Graeme Rocher", price: 25.00 as Double).save()
- new Book(title:"Java Persistence with Hibernate", author:"Gavin King, Christian Bauer", price:35.00 as Double).save()
- }
-
- def destroy = {
- }
-}
@@ -1,24 +0,0 @@
-// log4j configuration
-log4j {
- appender.stdout = "org.apache.log4j.ConsoleAppender"
- appender."stdout.layout"="org.apache.log4j.PatternLayout"
- rootLogger="info,stdout"
- logger {
- grails.spring="info,stdout"
- org.codehaus.groovy.grails.web="info,stdout"
- org.codehaus.groovy.grails.commons="info,stdout"
- org.codehaus.groovy.grails.plugins="info,stdout"
- org.springframework="off,stdout"
- org."springframework.webflow"="info,stdout"
- org.codehaus.groovy.grails.orm.hibernate="info,stdout"
- org.hibernate="off,stdout"
- }
- additivity.'default' = false
- additivity {
- grails=false
- org.codehaus.groovy.grails=false
- org.springframework=false
- org."springframework.webflow" = false
- org.hibernate=false
- }
-}
@@ -1,26 +0,0 @@
-dataSource {
- pooling = false
- driverClassName = "org.hsqldb.jdbcDriver"
- username = "sa"
- password = ""
-}
-environments {
- "development" {
- dataSource {
- dbCreate = "create-drop" // one of 'create', 'createeate-drop','update'
- url = "jdbc:hsqldb:mem:devDB"
- }
- }
- "test" {
- dataSource {
- dbCreate = "update"
- url = "jdbc:hsqldb:mem:testDb"
- }
- }
- "production" {
- dataSource {
- dbCreate = "update"
- url = "jdbc:hsqldb:file:prodDb;shutdown=true"
- }
- }
-}
@@ -1,9 +0,0 @@
-class UrlMappings {
- static mappings = {
- "/$controller/$action?/$id?"{
- constraints {
- // apply constraints here
- }
- }
- }
-}
@@ -1,84 +0,0 @@
-import org.springframework.context.*
-
-class BookController implements ApplicationContextAware {
- ApplicationContext applicationContext
-
- def test = {
- GroovySystem.metaClassRegistry.removeMetaClass(String)
- render "${applicationContext.getBeanDefinition('bookService')}"
- }
-
- def index = {
- redirect(action:'shoppingCart')
- }
- def shoppingCartFlow = {
- getBooks {
- action {
-
- [ bookList:Book.list() ]
- }
- on("success").to "showCatalogue"
- on(Exception).to "handleError"
- }
- showCatalogue {
- on("chooseBook") {
- if(!params.id)return error()
- def items = flow.cartItems
- if(!items) items = [] as HashSet
- items << Book.get(params.id)
- flow.cartItems = items
- }.to "showCart"
- }
- showCart {
- on("checkout").to "enterPersonalDetails"
- on("continueShopping").to "showCatalogue"
- }
- enterPersonalDetails {
- on("submit") {
- def p = new Person(params)
- flow.person = p
- def e = yes()
- if(p.hasErrors() || !p.validate())return error()
- }.to "enterShipping"
- on("return").to "showCart"
- on(Exception).to "handleError"
- }
- enterShipping {
- on("back").to "enterPersonalDetails"
- on("submit") {
- def a = new Address(params)
- flow.address = a
- if(a.hasErrors() || !a.validate()) return error()
- }.to "enterPayment"
- }
- enterPayment {
- on("back").to "enterShipping"
- on("submit") {
- def pd = new PaymentDetails(params)
- flow.paymentDetails = pd
- if(pd.hasErrors() || !pd.validate()) return error()
- }.to "confirmPurchase"
- }
- confirmPurchase {
- on("back").to "enterPayment"
- on("confirm").to "processPurchaseOrder"
- }
- processPurchaseOrder {
- action {
- def a = flow.address
- def p = flow.person
- def pd = flow.paymentDetails
- def cartItems = flow.cartItems
- def o = new Order(person:p, shippingAddress:a, paymentDetails:pd)
- o.invoiceNumber = new Random().nextInt(9999999)
- cartItems.each { o.addToItems(it) }
- [order:o]
- }
- on("error").to "confirmPurchase"
- on(Exception).to "confirmPurchase"
- on("success").to "displayInvoice"
- }
- displayInvoice()
- handleError()
- }
-}
@@ -1,9 +0,0 @@
-class Address implements Serializable {
- String number
- String postCode
-
- static constraints = {
- number(blank:false)
- postCode(minSize:6)
- }
-}
@@ -1,10 +0,0 @@
-class Book implements Serializable {
- String title
- String author
- Double price
-
- static constraints = {
- title(blank:false)
- author(blank:false)
- }
-}
@@ -1,15 +0,0 @@
-class Order implements Serializable {
- static belongsTo = [person:Person]
- static hasMany = [items:Book]
-
- String invoiceNumber
- Address shippingAddress
- PaymentDetails paymentDetails
-
- static embedded = ['shippingAddress', 'paymentDetails']
-
- static constraints = {
- shippingAddress(nullable:false)
- paymentDetails(nullable:false)
- }
-}
@@ -1,11 +0,0 @@
-class PaymentDetails implements Serializable {
-
- String cardNumber
- String expiryDate
-
- static constraints = {
- cardNumber(creditCard:true)
- expiryDate(matches:"\\d{2}/\\d{2}")
- }
-
-}
@@ -1,7 +0,0 @@
-class Person implements java.io.Serializable {
- String name
-
- static constraints = {
- name(blank:false)
- }
-}
@@ -1,19 +0,0 @@
-default.doesnt.match.message=Property [{0}] of class [{1}] with value [{2}] does not match the required pattern [{3}]
-default.invalid.url.message=Property [{0}] of class [{1}] with value [{2}] is not a valid URL
-default.invalid.creditCard.message=Property [{0}] of class [{1}] with value [{2}] is not a valid credit card number
-default.invalid.email.message=Property [{0}] of class [{1}] with value [{2}] is not a valid e-mail address
-default.invalid.range.message=Property [{0}] of class [{1}] with value [{2}] does not fall within the valid range from [{3}] to [{4}]
-default.invalid.size.message=Property [{0}] of class [{1}] with value [{2}] does not fall within the valid size range from [{3}] to [{4}]
-default.invalid.max.message=Property [{0}] of class [{1}] with value [{2}] exceeds maximum value [{3}]
-default.invalid.min.message=Property [{0}] of class [{1}] with value [{2}] is less than minimum value [{3}]
-default.invalid.max.size.message=Property [{0}] of class [{1}] with value [{2}] exceeds the maximum size of [{3}]
-default.invalid.min.size.message=Property [{0}] of class [{1}] with value [{2}] is less than the minimum size of [{3}]
-default.invalid.validator.message=Property [{0}] of class [{1}] with value [{2}] does not pass custom validation
-default.not.inlist.message=Property [{0}] of class [{1}] with value [{2}] is not contained within the list [{3}]
-default.blank.message=Property [{0}] of class [{1}] cannot be blank
-default.not.equal.message=Property [{0}] of class [{1}] with value [{2}] cannot equal [{3}]
-default.null.message=Property [{0}] of class [{1}] cannot be null
-default.not.unique.message=Property [{0}] of class [{1}] with value [{2}] must be unique
-
-default.paginate.prev=Previous
-default.paginate.next=Next
Oops, something went wrong.

0 comments on commit 3b5c7f1

Please sign in to comment.