polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [11/50] [abbrv] polygene-java git commit: :libraries:alarm refine
Date Tue, 16 May 2017 18:51:03 GMT
:libraries:alarm refine


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

Branch: refs/heads/master
Commit: 10963fb1d25e038c24034669babe1b1f5aa6b2b5
Parents: 54e43a4
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon May 15 11:02:34 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon May 15 11:02:34 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/polygene/library/alarm/AlarmEvent.java    | 3 +--
 .../java/org/apache/polygene/library/alarm/AlarmPoint.java    | 7 ++-----
 .../org/apache/polygene/library/alarm/AlarmPointEntity.java   | 3 +--
 .../org/apache/polygene/library/alarm/AlarmPointFactory.java  | 3 +--
 .../java/org/apache/polygene/library/alarm/AlarmProxy.java    | 3 +--
 .../java/org/apache/polygene/library/alarm/AlarmStatus.java   | 3 +--
 .../java/org/apache/polygene/library/alarm/AlarmSystem.java   | 4 ++--
 .../org/apache/polygene/library/alarm/AlarmSystemService.java | 4 +---
 .../polygene/library/alarm/ExtendedAlarmModelService.java     | 7 +++----
 .../polygene/library/alarm/SimpleAlarmModelService.java       | 7 +++----
 .../polygene/library/alarm/StandardAlarmModelService.java     | 7 +++----
 11 files changed, 19 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmEvent.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmEvent.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmEvent.java
index ec8aeff..89e7006 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmEvent.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmEvent.java
@@ -29,7 +29,6 @@ import org.apache.polygene.api.injection.scope.Service;
 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.ValueComposite;
 
 /**
  * Event for indicating change of AlarmStatus of an AlarmPoint.
@@ -38,7 +37,7 @@ import org.apache.polygene.api.value.ValueComposite;
  */
 @Mixins( AlarmEvent.Mixin.class )
 public interface AlarmEvent
