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 2020/02/20 07:55:56 UTC
[isis] 14/14: ISIS-2062: refguide docs
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 31a57b18bda33eefc1c787b6e95010b606f8ebde
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Feb 20 07:45:14 2020 +0000
ISIS-2062: refguide docs
---
antora/playbooks/site-extensions.yml | 5 +-
antora/playbooks/site.yml | 3 +
.../examples/services/audit/AuditerService.java | 14 ++--
.../applib-svc/pages/AcceptHeaderService.adoc | 3 +-
.../pages/ApplicationFeatureRepository.adoc | 8 +--
.../modules/applib-svc/pages/AuditerService.adoc | 79 ++------------------
.../applib-svc/pages/AuditerServiceLogging.adoc | 1 -
.../modules/applib-svc/pages/BookmarkService.adoc | 2 +-
.../main/adoc/modules/applib-svc/pages/about.adoc | 25 ++-----
.../isis/applib/services/audit/AuditerService.java | 14 ++--
.../src/main/adoc/modules/config/pages/about.adoc | 16 ++---
extensions/core/auditer/adoc/antora.yml | 2 +
.../core/auditer/adoc/modules/auditer/nav.adoc | 1 +
.../auditer/adoc/modules/auditer/pages/about.adoc | 84 ++--------------------
.../adoc/modules/auditer/partials/module-nav.adoc | 3 +
.../adoc/modules/starters/pages/helloworld.adoc | 24 +++----
.../adoc/modules/starters/pages/simpleapp.adoc | 52 +++++++-------
17 files changed, 100 insertions(+), 236 deletions(-)
diff --git a/antora/playbooks/site-extensions.yml b/antora/playbooks/site-extensions.yml
index c764061..704c8e5 100644
--- a/antora/playbooks/site-extensions.yml
+++ b/antora/playbooks/site-extensions.yml
@@ -21,7 +21,10 @@ content:
branches: HEAD
- url: .
- start_path: extensions/persistence/jdo/flywayjdo/adoc # extensions
+ start_path: extensions/core/auditer/adoc # extensions
+ branches: HEAD
+ - url: .
+ start_path: extensions/core/flyway/adoc # userguide
branches: HEAD
- url: .
diff --git a/antora/playbooks/site.yml b/antora/playbooks/site.yml
index bf8842e..50d0c19 100644
--- a/antora/playbooks/site.yml
+++ b/antora/playbooks/site.yml
@@ -84,6 +84,9 @@ content:
branches: HEAD
- url: .
+ start_path: extensions/core/auditer/adoc # extensions
+ branches: HEAD
+ - url: .
start_path: extensions/core/flyway/adoc # userguide
branches: HEAD
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/audit/AuditerService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/audit/AuditerService.java
index 762cc15..12bcc47 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/audit/AuditerService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/audit/AuditerService.java
@@ -42,14 +42,16 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
// tag::refguide[]
public interface AuditerService {
- boolean isEnabled();
+ boolean isEnabled(); // <1>
void audit(
- final UUID interactionId, final int sequence,
- final String targetClassName, final Bookmark target,
- final String memberIdentifier, final String propertyName,
- final String preValue, final String postValue,
- final String user, final Timestamp timestamp);
+ final UUID interactionId, final int sequence, // <2>
+ final String targetClassName,
+ final Bookmark target, // <3>
+ final String memberIdentifier,
+ final String propertyName, // <4>
+ final String preValue, final String postValue, // <5>
+ final String user, final Timestamp timestamp); // <6>
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/AcceptHeaderService.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/AcceptHeaderService.adoc
index aedccdb..a0bacd4 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/AcceptHeaderService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/AcceptHeaderService.adoc
@@ -19,17 +19,16 @@ The API defined by the service is:
----
include::refguide:applib-svc:example$services/acceptheader/AcceptHeaderService.java[tags=refguide]
----
+
<.> returns the list of media types found in the HTTP Accept header.
The intention is that this service only returns a list when the request is initiated through the xref:vro:ROOT:about.adoc[Restful Objects viewer].
Otherwise the service will likely return `null`.
-
== Implementation
The default implementation is provided by `o.a.i.viewer.restfulobjects.rendering.service.acceptheader.AcceptHeaderServiceForRest`, and is xref:refguide:applib-ant:RequestScoped.adoc[`@RequestScoped`].
-
== Usage
The intended use of this service is where there are multiple concurrent versions of a REST API, for backward compatibility of existing clients.
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/ApplicationFeatureRepository.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/ApplicationFeatureRepository.adoc
index 9150e94..34b77e2 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/ApplicationFeatureRepository.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/ApplicationFeatureRepository.adoc
@@ -6,25 +6,25 @@
The `ApplicationFeatureRepository` provides the access to string representations of the packages, classes and class members (collectively: "application features") of the domain classes within the Apache Isis' internal metamodel.
-== API & Implementation
+== API
The API defined by the service is:
[source,java]
----
-include::refguide:applib-svc:example$services/appfeat/ApplicationFeatureRepository.java[tags="refguide"]
+include::refguide:applib-svc:example$services/appfeat/ApplicationFeatureRepository.java[tags=refguide]
----
where `ApplicationMemberType` in turn is:
[source,java]
----
-include::refguide:applib-svc:example$services/appfeat/ApplicationMemberType.java[tags=*]
+include::refguide:applib-svc:example$services/appfeat/ApplicationMemberType.java[tags=refguide]
----
These methods are designed primarily to return lists of strings for use in drop-downs.
-== Implementation & Config Properties
+== Implementation
The default implementation of this domain service is `o.a.i.core.metamodel.services.appfeat.ApplicationFeatureRepositoryDefault`.
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerService.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerService.adoc
index 910739f..2939331 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerService.adoc
@@ -9,30 +9,17 @@
The `AuditerService` 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.
-
-
== SPI
The SPI for the service is:
[source,java]
----
-public interface AuditerService {
- boolean isEnabled(); // <1>
- public void audit(
- UUID transactionId, int sequence, // <2>
- String targetClassName,
- Bookmark target, // <3>
- String memberIdentifier,
- String propertyName, // <4>
- String preValue, String postValue, // <5>
- String user, java.sql.Timestamp timestamp); // <6>
- }
+include::refguide:applib-svc:example$services/audit/AuditerService.java[tag=refguide]
----
<1> whether this implementation is enabled.
If all configured implementations are disabled, then auditing is suppressed (a minor performance optimization).
-<2> together the `transactionId` (misnamed; really is the request/interaction Id) and the `sequence` uniquely identify
-the transaction in which the object was changed.
+<2> together the `transactionId` (misnamed; really is the request/interaction Id) and the `sequence` uniquely identify the transaction in which the object was changed.
<3> identifies the object that has changed
<4> the property of the object that has changed.
The combination of the `transactionId`, `sequence`, `target` and `propertyName` is unique.
@@ -42,67 +29,15 @@ If the object was created then "[NEW]" is used as the pre-value; if the object w
The framework will call this for each and every domain object property that is modified within a transaction.
-
-
== Implementations
The framework allows multiple implementations of this service to be registered; all will be called.
-The framework provides one implementation of its own, `AuditerServiceLogging` (in `o.a.i.applib.services.audit` package); this
-logs simple messages to an SLF4J logger.
-
-
-For example, this can be configured to write to a separate log file by adding the following to `logging.properties`:
-
-[source,ini]
-----
-log4j.appender.AuditerServiceLogging=org.apache.log4j.FileAppender
-log4j.appender.AuditerServiceLogging.File=./logs/AuditerServiceLogging.log
-log4j.appender.AuditerServiceLogging.Append=false
-log4j.appender.AuditerServiceLogging.layout=org.apache.log4j.PatternLayout
-log4j.appender.AuditerServiceLogging.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
-
-log4j.logger.org.apache.isis.applib.services.audit.AuditerServiceLogging=DEBUG,AuditerServiceLogging
-log4j.additivity.org.apache.isis.applib.services.audit.AuditerServiceLogging=false
-----
-
-
-
-
-== Usage
-
-The typical way to indicate that an object should be audited is to annotate it with the xref:refguide:applib-ant:DomainObject.adoc#auditing[`@DomainObject#auditing()`] annotation.
-
-
-== Alternative Implementations
-
-The (non-ASF) link:https://platform.incode.org[Incode Platform^]'s audit module provides an implementation of this service (`AuditerService`), and also provides a number of related domain services (`AuditingServiceMenu`, `AuditingServiceRepository` and `AuditingServiceContributions`).
-
-The (non-ASF) link:https://platform.incode.org[Incode Platform^]'s audit module also provides an implementation, `org.isisaddons.module.audit.dom.AuditerServiceUsingJdo`.
-This creates an audit record for each changed property (ie every time that `AuditerService#audit(...)` is called.
-
-The module also provides:
-
-* `AuditingServiceMenu` service which provides actions to search for ``AuditEntry``s, underneath an 'Activity' menu on
-the secondary menu bar.
-
-* `AuditingServiceRepository` service to to search for persisted `AuditEntry``s.
-None of its actions are visible in the user interface (they are all `@Programmatic`).
-
-* `AuditingServiceContributions` which contributes collections to the xref:refguide:applib-cm:classes/mixins.adoc#HasUniqueId[ `HasUniqueId`] interface.
-This will therefore display all audit entries that occurred in a given request/transaction, in other words whenever a command, a published event or another audit entry is displayed.
-
-
-These services can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
-
-If menu items or contributions are not required in the UI, these can be suppressed either using security or by implementing a xref:userguide:btb:about.adoc#vetoing-visibility[vetoing subscriber].
-
-
-== Related Services
+There are two implementations provided by the framework:
-The auditing service works very well with implementations of xref:refguide:applib-svc:PublisherService.adoc[`PublisherService`] that persist the ``Interaction.Execution`` objects obtained from the xref:refguide:applib-svc:InteractionContext.adoc[`InteractionContext`] service.
-The interaction execution captures the _cause_ of an interaction (an action was invoked, a property was edited), while the `AuditerService` audit entries capture the _effect_ of that interaction in terms of changed state.
+* The core framework provides the `AuditerServiceLogging` (in `o.a.i.applib.services.audit` package).
+This simply logs the messages to a link:https://logging.apache.org/log4j/log4j-2.2/manual/configuration.html[LOG4J2] logger.
-The xref:refguide:applib-svc:CommandService.adoc[`CommandService`] can also be combined with the auditer service, however
-``Command``s are primarily concerned with capture the _intent_ of an action, not the actual action invocation itself.
+* the xref:extensions:ROOT:about.adoc[AuditerServiceUsingJdo] in the xref:extensions:ROOT:about.adoc[Extensions catalog] persists each audit record in a relational table.
+As its name implies, it uses xref:pjdo:ROOT:about.adoc[JDO/DataNucleus] to do this.
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerServiceLogging.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerServiceLogging.adoc
deleted file mode 100644
index 8b13789..0000000
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerServiceLogging.adoc
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/BookmarkService.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/BookmarkService.adoc
index 2e7fe8d..5330bae 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/BookmarkService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/BookmarkService.adoc
@@ -40,7 +40,7 @@ The API defined by `BookmarkService` is:
----
include::refguide:applib-svc:example$services/bookmark/BookmarkService.java[tags="refguide"]
----
-<2> same as `lookup(Bookmark bookmark)`, but downcasts to the specified type.
+<.> same as `lookup(Bookmark bookmark)`, but downcasts to the specified type.
The core framework provides a default implementation of this API, namely `o.a.i.core.metamodel.services.bookmarks.BookmarkServiceInternalDefault`
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/about.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/about.adoc
index 8bde09a..8adc05b 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/about.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/about.adoc
@@ -4,11 +4,7 @@
-This guide documents Apache Isis' domain services, both those that act as an API (implemented by the framework for
-your domain objects to call), and those domain services that act as an SPI (implemented by your domain application and
-which are called by the framework).
-
-
+This guide documents Apache Isis' domain services, both those that act as an API (implemented by the framework for your domain objects to call), and those domain services that act as an SPI (implemented by your domain application and which are called by the framework).
== Types of Domain Service
@@ -40,22 +36,16 @@ include::refguide:applib-svc:partial$metadata-api.adoc[leveloffset=+2]
include::refguide:applib-svc:partial$persistence-layer-api.adoc[leveloffset=+2]
include::refguide:applib-svc:partial$persistence-layer-spi.adoc[leveloffset=+2]
-
-
== Public API vs Internal Services
The vast majority of Apache Isis' domain services are defined in Apache Isis' applib (`o.a.i.core:isis-applib` module) as stable, public classes.
Importantly, this also minimizes the coupling between your code and Apache Isis, allowing you to easily mock out these services in your unit tests.
-
The framework also defines a number of "internal" services.
These are not part of the framework's formal API, in that they use classes that are outside of the applib.
These internal framework services should be thought of as part of the internal design of the framework, and are liable to change from release to release.
The internal framework services are documented in the xref:runtime-services:ROOT:about.adoc[Framework Internal Services] guide.
-
-
-
== Using the services
Apache Isis includes an extensive number of domain services for your domain objects to use; simply define the service as an annotated field and Apache Isis will inject the service into your object.
@@ -81,16 +71,12 @@ public class Customer {
----
<1> Service automatically injected by the framework.
-For objects that are already persisted, the service is automatically injected just after the object is rehydrated by
-JDO/DataNucleus.
+For objects that are already persisted, the service is automatically injected just after the object is rehydrated by JDO/DataNucleus.
For transient objects (instantiated programmatically), the xref:refguide:applib-svc:FactoryService.adoc[`FactoryService#instantiate(...)`] or the xref:refguide:applib-svc:RepositoryService.adoc[`RepositoryService#instantiate(...)`]'s will automatically inject the services.
Alternatively the object can be instantiated simply using `new`, then services injected using xref:refguide:applib-svc:ServiceRegistry.adoc[`ServiceRegistry`]'s ``injectServicesInto(...)`` method.
-
-
-
== Overriding the services
The framework provides default implementations for many of the domain services.
@@ -137,7 +123,6 @@ public class MyLocaleProvider implements LocaleProvider { /* ... */ }
It's not necessary to annotate `@Named` or `@Qualifier`, but could be considered good practice.
-
== Command and Events
A good number of the domain services manage the execution of action invocations/property edits, along with the state of domain objects that are modified as a result of these.
@@ -151,8 +136,7 @@ image::reference-services/commands-and-events.png[width="960px",link="{imagesdir
To explain:
-* the (request-scoped) xref:refguide:applib-svc:CommandContext.adoc[`CommandContext`] captures the user's intention to
-invoke an action or edit a property; this is held by the `Command` object.
+* the (request-scoped) xref:refguide:applib-svc:CommandContext.adoc[`CommandContext`] captures the user's intention to invoke an action or edit a property; this is held by the `Command` object.
* if a xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured, then this will be used to create the `Command` object implementation, generally so that it can then also be persisted.
+
@@ -171,7 +155,8 @@ Whether this occurs depends on whether the action/property has been annotated (u
Metrics as to which objects are merely loaded into memory are also captured using the xref:refguide:applib-svc:MetricsService.adoc[`MetricsService`] (not shown on the diagram).
* At the end of each execution, details of that execution are published through the (internal)
-xref:runtime-services:ROOT:spi/PublisherServiceInternal.adoc[`PublisherServiceInternal`] domain service. This is only done for actions/properties annotated appropriate (with xref:refguide:applib-ant:Action.adoc#publishing[`@Action#publishing()`] or xref:refguide:applib-ant:Property.adoc#publishing[`@Property#publishing()`]).
+xref:runtime-services:ROOT:spi/PublisherServiceInternal.adoc[`PublisherServiceInternal`] domain service.
+This is only done for actions/properties annotated appropriate (with xref:refguide:applib-ant:Action.adoc#publishing[`@Action#publishing()`] or xref:refguide:applib-ant:Property.adoc#publishing[`@Property#publishing()`]).
+
The internal service delegates in turn to any registered xref:refguide:applib-svc:PublisherService.adoc[`PublisherService`]s (there may be more than one).
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/audit/AuditerService.java b/api/applib/src/main/java/org/apache/isis/applib/services/audit/AuditerService.java
index 762cc15..12bcc47 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/audit/AuditerService.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/audit/AuditerService.java
@@ -42,14 +42,16 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
// tag::refguide[]
public interface AuditerService {
- boolean isEnabled();
+ boolean isEnabled(); // <1>
void audit(
- final UUID interactionId, final int sequence,
- final String targetClassName, final Bookmark target,
- final String memberIdentifier, final String propertyName,
- final String preValue, final String postValue,
- final String user, final Timestamp timestamp);
+ final UUID interactionId, final int sequence, // <2>
+ final String targetClassName,
+ final Bookmark target, // <3>
+ final String memberIdentifier,
+ final String propertyName, // <4>
+ final String preValue, final String postValue, // <5>
+ final String user, final Timestamp timestamp); // <6>
}
// end::refguide[]
diff --git a/core/config/src/main/adoc/modules/config/pages/about.adoc b/core/config/src/main/adoc/modules/config/pages/about.adoc
index fbb8acf..3578ee1 100644
--- a/core/config/src/main/adoc/modules/config/pages/about.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/about.adoc
@@ -102,13 +102,13 @@ For example, the xref:docs:starters:simpleapp.adoc[simpleapp starter app] projec
----
@SpringBootApplication
@Import({
- AppManifest.class, //<!--1-->
+ AppManifest.class, // <1>
})
public class SimpleApp
extends SpringBootServletInitializer {
public static void main(String[] args) {
- IsisPresets.prototyping(); //<!--2-->
+ IsisPresets.prototyping(); // <2>
SpringApplication.run(
new Class[] { SimpleApp.class }, args);
}
@@ -126,13 +126,13 @@ It looks like this:
----
@Configuration
@Import({
- IsisModuleCoreRuntimeServices.class, //<!--1-->
- IsisModuleSecurityShiro.class, //<!--2-->
- IsisModuleJdoDataNucleus5.class, //<!--3-->
- IsisModuleViewerRestfulObjectsJaxrsResteasy4.class, //<!--4-->
- IsisModuleViewerWicketViewer.class, //<!--5-->
+ IsisModuleCoreRuntimeServices.class, // <1>
+ IsisModuleSecurityShiro.class, // <2>
+ IsisModuleJdoDataNucleus5.class, // <3>
+ IsisModuleViewerRestfulObjectsJaxrsResteasy4.class, // <4>
+ IsisModuleViewerWicketViewer.class, // <5>
...
- ApplicationModule.class, //<!--6-->
+ ApplicationModule.class, // <6>
...
})
public class AppManifest {
diff --git a/extensions/core/auditer/adoc/antora.yml b/extensions/core/auditer/adoc/antora.yml
new file mode 100644
index 0000000..eeeeb1e
--- /dev/null
+++ b/extensions/core/auditer/adoc/antora.yml
@@ -0,0 +1,2 @@
+name: extensions
+version: master
diff --git a/extensions/core/auditer/adoc/modules/auditer/nav.adoc b/extensions/core/auditer/adoc/modules/auditer/nav.adoc
new file mode 100644
index 0000000..dba32e5
--- /dev/null
+++ b/extensions/core/auditer/adoc/modules/auditer/nav.adoc
@@ -0,0 +1 @@
+include::userguide:ROOT:partial$component-nav.adoc[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerService.adoc b/extensions/core/auditer/adoc/modules/auditer/pages/about.adoc
similarity index 52%
copy from api/applib/src/main/adoc/modules/applib-svc/pages/AuditerService.adoc
copy to extensions/core/auditer/adoc/modules/auditer/pages/about.adoc
index 910739f..62ed36e 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/AuditerService.adoc
+++ b/extensions/core/auditer/adoc/modules/auditer/pages/about.adoc
@@ -1,79 +1,7 @@
-[[AuditerService]]
-= `AuditerService`
+= Auditer
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-The `AuditerService` 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.
-
-
-
-== SPI
-
-The SPI for the service is:
-
-[source,java]
-----
-public interface AuditerService {
- boolean isEnabled(); // <1>
- public void audit(
- UUID transactionId, int sequence, // <2>
- String targetClassName,
- Bookmark target, // <3>
- String memberIdentifier,
- String propertyName, // <4>
- String preValue, String postValue, // <5>
- String user, java.sql.Timestamp timestamp); // <6>
- }
-----
-<1> whether this implementation is enabled.
-If all configured implementations are disabled, then auditing is suppressed (a minor performance optimization).
-<2> together the `transactionId` (misnamed; really is the request/interaction Id) and the `sequence` uniquely identify
-the transaction in which the object was changed.
-<3> identifies the object that has changed
-<4> the property of the object that has changed.
-The combination of the `transactionId`, `sequence`, `target` and `propertyName` is unique.
-<5> the before and after values of the property (in string format).
-If the object was created then "[NEW]" is used as the pre-value; if the object was deleted then "[DELETED]" is used as the post-value.
-<6> the user that changed the object, and the date/time that this occurred.
-
-The framework will call this for each and every domain object property that is modified within a transaction.
-
-
-
-== Implementations
-
-The framework allows multiple implementations of this service to be registered; all will be called.
-The framework provides one implementation of its own, `AuditerServiceLogging` (in `o.a.i.applib.services.audit` package); this
-logs simple messages to an SLF4J logger.
-
-
-For example, this can be configured to write to a separate log file by adding the following to `logging.properties`:
-
-[source,ini]
-----
-log4j.appender.AuditerServiceLogging=org.apache.log4j.FileAppender
-log4j.appender.AuditerServiceLogging.File=./logs/AuditerServiceLogging.log
-log4j.appender.AuditerServiceLogging.Append=false
-log4j.appender.AuditerServiceLogging.layout=org.apache.log4j.PatternLayout
-log4j.appender.AuditerServiceLogging.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
-
-log4j.logger.org.apache.isis.applib.services.audit.AuditerServiceLogging=DEBUG,AuditerServiceLogging
-log4j.additivity.org.apache.isis.applib.services.audit.AuditerServiceLogging=false
-----
-
-
-
-
-== Usage
-
-The typical way to indicate that an object should be audited is to annotate it with the xref:refguide:applib-ant:DomainObject.adoc#auditing[`@DomainObject#auditing()`] annotation.
-
-
-== Alternative Implementations
+WARNING: TODO: v2 - will move this into the framework, update these docs
The (non-ASF) link:https://platform.incode.org[Incode Platform^]'s audit module provides an implementation of this service (`AuditerService`), and also provides a number of related domain services (`AuditingServiceMenu`, `AuditingServiceRepository` and `AuditingServiceContributions`).
@@ -82,8 +10,7 @@ This creates an audit record for each changed property (ie every time that `Audi
The module also provides:
-* `AuditingServiceMenu` service which provides actions to search for ``AuditEntry``s, underneath an 'Activity' menu on
-the secondary menu bar.
+* `AuditingServiceMenu` service which provides actions to search for ``AuditEntry``s, underneath an 'Activity' menu on the secondary menu bar.
* `AuditingServiceRepository` service to to search for persisted `AuditEntry``s.
None of its actions are visible in the user interface (they are all `@Programmatic`).
@@ -91,11 +18,13 @@ None of its actions are visible in the user interface (they are all `@Programmat
* `AuditingServiceContributions` which contributes collections to the xref:refguide:applib-cm:classes/mixins.adoc#HasUniqueId[ `HasUniqueId`] interface.
This will therefore display all audit entries that occurred in a given request/transaction, in other words whenever a command, a published event or another audit entry is displayed.
-
These services can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
If menu items or contributions are not required in the UI, these can be suppressed either using security or by implementing a xref:userguide:btb:about.adoc#vetoing-visibility[vetoing subscriber].
+== Usage
+
+The typical way to indicate that an object should be audited is to annotate it with the xref:refguide:applib-ant:DomainObject.adoc#auditing[`@DomainObject#auditing()`] annotation.
== Related Services
@@ -106,3 +35,4 @@ The interaction execution captures the _cause_ of an interaction (an action was
The xref:refguide:applib-svc:CommandService.adoc[`CommandService`] can also be combined with the auditer service, however
``Command``s are primarily concerned with capture the _intent_ of an action, not the actual action invocation itself.
+
diff --git a/extensions/core/auditer/adoc/modules/auditer/partials/module-nav.adoc b/extensions/core/auditer/adoc/modules/auditer/partials/module-nav.adoc
new file mode 100644
index 0000000..42c5f8f
--- /dev/null
+++ b/extensions/core/auditer/adoc/modules/auditer/partials/module-nav.adoc
@@ -0,0 +1,3 @@
+** xref:extensions:auditer:about.adoc[Auditer]
+
+
diff --git a/starters/adoc/modules/starters/pages/helloworld.adoc b/starters/adoc/modules/starters/pages/helloworld.adoc
index 8a7f824..8b5943d 100644
--- a/starters/adoc/modules/starters/pages/helloworld.adoc
+++ b/starters/adoc/modules/starters/pages/helloworld.adoc
@@ -263,8 +263,8 @@ In the case of `HelloWorldModule`, it is extremely simple:
package domainapp.modules.hello;
... imports omitted ...
@Configuration
-@Import({}) //<!--1-->
-@ComponentScan //<!--2-->
+@Import({}) // <1>
+@ComponentScan // <2>
public class HelloWorldModule {
}
----
@@ -311,17 +311,17 @@ In the case of the helloworld starter app, the `AppManifest` looks like this:
----
@Configuration
@Import({
- IsisModuleCoreRuntimeServices.class, //<!--1-->
- IsisModuleSecurityShiro.class, //<!--2-->
- IsisModuleJdoDataNucleus5.class, //<!--3-->
- IsisModuleViewerRestfulObjectsJaxrsResteasy4.class, //<!--4-->
- IsisModuleViewerWicketViewer.class, //<!--5-->
+ IsisModuleCoreRuntimeServices.class, // <1>
+ IsisModuleSecurityShiro.class, // <2>
+ IsisModuleJdoDataNucleus5.class, // <3>
+ IsisModuleViewerRestfulObjectsJaxrsResteasy4.class, // <4>
+ IsisModuleViewerWicketViewer.class, // <5>
- IsisModuleTestingH2ConsoleUi.class, //<!--6-->
+ IsisModuleTestingH2ConsoleUi.class, // <6>
- HelloWorldModule.class //<!--7-->
+ HelloWorldModule.class // <7>
})
-@PropertySource(IsisPresets.NoTranslations) //<!--8-->
+@PropertySource(IsisPresets.NoTranslations) // <8>
public class AppManifest {
}
----
@@ -347,13 +347,13 @@ It is mostly boilerplate:
----
@SpringBootApplication
@Import({
- AppManifest.class, //<!--1-->
+ AppManifest.class, // <1>
})
public class HelloWorldApp
extends SpringBootServletInitializer {
public static void main(String[] args) {
- IsisPresets.prototyping(); //<!--2-->
+ IsisPresets.prototyping(); // <2>
SpringApplication.run(
new Class[] { HelloWorldApp.class }, args);
}
diff --git a/starters/adoc/modules/starters/pages/simpleapp.adoc b/starters/adoc/modules/starters/pages/simpleapp.adoc
index df25c3a..7f20103 100644
--- a/starters/adoc/modules/starters/pages/simpleapp.adoc
+++ b/starters/adoc/modules/starters/pages/simpleapp.adoc
@@ -397,10 +397,10 @@ In the case of `SimpleModule`, it consists of:
package domainapp.modules.simple;
... imports omitted ...
@Configuration
-@Import({}) //<!--1-->
-@ComponentScan //<!--2-->
+@Import({}) // <1>
+@ComponentScan // <2>
public class SimpleModule
- implements ModuleWithFixtures { //<!--3-->
+ implements ModuleWithFixtures { // <3>
@Override
public FixtureScript getTeardownFixture() {
@@ -412,7 +412,7 @@ public class SimpleModule
};
}
- public static class PropertyDomainEvent<S,T> //<!--4-->
+ public static class PropertyDomainEvent<S,T> // <4>
extends org.apache.isis.applib.events.domain.PropertyDomainEvent<S,T> {}
public static class CollectionDomainEvent<S,T>
@@ -421,7 +421,7 @@ public class SimpleModule
public static class ActionDomainEvent<S> extends
org.apache.isis.applib.events.domain.ActionDomainEvent<S> {}
- @ConfigurationProperties("app.simple-module") //<!--5-->
+ @ConfigurationProperties("app.simple-module") // <5>
@Data
@Validated
public static class Configuration {
@@ -525,22 +525,22 @@ The `SimpleModuleIntegTestAbstract` is the superclass of all integration tests i
.SimpleModuleIntegTestAbstract.java
----
@SpringBootTest(
- classes = SimpleModuleIntegTestAbstract.AppManifest.class //<!--1-->
+ classes = SimpleModuleIntegTestAbstract.AppManifest.class // <1>
)
-@TestPropertySource({ //<!--2-->
- IsisPresets.H2InMemory_withUniqueSchema, //<!--3-->
- IsisPresets.DataNucleusAutoCreate, //<!--4-->
- IsisPresets.UseLog4j2Test, //<!--5-->
+@TestPropertySource({ // <2>
+ IsisPresets.H2InMemory_withUniqueSchema, // <3>
+ IsisPresets.DataNucleusAutoCreate, // <4>
+ IsisPresets.UseLog4j2Test, // <5>
})
public abstract class SimpleModuleIntegTestAbstract
- extends IsisIntegrationTestAbstractWithFixtures { //<!--6-->
+ extends IsisIntegrationTestAbstractWithFixtures { // <6>
@Configuration
@Import({
- IsisModuleCoreRuntimeServices.class, //<!--7-->
+ IsisModuleCoreRuntimeServices.class, // <7>
IsisModuleSecurityBypass.class,
IsisModuleJdoDataNucleus5.class,
- IsisModuleTestingFixturesApplib.class, //<!--8-->
+ IsisModuleTestingFixturesApplib.class, // <8>
SimpleModule.class
})
@@ -642,22 +642,22 @@ It looks like this:
----
@Configuration
@Import({
- IsisModuleCoreRuntimeServices.class, //<!--1-->
- IsisModuleSecurityShiro.class, //<!--2-->
- IsisModuleJdoDataNucleus5.class, //<!--3-->
- IsisModuleViewerRestfulObjectsJaxrsResteasy4.class, //<!--4-->
- IsisModuleViewerWicketViewer.class, //<!--5-->
+ IsisModuleCoreRuntimeServices.class, // <1>
+ IsisModuleSecurityShiro.class, // <2>
+ IsisModuleJdoDataNucleus5.class, // <3>
+ IsisModuleViewerRestfulObjectsJaxrsResteasy4.class, // <4>
+ IsisModuleViewerWicketViewer.class, // <5>
- IsisModuleTestingH2ConsoleUi.class, //<!--6-->
- IsisModuleTestingFixturesApplib.class, //<!--7-->
+ IsisModuleTestingH2ConsoleUi.class, // <6>
+ IsisModuleTestingFixturesApplib.class, // <7>
- IsisModuleExtFlywayImpl.class, //<!--8-->
+ IsisModuleExtFlywayImpl.class, // <8>
- ApplicationModule.class, //<!--9-->
+ ApplicationModule.class, // <9>
- DomainAppDemo.class //<!--10-->
+ DomainAppDemo.class // <10>
})
-@PropertySource(IsisPresets.NoTranslations) //<!--11-->
+@PropertySource(IsisPresets.NoTranslations) // <11>
@PropertySource(IsisPresets.DebugDiscovery),
public class AppManifest {
}
@@ -688,13 +688,13 @@ It is mostly boilerplate:
----
@SpringBootApplication
@Import({
- AppManifest.class, //<!--1-->
+ AppManifest.class, // <1>
})
public class SimpleApp
extends SpringBootServletInitializer {
public static void main(String[] args) {
- IsisPresets.prototyping(); //<!--2-->
+ IsisPresets.prototyping(); // <2>
SpringApplication.run(
new Class[] { SimpleApp.class }, args);
}