You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/11/17 11:29:36 UTC

svn commit: r1542695 - /isis/site/trunk/content/core/services/auditing-service.md

Author: danhaywood
Date: Sun Nov 17 10:29:36 2013
New Revision: 1542695

URL: http://svn.apache.org/r1542695
Log:
updated the auditing service page

Modified:
    isis/site/trunk/content/core/services/auditing-service.md

Modified: isis/site/trunk/content/core/services/auditing-service.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/core/services/auditing-service.md?rev=1542695&r1=1542694&r2=1542695&view=diff
==============================================================================
--- isis/site/trunk/content/core/services/auditing-service.md (original)
+++ isis/site/trunk/content/core/services/auditing-service.md Sun Nov 17 10:29:36 2013
@@ -1,32 +1,52 @@
 Title: Auditing Service
 
-The `AuditingService` provides a simple mechanism to capture changes to data.  It is called for each property that has changed on any domain object, as a set of pre- and post-values.
+The auditing service provides a simple mechanism to capture changes to data.  It is called for each property that has changed on any domain object, as a set of pre- and post-values.
 
-> You may prefer to use the [Publishing Service](publishing-service.html) rather than the Auditing Service, since it is considerably more flexible.
+### API
 
 The API for the service is:
 
-<pre>
-  public interface AuditingService {
+    public interface AuditingService2 {
     
-    @Hidden
-    public void audit(
-       String user, long currentTimestampEpoch, 
-       String objectType, String identifier, 
-       String preValue, String postValue);
-  }
-</pre>
+        @Hidden
+        public void audit(
+           String user, long currentTimestampEpoch, 
+           String objectType, String identifier, 
+           String propertyId, 
+           String preValue, String postValue);
+      }
 
-> This service is currently only supported by the [JDO objectstore](../../components/objectstores/jdo/about.html).
+> Note that the original API for this service was called `AuditingService`.  This original API has been deprecated because it accidentally omitted the `propertyId` parameter.
 
 ### Register the Service
 
-A simple implementation of the service, that writes to stdout, is available.  Typically though you would write your own implementation.
+To use, simply register your service implementation as you would any other service, in `isis.properties`:
 
 Register like any other service in `isis.properties`:
 
 <pre>
 isis.services=<i>...other services...</i>,\
-              org.apache.isis.applib.services.audit.AuditingService$Stdout,\
+              com.mycompany.myapp.isis.MyAuditingService,\
               ...
 </pre>
+
+
+### Existing Implementations
+
+A simple implementation of the service that writes to stderr, is available, useful for debugging:
+
+<pre>
+isis.services=<i>...other services...</i>,\
+              org.apache.isis.applib.services.audit.AuditingService2$Stderr,\
+              ...
+</pre>
+
+
+### Limitations
+
+This service is currently only supported when the the [JDO objectstore](../../components/objectstores/jdo/about.html) is configured.
+
+
+### Alternatives
+
+A similar service that you may prefer to use is the [Publishing Service](publishing-service.html).  While a little more complex, it is also considerably more flexible.