[35/58] [abbrv] isis git commit: object titles and icons; fixing links
http://git-wip-us.apache.org/repos/asf/isis/blob/85b1e70b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_domain-services_scoped-services.adoc -- diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_domain-services_scoped-services.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_domain-services_scoped-services.adoc new file mode 100644 index 000..61c48ff --- /dev/null +++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_domain-services_scoped-services.adoc @@ -0,0 +1,23 @@ +[[_ugfun_programming-model_domain-services_scoped-services]] += Scoped services +: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/ + + +By default all domain services are considered to be singletons, and thread-safe. + +Sometimes though a service's lifetime is applicable only to a single request; in other words it is request-scoped. + +The CDI annotation xref:../rgant/rgant.adoc#_rgant-RequestScoped[`@javax.enterprise.context.RequestScoped`] is used to indicate this fact: + +[source,java] + +@javax.enterprise.context.RequestScoped +public class MyService extends AbstractService { +... +} + + +The framework provides a number of request-scoped services, include a xref:../rgsvc/rgsvc.adoc#_rgsvc_api_Scratchpad[`Scratchpad`] service query results caching through the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_QueryResultsCache[`QueryResultsCache`], and support for co-ordinating bulk actions through the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_ActionInvocationContext[`ActionInvocationContext`] service. See the xref:../rgsvc/rgsvc.adoc#[domain services] reference guide for further details. + http://git-wip-us.apache.org/repos/asf/isis/blob/85b1e70b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc -- diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc index 1a0a9a3..d6c3f45 100644 --- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc @@ -6,12 +6,11 @@ :_imagesdir: images/ - +A xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_types-of-domain-objects_mixins[mixin] acts like a trait or extension method, allowing one module to contribute behaviour or derived state to another object. Syntactically, a mixin is defined using either the xref:../rgant/rgant.adoc#_rgant_Mixin[`@Mixin`] annotation or using xref:../rgant/rgant.adoc#_rgant_DomainObject_nature[`@DomainObject#nature()`] attribute (specifying a nature of `Nature.MIXIN`). - [source,java] @Mixin(method="coll") // <1> @@ -41,306 +40,18 @@ This could also be an interface. This requires that the action has safe semantics, ie does not alter state/no side-effects. +include::_ugfun_programming-model_mixins_contributed-collection.adoc[leveloffset=+1] +include::_ugfun_programming-model_mixins_contributed-property.adoc[leveloffset=+1] +include::_ugfun_programming-model_mixins_contributed-action.adoc[leveloffset=+1] +include::_ugfun_programming-model_mixins_inferred-name.adoc[leveloffset=+1] +include::_ugfun_programming-model_mixins_nested-static-classes .adoc[leveloffset=+1] - - - -== Contributed services - -Contributed services provide many of the same benefits as xref:../ugbtb/ugbtb.adoc#_ugbtb_decoupling_mixins[mixins]; -indeed mixins are an evolution and refinement of the contributions concept. - -[WARNING] - -It's possible that contributions may be deprecated and eventually removed in a future version of the framework, to be replaced entirely by mixins. - - -The main difference between contributed services and mixins is that the actions of a contributed service will -contribute to _all_ the parameters of its actions, whereas a mixin only contributes to the type
[35/58] [abbrv] isis git commit: object titles and icons; fixing links
http://git-wip-us.apache.org/repos/asf/isis/blob/85b1e70b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_domain-services_scoped-services.adoc -- diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_domain-services_scoped-services.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_domain-services_scoped-services.adoc new file mode 100644 index 000..61c48ff --- /dev/null +++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_domain-services_scoped-services.adoc @@ -0,0 +1,23 @@ +[[_ugfun_programming-model_domain-services_scoped-services]] += Scoped services +: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/ + + +By default all domain services are considered to be singletons, and thread-safe. + +Sometimes though a service's lifetime is applicable only to a single request; in other words it is request-scoped. + +The CDI annotation xref:../rgant/rgant.adoc#_rgant-RequestScoped[`@javax.enterprise.context.RequestScoped`] is used to indicate this fact: + +[source,java] + +@javax.enterprise.context.RequestScoped +public class MyService extends AbstractService { +... +} + + +The framework provides a number of request-scoped services, include a xref:../rgsvc/rgsvc.adoc#_rgsvc_api_Scratchpad[`Scratchpad`] service query results caching through the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_QueryResultsCache[`QueryResultsCache`], and support for co-ordinating bulk actions through the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_ActionInvocationContext[`ActionInvocationContext`] service. See the xref:../rgsvc/rgsvc.adoc#[domain services] reference guide for further details. + http://git-wip-us.apache.org/repos/asf/isis/blob/85b1e70b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc -- diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc index 1a0a9a3..d6c3f45 100644 --- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_mixins.adoc @@ -6,12 +6,11 @@ :_imagesdir: images/ - +A xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_types-of-domain-objects_mixins[mixin] acts like a trait or extension method, allowing one module to contribute behaviour or derived state to another object. Syntactically, a mixin is defined using either the xref:../rgant/rgant.adoc#_rgant_Mixin[`@Mixin`] annotation or using xref:../rgant/rgant.adoc#_rgant_DomainObject_nature[`@DomainObject#nature()`] attribute (specifying a nature of `Nature.MIXIN`). - [source,java] @Mixin(method="coll") // <1> @@ -41,306 +40,18 @@ This could also be an interface. This requires that the action has safe semantics, ie does not alter state/no side-effects. +include::_ugfun_programming-model_mixins_contributed-collection.adoc[leveloffset=+1] +include::_ugfun_programming-model_mixins_contributed-property.adoc[leveloffset=+1] +include::_ugfun_programming-model_mixins_contributed-action.adoc[leveloffset=+1] +include::_ugfun_programming-model_mixins_inferred-name.adoc[leveloffset=+1] +include::_ugfun_programming-model_mixins_nested-static-classes .adoc[leveloffset=+1] - - - -== Contributed services - -Contributed services provide many of the same benefits as xref:../ugbtb/ugbtb.adoc#_ugbtb_decoupling_mixins[mixins]; -indeed mixins are an evolution and refinement of the contributions concept. - -[WARNING] - -It's possible that contributions may be deprecated and eventually removed in a future version of the framework, to be replaced entirely by mixins. - - -The main difference between contributed services and mixins is that the actions of a contributed service will -contribute to _all_ the parameters of its actions, whereas a mixin only contributes to the type