polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [10/50] polygene-java git commit: :tutorials:services refine snippets
Date Mon, 15 May 2017 11:03:15 GMT
:tutorials:services refine snippets


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/64ebe416
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/64ebe416
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/64ebe416

Branch: refs/heads/develop
Commit: 64ebe416dc6a40dac891a5391eb697709e75e22a
Parents: 1a1d644
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon May 15 09:37:36 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon May 15 09:37:36 2017 +0200

----------------------------------------------------------------------
 .../apache/polygene/tutorials/services/step2/Book.java |  2 --
 .../tutorials/services/step2/LibraryService.java       |  3 +--
 .../apache/polygene/tutorials/services/step3/Book.java |  2 --
 .../tutorials/services/step3/LibraryMixin.java         |  4 ++--
 .../tutorials/services/step3/LibraryService.java       |  3 +--
 .../apache/polygene/tutorials/services/step4/Book.java |  2 --
 .../tutorials/services/step4/LibraryConfiguration.java |  2 --
 .../tutorials/services/step4/LibraryMixin.java         |  4 ++--
 .../tutorials/services/step4/LibraryService.java       |  3 +--
 .../apache/polygene/tutorials/services/step5/Book.java |  2 --
 .../tutorials/services/step5/LibraryService.java       | 13 +++++--------
 .../apache/polygene/tutorials/services/step6/Book.java |  2 --
 .../tutorials/services/step6/LibraryService.java       |  8 +++-----
 13 files changed, 15 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/Book.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/Book.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/Book.java
index 55751f3..a4367cf 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/Book.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/Book.java
@@ -20,10 +20,8 @@
 package org.apache.polygene.tutorials.services.step2;
 
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.value.ValueComposite;
 
 public interface Book
