Permalink
Browse files

Initial commit

  • Loading branch information...
1 parent 553e9d0 commit 4787a72814fc343f1da8d207bca6a4935ce187a3 @deigote deigote committed Oct 5, 2012
Showing with 8,522 additions and 0 deletions.
  1. +71 −0 GrailsSimplexMailPluginGrailsPlugin.groovy
  2. +9 −0 application.properties
  3. +16 −0 dsl.groovy.sample
  4. +36 −0 grails-app/conf/BuildConfig.groovy
  5. +24 −0 grails-app/conf/Config.groovy
  6. +43 −0 grails-app/conf/DataSource.groovy
  7. +13 −0 grails-app/conf/UrlMappings.groovy
  8. +25 −0 grails-app/services/es/osoco/simplexmail/SimplexMailService.groovy
  9. +8 −0 grails-app/services/es/osoco/simplexmail/SimplexMailSlurperService.groovy
  10. +11 −0 grails-app/views/error.gsp
  11. +10 −0 scripts/_Install.groovy
  12. +5 −0 scripts/_Uninstall.groovy
  13. +10 −0 scripts/_Upgrade.groovy
  14. BIN target/classes/BuildConfig$_run_closure1.class
  15. BIN target/classes/BuildConfig$_run_closure1_closure2.class
  16. BIN target/classes/BuildConfig$_run_closure1_closure3.class
  17. BIN target/classes/BuildConfig$_run_closure1_closure4.class
  18. BIN target/classes/BuildConfig$_run_closure1_closure5.class
  19. BIN target/classes/BuildConfig$_run_closure1_closure5_closure6.class
  20. BIN target/classes/BuildConfig.class
  21. BIN target/classes/Config$_run_closure1.class
  22. BIN target/classes/Config.class
  23. BIN target/classes/DataSource$_run_closure1.class
  24. BIN target/classes/DataSource$_run_closure2.class
  25. BIN target/classes/DataSource$_run_closure3.class
  26. BIN target/classes/DataSource$_run_closure3_closure4.class
  27. BIN target/classes/DataSource$_run_closure3_closure4_closure7.class
  28. BIN target/classes/DataSource$_run_closure3_closure5.class
  29. BIN target/classes/DataSource$_run_closure3_closure5_closure8.class
  30. BIN target/classes/DataSource$_run_closure3_closure6.class
  31. BIN target/classes/DataSource$_run_closure3_closure6_closure9.class
  32. BIN target/classes/DataSource$_run_closure3_closure6_closure9_closure10.class
  33. BIN target/classes/DataSource.class
  34. BIN target/classes/GrailsSimplexMailPluginGrailsPlugin$_closure1.class
  35. BIN target/classes/GrailsSimplexMailPluginGrailsPlugin$_closure2.class
  36. BIN target/classes/GrailsSimplexMailPluginGrailsPlugin$_closure3.class
  37. BIN target/classes/GrailsSimplexMailPluginGrailsPlugin$_closure4.class
  38. BIN target/classes/GrailsSimplexMailPluginGrailsPlugin$_closure5.class
  39. BIN target/classes/GrailsSimplexMailPluginGrailsPlugin$_closure6.class
  40. BIN target/classes/GrailsSimplexMailPluginGrailsPlugin$_closure7.class
  41. BIN target/classes/GrailsSimplexMailPluginGrailsPlugin.class
  42. BIN target/classes/UrlMappings$__clinit__closure1.class
  43. BIN target/classes/UrlMappings$__clinit__closure1_closure2.class
  44. BIN target/classes/UrlMappings$__clinit__closure1_closure2_closure3.class
  45. BIN target/classes/UrlMappings.class
  46. +9 −0 target/classes/application.properties
  47. BIN target/classes/es/osoco/simplexmail/SimplexMailService$_sendEmail_closure1.class
  48. BIN target/classes/es/osoco/simplexmail/SimplexMailService$_sendEmail_closure1_closure2.class
  49. BIN target/classes/es/osoco/simplexmail/SimplexMailService.class
  50. BIN target/classes/es/osoco/simplexmail/SimplexMailSlurperService.class
  51. +6,047 −0 target/stacktrace.log
  52. +17 −0 test/unit/es/osoco/simplexmail/SimplexMailServiceTests.groovy
  53. +17 −0 test/unit/es/osoco/simplexmail/SimplexMailSlurperServiceTests.groovy
  54. +33 −0 web-app/WEB-INF/applicationContext.xml
  55. +14 −0 web-app/WEB-INF/sitemesh.xml
  56. +572 −0 web-app/WEB-INF/tld/c.tld
  57. +671 −0 web-app/WEB-INF/tld/fmt.tld
  58. +550 −0 web-app/WEB-INF/tld/grails.tld
  59. +311 −0 web-app/WEB-INF/tld/spring.tld
