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 2017/05/12 10:26:04 UTC
[15/18] isis git commit: ISIS-1594: updates domain service .adoc
names and ids,
so that the edit buttons are added correctly to subdocuments. Also some
further minor improvements on scrolling.
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_InteractionDtoServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_InteractionDtoServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_InteractionDtoServiceInternal.adoc
deleted file mode 100644
index fd7c6c8..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_InteractionDtoServiceInternal.adoc
+++ /dev/null
@@ -1,44 +0,0 @@
-[[_rgfis_spi_InteractionDtoServiceInternal]]
-= `InteractionDtoServiceInternal`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-
-The `InteractionDtoServiceInternal` internal domain service is used by the framework to create and update DTOs representing member executions, ie the invocation of an action or the editing of a property. The DTO is in all cases a subclass of `MemberExecutionDto`, from the xref:../rgcms/rgcms.adoc#_rgcms_schema-ixn["ixn" schema], and subsequently accessible from the `Interaction` object (per the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] service).
-
-
-== SPI & Implementation
-
-The SPI of the service is:
-
-[source,java]
-----
-public interface InteractionDtoServiceInternal {
- ActionInvocationDto asActionInvocationDto( // <1>
- ObjectAction objectAction,
- ObjectAdapter targetAdapter,
- List<ObjectAdapter> argumentAdapters);
- PropertyEditDto asPropertyEditDto( // <2>
- OneToOneAssociation property,
- ObjectAdapter targetAdapter,
- ObjectAdapter newValueAdapterIfAny);
- ActionInvocationDto updateResult( // <3>
- ActionInvocationDto actionInvocationDto,
- ObjectAction objectAction,
- Object resultPojo);
-}
-----
-<1> called by the framework when invoking an action, to create a DTO capturing the details of the action invocation (target, arguments etc).
-<2> called by the framework when editing a property, to create a DTO (for the xref:../rgcms/rgcms.adoc#_rgcms_schema-ixn["ixn" schema]) capturing the details of the property edit (target, new value etc).
-<3> called by the framework to attach the result of an action invocation to the aforementioned DTO.
-
-The service is implemented by `o.a.i.core.runtime.services.ixn.InteractionDtoServiceInternalDefault`.
-
-
-== Related Services
-
-The design of this service is similar to that of
-xref:../rgfis/rgfis.adoc#_rgfis_spi_CommandDtoServiceInternal[`CommandDtoServiceInternal`], used to create the `CommandDto`
-(from the xref:../rgcms/rgcms.adoc#_rgcms_schema-cmd["cmd" schema]).
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_MessageBrokerServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_MessageBrokerServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_MessageBrokerServiceInternal.adoc
deleted file mode 100644
index 1e77f1c..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_MessageBrokerServiceInternal.adoc
+++ /dev/null
@@ -1,42 +0,0 @@
-[[_rgfis_spi_MessageBrokerServiceInternal]]
-= `MessageBrokerServiceInternal` (removed in `1.15.0-SNAPSHOT`)
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The (internal) `MessageBrokerServiceInternal` domain service is a wrapper around xref:../rgsvc/rgsvc.adoc#_rgsvc_api_MessageService[`MessageService`].
-
-
-[NOTE]
-====
-As of `1.15.0-SNAPSHOT` this service has been removed; it does does not provide any additional capabilities over and those of `MessageService`.
-====
-
-
-
-
-
-== SPI
-
-The SPI of the service is:
-
-[source,java]
-----
-public interface MessageBrokerServiceInternal {
- void informUser(String message);
- void warnUser(String message);
- void raiseError(String message);
-}
-----
-
-
-== Runtime vs Noop implementation
-
-The framework provides two implementations:
-
-* `MessageBrokerServiceInternalDefault` is provided by `isis-core-runtime`, and is used during normal use and integration tests
-
-* `MessageBrokerServiceInternalNoop` is provided as a fallback by `isis-core-metamodel`, and is provided to allow the xref:../rgmvn/rgmvn.adoc#[maven plugin] to be bootstrapped without any "backend" database.
-
-The `...Default` implementation takes priority over the `...Noop` implementation.
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_PersistenceSessionServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_PersistenceSessionServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_PersistenceSessionServiceInternal.adoc
deleted file mode 100644
index 2427682..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_PersistenceSessionServiceInternal.adoc
+++ /dev/null
@@ -1,96 +0,0 @@
-[[_rgfis_spi_PersistenceSessionServiceInternal]]
-= `PersistenceSessionServiceInternal`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The (internal) `PersistenceSessionServiceInternal` domain service acts as a facade to the underlying JDO persistence session / database connection. As such it provides methods for querying and for persisting objects.
-
-[NOTE]
-====
-The default implementation of this service is not (as of `1.13.0`) request-scoped, however all of the methods delegate
-to the `PersistenceSession` of the current `IsisSession` - obtained from the thread-local of `IsisSessionFactory` singleton service.
-So, in effect the service does act as if it is request scoped.
-====
-
-
-
-== SPI
-
-The SPI of the service is a hierarchy of types. First is `AdapterManagerBase`:
-
-[source,java]
-----
-public interface AdapterManagerBase {
- ObjectAdapter getAdapterFor(Object pojo); // <1>
- ObjectAdapter adapterFor(Object domainObject); // <2>
-----
-<1> Gets the `ObjectAdapter` for the specified domain object if it exists in the identity map, else returns `null`.
-<2> Looks up or creates a standalone (value) or root adapter.
-
-The `AdapterManager` is the immediate subtype:
-
-[source,java]
-----
-public interface AdapterManager extends AdapterManagerBase {
- ObjectAdapter getAdapterFor(Object pojo); // <1>
- ObjectAdapter adapterFor( // <2>
- Object pojo, ObjectAdapter parentAdapter,
- OneToManyAssociation collection);
- ObjectAdapter mapRecreatedPojo(Oid oid, Object recreatedPojo); // <3>
- void removeAdapter(ObjectAdapter adapter); // <4>
-}
-----
-<1> Gets the `ObjectAdapter` for the `Oid` if it exists in the identity map.
-<2> Looks up or creates a collection adapter.
-<3> Enable RecreatableObjectFacet to 'temporarily' map an existing pojo to an oid.
-<4> Enable RecreatableObjectFacet to remove a 'temporarily' mapped an adapter for a pojo.
-
-
-Finally, `PersistenceSessionServiceInternal` is a subtype of `AdapterManager`:
-
-[source,java]
-----
-public interface PersistenceSessionServiceInternal extends AdapterManager {
-
- // instantiate
- ObjectAdapter createTransientInstance(
- ObjectSpecification spec);
- ObjectAdapter createViewModelInstance(
- ObjectSpecification spec, String memento);
-
- // retrieve
- void resolve(Object parent);
- @Deprecated
- void resolve(Object parent, Object field);
- Object lookup(Bookmark bookmark, final BookmarkService2.FieldResetPolicy fieldResetPolicy);
- Bookmark bookmarkFor(Object domainObject);
- Bookmark bookmarkFor(Class<?> cls, String identifier);
-
- // beginTran, flush, commit, currentTransaction
- void beginTran();
- boolean flush();
- void commit();
- Transaction currentTransaction();
- void executeWithinTransaction(TransactionalClosure transactionalClosure);
-
- // makePersistent, remove
- void makePersistent(ObjectAdapter adapter);
- void remove(ObjectAdapter adapter);
- // allMatchingQuery, firstMatchingQuery
- <T> List<ObjectAdapter> allMatchingQuery(Query<T> query);
- <T> ObjectAdapter firstMatchingQuery(Query<T> query);
-}
-----
-
-
-== Runtime vs Noop implementation
-
-The framework provides two implementations:
-
-* `PersistenceSessionServiceInternalDefault` is provided by `isis-core-runtime`, and is used during normal use and integration tests
-
-* `PersistenceSessionServiceInternalNoop` is provided as a fallback by `isis-core-metamodel`, and is provided to allow the xref:../rgmvn/rgmvn.adoc#[maven plugin] to be bootstrapped without any "backend" database.
-
-The `...Default` implementation takes priority over the `...Noop` implementation.
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_PublishingServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_PublishingServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_PublishingServiceInternal.adoc
deleted file mode 100644
index faab58e..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_PublishingServiceInternal.adoc
+++ /dev/null
@@ -1,76 +0,0 @@
-[[_rgfis_spi_PublishingServiceInternal]]
-= `PublishingServiceInternal`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The (internal) `PublishingServiceInternal` domain service acts as an internal facade to any
-configured xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`] or (deprecated)
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`] domain services.
-
-For published action invocations/ property edits, it provides an API for those member executions to call.
-
-For published objects, it provides an API for the framework to call at the end of the interaction; it obtains details
-of the changed objects (from the
-xref:../rgfis/rgfis.adoc#_rgfis_spi_ChangedObjectsServiceInternal[`ChangedObjectsServiceInternal`]) and filters them to just
-those objects that are to be published; these are then passed through to any configured `PublisherService` or
-`PublishingService` implementations.
-
-
-
-== SPI and Implementation
-
-The SPI of the service is:
-
-[source,java]
-----
-public class PublishingServiceInternal {
- void publishAction(
- Interaction.Execution execution, // <1>
- ObjectAction objectAction, // <2>
- IdentifiedHolder identifiedHolder,
- ObjectAdapter targetAdapter,
- List<ObjectAdapter> parameterAdapters,
- ObjectAdapter resultAdapter);
- void publishProperty( // <3>
- Interaction.Execution execution);
- void publishObjects(); // <4>
-}
-----
-<1> to publish an action invocation, as represented by the specified member `Execution` parameter and with the
-xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`] annotation attribute or equivalent, to any configured
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`]. The `Execution` object will be an instance of
-`ActionInvocation` (see xref:../rgsvc/rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] for details).
-<2> the remaining parameters are to support the publishing of the action to any configured
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`] services (deprecated).
-<3> to publish a property edit, as as represented by the specified member `Execution` parameter and with the
-xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`] annotation attribute or equivalent, to any
-configured xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`]. The `Execution` object will be an instance
-of `PropertyEdit` (see xref:../rgsvc/rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] for details).
-<4> to publish all changed objects that are to be published (with the
-xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`] annotation attribute or equivalent).
-
-
-The service implementation is `o.a.i.c.m.s.publishing.PublishingServiceInternal`.
-
-
-
-== Registering the Service
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' default
-implementation of `PublishingServiceInternal` class is automatically registered (it is annotated with `@DomainService`)
-so no further configuration is required.
-
-
-== Related Classes
-
-The service delegates between the (internal)
-xref:../rgfis/rgfis.adoc#_rgfis_spi_ChangedObjectsServiceInternal[`ChangedObjectsServiceInternal`] domain service to the
-configured xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`] and
- xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].
-
-The (internal) xref:../rgfis/rgfis.adoc#_rgfis_spi_AuditingServiceInternal[`AuditingServiceInternal`] performs a similar
-function for the xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`], also collating details of the
-changed objects from `ChangedObjectsServiceInternal`.
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_RepresentationService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_RepresentationService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_RepresentationService.adoc
deleted file mode 100644
index ca62d9a..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_RepresentationService.adoc
+++ /dev/null
@@ -1,95 +0,0 @@
-[[_rgfis_spi_RepresentationService]]
-= `RepresentationService`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-
-
-The `RepresentationService` is the main plug-in point for the xref:../ugvro/ugvro.adoc#[RestfulObjects viewer] to generate representations.
-
-The default implementation generates representations according to the link:http://restfulobjects.org[Restful Objects spec] v1.0. However, it also delegates to the xref:../rgfis/rgfis.adoc#_rgfis_spi_ContentNegotiationService[`ContentNegotiationService`] which provides a mechanism for altering representations according to the HTTP `Accept` header.
-
-The principal motivation is to allow more flexible representations to be generated for REST clients that (perhaps through their use of a certain Javascript library, say) expect, or at least works best with, a certain style of representation.
-
-In all there are three domain services that can influence the representations generated: this service, xref:../rgfis/rgfis.adoc#_rgfis_spi_ContentNegotiationService[`ContentNegotiationService`]and the xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_ContentMappingService[`ContentMappingService`]. The diagram below shows how these collaborate:
-
-image::{_imagesdir}reference-services-spi/RepresentationService/service-collaborations.png[width="700px",link="{_imagesdir}reference-services-spi/RepresentationService/service-collaborations.png"]
-
-The `RepresentationServiceForRestfulObjects` is the default implementation of this service; likewise `ContentNegotiationServiceXRoDomainType` is the default implementation of the `ContentNegotiationService`. If you inspect the source code you'll see that the default implementation of this service's primary responsibility is to generate the default Restful Objects representations. Therefore, if you what you want to do is to generate a _different _representation then in many cases replacing either this service _or_ the `ContentNegotiationService` will be equivalent (you'll notice that their SPIs are very similar).
-
-
-== SPI
-
-The SPI defined by this service is:
-
-[source,java]
-----
-public interface RepresentationService {
- Response objectRepresentation( // <1>
- Context rendererContext,
- ObjectAdapter objectAdapter);
- Response propertyDetails( // <2>
- Context rendererContext,
- ObjectAndProperty objectAndProperty,
- MemberReprMode memberReprMode);
- Response collectionDetails( // <3>
- Context rendererContext,
- ObjectAndCollection objectAndCollection,
- MemberReprMode memberReprMode);
- Response actionPrompt( // <4>
- Context rendererContext,
- ObjectAndAction objectAndAction);
- Response actionResult( // <5>
- Context rendererContext,
- ObjectAndActionInvocation objectAndActionInvocation,
- ActionResultReprRenderer.SelfLink selfLink);
- public static interface Context extends RendererContext {
- ObjectAdapterLinkTo getAdapterLinkTo();
- }
-}
-----
-<1> representation of a single object, as per section 14.4 of the RO spec, v1.0
-<2> representation of a single property of an object, as per section 16.4 of the RO spec v1.0
-<3> representation of a single collection of an object, as per section 17.5 of the RO spec v1.0
-<4> representation of a single action (prompt) of an object, as per section 18.2 of the RO spec v1.0
-<5> representation of the results of a single action invocation, as per section 19.5 of the RO spec v1.0
-
-These methods provide:
-
-* a `RendererContext` which provides access to request-specific context (eg HTTP headers), session-specific context (eg authentication) and global context (eg configuration settings)
-
-* an object representing the information to be rendered +
-+
-eg `ObjectAdapter`, `ObjectAndProperty`, `ObjectAndCollection` etc
-
-* for members, whether the representation is in read/write mode +
-+
-ie `MemberReprMode`
-
-
-
-
-
-
-== Implementation
-
-As discussed in the introduction, the framework provides a default implementation, `o.a.i.v.ro.rendering.service.RepresentationServiceContentNegotiator`. This delegates to xref:../rgfis/rgfis.adoc#_rgfis_spi_ContentNegotiationService[`ContentNegotiationService`] to generate an alternative representation; but if none is provided then it falls back on generating the representations as defined in the link:http://restfulobjects.org[Restful Objects spec] v1.0.
-
-To use an alternative implementation, use
-xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
-
-
-== Registering the Services
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' default implementation of `RepresentationService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
-
-
-
-
-== Related Services
-
-The default implementation delegates to xref:../rgfis/rgfis.adoc#_rgfis_spi_ContentNegotiationService[`ContentNegotiationService`], whose default implementation may delegate in turn to xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_ContentMappingService[`ContentMappingService`] (if present).
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_TransactionStateProviderInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_TransactionStateProviderInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_TransactionStateProviderInternal.adoc
deleted file mode 100644
index c866f60..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_spi_TransactionStateProviderInternal.adoc
+++ /dev/null
@@ -1,38 +0,0 @@
-[[_rgfis_spi_TransactionStateProviderInternal]]
-= `TransactionStateProviderInternal`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The (internal) `TransactionStateProviderInternal` domain service simply provides the ability to check as to the
-state of the current transaction.
-
-[NOTE]
-====
-The service will probably be combined with xref:../rgsvc/rgsvc.adoc#_rgsvc_api_TransactionService[`TransactionService`]
-in the future.
-====
-
-
-== SPI and Implementation
-
-The SPI of the service is simply:
-
-[source,java]
-----
-public interface TransactionStateProviderInternal {
- TransactionState getTransactionState();
-}
-----
-
-
-== Runtime vs Noop implementation
-
-The framework provides two implementations:
-
-* `TransactionStateProviderInternalDefault` is provided by `isis-core-runtime`, and is used during normal use and integration tests
-
-* `TransactionStateProviderInternalNoop` is provided as a fallback by `isis-core-metamodel`, and is provided to allow the xref:../rgmvn/rgmvn.adoc#[maven plugin] to be bootstrapped without any "backend" database.
-
-The `...Default` implementation takes priority over the `...Noop` implementation.
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc b/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc
index a3fb8d7..594747d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc
@@ -13,11 +13,11 @@ Use to verify at build time that the metamodel of an application is valid. This
* `swagger` +
+
-Uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_SwaggerService[`SwaggerService`] to generate link:http://swagger.io[Swagger] spec files that describe the public and/or private RESTful APIs exposed by the xref:../ugvro/ugvro.adoc#[RestfulObjects viewer].
+Uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_metadata-api_SwaggerService[`SwaggerService`] to generate link:http://swagger.io[Swagger] spec files that describe the public and/or private RESTful APIs exposed by the xref:../ugvro/ugvro.adoc#[RestfulObjects viewer].
* `xsd` +
+
-Uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_JaxbService[`JaxbService`] to generate XSD schemas from any JAXB-annotated view models/DTOs. +
+Uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_integration-api_JaxbService[`JaxbService`] to generate XSD schemas from any JAXB-annotated view models/DTOs. +
+
This is instead of and preferable to using the JAXB link:https://jaxb.java.net/2.2.4/docs/schemagen.html[schemagen] tool, because it uses the framework's support (via xref:../rgant/rgant.adoc#_rgant-XmlJavaTypeAdapter[`@XmlJavaTypeAdapter`]) to translate any references to domain objects into ``OidDto``s (as defined by the Apache Isis xref:../rgcms/rgcms.adoc#_rgcms_schema-common[common schema]).
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc b/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc
index 607ee86..5958a95 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc
@@ -6,7 +6,7 @@
:toc: right
-The `swagger` goal of the `isis-maven-plugin` uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_SwaggerService[`SwaggerService`] to
+The `swagger` goal of the `isis-maven-plugin` uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_metadata-api_SwaggerService[`SwaggerService`] to
generate link:http://swagger.io[Swagger] spec files to describe the public and/or private RESTful APIs exposed by the xref:../ugvro/ugvro.adoc#[RestfulObjects viewer].
These spec files, once generated, can then be used in the build pipeline to generate client-side stubs, typically using Swagger's own link:https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin[swagger-codegen-maven] plugin.
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc b/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc
index b2173c4..174ef72 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc
@@ -6,7 +6,7 @@
:toc: right
-The `xsd` goal of the `isis-maven-plugin` uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_JaxbService[`JaxbService`] to
+The `xsd` goal of the `isis-maven-plugin` uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_integration-api_JaxbService[`JaxbService`] to
generate XSD schemas from any JAXB-annotated xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_types-of-domain-objects_view-models[view model/DTOs].
This is instead of and preferable to using the JAXB link:https://jaxb.java.net/2.2.4/docs/schemagen.html[schemagen]
@@ -30,7 +30,7 @@ Defaults to `false`. Most DTO classes will reference one another or the xref:..
* `commonSchemas` - (optional) whether to also generate the isis common schema(s). +
+
-Defaults to `false`; if set then the call to xref:../rgsvc/rgsvc.adoc#_rgsvc_api_JaxbService[`JaxbService`] will set `IsisSchemas.INCLUDE` flag.
+Defaults to `false`; if set then the call to xref:../rgsvc/rgsvc.adoc#_rgsvc_integration-api_JaxbService[`JaxbService`] will set `IsisSchemas.INCLUDE` flag.
As a convenience to any (Java) consumers, the XSDs generated from the view models can then in turn be generated
into DTOs. The original view models and these DTOs are similar but not identical: while the view models can only be used
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_AcceptHeaderService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_AcceptHeaderService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_AcceptHeaderService.adoc
deleted file mode 100644
index 61e26b4..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_AcceptHeaderService.adoc
+++ /dev/null
@@ -1,79 +0,0 @@
-[[_rgsvc_api_AcceptHeaderService]]
-= `AcceptHeaderService`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The `AcceptHeaderService` domain service is a xref:../rgant/rgant.adoc#_rgant-RequestScoped[`@RequestScoped`] service that
-simply exposes the HTTP `Accept` header to the domain. Its intended use is to support multiple versions of a REST API, where the responsibility for content negotiation (determining which version of the REST API is to be used) is managed by logic in the domain objects themselves.
-
-[NOTE]
-====
-As an alternative to performing content negotiation within the domain classes, the xref:../rgfis/rgfis.adoc#_rgfis_spi_ContentNegotiationService[`ContentNegotiationService`] and
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_ContentMappingService[`ContentMappingService`] SPI domain services allow the framework to perform the content negotiation responsibility.
-====
-
-== API & Implementation
-
-The API defined by the service is:
-
-[source,java]
-----
-@DomainService(nature = NatureOfService.DOMAIN)
-@RequestScoped // <1>
-public interface AcceptHeaderService {
- @Programmatic
- List<MediaType> getAcceptableMediaTypes(); // <2>
-}
-----
-<1> is xref:../rgant/rgant.adoc#_rgant-RequestScoped[`@RequestScoped`], so this domain service instance is scoped to a particular request and is then destroyed
-<2> returns the list of media types found in the HTTP Accept header.
-
-
-The default implementation is provided by `o.a.i.v.ro.rendering.service.acceptheader.AcceptHeaderServiceForRest`.
-
-[NOTE]
-====
-Note that the service will only return a list when the request is initiated through the xref:../ugvro/ugvro.adoc#[Restful Objects viewer]. Otherwise the service will return `null`.
-====
-
-
-== Usage
-
-The intended use of this service is where there are multiple concurrent versions of a REST API, for backward
-compatibility of existing clients. The `AcceptHeaderService` allows the responsibility for content negotiation
-(determining which version of the REST API is to be used) to be performed by logic in the domain objects themselves.
-
-The diagram below illustrated this:
-
-image::{_imagesdir}reference-services-api/acceptheaderservice.png[width="700px",link="{_imagesdir}reference-services-api/acceptheaderservice.png"]
-
-The REST request is submitted to a domain service with a xref:../rgant/rgant.adoc#_rgant-DomainService_nature[nature] of `VIEW_REST_ONLY` (`MyRestApi` in the diagram). This uses the `AcceptHeaderService` to obtain the values of the
-HTTP `Accept` header. Based on this it delegates to the appropriate underlying domain service (with a nature of
-`DOMAIN` so that they are not exposed in the REST API at all).
-
-[TIP]
-====
-The service does not define any conventions as to the format of the media types. The option is to use the media type's
-type/subtype, eg `application/vnd.myrestapi-v1+json`; an alternative is to use a media type parameter as a hint, eg
-`application/json;x-my-rest-api-version=1` (where `x-my-rest-api-version` is the media type parameter).
-
-The Restful Objects specification does this something similar with its own `x-ro-domain-type` media type parameter;
-this is used by the xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_ContentMappingService[`ContentMappingService`] to determine how to
-map domain objects to view models/DTOs.
-====
-
-
-
-
-== Registering the Service
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' default
-implementation of `AcceptHeaderService` class is automatically registered (it is annotated with `@DomainService`)
-so no further configuration is required.
-
-To use an alternative implementation, use
-xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ActionInvocationContext.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ActionInvocationContext.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ActionInvocationContext.adoc
deleted file mode 100644
index 81832c9..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ActionInvocationContext.adoc
+++ /dev/null
@@ -1,99 +0,0 @@
-[[_rgsvc_api_ActionInvocationContext]]
-= `ActionInvocationContext`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The `ActionInvocationContext` domain service is a xref:../rgant/rgant.adoc#_rgant-RequestScoped[`@RequestScoped`] service intended to support the implementation of "bulk" actions annotated with xref:../rgant/rgant.adoc#_rgant-Action_invokeOn[`@Action#invokeOn()`]. This allows the user to select multiple objects in a table and then invoke the same action against all of them.
-
-When an action is invoked in this way, this service allows each object instance to "know where it is" in the collection; it acts a little like an iterator. In particular, an object can determine if it is the last object to be called, and so can perform special processing, eg to return a summary calculated result.
-
-
-== API & Implementation
-
-The API defined by the service is:
-
-[source,java]
-----
-@DomainService(nature = NatureOfService.DOMAIN)
-@RequestScoped // <1>
-public static class ActionInvocationContext {
- public InvokedOn getInvokedOn() { ... } // <2>
- public List<Object> getDomainObjects() { ... } // <3>
- public int getSize() { ... }
- public int getIndex() { ... } // <4>
- public boolean isFirst() { ... }
- public boolean isLast() { ... }
-}
-----
-<1> is xref:../rgant/rgant.adoc#_rgant-RequestScoped[`@RequestScoped`], so this domain service instance is scoped to a particular request and is then destroyed
-<2> an enum set to either `OBJECT` (if action has been invoked on a single object) or `COLLECTION` (if has been invoked on a collection).
-<3> returns the list of domain objects which are being acted upon
-<4> is the 0-based index to the object being acted upon.
-
-
-
-== Usage
-
-For actions that are void or that return null, Apache Isis will return to the list once executed. But for bulk actions that are non-void, Apache Isis will render the returned object/value from the last object invoked (and simply discards the object/value of all actions except the last).
-
-One idiom is for the domain objects to also use the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_Scratchpad[`Scratchpad`] service to share information, for example to aggregate values. The `ActionInvocationContext#isLast()` method can then be used to determine if all the information has been gathered, and then do something with it (eg derive variance across a range of values, render a graph etc).
-
-More prosaically, the `ActionInvocationContext` can be used to ensure that the action behaves appropriately depending on how it has been invoked (on a single object and/or a collection) whether it is called in bulk mode or regular mode. Here's a snippet of code from the bulk action in the Isis addon example https://github.com/isisaddons/isis-app-todoapp/[todoapp] (not ASF):
-
-[source,java]
-----
-public class ToDoItem ... {
- @Action(invokeOn=InvokeOn.OBJECTS_AND_COLLECTIONS)
- public ToDoItem completed() {
- setComplete(true);
- ...
- return actionInvocationContext.getInvokedOn() == InvokedOn.OBJECT
- ? this // <1>
- : null; // <2>
- }
- @Inject
- ActionInvocationContext actionInvocationContext;
-}
-----
-<1> if invoked as a regular action, return this object;
-<2> otherwise (if invoked on collection of objects), return null, so that the xref:../ugvw/ugvw.adoc#[Wicket viewer] will re-render the list of objects
-
-
-
-
-== Registering the Service
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' default
-implementation of `ActionInvocationContext` class is automatically registered (it is annotated with `@DomainService`)
-so no further configuration is required.
-
-To use an alternative implementation, use
-xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
-
-
-
-== Unit testing support
-
-The `ActionInvocationContext` class also has a couple of static factory methods intended to support unit testing:
-
-[source,java]
-----
-@DomainService(nature = NatureOfService.DOMAIN)
-@RequestScoped
-public class ActionInvocationContext {
- public static ActionInvocationContext onObject(final Object domainObject) {
- return new ActionInvocationContext(InvokedOn.OBJECT, Collections.singletonList(domainObject));
- }
- public static ActionInvocationContext onCollection(final Object... domainObjects) {
- return onCollection(Arrays.asList(domainObjects));
- }
- public static ActionInvocationContext onCollection(final List<Object> domainObjects) {
- return new ActionInvocationContext(InvokedOn.COLLECTION, domainObjects);
- }
- ...
-}
-----
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ApplicationFeatureRepository.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ApplicationFeatureRepository.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ApplicationFeatureRepository.adoc
deleted file mode 100644
index f3b5df1..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ApplicationFeatureRepository.adoc
+++ /dev/null
@@ -1,66 +0,0 @@
-[[_rgsvc_api_ApplicationFeatureRepository]]
-= `ApplicationFeatureRepository`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-
-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.
-
-[TIP]
-====
-This functionality was originally implemented as part of (non-ASF) link:http://isisaddons.org[Isis Addons] security
-module, where the string representations of the various features are used to represent permissions.
-====
-
-
-== API & Implementation
-
-The API defined by the service is:
-
-[source,java]
-----
-public interface ApplicationFeatureRepository {
- List<String> packageNames();
- List<String> packageNamesContainingClasses(ApplicationMemberType memberType);
- List<String> classNamesContainedIn(String packageFqn, ApplicationMemberType memberType);
- List<String> classNamesRecursivelyContainedIn(String packageFqn);
- List<String> memberNamesOf(String packageFqn, String className, ApplicationMemberType memberType);
-}
-----
-
-where `ApplicationMemberType` in turn is:
-
-[source,java]
-----
-public enum ApplicationMemberType {
- PROPERTY,
- COLLECTION,
- ACTION;
-}
-----
-
-These methods are designed primarily to return lists of strings for use in drop-downs.
-
-
-
-
-== Registering the Service
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
-implementation of `ApplicationFeatureRepository` service is automatically registered and injected (it is annotated with
-`@DomainService`) so no further configuration is required.
-
-To use an alternative implementation, use
-xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
-
-
-== Related Services
-
-The default implementation of this service - `ApplicationFeatureRepositoryDefault` uses the `ApplicationFeatureFactory` service to instantiate `ApplicationFeature` instances.
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService.adoc
deleted file mode 100644
index 103724f..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService.adoc
+++ /dev/null
@@ -1,134 +0,0 @@
-[[_rgsvc_api_BackgroundService]]
-= `BackgroundService2`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The `BackgroundService2` domain service, and also the companion
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommandService2`] SPI service, enable commands
-to be persisted such that they may be invoked in the background.
-
-The `BackgroundService2` is responsible for capturing a memento representing the command in a typesafe way,
-and persisting it rather than executing it directly.
-
-The default `BackgroundServiceDefault` implementation works by using a proxy wrapper around the target so that it can
-capture the action to invoke and its arguments. (As of `1.13.0`), this is done using xref:../rgfis/rgfis.adoc#_rgfis_spi_CommandDtoServiceInternal[`CommandDtoServiceInternal`] (in previous releases it used (a private copy of) xref:../rgsvc/rgsvc.adoc#_rgsvc_api_MementoService[`MementoService`]).
-
-The persistence delegates the persistence of the memento to an appropriate implementation of the companion
-`BackgroundCommandService2`. One such implementation of `BackgroundCommandService` is provided by (non-ASF)
-http://github.com/isisaddons/isis-module-command[Isis addons' command] module.
-
-The persisting of commands is only half the story; there needs to be a separate process to read the commands and
-execute them. The `BackgroundCommandExecution` abstract class (discussed
-xref:../rgsvc/rgsvc.adoc#_rgsvc_api_BackgroundService_BackgroundCommandExecution[below]) provides infrastructure to do this;
-the concrete implementation of this class depends on the configured `BackgroundCommandService` (in order to query for
-the persisted (background) ``Command``s.
-
-
-
-== API & Implementation
-
-The API is:
-
-[source,java]
-----
-public interface BackgroundService2 {
- <T> T execute(final T object); // <1>
- <T> T executeMixin(Class<T> mixinClass, Object mixedIn); // <2>
-}
-----
-<1> returns a proxy around the domain object; any methods executed against this proxy will result in a command (to invoke the corresponding action) being persisted by xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_BackgroundCommandService2[`BackgroundCommandService2`]
-<2> Returns a proxy around the mixin; any methods executed against this proxy will result in a command (to invoke the corresponding mixin action) being persisted by xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_BackgroundCommandService2[`BackgroundCommandService2`].
-
-The default implementation is provided by core (`o.a.i.core.runtime.services.background.BackgroundServiceDefault`).
-
-
-
-== Usage
-
-Using the service is very straight-forward; wrap the target domain object using `BackgroundService#execute(...)` and invoke the method on the object returned by that method.
-
-For example:
-
-[source,java]
-----
-public void submitCustomerInvoices() {
- for(Customer customer: customerRepository.findCustomersToInvoice()) {
- backgroundService.execute(customer).submitInvoice();
- }
- messageService.informUser("Calculating...");
-}
-----
-
-This will create a bunch of background commands executing the `submitInvoice()` action for each of the customers returned from the customer repository.
-
-The action method invoked must be part of the Apache Isis metamodel, which is to say it must be public, accept only scalar arguments, and must not be annotated with xref:../rgant/rgant.adoc#_rgant-Programmatic[`@Programmatic`] or `@Ignore`. However, it may be annotated with xref:../rgant/rgant.adoc#_rgant-Action_hidden[`@Action#hidden()`] or xref:../rgant/rgant.adoc#_rgant-ActionLayout_hidden[`@ActionLayout#hidden()`] and it will still be invoked.
-
-In fact, when invoked by the background service, no business rules (hidden, disabled, validation) are enforced; the action method must take responsibility for performing appropriate validation and error checking.
-
-[TIP]
-====
-If you want to check business rules, you can use xref:../rgant/rgant.adoc#_rgant-WrapperFactory[`@WrapperFactory#wrapNoExecute(...)`].
-====
-
-
-
-== End-user experience
-
-For the end-user, executing an action that delegates work off to the `BackgroundService` raises the problem of how does the user know the work is complete?
-
-One option is for the background jobs to take responsibility to notify the user themselves. In the above example, this would be the `submitInvoice()` method called upon each customer. One could imagine more complex designs where only the final command executed notifies the user.
-
-However, an alternative is to rely on the fact that the `BackgroundService` will automatically hint that the `Command` representing the original interaction (to `submitCustomerInvoices()` in the example above) should be persisted. This will be available if the related xref:../rgsvc/rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] and xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] domain services are configured, and the `CommandService` supports persistent commands. Note that (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module does indeed provide such an implementation of `CommandService` (as well as of the required `BackgroundCommandService`).
-
-Thus, the original action can run a query to obtain it corresponding `Command`, and return this to the user. The upshot is that the child ``Command``s created by the `BackgroundService` will then be associated with `Command` for the original action.
-
-We could if we wanted write the above example as follows:
-
-[source,java]
-----
-public Command submitCustomerInvoices() {
- for(Customer customer: customerRepository.findCustomersToInvoice()) {
- backgroundService.execute(customer).submitInvoice();
- }
- return commandContext.getCommand();
-}
-@Inject
-CommandContext commandContext; // <1>
-----
-<1> the injected xref:../rgsvc/rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] domain service.
-
-The user would be returned a domain object representing their action invocation.
-
-
-
-
-== Registering the Services
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
-implementation of `BackgroundService` is automatically registered (it is annotated with `@DomainService`) so no
-further configuration is required.
-
-To use an alternative implementation, use
-xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
-
-
-
-== Related Services
-
-This service is closely related to the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] and also that service's supporting xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] service.
-
-The `CommandContext` service is responsible for providing a parent `Command` with which the background ``Command``s can then be associated as children, while the `CommandService` is responsible for persisting those parent `Command`s. The latter is analogous to the way in which the `BackgroundCommandService` persists the child background `Command`s.
-
-The implementations of `CommandService` and `BackgroundCommandService` go together; typically both parent `Command`s and child background `Command`s will be persisted in the same way. The (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module provides implementations of both (see xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] and xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommandService`]).
-
-The xref:../rgfis/rgfis.adoc#_rgfis_spi_CommandDtoServiceInternal[`CommandDtoServiceInternal`] is used to obtain
-a memento of the command such that it can be persisted. (In earlier versions, xref:../rgsvc/rgsvc.adoc#_rgsvc_api_MementoService[`MementoService`] was used for this purpose).
-
-
-include::_rgsvc_api_BackgroundService_BackgroundCommandExecution.adoc[leveloffset=+1]
-include::_rgsvc_api_BackgroundService_Quartz.adoc[leveloffset=+1]
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService_BackgroundCommandExecution.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService_BackgroundCommandExecution.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService_BackgroundCommandExecution.adoc
deleted file mode 100644
index e9c74aa..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService_BackgroundCommandExecution.adoc
+++ /dev/null
@@ -1,25 +0,0 @@
-[[_rgsvc_api_BackgroundService_BackgroundCommandExecution]]
-= `BackgroundCommandExec'n` abstract class
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The `BackgroundCommandExecution` (in isis-core) is an abstract template class provided by isis-core that defines an abstract hook method to obtain background `Command`s to be executed:
-
-[source,java]
-----
-public abstract class BackgroundCommandExecution
- extends AbstractIsisSessionTemplate {
- ...
- protected abstract List<? extends Command> findBackgroundCommandsToExecute();
- ...
-}
-----
-
-The developer is required to implement this hook method in a subclass.
-
-
-
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService_Quartz.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService_Quartz.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService_Quartz.adoc
deleted file mode 100644
index e57baca..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BackgroundService_Quartz.adoc
+++ /dev/null
@@ -1,162 +0,0 @@
-[[_rgsvc_api_BackgroundService_Quartz]]
-= Quartz Scheduler Configuration
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-
-The last part of the puzzle is to actually run the (appropriate implementation of) `BackgroundCommandExecution). This could be run in a batch job overnight, or run continually by, say, the http://quartz-scheduler.org[Quartz] scheduler or by http://camel.apache.org]Apache Camel]. This section looks at configuring Quartz.
-
-If using (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module, then note that this already provides a suitable concrete implementation, namely `org.isisaddons.module.command.dom.BackgroundCommandExecutionFromBackgroundCommandServiceJdo`. We therefore just need to schedule this to run as a Quartz job.
-
-
-First, we need to define a Quartz job, for example:
-
-[source,java]
-----
-import org.isisaddons.module.command.dom.BackgroundCommandExecutionFromBackgroundCommandServiceJdo;
-public class BackgroundCommandExecutionQuartzJob extends AbstractIsisQuartzJob {
- public BackgroundCommandExecutionQuartzJob() {
- super(new BackgroundCommandExecutionFromBackgroundCommandServiceJdo());
- }
-}
-----
-
-where `AbstractIsisQuartzJob` is in turn the following boilerplate:
-
-[source,java]
-----
-package domainapp.webapp.quartz;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-...
-public class AbstractIsisQuartzJob implements Job {
- public static enum ConcurrentInstancesPolicy {
- SINGLE_INSTANCE_ONLY,
- MULTIPLE_INSTANCES
- }
-
- private final AbstractIsisSessionTemplate isisRunnable;
- private final ConcurrentInstancesPolicy concurrentInstancesPolicy;
- private boolean executing;
-
- public AbstractIsisQuartzJob(AbstractIsisSessionTemplate isisRunnable) {
- this(isisRunnable, ConcurrentInstancesPolicy.SINGLE_INSTANCE_ONLY);
- }
- public AbstractIsisQuartzJob(
- AbstractIsisSessionTemplate isisRunnable,
- ConcurrentInstancesPolicy concurrentInstancesPolicy) {
- this.isisRunnable = isisRunnable;
- this.concurrentInstancesPolicy = concurrentInstancesPolicy;
- }
-
- public void execute(final JobExecutionContext context)
- throws JobExecutionException {
- final AuthenticationSession authSession = newAuthSession(context);
- try {
- if(concurrentInstancesPolicy == ConcurrentInstancesPolicy.SINGLE_INSTANCE_ONLY &&
- executing) {
- return;
- }
- executing = true;
-
- isisRunnable.execute(authSession, context);
- } finally {
- executing = false;
- }
- }
-
- AuthenticationSession newAuthSession(JobExecutionContext context) {
- String user = getKey(context, SchedulerConstants.USER_KEY);
- String rolesStr = getKey(context, SchedulerConstants.ROLES_KEY);
- String[] roles = Iterables.toArray(
- Splitter.on(",").split(rolesStr), String.class);
- return new SimpleSession(user, roles);
- }
-
- String getKey(JobExecutionContext context, String key) {
- return context.getMergedJobDataMap().getString(key);
- }
-}
-----
-
-
-This job can then be configured to run using Quartz' `quartz-config.xml` file:
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<job-scheduling-data
- xmlns="http://www.quartz-scheduler.org/xml/JobSchedulingData"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData
-http://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd"
- version="1.8">
- <schedule>
- <job>
- <name>BackgroundCommandExecutionJob</name>
- <group>Isis</group>
- <description>
- Poll and execute any background actions persisted by the BackgroundActionServiceJdo domain service
- </description>
- <job-class>domainapp.webapp.quartz.BackgroundCommandExecutionQuartzJob</job-class>
- <job-data-map>
- <entry>
- <key>webapp.scheduler.user</key>
- <value>scheduler_user</value>
- </entry>
- <entry>
- <key>webapp.scheduler.roles</key>
- <value>admin_role</value>
- </entry>
- </job-data-map>
- </job>
- <trigger>
- <cron>
- <name>BackgroundCommandExecutionJobEveryTenSeconds</name>
- <job-name>BackgroundCommandExecutionJob</job-name>
- <job-group>Isis</job-group>
- <cron-expression>0/10 * * * * ?</cron-expression>
- </cron>
- </trigger>
- </schedule>
-</job-scheduling-data>
-----
-
-The remaining two pieces of configuration are the `quartz.properties` file:
-
-[source,ini]
-----
-org.quartz.scheduler.instanceName = SchedulerQuartzConfigXml
-org.quartz.threadPool.threadCount = 1
-org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
-org.quartz.plugin.jobInitializer.class =org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin
-org.quartz.plugin.jobInitializer.fileNames = webapp/scheduler/quartz-config.xml
-org.quartz.plugin.jobInitializer.failOnFileNotFound = true
-----
-
-and the entry in `web.xml` for the Quartz servlet:
-
-[source,xml]
-----
-<servlet>
- <servlet-name>QuartzInitializer</servlet-name>
- <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
- <init-param>
- <param-name>config-file</param-name>
- <param-value>webapp/scheduler/quartz.properties</param-value>
- </init-param>
- <init-param>
- <param-name>shutdown-on-unload</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>start-scheduler-on-load</param-name>
- <param-value>true</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-----
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BookmarkService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BookmarkService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BookmarkService.adoc
deleted file mode 100644
index 895c19a..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BookmarkService.adoc
+++ /dev/null
@@ -1,125 +0,0 @@
-[[_rgsvc_api_BookmarkService]]
-= `BookmarkService2`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The `BookmarkService2` API provides the ability to obtain a serializable ``o.a.i.applib.bookmarks.Bookmark`` for any (persisted) domain object, and to lookup domain objects given a ``Bookmark``. This can then in turn be converted to and from a string.
-
-For example, a `Customer` object with:
-
-* an object type of "custmgmt.Customer" (as per xref:../rgant/rgant.adoc#_rgant-DomainObject_objectType[`DomainObject#objectType()`] or equivalent) , and
-* an id=123
-
-could correspond to a `Bookmark` with a string representation of `custmgmt.Customer|123`.
-
-[NOTE]
-====
-A `Bookmark` is little more than an API equivalent of Apache Isis' internal `Oid` (object identifier). Nevertheless, the ability to uniquely address _any_ domain object within an Apache Isis system -- to in effect provide a URN -- is immensely useful.
-
-For example, a `Bookmark` could be converted into a barcode, and then this used for automated scanning of correspondence from a customer.
-====
-
-``Bookmark``s are used by several other domain services as a means of storing areference to an arbitrary object
-(a polymorphic relationship). For example, the (non-ASF)
-http://github.com/isisaddons/isis-module-auditing[Isis addons' auditing] module's implementation of
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditerService[`AuditerService`] uses bookmarks to capture the object
-that is being audited.
-
-[TIP]
-====
-One downside of using ``Bookmark``s is that there is no way for the JDO/DataNucleus objectstore to enforce any kind of referental integrity. However, the (non-ASF) http://github.com/isisaddons/isis-module-poly[Isis addons' poly] module describes and supports a design pattern to address this requirement.
-====
-
-
-
-
-== API & Implementation
-
-The API defined by `BookmarkService2` is:
-
-[source,java]
-----
-public interface BookmarkService2 {
- enum FieldResetPolicy { // <1>
- RESET,
- DONT_RESET
- }
- Object lookup(BookmarkHolder bookmarkHolder, FieldResetPolicy policy);
- Object lookup(Bookmark bookmark, FieldResetPolicy policy);
- <T> T lookup(Bookmark bookmark, FieldResetPolicy policy, Class<T> cls); // <2>
- Bookmark bookmarkFor(Object domainObject);
- Bookmark bookmarkFor(Class<?> cls, String identifier);
-}
-----
-<1> if the object has already been loaded from the database, then whether to reset its fields. The default it to `RESET`.
-<2> 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`
-
-
-== `BookmarkHolder`
-
-The `BookmarkHolder` interface is intended to be implemented by domain objects that use a `Bookmark` to reference a (single) domain object; an example might be a class such as the audit entry, mentioned above. The interface is simply:
-
-
-[source,java]
-----
-public interface BookmarkHolder {
- @Programmatic
- Bookmark bookmark();
-}
-
-----
-
-There are two services that will contribute to this interface:
-
-* `BookmarkHolderActionContributions` will provide a `lookup(...)` action
-* `BookmarkHolderAssociationContributions` provides an `object` property.
-
-Either of these can be suppressed, if required, using a vetoing subscriber. For example, to suppress the `object` property (so that only the `lookup(...)` action is ever shown for implementations of `BookmarkHolder`, define:
-
-[source,java]
-----
-@DomainService(nature=NatureOfService.DOMAIN)
-public class AlwaysHideBookmarkHolderAssociationsObjectProperty {
- @Subscribe
- public void on(BookmarkHolderAssociationContributions.ObjectDomainEvent ev) {
- ev.hide();
- }
-}
-----
-
-A more sophisticated implementation could look inside the passed `ev` argument and selectively hide or not based on the contributee.
-
-
-
-
-== Usage by other services
-
-Bookmarks are used by the (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module's
-implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_api_BackgroundCommandService[`BackgroundCommandService`], which uses a
-bookmark to capture the target object on which an action will be invoked subsequently.
-
-Bookmarks are also used by the (non-ASF) http://github.com/isisaddons/isis-module-publishing[Isis addons' publishing]
-module's implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`], and by the
-(non-ASF) http://github.com/isisaddons/isis-module-auditing[Isis addons' auditing] module's implementation of
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditerService[`AuditerService`].
-
-
-
-
-== Registering the Service
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
-implementation of `BookmarkService` is automatically registered (it is annotated with `@DomainService`) so no further
-configuration is required.
-
-To use an alternative implementation, use
-xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BulkInteractionContext.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BulkInteractionContext.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BulkInteractionContext.adoc
deleted file mode 100644
index cb210a8..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_BulkInteractionContext.adoc
+++ /dev/null
@@ -1,9 +0,0 @@
-[[_rgsvc_api_BulkInteractionContext]]
-= `BulkInteractionContext`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-This service is deprecated, replaced by xref:../rgsvc/rgsvc.adoc#_rgsvc_api_ActionInvocationContext[`ActionInvocationContext`].
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ClockService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ClockService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ClockService.adoc
deleted file mode 100644
index e9760c1..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_api_ClockService.adoc
+++ /dev/null
@@ -1,101 +0,0 @@
-[[_rgsvc_api_ClockService]]
-= `ClockService`
-: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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../../
-:_imagesdir: images/
-
-
-
-
-Most applications deal with dates and times in one way or another. For example, if an `Order` is placed, then the `Customer` may have 30 days to pay the `Invoice`, otherwise a penalty may be levied.
-
-However, such date/time related functionality can quickly complicate automated testing: "today+30" will be a different value every time the test is run.
-
-Even disregarding testing, there may be a requirement to ensure that date/times are obtained from an NNTP server (rather than the system PC). While instantiating a `java.util.Date` to current the current time is painless enough, we would not want complex technical logic for querying an NNTP server spread around domain logic code.
-
-Therefore it's common to provide a domain service whose responsibility is to provide the current time. This service can be injected into any domain object (and can be mocked out for unit testing). Apache Isis provides such a facade through the `ClockService`.
-
-
-
-== API & Implementation
-
-The API defined by `ClockService` is:
-
-[source,java]
-----
-@DomainService(nature = NatureOfService.DOMAIN)
-public class ClockService {
- @Programmatic
- public LocalDate now() { ... }
- @Programmatic
- public LocalDateTime nowAsLocalDateTime() { ... }
- @Programmatic
- public DateTime nowAsDateTime() { ... }
- @Programmatic
- public Timestamp nowAsJavaSqlTimestamp() { ... }
- @Programmatic
- public long nowAsMillis() { ... }
-}
-----
-
-This class (`o.a.i.applib.services.clock.ClockService`) is also the default implementation. The time provided by this default implementation is based on the system clock.
-
-
-
-
-== Testing Support
-
-The default `ClockService` implementation in fact simply delegates to another class defined in the API, namely the `o.a.i.applib.clock.Clock`, an abstract singleton class. It is not recommended that your code use the `Clock` directly, but you should understand how this all works:
-
-* there are two subclasses implementations `Clock`, namely `SystemClock` and `FixtureClock`.
-* the first implementation that is instantiated registers itself as the singleton.
-* if running in xref:../rgcfg/rgcfg.adoc#_rgcfg_deployment-types[production] (server) mode, then (unless another implementation has beaten it to the punch) the framework will instantiate the ``SystemClock`. Once instantiated this cannot be replaced.
-* if running in xref:../rgcfg/rgcfg.adoc#_rgcfg_deployment-types[prototype] mode, then the framework will instead instantiate `FixtureClock`. This _can_ be replaced if required.
-
-The `FixtureClock` will behave as the system clock, unless its is explicitly set using `FixtureClock#setDate(...)` or `FixtureClock#setTime(...)` and so forth.
-
-
-
-=== Alternative Implementations
-
-Suppose you want (as discussed in the introduction to this service) to use a clock that delegates to NNTP. For most domain services this would amount to implementing the appropriate service and registering in `isis.properties` so that it is used in preference to any implementations provided by default by the framework.
-
-In the case of the `ClockService`, though, this approach (unfortunately) will not work, because parts of Apache Isis (still) delegate to the `Clock` singleton rather than using the `ClockService` domain service.
-
-The workaround, therefore, is to implement your functionality as a subclass of `Clock`. You can write a domain service that will ensure that your implementation is used ahead of any implementations provided by the framework.
-
-For example:
-
-[source,java]
-----
-@DomainService(nature=NatureOfService.DOMAIN)
-public class NntpClockServiceInitializer {
- @Programmatic
- @PostConstruct
- public void postConstruct(Map<String,String> properties) {
- new NntpClock(properties); // <1>
- }
- private static class NntpClock extends Clock {
- NntpClock(Map<String,String> properties) { ... } // <2>
- protected long time() { ... } // <3>
- ... NNTP stuff here ...
- }
- }
-}
-----
-<1> enough to simply instantiate the `Clock`; it will register itself as singleton
-<2> connect to NNTP service using configuration properties from `isis.properties`
-<3> call to NNTP service here
-
-
-
-
-== Registering the Service
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
-implementation of `ClockService` is automatically registered (it is annotated with `@DomainService`) so no further
-configuration is required.
-
-If you want to use a different implementation of `Clock`, eg delegating to NNTP, then do _not_ register directly, but
-instead subclass from `o.a.i.applib.clock.Clock` singleton (as described in the section above).