Permalink
Browse files

Rewrite of the plugin as grails 2.0 plugin

- fixed deprecations
- fixed imports
- enhanced the plugin-descriptor
- fixed some spellings
- moved dependencies into BuildConfig.groovy (using springsource security core 1.2.6)
- removed generated (partial obsolete) artifacts and added them to .gitignore (docs, previsouly generated plugins, plugin.xml etc.)
  • Loading branch information...
delight committed Dec 18, 2011
1 parent 47f412e commit d5d546d562cbbe5f807d1efe3793b0055839a282
Showing with 1,602 additions and 13,631 deletions.
  1. +14 −0 .classpath
  2. +9 −0 .gitignore
  3. +19 −0 .project
  4. +3 −0 .settings/org.codehaus.groovy.eclipse.preferences.prefs
  5. +33 −10 AuditTrailGrailsPlugin.groovy
  6. +2 −6 application.properties
  7. +0 −33 docs/api/allclasses-frame.html
  8. +0 −33 docs/api/allclasses-noframe.html
  9. +0 −141 docs/api/constant-values.html
  10. +0 −141 docs/api/deprecated-list.html
  11. +0 −212 docs/api/help-doc.html
  12. +0 −185 docs/api/index-all.html
  13. +0 −37 docs/api/index.html
  14. +0 −170 docs/api/nineci/greenbill/Stamp.html
  15. +0 −377 docs/api/nineci/greenbill/StampASTTransformation.html
  16. +0 −139 docs/api/nineci/greenbill/class-use/Stamp.html
  17. +0 −139 docs/api/nineci/greenbill/class-use/StampASTTransformation.html
  18. +0 −44 docs/api/nineci/greenbill/package-frame.html
  19. +0 −169 docs/api/nineci/greenbill/package-summary.html
  20. +0 −152 docs/api/nineci/greenbill/package-tree.html
  21. +0 −139 docs/api/nineci/greenbill/package-use.html
  22. +0 −154 docs/api/overview-tree.html
  23. +0 −1 docs/api/package-list
  24. BIN docs/api/resources/inherit.gif
  25. +0 −84 docs/api/src-html/nineci/greenbill/Stamp.html
  26. +0 −353 docs/api/src-html/nineci/greenbill/StampASTTransformation.html
  27. +0 −29 docs/api/stylesheet.css
  28. +0 −523 docs/gapi/DefaultPackage/AuditTrailGrailsPlugin.html
  29. +0 −37 docs/gapi/DefaultPackage/package-frame.html
  30. +0 −114 docs/gapi/DefaultPackage/package-summary.html
  31. +0 −71 docs/gapi/allclasses-frame.html
  32. +0 −97 docs/gapi/deprecated-list.html
  33. +0 −220 docs/gapi/grails-app/conf/Config.html
  34. +0 −220 docs/gapi/grails-app/conf/DataSource.html
  35. +0 −220 docs/gapi/grails-app/conf/SecurityConfig.html
  36. +0 −257 docs/gapi/grails-app/conf/UrlMappings.html
  37. +0 −37 docs/gapi/grails-app/conf/package-frame.html
  38. +0 −132 docs/gapi/grails-app/conf/package-summary.html
  39. +0 −320 docs/gapi/grails-app/domain/nineci/tests/TestAuthority.html
  40. +0 −314 docs/gapi/grails-app/domain/nineci/tests/TestDomain.html
  41. +0 −491 docs/gapi/grails-app/domain/nineci/tests/TestPerson.html
  42. +0 −37 docs/gapi/grails-app/domain/nineci/tests/package-frame.html
  43. +0 −128 docs/gapi/grails-app/domain/nineci/tests/package-summary.html
  44. BIN docs/gapi/groovy.ico
  45. +0 −188 docs/gapi/help-doc.html
  46. +0 −682 docs/gapi/index-all.html
  47. +0 −37 docs/gapi/index.html
  48. BIN docs/gapi/inherit.gif
  49. +0 −62 docs/gapi/overview-frame.html
  50. +0 −129 docs/gapi/overview-summary.html
  51. +0 −8 docs/gapi/package-list
  52. +0 −220 docs/gapi/scripts/_Install.html
  53. +0 −220 docs/gapi/scripts/_Uninstall.html
  54. +0 −220 docs/gapi/scripts/_Upgrade.html
  55. +0 −37 docs/gapi/scripts/package-frame.html
  56. +0 −126 docs/gapi/scripts/package-summary.html
  57. +0 −648 docs/gapi/src/groovy/nineci/hibernate/AuditStampInterceptor.html
  58. +0 −527 docs/gapi/src/groovy/nineci/hibernate/AuditTrailInterceptor.html
  59. +0 −281 docs/gapi/src/groovy/nineci/hibernate/NewObjectIdGenerator.html
  60. +0 −37 docs/gapi/src/groovy/nineci/hibernate/package-frame.html
  61. +0 −128 docs/gapi/src/groovy/nineci/hibernate/package-summary.html
  62. +0 −194 docs/gapi/src/java/nineci/greenbill/Stamp.html
  63. +0 −441 docs/gapi/src/java/nineci/greenbill/StampASTTransformation.html
  64. +0 −46 docs/gapi/src/java/nineci/greenbill/package-frame.html
  65. +0 −140 docs/gapi/src/java/nineci/greenbill/package-summary.html
  66. +0 −28 docs/gapi/stylesheet.css
  67. +0 −380 docs/gapi/test/integration/nineci/tests/AuditStampTests.html
  68. +0 −408 docs/gapi/test/integration/nineci/tests/BaseIntTest.html
  69. +0 −359 docs/gapi/test/integration/nineci/tests/IdGeneratorTests.html
  70. +0 −37 docs/gapi/test/integration/nineci/tests/package-frame.html
  71. +0 −130 docs/gapi/test/integration/nineci/tests/package-summary.html
  72. +0 −342 docs/gapi/test/unit/nineci/TestDomainTests.html
  73. +0 −37 docs/gapi/test/unit/nineci/package-frame.html
  74. +0 −114 docs/gapi/test/unit/nineci/package-summary.html
  75. +39 −0 grails-app/conf/BuildConfig.groovy
  76. +23 −12 grails-app/conf/Config.groovy
  77. +37 −26 grails-app/conf/DataSource.groovy
  78. +0 −10 grails-app/conf/SecurityConfig.groovy
  79. +10 −8 grails-app/conf/UrlMappings.groovy
  80. +134 −0 grails-app/controllers/LoginController.groovy
  81. +12 −0 grails-app/controllers/LogoutController.groovy
  82. +8 −8 grails-app/domain/nine/tests/TestDomain.groovy
  83. +16 −0 grails-app/domain/nine/tests/TestUser.groovy
  84. +6 −1 grails-app/domain/nine/tests/TestUserTestRole.groovy
  85. +11 −0 grails-app/views/error.gsp
  86. +126 −0 grails-app/views/login/auth.gsp
  87. +10 −0 grails-app/views/login/denied.gsp
  88. BIN grails-audit-trail-0.1.5.zip
  89. BIN grails-audit-trail-0.1.6.zip
  90. BIN grails-audit-trail-0.1.zip
  91. BIN grails-audit-trail-1.0.zip
  92. BIN grails-audit-trail-1.1.zip
  93. BIN grails-audit-trail-1.2.zip
  94. +0 −20 plugin.xml
  95. +4 −3 src/java/gorm/AuditStamp.java
  96. +157 −115 src/java/gorm/AuditStampASTTransformation.java
  97. +2 −3 test/integration/nine/tests/BaseInt.groovy
  98. +0 −2 test/integration/nine/tests/IdGeneratorTests.groovy
  99. +19 −0 test/unit/nine/tests/TestDomainTests.groovy
  100. +0 −17 test/unit/nineci/TestDomainTests.groovy
  101. +33 −0 web-app/WEB-INF/applicationContext.xml
  102. +14 −0 web-app/WEB-INF/sitemesh.xml
  103. +0 −563 web-app/WEB-INF/tld/c.tld
  104. +0 −671 web-app/WEB-INF/tld/fmt.tld
  105. +550 −0 web-app/WEB-INF/tld/grails.tld
  106. +311 −0 web-app/WEB-INF/tld/spring.tld
