Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change mail

add proxy support
  • Loading branch information...
commit 0ac6e1b22ef4dc6e3abfab906dfb28466a5fdcbd 1 parent b9c32bc
@smaldini smaldini authored
Showing with 194 additions and 133 deletions.
  1. +1 −1  HEADER.TXT
  2. +2 −2 PlatformCoreGrailsPlugin.groovy
  3. +1 −1  grails-app/conf/Config.groovy
  4. +1 −1  grails-app/conf/PlatformCoreBootStrap.groovy
  5. +1 −1  grails-app/conf/PlatformCoreFilters.groovy
  6. +1 −1  grails-app/conf/PlatformCoreUrlMappings.groovy
  7. +1 −1  grails-app/conf/TestEvents.groovy
  8. +1 −1  grails-app/controllers/org/grails/plugin/platform/controllers/PlatformToolsController.groovy
  9. +2 −2 grails-app/controllers/org/grails/plugin/platform/test/SampleController.groovy
  10. +2 −2 grails-app/domain/org/grails/plugin/platform/test/Author.groovy
  11. +2 −2 grails-app/domain/org/grails/plugin/platform/test/Book.groovy
  12. +5 −5 grails-app/services/org/grails/plugin/platform/test/SampleService.groovy
  13. +1 −1  grails-app/taglib/org/grails/plugin/platform/NavigationTagLib.groovy
  14. +1 −1  grails-app/taglib/org/grails/plugin/platform/PlatformTagLib.groovy
  15. +1 −1  grails-app/taglib/org/grails/plugin/platform/SecurityTagLib.groovy
  16. +1 −1  grails-app/taglib/org/grails/plugin/platform/SystemTagLib.groovy
  17. +1 −1  grails-app/taglib/org/grails/plugin/platform/UiExtensionsTagLib.groovy
  18. +1 −1  scripts/UpdateHeader.groovy
  19. +45 −1 src/docs/guide/events/gorm.gdoc
  20. +4 −3 src/docs/guide/events/listening.gdoc
  21. +1 −1  src/groovy/org/grails/plugin/platform/config/ConfigBuilder.groovy
  22. +1 −1  src/groovy/org/grails/plugin/platform/config/ConfigOptionsBuilder.groovy
  23. +1 −1  src/groovy/org/grails/plugin/platform/config/PluginConfiguration.groovy
  24. +1 −1  src/groovy/org/grails/plugin/platform/config/PluginConfigurationEntry.groovy
  25. +1 −1  src/groovy/org/grails/plugin/platform/config/PluginConfigurationFactory.groovy
  26. +1 −1  src/groovy/org/grails/plugin/platform/config/PluginConfigurationImpl.groovy
  27. +1 −1  src/groovy/org/grails/plugin/platform/conventions/Conventions.groovy
  28. +1 −1  src/groovy/org/grails/plugin/platform/conventions/ConventionsImpl.groovy
  29. +1 −1  src/groovy/org/grails/plugin/platform/conventions/DSLBlockCommand.groovy
  30. +1 −1  src/groovy/org/grails/plugin/platform/conventions/DSLCallCommand.groovy
  31. +1 −1  src/groovy/org/grails/plugin/platform/conventions/DSLCommand.groovy
  32. +1 −1  src/groovy/org/grails/plugin/platform/conventions/DSLEvaluator.groovy
  33. +1 −1  src/groovy/org/grails/plugin/platform/conventions/DSLNamedArgsBlockCommand.groovy
  34. +1 −1  src/groovy/org/grails/plugin/platform/conventions/DSLNamedArgsCallCommand.groovy
  35. +1 −1  src/groovy/org/grails/plugin/platform/conventions/DSLSetValueCommand.groovy
  36. +1 −1  src/groovy/org/grails/plugin/platform/conventions/StandardDSLBuilder.groovy
  37. +1 −1  src/groovy/org/grails/plugin/platform/conventions/StandardDSLDelegate.groovy
  38. +1 −1  src/groovy/org/grails/plugin/platform/conventions/UnsupportedDSLOperationException.groovy
  39. +1 −1  src/groovy/org/grails/plugin/platform/events/Events.groovy
  40. +18 −6 src/groovy/org/grails/plugin/platform/events/EventsImpl.groovy
  41. +2 −2 src/groovy/org/grails/plugin/platform/events/dispatcher/GormTopicSupport.groovy
  42. +2 −2 src/groovy/org/grails/plugin/platform/events/dispatcher/GormTopicSupport1X.groovy
  43. +2 −2 src/groovy/org/grails/plugin/platform/events/dispatcher/GormTopicSupport2X.groovy
  44. +1 −1  src/groovy/org/grails/plugin/platform/injection/InjectedMethod.groovy
  45. +1 −1  src/groovy/org/grails/plugin/platform/injection/Injection.groovy
  46. +1 −1  src/groovy/org/grails/plugin/platform/injection/InjectionBuilder.groovy
  47. +1 −1  src/groovy/org/grails/plugin/platform/injection/InjectionBuilderArtefactTypeDelegate.groovy
  48. +1 −1  src/groovy/org/grails/plugin/platform/injection/InjectionBuilderMethodDelegate.groovy
  49. +1 −1  src/groovy/org/grails/plugin/platform/injection/InjectionImpl.groovy
  50. +1 −1  src/groovy/org/grails/plugin/platform/navigation/Navigation.groovy
  51. +1 −1  src/groovy/org/grails/plugin/platform/navigation/NavigationImpl.groovy
  52. +1 −1  src/groovy/org/grails/plugin/platform/navigation/NavigationItem.groovy
  53. +1 −1  src/groovy/org/grails/plugin/platform/navigation/NavigationScope.groovy
  54. +1 −1  src/groovy/org/grails/plugin/platform/security/NotPermittedException.groovy
  55. +1 −1  src/groovy/org/grails/plugin/platform/security/Security.groovy
  56. +1 −1  src/groovy/org/grails/plugin/platform/security/SecurityBridge.groovy
  57. +1 −1  src/groovy/org/grails/plugin/platform/security/SecurityImpl.groovy
  58. +1 −1  src/groovy/org/grails/plugin/platform/ui/UiConstants.groovy
  59. +1 −1  src/groovy/org/grails/plugin/platform/ui/UiExtensions.groovy
  60. +1 −1  src/groovy/org/grails/plugin/platform/util/ClosureInvokingScript.groovy
  61. +1 −1  src/groovy/org/grails/plugin/platform/util/PluginUtils.groovy
  62. +1 −1  src/groovy/org/grails/plugin/platform/util/PropertyNamespacer.groovy
  63. +1 −1  src/groovy/org/grails/plugin/platform/util/TagLibUtils.groovy
  64. +1 −1  src/groovy/org/grails/plugin/platform/util/ViewCallbackDelegate.groovy
  65. +1 −1  src/java/grails/events/EventDeclarationException.java
  66. +1 −1  src/java/grails/events/EventException.java
  67. +3 −3 src/java/grails/events/Listener.java
  68. +1 −1  src/java/grails/platform/PlatformException.java
  69. +1 −1  src/java/org/grails/plugin/platform/events/DefaultEventsClass.java
  70. +2 −2 src/java/org/grails/plugin/platform/events/EventDefinition.groovy
  71. +2 −2 src/java/org/grails/plugin/platform/events/EventMessage.java
  72. +2 −2 src/java/org/grails/plugin/platform/events/EventReply.java
  73. +1 −1  src/java/org/grails/plugin/platform/events/EventsArtefactHandler.java
  74. +1 −1  src/java/org/grails/plugin/platform/events/EventsClass.java
  75. +2 −2 src/java/org/grails/plugin/platform/events/ListenerId.java
  76. +2 −2 src/java/org/grails/plugin/platform/events/publisher/DefaultEventsPublisher.java
  77. +2 −2 src/java/org/grails/plugin/platform/events/publisher/EventsPublisher.java
  78. +2 −2 src/java/org/grails/plugin/platform/events/publisher/GormBridgePublisher.java
  79. +20 −16 src/java/org/grails/plugin/platform/events/registry/DefaultEventsRegistry.java
  80. +2 −2 src/java/org/grails/plugin/platform/events/registry/EventHandler.java
  81. +2 −2 src/java/org/grails/plugin/platform/events/registry/EventsRegistry.java
  82. +1 −1  src/java/org/grails/plugin/platform/navigation/DefaultNavigationClass.java
  83. +1 −1  src/java/org/grails/plugin/platform/navigation/NavigationArtefactHandler.java
  84. +1 −1  src/java/org/grails/plugin/platform/navigation/NavigationClass.java
  85. +2 −2 src/precompile/org/codehaus/groovy/grails/compiler/PrecompileTest.java
  86. +1 −1  test/unit/org/grails/plugin/platform/config/PluginConfigurationSpec.groovy
  87. +1 −1  test/unit/org/grails/plugin/platform/config/PluginConfigurationTests.groovy
  88. +1 −1  test/unit/org/grails/plugin/platform/injection/InjectionTests.groovy
