ISIS-1133: more adocs
Project: http://git-wip-us.apache.org/repos/asf/isis/repo Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/c32f4f84 Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/c32f4f84 Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/c32f4f84 Branch: refs/heads/master Commit: c32f4f84a0efae02e4d554bd00f68dbcd4fed08a Parents: 3cd72ab Author: Dan Haywood <[email protected]> Authored: Wed May 6 19:20:15 2015 +0100 Committer: Dan Haywood <[email protected]> Committed: Wed May 6 19:20:15 2015 +0100 ---------------------------------------------------------------------- .../_user-guide_background-execution.adoc | 99 --------------- ...ncepts_philosophy_naked-objects-pattern.adoc | 2 +- .../user-guide/_user-guide_headless-access.adoc | 111 +++++++++++++++++ ...how-tos_ui-hints_names-and-descriptions.adoc | 20 +++- ...er-guide_integrating-with-other-systems.adoc | 11 -- .../_user-guide_more-advanced_neo4j.adoc | 8 +- .../_user-guide_runtime-configuration.adoc | 4 +- ..._runtime-configuration_configuring-core.adoc | 47 ++++++++ ...e-configuration_configuring-datanucleus.adoc | 9 +- ...tion_configuring-datanucleus_properties.adoc | 57 +++++++++ ...runtime-configuration_integration-tests.adoc | 13 -- ...-guide_runtime-configuration_properties.adoc | 7 -- ...e_runtime-configuration_properties_core.adoc | 41 ------- ...tion_properties_datanucleus-objectstore.adoc | 57 --------- .../user-guide/_user-guide_testing.adoc | 2 +- ...er-guide_testing_bdd-integ-test-support.adoc | 7 -- .../_user-guide_testing_bdd-spec-support.adoc | 8 ++ .../_user-guide_testing_integ-test-support.adoc | 108 +---------------- ...esting_integ-test-support_bootstrapping.adoc | 119 +++++++++++++++++++ ..._wicket-viewer_configuration_properties.adoc | 16 +-- .../BackgroundCommandExecution.png | Bin 26916 -> 0 bytes ...ExecutionFromBackgroundCommandServiceJdo.png | Bin 38373 -> 0 bytes .../BackgroundCommandExecution.png | Bin 0 -> 26916 bytes ...ExecutionFromBackgroundCommandServiceJdo.png | Bin 0 -> 38373 bytes .../main/asciidoc/user-guide/user-guide.adoc | 4 +- 25 files changed, 383 insertions(+), 367 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_background-execution.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_background-execution.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_background-execution.adoc deleted file mode 100644 index 8d67d6a..0000000 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_background-execution.adoc +++ /dev/null @@ -1,99 +0,0 @@ -= Background Execution -: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/ - - -As well as supporting the Wicket viewer and Restful viewer for "online" access, Apache Isis also supports programmatic access. The API provided is low-level and allows code to interact very directly with the Isis metamodel and runtime. Howwever the <<WrapperFactory>> service could be used to enforce business rules if required. - -Typical use cases are to support batch execution or background scheduler execution (eg using http://quartz-scheduler.org[Quartz]) . It could also be used to run Isis as a service, or to integrate within a JMS/ESB messaging solutions. - -== AbstractIsisSessionTemplate - -The `AbstractIsisSessionTemplate` class (whose name is inspired by the Spring framework's naming convention for similar classes that query http://docs.spring.io/spring/docs/2.5.x/reference/jdbc.html#jdbc-JdbcTemplate[JDBC], http://docs.spring.io/spring/docs/2.5.x/reference/jms.html#jms-jmstemplate[JMS], http://docs.spring.io/spring/docs/2.5.x/reference/orm.html#orm-jpa-template[JPA] etc.) provides the mechanism to open up a 'session' within the Isis framework, in order to resolve and interact with entities. - -The class itself is intended to be subclassed: - -[source,java] ----- -public abstract class AbstractIsisSessionTemplate { - - public void execute(final AuthenticationSession authSession, final Object context) { ... } //<1> - protected abstract void doExecute(Object context); // <2> - - protected ObjectAdapter adapterFor(final Object targetObject) { ... } - protected ObjectAdapter adapterFor(final RootOid rootOid) { ... } - - protected PersistenceSession getPersistenceSession() { ... } - protected IsisTransactionManager getTransactionManager() { ... } - protected AdapterManager getAdapterManager() { ... } -} ----- -<1> `execute(...)` sets up the `IsisSession` and delegates to ... -<2> `doExecute(...)`, the mandatory hook method for subclasses to implement. -The passed object represents passes a context from the caller (eg the scheduler, cron job, JMS etc) that instantiated and executed the class. - -The `protected` methods expose key internal APIs within Isis, for the subclass to use as necessary. - - -TIP: One notable feature of `AbstractIsisSessionTemplate` is that it will automatically inject any domain services into itself. Thus, it is relatively easy for the subclass to "reach into" the domain, through injected repository services. - - - - -== BackgroundCommandExecution - -The `BackgroundCommandExecution` class (a subclass of <<AbstractIsisSessionTemplate>>) is intended to simplify the execution of background ``Command``s persisted by way of the <<CommandService>> and the <<BackgroundCommandService>>. - -Its signature is: - -[source,java] ----- -public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemplate { - protected void doExecute(Object context) { ... } - protected abstract List<? extends Command> findBackgroundCommandsToExecute(); // <1> -} ----- -<1> `findBackgroundCommandsToExecute()` is a mandatory hook method for subclasses to implement. - -This allows for different implementations of the `CommandService` and `BackgroundCommandService` to persist to wherever. - -The diagram below shows the dependencies between these various classes: - -.Inheritance Hierarchy for `BackgroundCommandExecution` -image::{_imagesdir}background-execution/BackgroundCommandExecution.png[width="400px"] - -[TIP] -==== -[source] -.DSL (http://yuml.me/edit/363b335f[yuml.me/363b335f]) ----- -[AbstractIsisSessionTemplate|#doExecute()]^-[BackgroundCommandExecution|#findBackgroundCommandsToExecute()] -[BackgroundCommandExecution]^-[BackgroundCommandExecutionFromBackgroundCommandServiceJdo] -[BackgroundCommandExecutionFromBackgroundCommandServiceJdo]->injected[BackgroundCommandServiceJdoRepository|findBackgroundCommandsNotYetStarted()] ----- -==== - - - -=== Isis Addons Command Module - -The `BackgroundCommandExecutionFromBackgroundCommandServiceJdo` is a concrete subclass of <<BackgroundCommandExecution>>, the intended use being for the class to be instantiated regularly (eg every 10 seconds) by a scheduler such as http://quartz-scheduler.org[Quartz]) to poll for ``Command``s to be executed, and then execute them. - -This implementation queries for ``Command``s persisted by the http://isisaddons.org/isis-module-command[Isis addons Command Module]'s implementations of <<CommandService>> and <<BackgroundCommandService>> using the `BackgroundCommandServiceJdoRepository`. - -The diagram below shows the inheritance hierarchy for this class: - -.Inheritance Hierarchy for `BackgroundCommandExecutionFromBackgroundCommandServiceJdo` -image::{_imagesdir}background-execution/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png[width="500px"] - -[TIP] -==== -[source] -.DSL (http://yuml.me/edit/25343da1[yuml.me/25343da1]): ----- -[AbstractIsisSessionTemplate|#doExecute()]^-[BackgroundCommandExecution|#findBackgroundCommandsToExecute()] -[BackgroundCommandExecution]->injected[BookmarkService|lookup()] -[BackgroundCommandExecution]->injected[CommandContext|setCommand()] ----- -==== \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_core-concepts_philosophy_naked-objects-pattern.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_core-concepts_philosophy_naked-objects-pattern.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_core-concepts_philosophy_naked-objects-pattern.adoc index 213781e..ec6d671 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_core-concepts_philosophy_naked-objects-pattern.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_core-concepts_philosophy_naked-objects-pattern.adoc @@ -37,7 +37,7 @@ Reenskaug then goes on to say that "this simple and powerful idea failed because In Apache Isis the responsibility of rendering an object is not the object itself, it is the framework. Rather, the object inspects the object and uses that to decide how to render the object. This is also extensible. In the http://isisaddons.org[Isis Addons] (non-ASF) the http://github.com/isisaddons/isis-wicket-gmap3}[Isis addons' gmap3 modue] renders any object with latitude/longitude on a map, while http://github.com/isisaddons/isis-wicket-fullcalendar2}[Isis addons' fullcalendar2 wicket extension] renders any object with date(s) on a calendar. ==== -=== Object Interface Mapping +== Object Interface Mapping Another -- more technical -- way to think about the naked objects pattern is as an _object interface mapper_, or `OIM`. We sometimes use this idea to explain naked objects to a bunch of developers. http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_headless-access.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_headless-access.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_headless-access.adoc new file mode 100644 index 0000000..aa504df --- /dev/null +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_headless-access.adoc @@ -0,0 +1,111 @@ += Headless access +: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 chapter tackles the topic of enabling access to an Isis application directly, or at least, not through either the <<_wicket_viewer, Wicket>> or <<_restfulobjects_viewer, Restful>> viewers. + +There are several main use-cases: + +* enabling background execution, eg of a thread managed by Quartz scheduler and running within the webapp + +* integration from other systems, eg for a subscriber on a pub/sub mechanism such as Camel, pushing changes through an Isis domain model. + +* leveraging an Isis application within a batch process + +Note that the calling thread runs in the same process space as the Isis domain object model (must be physically linked to the JAR files containing the domain classes). For use cases where the calling thread runs in some other process space (eg migrating data from a legacy system), then the <<_restfulobjects_viewer, Restful Objects viewer>> is usually the way to go. + +The API described in this chapter is reasonably low-level, allowing code to interact very directly with the Isis metamodel and runtime. Such callers should be considered trusted: they do not (by default) honour any business rules eg implicit in the Isis annotations or hide/disable/validate methods. However the <<WrapperFactory>> service could be used to enforce such business rules if required. + + +== AbstractIsisSessionTemplate + +The `AbstractIsisSessionTemplate` class (whose name is inspired by the Spring framework's naming convention for similar classes that query http://docs.spring.io/spring/docs/2.5.x/reference/jdbc.html#jdbc-JdbcTemplate[JDBC], http://docs.spring.io/spring/docs/2.5.x/reference/jms.html#jms-jmstemplate[JMS], http://docs.spring.io/spring/docs/2.5.x/reference/orm.html#orm-jpa-template[JPA] etc.) provides the mechanism to open up a 'session' within the Isis framework, in order to resolve and interact with entities. + +The class itself is intended to be subclassed: + +[source,java] +---- +public abstract class AbstractIsisSessionTemplate { + + public void execute(final AuthenticationSession authSession, final Object context) { ... } //<1> + protected abstract void doExecute(Object context); // <2> + + protected ObjectAdapter adapterFor(final Object targetObject) { ... } + protected ObjectAdapter adapterFor(final RootOid rootOid) { ... } + + protected PersistenceSession getPersistenceSession() { ... } + protected IsisTransactionManager getTransactionManager() { ... } + protected AdapterManager getAdapterManager() { ... } +} +---- +<1> `execute(...)` sets up the `IsisSession` and delegates to ... +<2> `doExecute(...)`, the mandatory hook method for subclasses to implement. +The passed object represents passes a context from the caller (eg the scheduler, cron job, JMS etc) that instantiated and executed the class. + +The `protected` methods expose key internal APIs within Isis, for the subclass to use as necessary. + + +TIP +==== +One notable feature of `AbstractIsisSessionTemplate` is that it will automatically inject any domain services into itself. Thus, it is relatively easy for the subclass to "reach into" the domain, through injected repository services. +==== + + + +== BackgroundCommandExecution + +The `BackgroundCommandExecution` class (a subclass of <<AbstractIsisSessionTemplate>>) is intended to simplify the execution of background ``Command``s persisted by way of the <<CommandService>> and the <<BackgroundCommandService>>. + +Its signature is: + +[source,java] +---- +public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemplate { + protected void doExecute(Object context) { ... } + protected abstract List<? extends Command> findBackgroundCommandsToExecute(); // <1> +} +---- +<1> `findBackgroundCommandsToExecute()` is a mandatory hook method for subclasses to implement. + +This allows for different implementations of the `CommandService` and `BackgroundCommandService` to persist to wherever. + +The diagram below shows the dependencies between these various classes: + +.Inheritance Hierarchy for `BackgroundCommandExecution` +image::{_imagesdir}headless-access/BackgroundCommandExecution.png[width="400px"] + +[TIP] +==== +[source] +.DSL (http://yuml.me/edit/363b335f[yuml.me/363b335f]) +---- +[AbstractIsisSessionTemplate|#doExecute()]^-[BackgroundCommandExecution|#findBackgroundCommandsToExecute()] +[BackgroundCommandExecution]^-[BackgroundCommandExecutionFromBackgroundCommandServiceJdo] +[BackgroundCommandExecutionFromBackgroundCommandServiceJdo]->injected[BackgroundCommandServiceJdoRepository|findBackgroundCommandsNotYetStarted()] +---- +==== + + + +=== Background Execution using Isis Addons Command Module (not ASF) + +The `BackgroundCommandExecutionFromBackgroundCommandServiceJdo` is a concrete subclass of <<BackgroundCommandExecution>>, the intended use being for the class to be instantiated regularly (eg every 10 seconds) by a scheduler such as http://quartz-scheduler.org[Quartz]) to poll for ``Command``s to be executed, and then execute them. + +This implementation queries for ``Command``s persisted by the http://isisaddons.org/isis-module-command[Isis addons Command Module]'s implementations of <<CommandService>> and <<BackgroundCommandService>> using the `BackgroundCommandServiceJdoRepository`. + +The diagram below shows the inheritance hierarchy for this class: + +.Inheritance Hierarchy for `BackgroundCommandExecutionFromBackgroundCommandServiceJdo` +image::{_imagesdir}headless-access/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png[width="500px"] + +[TIP] +==== +[source] +.DSL (http://yuml.me/edit/25343da1[yuml.me/25343da1]): +---- +[AbstractIsisSessionTemplate|#doExecute()]^-[BackgroundCommandExecution|#findBackgroundCommandsToExecute()] +[BackgroundCommandExecution]->injected[BookmarkService|lookup()] +[BackgroundCommandExecution]->injected[CommandContext|setCommand()] +---- +==== http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_how-tos_ui-hints_names-and-descriptions.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_how-tos_ui-hints_names-and-descriptions.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_how-tos_ui-hints_names-and-descriptions.adoc index 042312f..04ab662 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_how-tos_ui-hints_names-and-descriptions.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_how-tos_ui-hints_names-and-descriptions.adoc @@ -9,15 +9,25 @@ IMPORTANT: TODO NOTE: see also <<_i18n, Internationalization>> -=== Class (object) +== Class (object) -=== Property +IMPORTANT: TODO + +== Property + +IMPORTANT: TODO + +== Collections -=== Collections +IMPORTANT: TODO + +== Actions + +IMPORTANT: TODO -=== Actions +== Action Parameters -=== Action Parameters +IMPORTANT: WIP Use `@ParameterLayout(named=...)` or `@Named(...)` http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_integrating-with-other-systems.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_integrating-with-other-systems.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_integrating-with-other-systems.adoc deleted file mode 100644 index f8668d1..0000000 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_integrating-with-other-systems.adoc +++ /dev/null @@ -1,11 +0,0 @@ -= Integrating with Other Systems -: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/ - -IMPORTANT: TODO - - -## Non UI Execution - -Using `IsisSessionTemplate` \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_more-advanced_neo4j.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_more-advanced_neo4j.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_more-advanced_neo4j.adoc index 7a8edca..95d27a7 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_more-advanced_neo4j.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_more-advanced_neo4j.adoc @@ -14,7 +14,7 @@ In addition, the http://github.com/isisaddons/isis-app-neoapp}[Isis addons' neoa The steps below describe the configuration steps required to update an existing app. -==== ConnectionURL +== ConnectionURL In `persistor.properties`, update the JDO `ConnectionURL` property, eg: @@ -25,7 +25,7 @@ isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=neo4j:neo4j_DB The other connection properties (`ConnectionDriverName`, `ConnectionUserName` and `ConnectionPassword`) should be commented out. -==== Update pom.xml +== Update pom.xml Add the following dependency to the `webapp` project's `pom.xml`: @@ -45,7 +45,7 @@ Add the following dependency to the `webapp` project's `pom.xml`: In the <<_simpleapp_archetype, SimpleApp archetype>> this is defined under the "neo4j" profile so can be activated using `-P neo4j`. -==== Try it out! +== Try it out! If you want to quickly try out neo4j for yourself: @@ -55,4 +55,4 @@ If you want to quickly try out neo4j for yourself: * run the app: -If you visit the about page you should see the neo4j JAR files are linked in, and a `neo4j_DB` subdirectory within the `webapp` directory. \ No newline at end of file +If you visit the about page you should see the neo4j JAR files are linked in, and a `neo4j_DB` subdirectory within the `webapp` directory. http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration.adoc index d19889b..b7a4e45 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration.adoc @@ -18,7 +18,7 @@ The configuration values are "baked" into the WAR file. Details on how to overr include::_user-guide_runtime-configuration_files.adoc[leveloffset=+1] -include::_user-guide_runtime-configuration_properties.adoc[leveloffset=+1] +include::_user-guide_runtime-configuration_configuring-core.adoc[leveloffset=+1] include::_user-guide_runtime-configuration_web-xml.adoc[leveloffset=+1] @@ -26,8 +26,6 @@ include::_user-guide_runtime-configuration_configuring-shiro.adoc[leveloffset=+1 include::_user-guide_runtime-configuration_configuring-datanucleus.adoc[leveloffset=+1] -include::_user-guide_runtime-configuration_integration-tests.adoc[leveloffset=+1] - http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-core.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-core.adoc new file mode 100644 index 0000000..a0a96e8 --- /dev/null +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-core.adoc @@ -0,0 +1,47 @@ += Configuring Core +: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 section lists the core/runtime configuration properties recognized by Apache Isis. + +Configuration properties for the JDO/DataNucleus objectstore can be found in the <<_configuring_datanucleus, Configuring DataNucleus>> section elsewhere in this chapter. + +Configuration properties for the viewers can be found in the <<Wicket Viewer>> chapter and the <<Restful Objects Viewer>> chapter. + +IMPORTANT: WIP... + +.Core Configuration Properties +[cols="2a,1,3a", options="header"] +|=== +|Property +|Value + +(_default value_) +|Description + +|`isis.services` +|`FQCN`,`FQCN2`,... +|Fully qualified class names of classes to be instantiated as domain services. Each entry can be optionally prefixed by "n:" specifying the relative order on the menu (corresponds to `@DomainServiceLayout#menuOrder()`). + +|`isis.services.` + +`container.disableAutoFlush` +|`true`,`_false_` +|Whether the `DomainObjectContainer` should automatically flush pending changes prior to querying (via `allMatches()`, `firstMatch()` and so on). + +|`isis.persistor.` + +`disableConcurrencyChecking` +|`true`,`_false_` +| Disables concurrency checking globally. Only intended for "emergency use" as a workaround while pending fix/patch to Isis itself. (Note that there is no "datanucleus" in the property). + +|`isis.reflector.facet.` + +`cssClassFa.patterns` +|regex:fa-icon,regex2:fa-icon2,... +|Comma separated list of key:value pairs, where the key is a regex matching action names (eg `create.*`) and the value is a link:fortawesome.github.io/Font-Awesome/icons/[font-awesome] icon name (eg `fa-plus`) to be applied (as per `@CssClassFa()`) to all action members matching the regex. + +|`isis.reflector.facet.` + +`cssClass.patterns` +|regex:css1,regex2:css2,... +|Comma separated list of key:value pairs, where the key is a regex matching action names (eg `delete.*`) and the value is a link:http://getbootstrap.com/css/[Bootstrap] CSS button class (eg `btn-warning) to be applied (as per `@CssClass()`) to all action members matching the regex. + +|=== + http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus.adoc index 9794c76..e1ea34f 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus.adoc @@ -10,11 +10,12 @@ DataNucleus will for itself also and read the `META-INF/persistence.xml`; at a m Furthermore, DataNucleus will search for various other XML mapping files, eg `mappings.jdo`. A full list can be found http://www.datanucleus.org/products/datanucleus/jdo/metadata.html[here]. The metadata in these XML can be used to override the annotations of annotated entities; see <<_overriding_jdo_annotations, Overriding JDO Annotatons>> for further discussion. +include::_user-guide_runtime-configuration_configuring-datanucleus_properties.adoc[leveloffset=+1] -include::_user-guide_configuration_configuring-datanucleus_persistence-xml.adoc[leveloffset=+1] +include::_user-guide_runtime-configuration_configuring-datanucleus_persistence-xml.adoc[leveloffset=+1] -include::_user-guide_configuration_configuring-datanucleus_disabling-persistence-by-reachability.adoc[leveloffset=+1] +include::_user-guide_runtime-configuration_configuring-datanucleus_eagerly-registering-entities.adoc[leveloffset=+1] -include::_user-guide_configuration_configuring-datanucleus_eagerly-registering-entities.adoc[leveloffset=+1] +include::_user-guide_runtime-configuration_configuring-datanucleus_disabling-persistence-by-reachability.adoc[leveloffset=+1] -include::_user-guide_configuration_configuring-datanucleus_using-jndi-data-source.adoc[leveloffset=+1] +include::_user-guide_runtime-configuration_configuring-datanucleus_using-jndi-data-source.adoc[leveloffset=+1] http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus_properties.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus_properties.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus_properties.adoc new file mode 100644 index 0000000..a76fa6a --- /dev/null +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_configuring-datanucleus_properties.adoc @@ -0,0 +1,57 @@ += Configuration Properties +: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/ + +IMPORTANT: WIP... + +These configuration properties are typically stored in `WEB-INF/persistor_datanucleus.properties`. However, you can place all configuration properties into `WEB-INF/isis.properties` if you wish (the configuration properties from all config files are merged together). + +== Configuration Properties for Apache Isis itself + + +.JDO/DataNucleus Objectstore Configuration Properties +[cols="2a,1,3a", options="header"] +|=== +|Property +|Value + +(_default value_) +|Description + +|`isis.persistor.datanucleus.` + +`RegisterEntities.packagePrefix` +| fully qualified package names (CSV) +| of class names; specifies the entities early rather than allow DataNucleus to find the entities lazily. Strongly recommended (subtle issues can sometimes arise if lazy discovery is used). +Further <<_registering_entity_types, discussion below>>. + +|`isis.persistor.datanucleus.` + +`PublishingService.serializedForm` +| zipped +| + +|=== + + + +== Configuration Properties passed through directly to DataNucleus. + +.JDO/DataNucleus Objectstore Configuration Properties +[cols="2a,1,3a", options="header"] +|=== +|Property +|Value + +(_default value_) +|Description + +|`isis.persistor.datanucleus.impl.*` +| +| Passed through directly to Datanucleus (with `isis.persistor.datanucleus.impl` prefix stripped) + +|`isis.persistor.datanucleus.impl.` + +`datanucleus.persistenceByReachabilityAtCommit` +|`false` +|We recommend this setting is disabled. + +Further <<_disabling_persistence_by_reachability, discussion below>>. + +|=== + http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_integration-tests.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_integration-tests.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_integration-tests.adoc deleted file mode 100644 index 7766d86..0000000 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_integration-tests.adoc +++ /dev/null @@ -1,13 +0,0 @@ -= Configuring Integration Tests -: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/ - -IMPORTANT: TODO - -Integration tests are configured programmatically, with a default set of properties to bootstrap the JDO/DataNucleus objectstore using an HSQLDB in-memory database. - -These can be overridden by subclassing `IsisConfigurationForJdoIntegTests`. - - - http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties.adoc index e14f044..1a476c7 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties.adoc @@ -3,10 +3,3 @@ :_basedir: ../ :_imagesdir: images/ -This section lists the core/runtime configuration properties recognized by Apache Isis. - -Configuration properties for the viewers can be found in the <<Wicket Viewer>> chapter and the <<Restful Objects Viewer>> chapter. - -include::_user-guide_configuration_properties_core.adoc[leveloffset=+1] - -include::_user-guide_configuration_properties_datanucleus-objectstore.adoc[leveloffset=+1] http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties_core.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties_core.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties_core.adoc deleted file mode 100644 index ff525c0..0000000 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties_core.adoc +++ /dev/null @@ -1,41 +0,0 @@ -= Core -: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/ - -IMPORTANT: WIP... - -.Core Configuration Properties -[cols="2a,1,3a", options="header"] -|=== -|Property -|Value + -(_default value_) -|Description - -|`isis.services` -|`FQCN`,`FQCN2`,... -|Fully qualified class names of classes to be instantiated as domain services. Each entry can be optionally prefixed by "n:" specifying the relative order on the menu (corresponds to `@DomainServiceLayout#menuOrder()`). - -|`isis.services.` + -`container.disableAutoFlush` -|`true`,`_false_` -|Whether the `DomainObjectContainer` should automatically flush pending changes prior to querying (via `allMatches()`, `firstMatch()` and so on). - -|`isis.persistor.` + -`disableConcurrencyChecking` -|`true`,`_false_` -| Disables concurrency checking globally. Only intended for "emergency use" as a workaround while pending fix/patch to Isis itself. (Note that there is no "datanucleus" in the property). - -|`isis.reflector.facet.` + -`cssClassFa.patterns` -|regex:fa-icon,regex2:fa-icon2,... -|Comma separated list of key:value pairs, where the key is a regex matching action names (eg `create.*`) and the value is a link:fortawesome.github.io/Font-Awesome/icons/[font-awesome] icon name (eg `fa-plus`) to be applied (as per `@CssClassFa()`) to all action members matching the regex. - -|`isis.reflector.facet.` + -`cssClass.patterns` -|regex:css1,regex2:css2,... -|Comma separated list of key:value pairs, where the key is a regex matching action names (eg `delete.*`) and the value is a link:http://getbootstrap.com/css/[Bootstrap] CSS button class (eg `btn-warning) to be applied (as per `@CssClass()`) to all action members matching the regex. - -|=== - http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties_datanucleus-objectstore.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties_datanucleus-objectstore.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties_datanucleus-objectstore.adoc deleted file mode 100644 index 2c6ba58..0000000 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_runtime-configuration_properties_datanucleus-objectstore.adoc +++ /dev/null @@ -1,57 +0,0 @@ -= JDO/Datanucleus Objectstore -: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/ - -IMPORTANT: WIP... - -These configuration properties are typically stored in `WEB-INF/persistor_datanucleus.properties`. However, you can place all configuration properties into `WEB-INF/isis.properties` if you wish (the configuration properties from all config files are merged together). - -== Configuration Properties for Apache Isis itself - - -.JDO/DataNucleus Objectstore Configuration Properties -[cols="2a,1,3a", options="header"] -|=== -|Property -|Value + -(_default value_) -|Description - -|`isis.persistor.datanucleus.` + -`RegisterEntities.packagePrefix` -| fully qualified package names (CSV) -| of class names; specifies the entities early rather than allow DataNucleus to find the entities lazily. Strongly recommended (subtle issues can sometimes arise if lazy discovery is used). -Further <<_registering_entity_types, discussion below>>. - -|`isis.persistor.datanucleus.` + -`PublishingService.serializedForm` -| zipped -| - -|=== - - - -== Configuration Properties passed through directly to DataNucleus. - -.JDO/DataNucleus Objectstore Configuration Properties -[cols="2a,1,3a", options="header"] -|=== -|Property -|Value + -(_default value_) -|Description - -|`isis.persistor.datanucleus.impl.*` -| -| Passed through directly to Datanucleus (with `isis.persistor.datanucleus.impl` prefix stripped) - -|`isis.persistor.datanucleus.impl.` + -`datanucleus.persistenceByReachabilityAtCommit` -|`false` -|We recommend this setting is disabled. + -Further <<_disabling_persistence_by_reachability, discussion below>>. - -|=== - http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing.adoc index 85f8da7..cb7962e 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing.adoc @@ -9,7 +9,7 @@ include::_user-guide_testing_unit-test-support.adoc[leveloffset=+1] include::_user-guide_testing_integ-test-support.adoc[leveloffset=+1] -include::_user-guide_testing_bdd-integ-test-support.adoc[leveloffset=+1] +include::_user-guide_testing_bdd-spec-support.adoc[leveloffset=+1] include::_user-guide_testing_fixture-scripts.adoc[leveloffset=+1] http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_bdd-integ-test-support.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_bdd-integ-test-support.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_bdd-integ-test-support.adoc deleted file mode 100644 index 714abc5..0000000 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_bdd-integ-test-support.adoc +++ /dev/null @@ -1,7 +0,0 @@ -= BDD/Integ Test Support -: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/ - -IMPORTANT: TODO - http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_bdd-spec-support.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_bdd-spec-support.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_bdd-spec-support.adoc new file mode 100644 index 0000000..9313dd6 --- /dev/null +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_bdd-spec-support.adoc @@ -0,0 +1,8 @@ += BDD Spec Support +: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/ + +IMPORTANT: TODO + +Support with Cucumber JVM... \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support.adoc index 1435e89..4f33165 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support.adoc @@ -7,122 +7,24 @@ IMPORTANT: TODO -== Bootstrapping +== Test Class -[source,java] -.Integration test bootstrapping ----- -private static class SimpleAppSystemBuilder extends IsisSystemForTest.Builder { - - public SimpleAppSystemBuilder() { - withLoggingAt(org.apache.log4j.Level.INFO); - with(testConfiguration()); - with(new DataNucleusPersistenceMechanismInstaller()); - - // services annotated with @DomainService - withServicesIn( "domainapp" ); - } - - private static IsisConfiguration testConfiguration() { - final IsisConfigurationForJdoIntegTests testConfiguration = new IsisConfigurationForJdoIntegTests(); // <1> - - testConfiguration.addRegisterEntitiesPackagePrefix("domainapp.dom.modules"); - return testConfiguration; - } -} ----- -<1> uses `IsisConfigurationForJdoIntegTests` for in-memory HSQLDB and other standard settings, see <<_isisconfigurationforjdointegtests, below>>. - -The <<_simpleapp_archetype, SimpleApp archetype>> is already set up to do this. - - - -== IsisConfigurationForJdoIntegTests - -IMPORTANT: WIP... - -When running integration tests with the JDO/DataNucleus Objectstore, there are certain standard configuration properties that are usually set. For example, integration tests are usually run against an in-memory HSQLDB database. - -To remove a little bit of boilerplate, the `IsisConfigurationForJdoIntegTests` class (in the `org.apache.isis.objectstore.jdo.datanucleus` package) can be used to bootstrap the application. - - -.Default Configuration Properties for Integration Tests -[cols="2a,1,3a", options="header"] -|=== -|Property -|Value -|Description - -|`isis.persistor.datanucleus.impl.` + -`javax.jdo.option.ConnectionURL` -|jdbc:hsqldb:mem:test -|JDBC URL - -|`isis.persistor.datanucleus.impl.` + -`javax.jdo.option.ConnectionDriverName` -|org.hsqldb.jdbcDriver -|JDBC Driver - -|`isis.persistor.datanucleus.impl.` + -`javax.jdo.option.ConnectionUserName` -|sa -|Username - -|`isis.persistor.datanucleus.impl.` + -`javax.jdo.option.ConnectionPassword` -|<empty string> -|Password - -|`isis.persistor.datanucleus.impl.` + -`datanucleus.schema.autoCreateAll` -|true -|Recreate DB for each test run (an in-memory database) +IMPORTANT: TODO -|`isis.persistor.datanucleus.impl.` + -`datanucleus.schema.validateAll` -|false -|Disable validations (minimize bootstrap time) -|`isis.persistor.datanucleus.impl.` + -`datanucleus.persistenceByReachabilityAtCommit` -|false -|As per WEB-INF/persistor_datanucleus.properties +include::_user-guide_testing_integ-test-support_bootstrapping.adoc[leveloffset=+1] -|`isis.persistor.datanucleus.impl.` + -`datanucleus.identifier.case` -|MixedCase -|As per WEB-INF/persistor_datanucleus.properties -|`isis.persistor.datanucleus.impl.` + -`datanucleus.cache.level2.type` -|none -|As per WEB-INF/persistor_datanucleus.properties -|`isis.persistor.datanucleus.impl.` + -`datanucleus.cache.level2.mode` -|ENABLE_SELECTIVE -|As per WEB-INF/persistor_datanucleus.properties -|`isis.persistor.datanucleus.` + -`install-fixtures` -|true -|Automatically install any fixtures that might have been registered -|`isis.persistor.` + -`enforceSafeSemantics` -|false -| -|`isis.deploymentType` -|server_prototype -| -|=== +== WrapperFactory +IMPORTANT: TODO -== WrapperFactory -IMPORTANT: TODO http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support_bootstrapping.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support_bootstrapping.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support_bootstrapping.adoc new file mode 100644 index 0000000..8b83102 --- /dev/null +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_testing_integ-test-support_bootstrapping.adoc @@ -0,0 +1,119 @@ += Bootstrapping +: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/ + + +IMPORTANT: WIP... + + +[source,java] +.Integration test bootstrapping +---- +private static class SimpleAppSystemBuilder extends IsisSystemForTest.Builder { + + public SimpleAppSystemBuilder() { + withLoggingAt(org.apache.log4j.Level.INFO); + with(testConfiguration()); + with(new DataNucleusPersistenceMechanismInstaller()); + + // services annotated with @DomainService + withServicesIn( "domainapp" ); + } + + private static IsisConfiguration testConfiguration() { + final IsisConfigurationForJdoIntegTests testConfiguration = new IsisConfigurationForJdoIntegTests(); // <1> + + testConfiguration.addRegisterEntitiesPackagePrefix("domainapp.dom.modules"); + return testConfiguration; + } +} +---- +<1> uses `IsisConfigurationForJdoIntegTests` for in-memory HSQLDB and other standard settings, see <<_isisconfigurationforjdointegtests, below>>. + +The <<_simpleapp_archetype, SimpleApp archetype>> is already set up to do this. + + + + +== IsisConfigurationForJdoIntegTests + +IMPORTANT: WIP... + +Integration tests are configured programmatically, with a default set of properties to bootstrap the JDO/DataNucleus objectstore using an HSQLDB in-memory database. + +To remove a little bit of boilerplate, the `IsisConfigurationForJdoIntegTests` class (in the `org.apache.isis.objectstore.jdo.datanucleus` package) can be used to bootstrap the application. If necessary, this class can be subclassed to override these defaults. + + +.Default Configuration Properties for Integration Tests +[cols="2a,1,3a", options="header"] +|=== +|Property +|Value +|Description + +|`isis.persistor.datanucleus.impl.` + +`javax.jdo.option.ConnectionURL` +|jdbc:hsqldb:mem:test +|JDBC URL + +|`isis.persistor.datanucleus.impl.` + +`javax.jdo.option.ConnectionDriverName` +|org.hsqldb.jdbcDriver +|JDBC Driver + +|`isis.persistor.datanucleus.impl.` + +`javax.jdo.option.ConnectionUserName` +|sa +|Username + +|`isis.persistor.datanucleus.impl.` + +`javax.jdo.option.ConnectionPassword` +|<empty string> +|Password + +|`isis.persistor.datanucleus.impl.` + +`datanucleus.schema.autoCreateAll` +|true +|Recreate DB for each test run (an in-memory database) + +|`isis.persistor.datanucleus.impl.` + +`datanucleus.schema.validateAll` +|false +|Disable validations (minimize bootstrap time) + +|`isis.persistor.datanucleus.impl.` + +`datanucleus.persistenceByReachabilityAtCommit` +|false +|As per WEB-INF/persistor_datanucleus.properties + +|`isis.persistor.datanucleus.impl.` + +`datanucleus.identifier.case` +|MixedCase +|As per WEB-INF/persistor_datanucleus.properties + +|`isis.persistor.datanucleus.impl.` + +`datanucleus.cache.level2.type` +|none +|As per WEB-INF/persistor_datanucleus.properties + +|`isis.persistor.datanucleus.impl.` + +`datanucleus.cache.level2.mode` +|ENABLE_SELECTIVE +|As per WEB-INF/persistor_datanucleus.properties + +|`isis.persistor.datanucleus.` + +`install-fixtures` +|true +|Automatically install any fixtures that might have been registered + +|`isis.persistor.` + +`enforceSafeSemantics` +|false +| + +|`isis.deploymentType` +|server_prototype +| +|=== + http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_wicket-viewer_configuration_properties.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_wicket-viewer_configuration_properties.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_wicket-viewer_configuration_properties.adoc index 77dcaa4..643185b 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_wicket-viewer_configuration_properties.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/_user-guide_wicket-viewer_configuration_properties.adoc @@ -56,35 +56,35 @@ Note that action pages are still used for bookmarked actions. |=== -=== Suppressing 'sign up' +== Suppressing 'sign up' IMPORTANT: TODO -=== Suppressing 'remember me' +== Suppressing 'remember me' IMPORTANT: TODO -=== Suppressing 'password reset' +== Suppressing 'password reset' IMPORTANT: TODO -=== Number of bookmarked pages +== Number of bookmarked pages IMPORTANT: TODO -=== Stripped Wicket tags +== Stripped Wicket tags IMPORTANT: TODO -=== Disabling modal dialogs +== Disabling modal dialogs IMPORTANT: TODO -=== Showing a theme chooser +== Showing a theme chooser IMPORTANT: TODO -=== Suppressing header and footer (embedded view) +== Suppressing header and footer (embedded view) IMPORTANT: TODO http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/images/background-execution/BackgroundCommandExecution.png ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/images/background-execution/BackgroundCommandExecution.png b/adocs/documentation/src/main/asciidoc/user-guide/images/background-execution/BackgroundCommandExecution.png deleted file mode 100644 index 5cefae3..0000000 Binary files a/adocs/documentation/src/main/asciidoc/user-guide/images/background-execution/BackgroundCommandExecution.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/images/background-execution/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/images/background-execution/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png b/adocs/documentation/src/main/asciidoc/user-guide/images/background-execution/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png deleted file mode 100644 index 0c026fb..0000000 Binary files a/adocs/documentation/src/main/asciidoc/user-guide/images/background-execution/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/images/headless-access/BackgroundCommandExecution.png ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/images/headless-access/BackgroundCommandExecution.png b/adocs/documentation/src/main/asciidoc/user-guide/images/headless-access/BackgroundCommandExecution.png new file mode 100644 index 0000000..5cefae3 Binary files /dev/null and b/adocs/documentation/src/main/asciidoc/user-guide/images/headless-access/BackgroundCommandExecution.png differ http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/images/headless-access/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/images/headless-access/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png b/adocs/documentation/src/main/asciidoc/user-guide/images/headless-access/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png new file mode 100644 index 0000000..0c026fb Binary files /dev/null and b/adocs/documentation/src/main/asciidoc/user-guide/images/headless-access/BackgroundCommandExecutionFromBackgroundCommandServiceJdo.png differ http://git-wip-us.apache.org/repos/asf/isis/blob/c32f4f84/adocs/documentation/src/main/asciidoc/user-guide/user-guide.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/user-guide/user-guide.adoc b/adocs/documentation/src/main/asciidoc/user-guide/user-guide.adoc index 7c9c95c..6170518 100644 --- a/adocs/documentation/src/main/asciidoc/user-guide/user-guide.adoc +++ b/adocs/documentation/src/main/asciidoc/user-guide/user-guide.adoc @@ -24,12 +24,10 @@ include::_user-guide_deployment.adoc[leveloffset=+1] include::_user-guide_testing.adoc[leveloffset=+1] -include::_user-guide_background-execution.adoc[leveloffset=+1] +include::_user-guide_headless-access.adoc[leveloffset=+1] include::_user-guide_isis-addons-modules.adoc[leveloffset=+1] -include::_user-guide_integrating-with-other-systems.adoc[leveloffset=+1] - include::_user-guide_extending.adoc[leveloffset=+1] include::_user-guide_troubleshooting.adoc[leveloffset=+1]
