forked from yakworks/grails-audit-trail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAuditTrailGrailsPlugin.groovy
45 lines (37 loc) · 1.4 KB
/
AuditTrailGrailsPlugin.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import gorm.FieldProps
import grails.plugin.audittrail.AuditTrailHelper
import grails.plugin.audittrail.AuditTrailInterceptor
class AuditTrailGrailsPlugin {
def version = "2.1.0"
def grailsVersion = "2.0.0 > *"
def author = "Joshua Burnett"
def authorEmail = "[email protected]"
def title = "Grails Audit Trail Plugin"
def description = 'Provides an annotation and Hibernate events to take care of audit trail stamping for your GORM objects'
def license = "APACHE"
def organization = [ name: "9ci", url: "http://www.9ci.com/" ]
def developers = [ [ name: "Joshua Burnet", email: "[email protected]" ]]
def issueManagement = [ system: "github", url: "https://github.com/9ci/grails-audit-trail/issues" ]
def scm = [ url: "https://github.com/9ci/grails-audit-trail" ]
def documentation = "http://grails.org/audit-trail"
def pluginExcludes = [
"grails-app/views/**/*",
'grails-app/domain/**',
'grails-app/controllers/**',
'grails-app/conf/*Config*',
'src/groovy/nine/tests/**'
]
def loadAfter = ['hibernate','hibernate4']
def doWithSpring = {
def cfg = application.config.grails.plugin.audittrail
def fprops = FieldProps.buildFieldMap(application.config)
auditTrailHelper(AuditTrailHelper) {
grailsApplication = ref("grailsApplication")
fieldPropsMap = fprops
}
entityInterceptor(AuditTrailInterceptor) {
auditTrailHelper = ref("auditTrailHelper")
fieldPropsMap = fprops
}
}
}