View
2  HEADER.TXT
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
4 PlatformCoreGrailsPlugin.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,7 +73,7 @@ Grails Plugin Platform Core APIs
def developers = [
[name: "Marc Palmer", email: "marc@grailsrocks.com"],
- [name: "Stéphane Maldini", email: "stephane.maldini@gmail.com"]
+ [name: "Stéphane Maldini", email: "smaldini@vmware.com"]
]
def issueManagement = [system: "JIRA", url: "http://jira.grails.org/browse/GPPLATFORMCORE"]
View
2  grails-app/conf/Config.groovy
@@ -30,7 +30,7 @@ grails.views.default.codec="none" // none, html, base64
grails.doc.title = "Grails Plugin Platform Core"
grails.doc.subtitle = "APIs and Tags for advanced Plugin integration"
grails.doc.images = new File("resources/img")
-grails.doc.authors = "Marc Palmer (marc@grailsrocks.com), Stéphane Maldini (stephane.maldini@gmail.com)"
+grails.doc.authors = "Marc Palmer (marc@grailsrocks.com), Stéphane Maldini (smaldini@vmware.com)"
grails.doc.license = "ASL 2"
grails.doc.copyright = "© 2012 Marc Palmer & Stéphane Maldini"
grails.doc.footer = "Please contact the authors with any corrections or suggestions"
View
2  grails-app/conf/PlatformCoreBootStrap.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  grails-app/conf/PlatformCoreFilters.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  grails-app/conf/PlatformCoreUrlMappings.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  grails-app/conf/TestEvents.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  grails-app/controllers/org/grails/plugin/platform/controllers/PlatformToolsController.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
4 grails-app/controllers/org/grails/plugin/platform/test/SampleController.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@ package org.grails.plugin.platform.test
/**
* @file
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @date 02/01/12
View
4 grails-app/domain/org/grails/plugin/platform/test/Author.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
package org.grails.plugin.platform.test
/**
* @file
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @date 03/01/12
View
4 grails-app/domain/org/grails/plugin/platform/test/Book.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
package org.grails.plugin.platform.test
/**
* @file
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @date 03/01/12
View
10 grails-app/services/org/grails/plugin/platform/test/SampleService.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import grails.events.Listener
/**
* @file
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @date 02/01/12
@@ -44,13 +44,13 @@ class SampleService {
}
@Listener(namespace = 'platformCore')
- void afterLoad(Author author) {
+ void afterInsert(Author author) {
println "will load author - $author.name"
}
@Listener(topic = 'sampleHello', namespace = 'platformCore')
- def testEvent(test) {
- println "Hello (bas) - $test"
+ def testEvent() {
+ println "Hello (bas) !!!!!"
'worked 1'
}
View
2  grails-app/taglib/org/grails/plugin/platform/NavigationTagLib.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  grails-app/taglib/org/grails/plugin/platform/PlatformTagLib.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  grails-app/taglib/org/grails/plugin/platform/SecurityTagLib.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  grails-app/taglib/org/grails/plugin/platform/SystemTagLib.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  grails-app/taglib/org/grails/plugin/platform/UiExtensionsTagLib.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  scripts/UpdateHeader.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
46 src/docs/guide/events/gorm.gdoc
@@ -1,4 +1,48 @@
-Starting from Grails 2, the Events Bus supports GORM events.
+Starting from Grails 2, the Events Bus supports [GORM events|http://grails.org/doc/latest/guide/GORM.html#eventsAutoTimestamping].
+
+h3. GORM Listeners
+
+To listen for GORM, simply declare listeners on the *gorm* namespace using the following supported topics table :
+{table}
+*Event Type* | *Target Topic*
+PreInsertEvent | beforeInsert
+PreUpdateEvent | beforeUpdate
+PreDeleteEvent | beforeDelete
+ValidationEvent | beforeValidate
+PostInsertEvent | afterInsert
+PostUpdateEvent | afterUpdate
+PostDeleteEvent | afterDelete
+SaveOrUpdateEvent | onSaveOrUpdate
+{table}
+
+Same listeners behaviors apply, e.g. Using EventMessage for the argument type, using wildcard topic name etc.
+{html:groovy}
+class SomeService{
+
+ @Listener(namespace = 'gorm')
+ void afterInsert(Author author) {
+ println "after save author - $author.name"
+ }
+
+ @Listener(topic = 'beforeInsert', namespace = 'gorm')
+ void beforeInsertBook(Book book) {
+ println "will insert book - $book.title"
+ }
+
+ @Listener(topic = 'before*', namespace = 'gorm')
+ void beforeEachGormEventAuthor(EventMessage message) {
+ println "gorm event $message.event on domain $message.data.class"
+ }
+
+}
+{html}
+
+h3. Filtering with Events Artifact
+
+{html:groovy}
+{html}
+
+h3. Vetoing changes
{note}
GORM may generate tons of events. Consider using it wisely, combine it with routing filtering
View
7 src/docs/guide/events/listening.gdoc
@@ -14,13 +14,14 @@ class SomeService{
def myMethod(User user){
}
- @grails.events.Listener //use 'mailSent' as topic name
- def mailSent(User user){
+ //use 'mailSent' as topic name
+ @grails.events.Listener
+ def mailSent(){
}
}
{html}
-Event methods are *single-argument*, and the value is the object sent with the event. Usually this is the "subject" of the event.
+Event methods can define a *single argument*, and the value is the object sent with the event. Usually this is the "subject" of the event.
However an event is carried by an enveloppe called EventMessage which contains several useful metadata like additionnal headers, current topic :
{html:groovy}
View
2  src/groovy/org/grails/plugin/platform/config/ConfigBuilder.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/config/ConfigOptionsBuilder.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/config/PluginConfiguration.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/config/PluginConfigurationEntry.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/config/PluginConfigurationFactory.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/config/PluginConfigurationImpl.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/Conventions.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/ConventionsImpl.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/DSLBlockCommand.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/DSLCallCommand.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/DSLCommand.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/DSLEvaluator.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/DSLNamedArgsBlockCommand.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/DSLNamedArgsCallCommand.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/DSLSetValueCommand.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/StandardDSLBuilder.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/StandardDSLDelegate.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/conventions/UnsupportedDSLOperationException.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/events/Events.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
24 src/groovy/org/grails/plugin/platform/events/EventsImpl.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ import org.grails.plugin.platform.conventions.DSLSetValueCommand
import org.grails.plugin.platform.events.publisher.EventsPublisher
import org.grails.plugin.platform.events.registry.EventsRegistry
import org.grails.plugin.platform.util.PluginUtils
+import org.springframework.aop.framework.Advised
import org.springframework.context.ApplicationContext
import java.lang.reflect.Method
@@ -171,11 +172,11 @@ class EventsImpl implements Events {
Listener annotation = method.getAnnotation(Listener)
if (annotation) {
String pluginName = PluginUtils.getNameOfDefiningPlugin(applicationContext, serviceClass)
- String namespace = annotation?.namespace()
+ String namespace = annotation.namespace()
checkNamespace pluginName, namespace, "-> @Listener $serviceClass.name#$method.name"
- String topic = annotation?.topic() ?: method.name
- c(namespace ?: APP_NAMESPACE, annotation?.namespace() as boolean, topic, method, serviceClass)
+ String topic = annotation.topic() ?: method.name
+ c(namespace ?: APP_NAMESPACE, annotation?.namespace() as boolean, topic, method, serviceClass, annotation.proxySupport())
}
}
}
@@ -193,7 +194,9 @@ class EventsImpl implements Events {
void registerListeners(Collection<Class<?>> serviceClasses) {
// grailsEventsDispatcher.scanClassForMappings(serviceClass)
- eachListener(serviceClasses) {String namespace, boolean hasInlineNamespace, String topic, Method method, Class serviceClass ->
+ def bean
+ eachListener(serviceClasses) {String namespace, boolean hasInlineNamespace,
+ String topic, Method method, Class serviceClass, boolean proxySupport ->
def definition = matchesDefinition(topic, method, serviceClass)
@@ -204,10 +207,19 @@ class EventsImpl implements Events {
log.warn "Event listener $serviceClass.name#$method.name declared for topic $topic and namespace $namespace but no such event is declared, you may never receive it"
}
+ bean = applicationContext.getBean(GrailsNameUtils.getPropertyName(serviceClass))
+ if (bean instanceof Advised) {
+ try {
+ bean = Advised.cast(bean).targetSource.target
+ } catch (Exception e) {
+ log.error("failed to retrieve bean origin from proxy", e);
+ }
+ }
+
grailsEventsRegistry.on(
namespace,
topic,
- applicationContext.getBean(GrailsNameUtils.getPropertyName(serviceClass)),
+ ,
method
)
}
View
4 src/groovy/org/grails/plugin/platform/events/dispatcher/GormTopicSupport.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ package org.grails.plugin.platform.events.dispatcher;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 03/01/12
View
4 src/groovy/org/grails/plugin/platform/events/dispatcher/GormTopicSupport1X.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ package org.grails.plugin.platform.events.dispatcher;
import org.springframework.context.ApplicationEvent
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 03/01/12
View
4 src/groovy/org/grails/plugin/platform/events/dispatcher/GormTopicSupport2X.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ package org.grails.plugin.platform.events.dispatcher;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 03/01/12
View
2  src/groovy/org/grails/plugin/platform/injection/InjectedMethod.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/injection/Injection.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/injection/InjectionBuilder.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/injection/InjectionBuilderArtefactTypeDelegate.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/injection/InjectionBuilderMethodDelegate.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/injection/InjectionImpl.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/navigation/Navigation.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/navigation/NavigationImpl.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/navigation/NavigationItem.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/navigation/NavigationScope.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/security/NotPermittedException.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/security/Security.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/security/SecurityBridge.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/security/SecurityImpl.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/ui/UiConstants.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/ui/UiExtensions.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/util/ClosureInvokingScript.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/util/PluginUtils.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/util/PropertyNamespacer.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/util/TagLibUtils.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/groovy/org/grails/plugin/platform/util/ViewCallbackDelegate.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/java/grails/events/EventDeclarationException.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/java/grails/events/EventException.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
6 src/java/grails/events/Listener.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
import java.lang.annotation.*;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 02/01/12
@@ -34,7 +34,7 @@
@Documented
public @interface Listener {
- //String value() default "";
String topic() default "";
String namespace() default "";
+ boolean proxySupport() default false;
}
View
2  src/java/grails/platform/PlatformException.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/java/org/grails/plugin/platform/events/DefaultEventsClass.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
4 src/java/org/grails/plugin/platform/events/EventDefinition.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@ package org.grails.plugin.platform.events
/**
* @file
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @date 14/05/12
View
4 src/java/org/grails/plugin/platform/events/EventMessage.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
import java.util.Map;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 30/12/11
View
4 src/java/org/grails/plugin/platform/events/EventReply.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
import java.util.concurrent.TimeoutException;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 30/12/11
View
2  src/java/org/grails/plugin/platform/events/EventsArtefactHandler.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/java/org/grails/plugin/platform/events/EventsClass.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
4 src/java/org/grails/plugin/platform/events/ListenerId.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
import java.lang.reflect.Method;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 09/01/12
View
4 src/java/org/grails/plugin/platform/events/publisher/DefaultEventsPublisher.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
import java.util.concurrent.*;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 16/01/12
View
4 src/java/org/grails/plugin/platform/events/publisher/EventsPublisher.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
import java.util.Map;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 02/01/12
View
4 src/java/org/grails/plugin/platform/events/publisher/GormBridgePublisher.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
import org.springframework.util.ReflectionUtils;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 29/05/12
View
36 src/java/org/grails/plugin/platform/events/registry/DefaultEventsRegistry.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@
import java.util.Set;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 02/01/12
@@ -113,16 +113,8 @@ private String registerHandler(Object bean, Method callback, String namespace, S
}
Object target = bean;
- Object realTarget = bean;
- if (bean instanceof Advised) {
- try {
- realTarget = ((Advised) bean).getTargetSource().getTarget();
- } catch (Exception e) {
- log.error("failed to retrieve bean origin from proxy", e);
- }
- }
- ListenerId listener = ListenerId.build(namespace, topic, realTarget, callback);
+ ListenerId listener = ListenerId.build(namespace, topic, target, callback);
ListenerHandler handler = new ListenerHandler(target, callback, listener);
@@ -163,7 +155,7 @@ public InvokeResult invokeListeners(EventMessage evt) {
Object result;
for (ListenerHandler _listener : listeners) {
if (log.isDebugEnabled()) {
- log.debug("Invoking listener [" + _listener.bean + '.' + _listener.method.getName() + "(arg)] for event [" + evt.getEvent() + "] with data [" + evt.getData() + "]");
+ log.debug("Invoking listener [" + _listener.bean.getClass() + '.' + _listener.method.getName() + "(arg)] for event [" + evt.getEvent() + "] with data [" + evt.getData() + "]");
}
try {
result = _listener.invoke(evt);
@@ -208,6 +200,7 @@ public InvokeResult(int invoked, Object result) {
private Method method;
private ListenerId listenerId;
private boolean useEventMessage = false;
+ private boolean noArgs = false;
public ListenerHandler(Object bean, Method m, ListenerId listenerId) {
this.listenerId = listenerId;
@@ -217,8 +210,10 @@ public ListenerHandler(Object bean, Method m, ListenerId listenerId) {
Class type = m.getParameterTypes()[0];
useEventMessage = EventMessage.class.isAssignableFrom(type);
if (useEventMessage && log.isDebugEnabled()) {
- log.debug("Listener " + bean + "." + method.getName() + " will receive EventMessage enveloppe");
+ log.debug("Listener " + bean.getClass() + "." + method.getName() + " will receive EventMessage enveloppe");
}
+ } else {
+ noArgs = true;
}
this.bean = bean;
//this.mapping = mapping;
@@ -235,14 +230,23 @@ public Object invoke(EventMessage _arg) throws Throwable {
argTypes.append(e.toString());
argTypes.append(',');
}
- log.debug("About to invoke listener method " + bean + "." + method.getName() + " with arg type " + argTypes +
+ log.debug("About to invoke listener method " + bean.getClass() + "." + method.getName() + " with arg type " + argTypes +
" with arg " + arg.toString());
}
try {
- res = method.invoke(bean, arg);
+ if (noArgs) {
+ res = method.invoke(bean);
+ } else {
+ res = method.invoke(bean, arg);
+ }
+ } catch (IllegalArgumentException e) {
+ //ignoring
+ if (log.isDebugEnabled()) {
+ log.debug("Ignoring call to " + bean.getClass() + "." + method.getName() + " with args " + arg.toString() + " - illegal arg exception: " + e.toString());
+ }
} catch (Throwable e) {
if (log.isDebugEnabled()) {
- log.debug("Ignoring call to " + bean + "." + method.getName() + " with args " + arg.toString() + " - illegal arg exception: " + e.toString());
+ log.debug("Failing call to " + bean.getClass() + "." + method.getName() + " with args " + arg.toString() + " : " + e.toString());
}
throw e;
}
View
4 src/java/org/grails/plugin/platform/events/registry/EventHandler.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
import org.grails.plugin.platform.events.ListenerId;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 19/01/12
View
4 src/java/org/grails/plugin/platform/events/registry/EventsRegistry.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
import java.lang.reflect.Method;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 02/01/12
View
2  src/java/org/grails/plugin/platform/navigation/DefaultNavigationClass.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/java/org/grails/plugin/platform/navigation/NavigationArtefactHandler.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  src/java/org/grails/plugin/platform/navigation/NavigationClass.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
4 src/precompile/org/codehaus/groovy/grails/compiler/PrecompileTest.java
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
import java.net.URL;
/**
- * @author Stephane Maldini <smaldini@doc4web.com>
+ * @author Stephane Maldini <smaldini@vmware.com>
* @version 1.0
* @file
* @date 02/02/12
View
2  test/unit/org/grails/plugin/platform/config/PluginConfigurationSpec.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  test/unit/org/grails/plugin/platform/config/PluginConfigurationTests.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  test/unit/org/grails/plugin/platform/injection/InjectionTests.groovy
@@ -1,7 +1,7 @@
/* Copyright 2011-2012 the original author or authors:
*
* Marc Palmer (marc@grailsrocks.com)
- * Stéphane Maldini (stephane.maldini@gmail.com)
+ * Stéphane Maldini (smaldini@vmware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Please sign in to comment.
Something went wrong with that request. Please try again.