-    extends ValueComposite, HasIdentity
+    extends HasIdentity
 {
     /**
      * Returns the reference of the AlarmPoint that generated the event.

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPoint.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPoint.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPoint.java
index d745767..8b1b7fd 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPoint.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPoint.java
@@ -346,11 +346,8 @@ public interface AlarmPoint extends HasIdentity
         @Override
         public List<String> attributeNames()
         {
-            ArrayList<String> result = new ArrayList<String>();
-            for( String name : state.attributes().get().keySet() )
-            {
-                result.add( name );
-            }
+            ArrayList<String> result = new ArrayList<>();
+            result.addAll( state.attributes().get().keySet() );
             return result;
         }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointEntity.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointEntity.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointEntity.java
index 6ad77a9..531a04b 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointEntity.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointEntity.java
@@ -19,10 +19,9 @@
  */
 package org.apache.polygene.library.alarm;
 
-import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.mixin.Mixins;
 
 @Mixins(AlarmPoint.AlarmPointMixin.class)
-public interface AlarmPointEntity extends AlarmPoint, EntityComposite
+public interface AlarmPointEntity extends AlarmPoint
 {
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointFactory.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointFactory.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointFactory.java
index f8c793d..1905e2e 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointFactory.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmPointFactory.java
@@ -24,14 +24,13 @@ import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 
 @Mixins( AlarmPointFactory.Mixin.class )
-public interface AlarmPointFactory extends ServiceComposite
+public interface AlarmPointFactory
 {
     AlarmPoint create(Identity identity, String systemName, String categoryName, AlarmClass
alarmClass );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmProxy.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmProxy.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmProxy.java
index 47ee6f1..3efdb7f 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmProxy.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmProxy.java
@@ -25,7 +25,6 @@ import java.util.Locale;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
-import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Service;
@@ -40,7 +39,7 @@ import org.apache.polygene.api.unitofwork.concern.UnitOfWorkPropagation;
 
 @Concerns( UnitOfWorkConcern.class )
 @Mixins( AlarmProxy.Mixin.class )
-public interface AlarmProxy extends AlarmPoint, TransientComposite
+public interface AlarmProxy extends AlarmPoint
 {
     @Mixins( FactoryMixin.class )
     interface Factory extends ServiceComposite

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmStatus.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmStatus.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmStatus.java
index af0616d..f10ae23 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmStatus.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmStatus.java
@@ -28,7 +28,6 @@ import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Initializable;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.value.ValueComposite;
 
 /**
  * Status of an AlarmPoint.
@@ -36,7 +35,7 @@ import org.apache.polygene.api.value.ValueComposite;
  * @author Niclas Hedhman
  */
 @Mixins( AlarmStatus.AlarmStatusMixin.class )
-public interface AlarmStatus extends ValueComposite
+public interface AlarmStatus
 {
 
     /**

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java
index 78d69a9..c205f64 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystem.java
@@ -158,7 +158,7 @@ public interface AlarmSystem
 
         public AlarmSystemMixin()
         {
-            alarmListeners = new CopyOnWriteArrayList<AlarmListener>();
+            alarmListeners = new CopyOnWriteArrayList<>();
         }
 
         /**
@@ -167,7 +167,7 @@ public interface AlarmSystem
         @Override
         public List<AlarmModelDescriptor> alarmModels()
         {
-            List<AlarmModelDescriptor> descriptors = new ArrayList<AlarmModelDescriptor>();
+            List<AlarmModelDescriptor> descriptors = new ArrayList<>();
             for( ServiceReference<AlarmModel> model : models )
             {
                 descriptors.add( model.metaInfo( AlarmModelDescriptor.class ) );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemService.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemService.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemService.java
index 331a1ff..ee46af2 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemService.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmSystemService.java
@@ -19,8 +19,6 @@
  */
 package org.apache.polygene.library.alarm;
 
-import org.apache.polygene.api.service.ServiceComposite;
-
-public interface AlarmSystemService extends AlarmSystem, ServiceComposite
+public interface AlarmSystemService extends AlarmSystem
 {
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/ExtendedAlarmModelService.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/ExtendedAlarmModelService.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/ExtendedAlarmModelService.java
index db7093b..5c8bfc2 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/ExtendedAlarmModelService.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/ExtendedAlarmModelService.java
@@ -28,7 +28,6 @@ import java.util.ResourceBundle;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 
@@ -83,7 +82,7 @@ import org.apache.polygene.api.value.ValueBuilderFactory;
 
 @Mixins(ExtendedAlarmModelService.ExtendedAlarmModelMixin.class)
 public interface ExtendedAlarmModelService
-    extends AlarmModel, ServiceComposite
+    extends AlarmModel
 {
     class ExtendedAlarmModelMixin
         implements AlarmModel
@@ -97,7 +96,7 @@ public interface ExtendedAlarmModelService
 
         static
         {
-            List<String> list1 = new ArrayList<String>();
+            List<String> list1 = new ArrayList<>();
             list1.add( AlarmPoint.STATUS_NORMAL );
             list1.add( AlarmPoint.STATUS_ACTIVATED );
             list1.add( AlarmPoint.STATUS_DEACTIVATED );
@@ -107,7 +106,7 @@ public interface ExtendedAlarmModelService
             list1.add( AlarmPoint.STATUS_DISABLED );
             STATUS_LIST = Collections.unmodifiableList( list1 );
 
-            List<String> list2 = new ArrayList<String>();
+            List<String> list2 = new ArrayList<>();
             list2.add( AlarmPoint.TRIGGER_ACTIVATE );
             list2.add( AlarmPoint.TRIGGER_DEACTIVATE );
             list2.add( AlarmPoint.TRIGGER_ACKNOWLEDGE );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/SimpleAlarmModelService.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/SimpleAlarmModelService.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/SimpleAlarmModelService.java
index 3a21160..3a74108 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/SimpleAlarmModelService.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/SimpleAlarmModelService.java
@@ -28,12 +28,11 @@ import java.util.ResourceBundle;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 
 @Mixins( SimpleAlarmModelService.SimpleAlarmModelMixin.class)
-public interface SimpleAlarmModelService extends AlarmModel, ServiceComposite
+public interface SimpleAlarmModelService extends AlarmModel
 {
     /**
      * The Simple AlarmPoint Model is centered around the Normal and Activated.
@@ -55,13 +54,13 @@ public interface SimpleAlarmModelService extends AlarmModel, ServiceComposite
 
         static
         {
-            List<String> list1 = new ArrayList<String>();
+            List<String> list1 = new ArrayList<>();
 
             list1.add( AlarmPoint.TRIGGER_ACTIVATE );
             list1.add( AlarmPoint.TRIGGER_DEACTIVATE );
             ALARM_TRIGGERS = Collections.unmodifiableList( list1 );
 
-            List<String> list2 = new ArrayList<String>();
+            List<String> list2 = new ArrayList<>();
             list2.add( AlarmPoint.STATUS_NORMAL );
             list2.add( AlarmPoint.STATUS_ACTIVATED );
             ALARM_STATUSES = Collections.unmodifiableList( list2 );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/10963fb1/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/StandardAlarmModelService.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/StandardAlarmModelService.java
b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/StandardAlarmModelService.java
index f1399c5..98258ad 100644
--- a/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/StandardAlarmModelService.java
+++ b/libraries/alarm/src/main/java/org/apache/polygene/library/alarm/StandardAlarmModelService.java
@@ -28,7 +28,6 @@ import java.util.ResourceBundle;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 
@@ -57,7 +56,7 @@ import org.apache.polygene.api.value.ValueBuilderFactory;
  */
 
 @Mixins( StandardAlarmModelService.StandardAlarmModelMixin.class )
-public interface StandardAlarmModelService extends AlarmModel, ServiceComposite
+public interface StandardAlarmModelService extends AlarmModel
 {
     class StandardAlarmModelMixin
         implements AlarmModel
@@ -68,14 +67,14 @@ public interface StandardAlarmModelService extends AlarmModel, ServiceComposite
 
         static
         {
-            List<String> list1 = new ArrayList<String>();
+            List<String> list1 = new ArrayList<>();
             list1.add( AlarmPoint.STATUS_NORMAL );
             list1.add( AlarmPoint.STATUS_ACTIVATED );
             list1.add( AlarmPoint.STATUS_DEACTIVATED );
             list1.add( AlarmPoint.STATUS_ACKNOWLEDGED );
             STATUS_LIST = Collections.unmodifiableList( list1 );
 
-            List<String> list2 = new ArrayList<String>();
+            List<String> list2 = new ArrayList<>();
             list2.add( AlarmPoint.TRIGGER_ACTIVATE );
             list2.add( AlarmPoint.TRIGGER_DEACTIVATE );
             list2.add( AlarmPoint.TRIGGER_ACKNOWLEDGE );


Mime
View raw message