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 2014/01/19 17:04:19 UTC

svn commit: r1559516 - in /isis/site/trunk/content: ./ applib-guide/domain-services/ applib-guide/how-tos/ core/services/

Author: danhaywood
Date: Sun Jan 19 16:04:18 2014
New Revision: 1559516

URL: http://svn.apache.org/r1559516
Log:
isis docs

Added:
    isis/site/trunk/content/core/services/bulk-interaction.md
    isis/site/trunk/content/core/services/query-results-cache.md
    isis/site/trunk/content/core/services/scratchpad.md
Removed:
    isis/site/trunk/content/core/services/initializing-services.md
Modified:
    isis/site/trunk/content/applib-guide/domain-services/how-to-09-020-How-to-write-a-typical-domain-service.md
    isis/site/trunk/content/applib-guide/how-tos/how-to-01-150-How-to-inject-services-into-a-domain-entity-or-other-service.md
    isis/site/trunk/content/core/services/about.md
    isis/site/trunk/content/documentation.md

Modified: isis/site/trunk/content/applib-guide/domain-services/how-to-09-020-How-to-write-a-typical-domain-service.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/applib-guide/domain-services/how-to-09-020-How-to-write-a-typical-domain-service.md?rev=1559516&r1=1559515&r2=1559516&view=diff
==============================================================================
--- isis/site/trunk/content/applib-guide/domain-services/how-to-09-020-How-to-write-a-typical-domain-service.md (original)
+++ isis/site/trunk/content/applib-guide/domain-services/how-to-09-020-How-to-write-a-typical-domain-service.md Sun Jan 19 16:04:18 2014
@@ -112,6 +112,47 @@ For example:
         public void forwardEmail(String to, String from, String subject, String body);
     }
 
+### Initializing Services
+
+Services can optionally declare lifecycle callbacks to initialize them (when the app is deployed) and to shut them down (when the app is undeployed).
+
+An Isis session *is* available when initialization occurs (so services can interact with the object store, for example). [1.4.0-SNAPSHOT].
+
+#### Initialization
+
+The framework will call any `public` method annotated with `@javax.annotation.PostConstruct` and with either no arguments of an argument of type `Map<String,String>`:
+
+<pre>
+  @PostConstruct
+  public void init() {
+    ..
+  }
+</pre>
+
+or
+
+<pre>
+  @PostConstruct
+  public void init(Map<String,String> props) {
+    ..
+  }
+</pre>
+
+In the latter case, the framework passes in the configuration (`isis.properties` and any other component-specific configuration files).
+
+
+#### Shutdown
+
+Shutdown is similar; the framework will call any method annotated with `@javax.annotation.PreDestroy`:
+
+<pre>
+  @PreDestroy
+  public void shutdown() {
+    ..
+  }
+</pre>
+
+
 ### The getId() method
 
 Optionally, a service may provide a `getId()` method:

Modified: isis/site/trunk/content/applib-guide/how-tos/how-to-01-150-How-to-inject-services-into-a-domain-entity-or-other-service.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/applib-guide/how-tos/how-to-01-150-How-to-inject-services-into-a-domain-entity-or-other-service.md?rev=1559516&r1=1559515&r2=1559516&view=diff
==============================================================================
--- isis/site/trunk/content/applib-guide/how-tos/how-to-01-150-How-to-inject-services-into-a-domain-entity-or-other-service.md (original)
+++ isis/site/trunk/content/applib-guide/how-tos/how-to-01-150-How-to-inject-services-into-a-domain-entity-or-other-service.md Sun Jan 19 16:04:18 2014
@@ -31,7 +31,7 @@ or alternatively, using 'inject' as the 
 
 Note that the method name can be anything; it doesn't need to be related to the type being injected.
 
-### Field Injection
+### Field Injection [1.4.0-SNAPSHOT]
 
 Field injection is also supported, using the `javax.inject.Inject annotation`.  For example:
 
@@ -47,3 +47,8 @@ Although this has the least boilerplate,
 
 Simply to note that constructor injection is *not* supported by Isis (and is unlikely to be, because the JDO specification for entities requires a no-arg constructor).
 