View
@@ -0,0 +1,14 @@
+<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="con" path="com.springsource.sts.grails.core.CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="web-app/WEB-INF/classes"/>
+</classpath>
View
@@ -0,0 +1,9 @@
+/plugin.xml
+grails-*.zip
+web-app/WEB-INF/classes/
+target/
+target-eclipse/
+c.tld
+fmt.tld
+.link_to_grails_plugins/
+stacktrace.log
View
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>audit-trail</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.sts.grails.core.nature</nature>
+ <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,3 @@
+#Created by grails
+eclipse.preferences.version=1
+groovy.dont.generate.class.files=true
@@ -1,33 +1,52 @@
-
class AuditTrailGrailsPlugin {
// the plugin version
- def version = "1.2"
+ def version = "1.2.1"
// the version or versions of Grails the plugin is designed for
def grailsVersion = "1.3 > *"
// the other plugins this plugin depends on
def dependsOn = [hibernate:"1.3 > *"]
+//'spring-security-core':"1.0.1 > *"]
// resources that are excluded from plugin packaging
def pluginExcludes = [
- 'grails-app/views/**','grails-app/domain/**','grails-app/controllers/**','grails-app/conf/*Config*'
+ "grails-app/views/error.gsp",
+ 'grails-app/views/login/*',
+ 'grails-app/domain/**',
+ 'grails-app/controllers/*',
+ 'grails-app/conf/*Config*'
]
- // TODO Fill in these fields
+ def title = "Audit Trail" // Headline display name of the plugin
def author = "Joshua Burnett"
def authorEmail = "joshua@greenbill.com"
- def title = ""
def description = 'provides an annotation and hibernate events to take care of audit trail stamping for your gorm objects'
// URL to the plugin's documentation
- def documentation = "http://grails.org/AuditTrail+Plugin"
+ def documentation = "http://grails.org/plugin/audit-trail"
+
+ // 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: "Konstantinos Kostarellis", email: "kosta.grails@gmail.com" ]]
+
+ // Location of the plugin's issue tracker.
+ def issueManagement = [ system: "github", url: "https://github.com/9ci/grails-audit-trail/issues" ]
+
+ // Online location of the plugin's browseable source code.
+ def scm = [ url: "https://github.com/9ci/grails-audit-trail" ]
def doWithWebDescriptor = { xml ->
- // TODO Implement additions to web.xml (optional), this event occurs before
+ // TODO Implement additions to web.xml (optional), this event occurs before
}
- def doWithSpring = {
- //eventTriggeringInterceptor(AuditStampInterceptor)
+ def doWithSpring = {
entityInterceptor(nineci.hibernate.AuditTrailInterceptor)
- }
+ }
def doWithDynamicMethods = { ctx ->
// TODO Implement registering dynamic methods to classes (optional)
@@ -47,4 +66,8 @@ class AuditTrailGrailsPlugin {
// 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
@@ -1,8 +1,4 @@
#Grails Metadata file
-#Tue Sep 28 20:52:55 CDT 2010
-app.grails.version=1.3.4
+#Fri Dec 16 23:50:45 CET 2011
+app.grails.version=2.0.0
app.name=audit-trail
-plugins.hibernate=1.3.4
-plugins.tomcat=1.3.4
-#plugins.spring-security-acl=1.0.1
-plugins.spring-security-core=1.0.1
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!--NewPage-->
-<HTML>
-<HEAD>
-<!-- Generated by javadoc (build 1.5.0_20) on Wed Oct 07 02:21:18 CDT 2009 -->
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<TITLE>
-All Classes (audit-trail)
-</TITLE>
-
-
-<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
-
-
-</HEAD>
-
-<BODY BGCOLOR="white">
-<FONT size="+1" CLASS="FrameHeadingFont">
-<B>All Classes</B></FONT>
-<BR>
-
-<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
-<TR>
-<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="nineci/greenbill/Stamp.html" title="annotation in nineci.greenbill" target="classFrame">Stamp</A>
-<BR>
-<A HREF="nineci/greenbill/StampASTTransformation.html" title="class in nineci.greenbill" target="classFrame">StampASTTransformation</A>
-<BR>
-</FONT></TD>
-</TR>
-</TABLE>
-
-</BODY>
-</HTML>
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!--NewPage-->
-<HTML>
-<HEAD>
-<!-- Generated by javadoc (build 1.5.0_20) on Wed Oct 07 02:21:18 CDT 2009 -->
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<TITLE>
-All Classes (audit-trail)
-</TITLE>
-
-
-<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
-
-
-</HEAD>
-
-<BODY BGCOLOR="white">
-<FONT size="+1" CLASS="FrameHeadingFont">
-<B>All Classes</B></FONT>
-<BR>
-
-<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
-<TR>
-<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="nineci/greenbill/Stamp.html" title="annotation in nineci.greenbill">Stamp</A>
-<BR>
-<A HREF="nineci/greenbill/StampASTTransformation.html" title="class in nineci.greenbill">StampASTTransformation</A>
-<BR>
-</FONT></TD>
-</TR>
-</TABLE>
-
-</BODY>
-</HTML>
@@ -1,141 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!--NewPage-->
-<HTML>
-<HEAD>
-<!-- Generated by javadoc (build 1.5.0_20) on Wed Oct 07 02:21:18 CDT 2009 -->
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<TITLE>
-Constant Field Values (audit-trail)
-</TITLE>
-
-
-<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
-
-<SCRIPT type="text/javascript">
-function windowTitle()
-{
- parent.document.title="Constant Field Values (audit-trail)";
-}
-</SCRIPT>
-<NOSCRIPT>
-</NOSCRIPT>
-
-</HEAD>
-
-<BODY BGCOLOR="white" onload="windowTitle();">
-
-
-<!-- ========= START OF TOP NAVBAR ======= -->
-<A NAME="navbar_top"><!-- --></A>
-<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
-<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
-<TR>
-<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_top_firstrow"><!-- --></A>
-<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="nineci/greenbill/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="nineci/greenbill/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
- </TR>
-</TABLE>
-</TD>
-<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
-</EM>
-</TD>
-</TR>
-
-<TR>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;PREV&nbsp;
-&nbsp;NEXT</FONT></TD>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A> &nbsp;
-&nbsp;<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
-&nbsp;<SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
-</SCRIPT>
-<NOSCRIPT>
- <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
-</NOSCRIPT>
-
-
-</FONT></TD>
-</TR>
-</TABLE>
-<A NAME="skip-navbar_top"></A>
-<!-- ========= END OF TOP NAVBAR ========= -->
-
-<HR>
-<CENTER>
-<H1>
-Constant Field Values</H1>
-</CENTER>
-<HR SIZE="4" NOSHADE>
-<B>Contents</B><UL>
-</UL>
-
-<HR>
-
-
-<!-- ======= START OF BOTTOM NAVBAR ====== -->
-<A NAME="navbar_bottom"><!-- --></A>
-<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
-<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
-<TR>
-<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_bottom_firstrow"><!-- --></A>
-<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="nineci/greenbill/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="nineci/greenbill/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
- </TR>
-</TABLE>
-</TD>
-<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
-</EM>
-</TD>
-</TR>
-
-<TR>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;PREV&nbsp;
-&nbsp;NEXT</FONT></TD>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A> &nbsp;
-&nbsp;<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
-&nbsp;<SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
-</SCRIPT>
-<NOSCRIPT>
- <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
-</NOSCRIPT>
-
-
-</FONT></TD>
-</TR>
-</TABLE>
-<A NAME="skip-navbar_bottom"></A>
-<!-- ======== END OF BOTTOM NAVBAR ======= -->
-
-<HR>
-
-</BODY>
-</HTML>
Oops, something went wrong.

0 comments on commit d5d546d

Please sign in to comment.