-    extends ValueComposite
 {
     Property<String> title();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/LibraryService.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/LibraryService.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/LibraryService.java
index 76224e5..70fdca7 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/LibraryService.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step2/LibraryService.java
@@ -20,10 +20,9 @@
 package org.apache.polygene.tutorials.services.step2;
 
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 
 @Mixins( LibraryMixin.class )
 public interface LibraryService
-    extends Library, ServiceComposite
+    extends Library
 {
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/Book.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/Book.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/Book.java
index 3b7751d..ff8e1e2 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/Book.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/Book.java
@@ -20,10 +20,8 @@
 package org.apache.polygene.tutorials.services.step3;
 
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.value.ValueComposite;
 
 public interface Book
-    extends ValueComposite
 {
     Property<String> title();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryMixin.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryMixin.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryMixin.java
index 5e1fa19..f1ea6e2 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryMixin.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryMixin.java
@@ -34,7 +34,7 @@ public class LibraryMixin
 
     public LibraryMixin()
     {
-        books = new HashMap<String, ArrayList<Book>>();
+        books = new HashMap<>();
     }
 
     @Override
@@ -80,7 +80,7 @@ public class LibraryMixin
 
     private void createBook( String author, String title, int copies )
     {
-        ArrayList<Book> bookCopies = new ArrayList<Book>();
+        ArrayList<Book> bookCopies = new ArrayList<>();
         String key = constructKey( author, title );
         books.put( key, bookCopies );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryService.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryService.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryService.java
index fa1b6d9..d91ad88 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryService.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step3/LibraryService.java
@@ -21,11 +21,10 @@ package org.apache.polygene.tutorials.services.step3;
 
 import org.apache.polygene.api.activation.Activators;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 
 @Mixins( LibraryMixin.class )
 @Activators( LibraryActivator.class )
 public interface LibraryService
-    extends Library, ServiceComposite
+    extends Library
 {
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/Book.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/Book.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/Book.java
index 7e9b6cf..ae73bd3 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/Book.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/Book.java
@@ -20,10 +20,8 @@
 package org.apache.polygene.tutorials.services.step4;
 
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.value.ValueComposite;
 
 public interface Book
-    extends ValueComposite
 {
     Property<String> title();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryConfiguration.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryConfiguration.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryConfiguration.java
index 3a3fc9d..65a81c0 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryConfiguration.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryConfiguration.java
@@ -19,11 +19,9 @@
  */
 package org.apache.polygene.tutorials.services.step4;
 
-import org.apache.polygene.api.configuration.ConfigurationComposite;
 import org.apache.polygene.api.property.Property;
 
 public interface LibraryConfiguration
-    extends ConfigurationComposite
 {
     Property<String> titles();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryMixin.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryMixin.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryMixin.java
index 1038738..27389a5 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryMixin.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryMixin.java
@@ -35,7 +35,7 @@ public class LibraryMixin
 
     public LibraryMixin( @This Configuration<LibraryConfiguration> config, @Structure
ValueBuilderFactory factory )
     {
-        books = new HashMap<String, ArrayList<Book>>();
+        books = new HashMap<>();
         String titles = config.get().titles().get();
         String authors = config.get().authors().get();
         int copies = config.get().copies().get();
@@ -84,7 +84,7 @@ public class LibraryMixin
 
     private void createBook( ValueBuilderFactory factory, String author, String title, int
copies )
     {
-        ArrayList<Book> bookCopies = new ArrayList<Book>();
+        ArrayList<Book> bookCopies = new ArrayList<>();
         String key = constructKey( author, title );
         books.put( key, bookCopies );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryService.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryService.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryService.java
index f902745..c9d6855 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryService.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step4/LibraryService.java
@@ -20,10 +20,9 @@
 package org.apache.polygene.tutorials.services.step4;
 
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 
 @Mixins( LibraryMixin.class )
 public interface LibraryService
-    extends Library, ServiceComposite
+    extends Library
 {
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/Book.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/Book.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/Book.java
index 29e0c9e..ae958f9 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/Book.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/Book.java
@@ -20,10 +20,8 @@
 package org.apache.polygene.tutorials.services.step5;
 
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.value.ValueComposite;
 
 public interface Book
-    extends ValueComposite
 {
     Property<String> title();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/LibraryService.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/LibraryService.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/LibraryService.java
index f5ea53c..e1d102e 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/LibraryService.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step5/LibraryService.java
@@ -23,21 +23,18 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.StringTokenizer;
 import org.apache.polygene.api.configuration.Configuration;
-import org.apache.polygene.api.configuration.ConfigurationComposite;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 
 @Mixins( LibraryService.LibraryMixin.class )
 public interface LibraryService
-    extends Library, ServiceComposite
+    extends Library
 {
-    public static interface LibraryConfiguration
-        extends ConfigurationComposite
+    interface LibraryConfiguration
     {
         Property<String> titles();
 
@@ -46,7 +43,7 @@ public interface LibraryService
         Property<Integer> copies();
     }
 
-    public static class LibraryMixin
+    class LibraryMixin
         implements Library
     {
 
@@ -56,7 +53,7 @@ public interface LibraryService
                              @Structure ValueBuilderFactory factory
         )
         {
-            books = new HashMap<String, ArrayList<Book>>();
+            books = new HashMap<>();
             String titles = config.get().titles().get();
             String authors = config.get().authors().get();
             int copies = config.get().copies().get();
@@ -105,7 +102,7 @@ public interface LibraryService
 
         private void createBook( ValueBuilderFactory factory, String author, String title,
int copies )
         {
-            ArrayList<Book> bookCopies = new ArrayList<Book>();
+            ArrayList<Book> bookCopies = new ArrayList<>();
             String key = constructKey( author, title );
             books.put( key, bookCopies );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/Book.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/Book.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/Book.java
index 1877b14..964ccb7 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/Book.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/Book.java
@@ -20,10 +20,8 @@
 package org.apache.polygene.tutorials.services.step6;
 
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.value.ValueComposite;
 
 public interface Book
-    extends ValueComposite
 {
     Property<String> title();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/64ebe416/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/LibraryService.java
----------------------------------------------------------------------
diff --git a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/LibraryService.java
b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/LibraryService.java
index 2737b4a..e926427 100644
--- a/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/LibraryService.java
+++ b/tutorials/services/src/main/java/org/apache/polygene/tutorials/services/step6/LibraryService.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.StringTokenizer;
 import org.apache.polygene.api.configuration.Configuration;
-import org.apache.polygene.api.configuration.ConfigurationComposite;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.property.Property;
@@ -33,8 +32,7 @@ import org.apache.polygene.api.value.ValueBuilderFactory;
 public class LibraryService
     implements Library
 {
-    public static interface LibraryConfiguration
-        extends ConfigurationComposite
+    public interface LibraryConfiguration
     {
         Property<String> titles();
 
@@ -49,7 +47,7 @@ public class LibraryService
                          @Structure ValueBuilderFactory factory
     )
     {
-        books = new HashMap<String, ArrayList<Book>>();
+        books = new HashMap<>();
         String titles = config.get().titles().get();
         String authors = config.get().authors().get();
         int copies = config.get().copies().get();
@@ -98,7 +96,7 @@ public class LibraryService
 
     private void createBook( ValueBuilderFactory factory, String author, String title, int
copies )
     {
-        ArrayList<Book> bookCopies = new ArrayList<Book>();
+        ArrayList<Book> bookCopies = new ArrayList<>();
         String key = constructKey( author, title );
         books.put( key, bookCopies );
 


Mime
View raw message