+### Qualified services
+
+Isis currently does not support qualified injection of services; the domain service of each type must be distinct from any other.  
+
+If you find a requirement to inject two instances of type `SomeService`, say, then the work-around is to create trivial subclasses `SomeServiceA` and `SomeServiceB` and inject these instead.
\ No newline at end of file

Modified: isis/site/trunk/content/core/services/about.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/core/services/about.md?rev=1559516&r1=1559515&r2=1559516&view=diff
==============================================================================
--- isis/site/trunk/content/core/services/about.md (original)
+++ isis/site/trunk/content/core/services/about.md Sun Jan 19 16:04:18 2014
@@ -1,13 +1,19 @@
 Title: Applib Services
 
 
-###  Services
+###  Singleton service APIs
 
-- [Initializing Services](initializing-services.html)
-- [Auditing Service](auditing-service.html)
-- [Bookmark Service](bookmark-service.html)
-- [Developer Utilities Service](developer-utilities-service.html)
-- [Exception Recognizers](exception-recognizers.html)
-- [Publishing Service](publishing-service.html)
-- [Settings Services](settings-services.html)
+* [Clock, Fixtures, etc](../../applib-guide/supporting-features/about.html)
+* [Auditing Service](./auditing-service.html)
+* [Bookmark Service](./bookmark-service.html)
+* [Developer Utilities Service](./developer-utilities-service.html)
+* [Exception Recognizers](./exception-recognizers.html)
+* [Publishing Service](./publishing-service.html)
+* [Settings Services](./settings-services.html)
+
+### @RequestScoped service APIs [1.4.0-SNAPSHOT]
+
+* [QueryResultsCache](./query-results-cache.html) [1.4.0-SNAPSHOT]
+* [Scratchpad](./scratchpad.html) [1.4.0-SNAPSHOT]
+* [Bulk Interaction](./bulk-interaction.html) [1.4.0-SNAPSHOT]
 

