-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Modular Grails application with plugins examples and presentation.
- Loading branch information
1 parent
c8d495a
commit c62a522
Showing
293 changed files
with
36,769 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
ModularGrailsWithPlugins-AndreasArledal/apps/recordStore/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Grails Metadata file | ||
#Wed Jul 25 10:40:35 CEST 2012 | ||
app.grails.version=2.1.0 | ||
app.name=recordStore | ||
app.version=0.1 |
5 changes: 5 additions & 0 deletions
5
...lsWithPlugins-AndreasArledal/apps/recordStore/grails-app/conf/ApplicationResources.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
modules = { | ||
application { | ||
resource url:'js/application.js' | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
ModularGrailsWithPlugins-AndreasArledal/apps/recordStore/grails-app/conf/BootStrap.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import se.findout.gr8conf.rs.Album | ||
|
||
class BootStrap { | ||
|
||
def init = { servletContext -> | ||
|
||
new Album( | ||
artist: "David Bowie", | ||
title: "The Rise and Fall of Ziggy Stardust and the Spiders from Mars", | ||
itemsInStock: 2, | ||
price: 8.2 | ||
).save() | ||
new Album( | ||
artist: "David Bowie", | ||
title: "Alladin Sane", | ||
itemsInStock: 0, | ||
price: 9 | ||
).save() | ||
new Album( | ||
artist: "The Clash", | ||
title: "London Calling", | ||
itemsInStock: 1, | ||
price: 8.5 | ||
).save() | ||
new Album( | ||
artist: "The Stone Roses", | ||
title: "The Stone Roses", | ||
itemsInStock: 0, | ||
price: 9 | ||
).save() | ||
|
||
} | ||
def destroy = { | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
ModularGrailsWithPlugins-AndreasArledal/apps/recordStore/grails-app/conf/BuildConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import grails.util.Environment | ||
|
||
def environment = Environment.getCurrent() | ||
|
||
if (environment != Environment.PRODUCTION) { | ||
grails.plugin.location.'rs-shop-assistant' = '../../plugins/rsShopAssistant' | ||
grails.plugin.location.'rs-customer' = '../../plugins/rsCustomer' | ||
grails.plugin.location.'rs-manager' = '../../plugins/rsManager' | ||
} | ||
|
||
grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0) | ||
grails.project.class.dir = "target/classes" | ||
grails.project.test.class.dir = "target/test-classes" | ||
grails.project.test.reports.dir = "target/test-reports" | ||
grails.project.target.level = 1.6 | ||
grails.project.source.level = 1.6 | ||
//grails.project.war.file = "target/${appName}-${appVersion}.war" | ||
|
||
grails.project.dependency.resolution = { | ||
// inherit Grails' default dependencies | ||
inherits("global") { | ||
// specify dependency exclusions here; for example, uncomment this to disable ehcache: | ||
// excludes 'ehcache' | ||
} | ||
log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' | ||
checksums true // Whether to verify checksums on resolve | ||
|
||
repositories { | ||
inherits true // Whether to inherit repository definitions from plugins | ||
|
||
grailsPlugins() | ||
grailsHome() | ||
grailsCentral() | ||
|
||
mavenLocal() | ||
mavenCentral() | ||
|
||
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories | ||
//mavenRepo "http://snapshots.repository.codehaus.org" | ||
//mavenRepo "http://repository.codehaus.org" | ||
//mavenRepo "http://download.java.net/maven/2/" | ||
//mavenRepo "http://repository.jboss.com/maven2/" | ||
} | ||
dependencies { | ||
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg. | ||
|
||
// runtime 'mysql:mysql-connector-java:5.1.20' | ||
} | ||
|
||
plugins { | ||
runtime ":hibernate:$grailsVersion" | ||
runtime ":jquery:1.7.2" | ||
runtime ":resources:1.1.6" | ||
|
||
// Uncomment these (or add new ones) to enable additional resources capabilities | ||
//runtime ":zipped-resources:1.0" | ||
//runtime ":cached-resources:1.0" | ||
//runtime ":yui-minify-resources:0.1.4" | ||
|
||
build ":tomcat:$grailsVersion" | ||
|
||
runtime ":database-migration:1.1" | ||
|
||
compile ':cache:1.0.0' | ||
|
||
} | ||
} |
93 changes: 93 additions & 0 deletions
93
ModularGrailsWithPlugins-AndreasArledal/apps/recordStore/grails-app/conf/Config.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// locations to search for config files that get merged into the main config; | ||
// config files can be ConfigSlurper scripts, Java properties files, or classes | ||
// in the classpath in ConfigSlurper format | ||
|
||
// grails.config.locations = [ "classpath:${appName}-config.properties", | ||
// "classpath:${appName}-config.groovy", | ||
// "file:${userHome}/.grails/${appName}-config.properties", | ||
// "file:${userHome}/.grails/${appName}-config.groovy"] | ||
|
||
// if (System.properties["${appName}.config.location"]) { | ||
// grails.config.locations << "file:" + System.properties["${appName}.config.location"] | ||
// } | ||
|
||
grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination | ||
grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format | ||
grails.mime.use.accept.header = false | ||
grails.mime.types = [ | ||
all: '*/*', | ||
atom: 'application/atom+xml', | ||
css: 'text/css', | ||
csv: 'text/csv', | ||
form: 'application/x-www-form-urlencoded', | ||
html: ['text/html','application/xhtml+xml'], | ||
js: 'text/javascript', | ||
json: ['application/json', 'text/json'], | ||
multipartForm: 'multipart/form-data', | ||
rss: 'application/rss+xml', | ||
text: 'text/plain', | ||
xml: ['text/xml', 'application/xml'] | ||
] | ||
|
||
// URL Mapping Cache Max Size, defaults to 5000 | ||
//grails.urlmapping.cache.maxsize = 1000 | ||
|
||
grails.app.context = '/' | ||
|
||
// What URL patterns should be processed by the resources plugin | ||
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*'] | ||
|
||
// The default codec used to encode data with ${} | ||
grails.views.default.codec = "none" // none, html, base64 | ||
grails.views.gsp.encoding = "UTF-8" | ||
grails.converters.encoding = "UTF-8" | ||
// enable Sitemesh preprocessing of GSP pages | ||
grails.views.gsp.sitemesh.preprocess = true | ||
// scaffolding templates configuration | ||
grails.scaffolding.templates.domainSuffix = 'Instance' | ||
|
||
// Set to false to use the new Grails 1.2 JSONBuilder in the render method | ||
grails.json.legacy.builder = false | ||
// enabled native2ascii conversion of i18n properties files | ||
grails.enable.native2ascii = true | ||
// packages to include in Spring bean scanning | ||
grails.spring.bean.packages = [] | ||
// whether to disable processing of multi part requests | ||
grails.web.disable.multipart=false | ||
|
||
// request parameters to mask when logging exceptions | ||
grails.exceptionresolver.params.exclude = ['password'] | ||
|
||
// configure auto-caching of queries by default (if false you can cache individual queries with 'cache: true') | ||
grails.hibernate.cache.queries = false | ||
|
||
environments { | ||
development { | ||
grails.logging.jul.usebridge = true | ||
} | ||
production { | ||
grails.logging.jul.usebridge = false | ||
// TODO: grails.serverURL = "http://www.changeme.com" | ||
} | ||
} | ||
|
||
// log4j configuration | ||
log4j = { | ||
// Example of changing the log pattern for the default console appender: | ||
// | ||
//appenders { | ||
// console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n') | ||
//} | ||
|
||
error 'org.codehaus.groovy.grails.web.servlet', // controllers | ||
'org.codehaus.groovy.grails.web.pages', // GSP | ||
'org.codehaus.groovy.grails.web.sitemesh', // layouts | ||
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping | ||
'org.codehaus.groovy.grails.web.mapping', // URL mapping | ||
'org.codehaus.groovy.grails.commons', // core / classloading | ||
'org.codehaus.groovy.grails.plugins', // plugins | ||
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration | ||
'org.springframework', | ||
'org.hibernate', | ||
'net.sf.ehcache.hibernate' | ||
} |
43 changes: 43 additions & 0 deletions
43
ModularGrailsWithPlugins-AndreasArledal/apps/recordStore/grails-app/conf/DataSource.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
dataSource { | ||
pooled = true | ||
driverClassName = "org.h2.Driver" | ||
username = "sa" | ||
password = "" | ||
} | ||
hibernate { | ||
cache.use_second_level_cache = true | ||
cache.use_query_cache = false | ||
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' | ||
} | ||
// environment specific settings | ||
environments { | ||
development { | ||
dataSource { | ||
dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', '' | ||
url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000" | ||
} | ||
} | ||
test { | ||
dataSource { | ||
dbCreate = "update" | ||
url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000" | ||
} | ||
} | ||
production { | ||
dataSource { | ||
dbCreate = "update" | ||
url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000" | ||
pooled = true | ||
properties { | ||
maxActive = -1 | ||
minEvictableIdleTimeMillis=1800000 | ||
timeBetweenEvictionRunsMillis=1800000 | ||
numTestsPerEvictionRun=3 | ||
testOnBorrow=true | ||
testWhileIdle=true | ||
testOnReturn=true | ||
validationQuery="SELECT 1" | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
ModularGrailsWithPlugins-AndreasArledal/apps/recordStore/grails-app/conf/UrlMappings.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class UrlMappings { | ||
|
||
static mappings = { | ||
|
||
"/$controller/$action?/$id?"{ | ||
constraints { | ||
// apply constraints here | ||
} | ||
} | ||
|
||
"/customer/album/$action?/$id?" (controller: 'customerAlbum') {} | ||
"/assistant/album/$action?/$id?" (controller: 'assistantAlbum') {} | ||
|
||
"/"(view:"/index") | ||
"500"(view:'/error') | ||
|
||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...GrailsWithPlugins-AndreasArledal/apps/recordStore/grails-app/conf/spring/resources.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place your Spring DSL code here | ||
beans = { | ||
} |
55 changes: 55 additions & 0 deletions
55
ModularGrailsWithPlugins-AndreasArledal/apps/recordStore/grails-app/i18n/messages.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
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 | ||
default.boolean.true=True | ||
default.boolean.false=False | ||
default.date.format=yyyy-MM-dd HH:mm:ss z | ||
default.number.format=0 | ||
|
||
default.created.message={0} {1} created | ||
default.updated.message={0} {1} updated | ||
default.deleted.message={0} {1} deleted | ||
default.not.deleted.message={0} {1} could not be deleted | ||
default.not.found.message={0} not found with id {1} | ||
default.optimistic.locking.failure=Another user has updated this {0} while you were editing | ||
|
||
default.home.label=Home | ||
default.list.label={0} List | ||
default.add.label=Add {0} | ||
default.new.label=New {0} | ||
default.create.label=Create {0} | ||
default.show.label=Show {0} | ||
default.edit.label=Edit {0} | ||
|
||
default.button.create.label=Create | ||
default.button.edit.label=Edit | ||
default.button.update.label=Update | ||
default.button.delete.label=Delete | ||
default.button.delete.confirm.message=Are you sure? | ||
|
||
# Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) | ||
typeMismatch.java.net.URL=Property {0} must be a valid URL | ||
typeMismatch.java.net.URI=Property {0} must be a valid URI | ||
typeMismatch.java.util.Date=Property {0} must be a valid Date | ||
typeMismatch.java.lang.Double=Property {0} must be a valid number | ||
typeMismatch.java.lang.Integer=Property {0} must be a valid number | ||
typeMismatch.java.lang.Long=Property {0} must be a valid number | ||
typeMismatch.java.lang.Short=Property {0} must be a valid number | ||
typeMismatch.java.math.BigDecimal=Property {0} must be a valid number | ||
typeMismatch.java.math.BigInteger=Property {0} must be a valid number |
55 changes: 55 additions & 0 deletions
55
...ailsWithPlugins-AndreasArledal/apps/recordStore/grails-app/i18n/messages_cs_CZ.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
default.doesnt.match.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] neodpovídá požadovanému vzoru [{3}] | ||
default.invalid.url.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není validní URL | ||
default.invalid.creditCard.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není validní číslo kreditní karty | ||
default.invalid.email.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není validní emailová adresa | ||
default.invalid.range.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není v povoleném rozmezí od [{3}] do [{4}] | ||
default.invalid.size.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není v povoleném rozmezí od [{3}] do [{4}] | ||
default.invalid.max.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] překračuje maximální povolenou hodnotu [{3}] | ||
default.invalid.min.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] je menší než minimální povolená hodnota [{3}] | ||
default.invalid.max.size.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] překračuje maximální velikost [{3}] | ||
default.invalid.min.size.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] je menší než minimální velikost [{3}] | ||
default.invalid.validator.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] neprošla validací | ||
default.not.inlist.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není obsažena v seznamu [{3}] | ||
default.blank.message=Položka [{0}] třídy [{1}] nemůže být prázdná | ||
default.not.equal.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] nemůže být stejná jako [{3}] | ||
default.null.message=Položka [{0}] třídy [{1}] nemůže být prázdná | ||
default.not.unique.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] musí být unikátní | ||
|
||
default.paginate.prev=Předcházející | ||
default.paginate.next=Následující | ||
default.boolean.true=Pravda | ||
default.boolean.false=Nepravda | ||
default.date.format=dd. MM. yyyy HH:mm:ss z | ||
default.number.format=0 | ||
|
||
default.created.message={0} {1} vytvořeno | ||
default.updated.message={0} {1} aktualizováno | ||
default.deleted.message={0} {1} smazáno | ||
default.not.deleted.message={0} {1} nelze smazat | ||
default.not.found.message={0} nenalezen s id {1} | ||
default.optimistic.locking.failure=Jiný uživatel aktualizoval záznam {0}, právě když byl vámi editován | ||
|
||
default.home.label=Domů | ||
default.list.label={0} Seznam | ||
default.add.label=Přidat {0} | ||
default.new.label=Nový {0} | ||
default.create.label=Vytvořit {0} | ||
default.show.label=Ukázat {0} | ||
default.edit.label=Editovat {0} | ||
|
||
default.button.create.label=Vytvoř | ||
default.button.edit.label=Edituj | ||
default.button.update.label=Aktualizuj | ||
default.button.delete.label=Smaž | ||
default.button.delete.confirm.message=Jste si jistý? | ||
|
||
# Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) | ||
typeMismatch.java.net.URL=Položka {0} musí být validní URL | ||
typeMismatch.java.net.URI=Položka {0} musí být validní URI | ||
typeMismatch.java.util.Date=Položka {0} musí být validní datum | ||
typeMismatch.java.lang.Double=Položka {0} musí být validní desetinné číslo | ||
typeMismatch.java.lang.Integer=Položka {0} musí být validní číslo | ||
typeMismatch.java.lang.Long=Položka {0} musí být validní číslo | ||
typeMismatch.java.lang.Short=Položka {0} musí být validní číslo | ||
typeMismatch.java.math.BigDecimal=Položka {0} musí být validní číslo | ||
typeMismatch.java.math.BigInteger=Položka {0} musí být validní číslo |
Oops, something went wrong.