@@ -0,0 +1,71 @@
+class GrailsSimplexMailPluginGrailsPlugin {
+ // the plugin version
+ def version = "0.1"
+ // the version or versions of Grails the plugin is designed for
+ def grailsVersion = "2.1 > *"
+ // the other plugins this plugin depends on
+ def dependsOn = [:]
+ // resources that are excluded from plugin packaging
+ def pluginExcludes = [
+ "grails-app/views/error.gsp"
+ ]
+
+ // TODO Fill in these fields
+ def title = "Grails Simplex Mail Plugin Plugin" // Headline display name of the plugin
+ def author = "Your name"
+ def authorEmail = ""
+ def description = '''\
+Brief summary/description of the plugin.
+'''
+
+ // URL to the plugin's documentation
+ def documentation = "http://grails.org/plugin/grails-simplex-mail-plugin"
+
+ // Extra (optional) plugin metadata
+
+ // License: one of 'APACHE', 'GPL2', 'GPL3'
+// def license = "APACHE"
+
+ // Details of company behind the plugin (if there is one)
+// def organization = [ name: "My Company", url: "http://www.my-company.com/" ]
+
+ // Any additional developers beyond the author specified above.
+// def developers = [ [ name: "Joe Bloggs", email: "joe@bloggs.net" ]]
+
+ // Location of the plugin's issue tracker.
+// def issueManagement = [ system: "JIRA", url: "http://jira.grails.org/browse/GPMYPLUGIN" ]
+
+ // Online location of the plugin's browseable source code.
+// def scm = [ url: "http://svn.codehaus.org/grails-plugins/" ]
+
+ def doWithWebDescriptor = { xml ->
+ // TODO Implement additions to web.xml (optional), this event occurs before
+ }
+
+ def doWithSpring = {
+ // TODO Implement runtime spring config (optional)
+ }
+
+ def doWithDynamicMethods = { ctx ->
+ // TODO Implement registering dynamic methods to classes (optional)
+ }
+
+ def doWithApplicationContext = { applicationContext ->
+ // TODO Implement post initialization spring config (optional)
+ }
+
+ def onChange = { event ->
+ // TODO Implement code that is executed when any artefact that this plugin is
+ // watching is modified and reloaded. The event contains: event.source,
+ // event.application, event.manager, event.ctx, and event.plugin.
+ }
+
+ def onConfigChange = { event ->
+ // TODO Implement code that is executed when the project configuration changes.
+ // The event is the same as for 'onChange'.
+ }
+
+ def onShutdown = { event ->
+ // TODO Implement code that is executed when the application shuts down (optional)
+ }
+}
View
@@ -0,0 +1,9 @@
+#Grails Metadata file
+#Fri Oct 05 12:29:14 CEST 2012
+app.grails.version=2.1.1
+app.name=grails-simplex-mail-plugin
+plugins.asynchronous-mail=0.6
+plugins.console=1.2
+plugins.hibernate=2.1.1
+plugins.mail=1.0
+plugins.quartz2=0.2.3
View
@@ -0,0 +1,16 @@
+contractMail {
+ to ''
+ from ''
+ cc ''
+ bcc ''
+ replyTo ''
+ subject ''
+ subjectCode ''
+ template ''
+
+}
+
+registrationMail {
+ inherits contractMail
+ template ''
+}
@@ -0,0 +1,36 @@
+grails.project.class.dir = "target/classes"
+grails.project.test.class.dir = "target/test-classes"
+grails.project.test.reports.dir = "target/test-reports"
+
+grails.project.dependency.resolution = {
+ // inherit Grails' default dependencies
+ inherits("global") {
+ // uncomment to disable ehcache
+ // excludes 'ehcache'
+ }
+ log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
+ repositories {
+ grailsCentral()
+ // uncomment the below to enable remote dependency resolution
+ // from public Maven repositories
+ //mavenLocal()
+ //mavenCentral()
+ //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.18'
+ }
+
+ plugins {
+ build(":tomcat:$grailsVersion",
+ ":release:2.0.3",
+ ":rest-client-builder:1.0.2") {
+ export = false
+ }
+ }
+}
@@ -0,0 +1,24 @@
+// configuration for plugin testing - will not be included in the plugin zip
+
+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'
+
+ warn 'org.mortbay.log'
+}
@@ -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"
+ }
+ }
+ }
+}
@@ -0,0 +1,13 @@
+class UrlMappings {
+
+ static mappings = {
+ "/$controller/$action?/$id?"{
+ constraints {
+ // apply constraints here
+ }
+ }
+
+ "/"(view:"/index")
+ "500"(view:'/error')
+ }
+}
@@ -0,0 +1,25 @@
+package es.osoco.simplexmail
+
+import java.util.Map;
+
+class SimplexMailService {
+
+ def transactional = false
+ def asynchronousMailService
+
+ private sendEmail(toEmail, fromEmail, ccEmails, bccEmails, replyToEmail, emailSubject,
+ emailBody, attachments) {
+ asynchronousMailService.sendAsynchronousMail {
+ to toEmail
+ from fromEmail
+ bcc bccEmails
+ replyTo replyToEmail
+ subject emailSubject
+ html emailBody
+ attachments?.each {
+ attachment ->
+ attachBytes attachment.name, attachment.mimeType, attachment.content
+ }
+ }
+ }
+}
@@ -0,0 +1,8 @@
+package es.osoco.simplexmail
+
+class SimplexMailSlurperService {
+
+ def serviceMethod() {
+
+ }
+}
View
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Grails Runtime Exception</title>
+ <meta name="layout" content="main">
+ <link rel="stylesheet" href="${resource(dir: 'css', file: 'errors.css')}" type="text/css">
+ </head>
+ <body>
+ <g:renderException exception="${exception}" />
+ </body>
+</html>
View
@@ -0,0 +1,10 @@
+//
+// This script is executed by Grails after plugin was installed to project.
+// This script is a Gant script so you can use all special variables provided
+// by Gant (such as 'baseDir' which points on project base dir). You can
+// use 'ant' to access a global instance of AntBuilder
+//
+// For example you can create directory under project tree:
+//
+// ant.mkdir(dir:"${basedir}/grails-app/jobs")
+//
@@ -0,0 +1,5 @@
+//
+// This script is executed by Grails when the plugin is uninstalled from project.
+// Use this script if you intend to do any additional clean-up on uninstall, but
+// beware of messing up SVN directories!
+//
View
@@ -0,0 +1,10 @@
+//
+// This script is executed by Grails during application upgrade ('grails upgrade'
+// command). This script is a Gant script so you can use all special variables
+// provided by Gant (such as 'baseDir' which points on project base dir). You can
+// use 'ant' to access a global instance of AntBuilder
+//
+// For example you can create directory under project tree:
+//
+// ant.mkdir(dir:"${basedir}/grails-app/jobs")
+//
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
+#Grails Metadata file
+#Fri Oct 05 12:29:14 CEST 2012
+app.grails.version=2.1.1
+app.name=grails-simplex-mail-plugin
+plugins.asynchronous-mail=0.6
+plugins.console=1.2
+plugins.hibernate=2.1.1
+plugins.mail=1.0
+plugins.quartz2=0.2.3
Binary file not shown.
Oops, something went wrong.

0 comments on commit 4787a72

Please sign in to comment.