Added: isis/site/trunk/content/core/services/bulk-interaction.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/core/services/bulk-interaction.md?rev=1559516&view=auto
==============================================================================
--- isis/site/trunk/content/core/services/bulk-interaction.md (added)
+++ isis/site/trunk/content/core/services/bulk-interaction.md Sun Jan 19 16:04:18 2014
@@ -0,0 +1,4 @@
+Title: Bulk Interaction [1.4.0-SNAPSHOT]
+
+> this is a stub, see [ISIS-655](https://issues.apache.org/jira/browse/ISIS-655)
+

Added: isis/site/trunk/content/core/services/query-results-cache.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/core/services/query-results-cache.md?rev=1559516&view=auto
==============================================================================
--- isis/site/trunk/content/core/services/query-results-cache.md (added)
+++ isis/site/trunk/content/core/services/query-results-cache.md Sun Jan 19 16:04:18 2014
@@ -0,0 +1,4 @@
+Title: Query Results Cache [1.4.0-SNAPSHOT]
+
+> this is a stub, see [ISIS-654](https://issues.apache.org/jira/browse/ISIS-654)
+

Added: isis/site/trunk/content/core/services/scratchpad.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/core/services/scratchpad.md?rev=1559516&view=auto
==============================================================================
--- isis/site/trunk/content/core/services/scratchpad.md (added)
+++ isis/site/trunk/content/core/services/scratchpad.md Sun Jan 19 16:04:18 2014
@@ -0,0 +1,4 @@
+Title: Scratchpad [1.4.0-SNAPSHOT]
+
+> this is a stub, see [ISIS-653](https://issues.apache.org/jira/browse/ISIS-653)
+

Modified: isis/site/trunk/content/documentation.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/documentation.md?rev=1559516&r1=1559515&r2=1559516&view=diff
==============================================================================
--- isis/site/trunk/content/documentation.md (original)
+++ isis/site/trunk/content/documentation.md Sun Jan 19 16:04:18 2014
@@ -175,8 +175,8 @@ For both:
 * [Derived property](./applib-guide/how-tos/how-to-04-010-How-to-make-a-derived-property.html)
 * [Derived collection](./applib-guide/how-tos/how-to-04-020-How-to-make-a-derived-collection.html)
 * [Inlining query-only repository action](./applib-guide/how-tos/how-to-04-030-How-to-inline-the-results-of-a-query-only-repository-action.html)
-* [Trigger other behaviour on property change](./applib-guide/how-tos/how-to-04-040-How-to-trigger-other-behaviour-when-a-property-is-changed.html)
-* [Trigger other behaviour on collection change](./applib-guide/how-tos/how-to-04-050-How-to-trigger-other-behaviour-when-an-object-is-added-or-removed.html)
+* [Trigger on property change](./applib-guide/how-tos/how-to-04-040-How-to-trigger-other-behaviour-when-a-property-is-changed.html)
+* [Trigger on collection change](./applib-guide/how-tos/how-to-04-050-How-to-trigger-other-behaviour-when-an-object-is-added-or-removed.html)
 
 ###Business rules
 
@@ -200,10 +200,10 @@ For both:
 * [Name/description of an action](./applib-guide/how-tos/how-to-05-040-How-to-specify-names-or-description-for-an-action.html)
 * [Entity icons reflecting object's state](./applib-guide/how-tos/how-to-05-050-How-to-specify-the-icon-for-an-individual-objects-state.html)
 
-### Services & cfg
+###Error handling
 
-* [Initializing Services](core/services/initializing-services.html)
-* [Configuration Files](core/configuration-files.html)
+* [Raise message to users](./applib-guide/how-tos/how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html)
+* [Unexpected errors](./applib-guide/how-tos/how-to-06-020-How-to-deal-with-an-unexpected-error.html)
 
 ###Prototyping tips
 
@@ -214,12 +214,6 @@ For both:
 
 {col-md-4
 
-###Error handling
-
-* [Raise message to users](./applib-guide/how-tos/how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html)
-* [Unexpected errors](./applib-guide/how-tos/how-to-06-020-How-to-deal-with-an-unexpected-error.html)
-
-
 ###Persistence lifecycle
 
 * [Initial value of property](./applib-guide/how-tos/how-to-07-010-How-to-set-up-the-initial-value-of-a-property-programmatically.html)
@@ -247,7 +241,7 @@ For both:
 {row
 
 {col-md-12
-## Reference
+## Applib
 
 }
 
@@ -257,19 +251,20 @@ For both:
 
 {col-md-4
 
-###  Applib
+###  Reference
 
+* [Configuration Files](core/configuration-files.html)
 * [Deployment Types](core/deployment-type.html)
+* [DomainObjectContainer interface](./applib-guide/reference/DomainObjectContainer.html)
 * [Recognized Methods and Prefixes](./applib-guide/reference/Recognized-Methods-and-Prefixes.html)
 * [Recognized Annotations](./applib-guide/reference/recognized-annotations/about.html)
-* [DomainObjectContainer interface](./applib-guide/reference/DomainObjectContainer.html)
 * [Lifecycle callbacks](./applib-guide/how-tos/how-to-07-070-How-to-hook-into-the-object-lifecycle-using-callbacks.html)
 
 }
 
 {col-md-4
 
-###  Applib service APIs
+###  Singleton service APIs
 
 * [Clock, Fixtures, etc](./applib-guide/supporting-features/about.html)
 * [Auditing Service](core/services/auditing-service.html)
@@ -279,6 +274,12 @@ For both:
 * [Publishing Service](core/services/publishing-service.html)
 * [Settings Services](core/services/settings-services.html)
 
+### @RequestScoped service APIs [1.4.0-SNAPSHOT]
+
+* [QueryResultsCache](core/services/query-results-cache.html) [1.4.0-SNAPSHOT, stub]
+* [Scratchpad](core/services/scratchpad.html) [1.4.0-SNAPSHOT, stub]
+* [Bulk Interaction](core/services/bulk-interaction.html) [1.4.0-SNAPSHOT, stub]
+
 }
 
 {col-md-4