tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [3/4] incubator-tamaya-sandbox git commit: TAMAYA-274 Added Tamaya Configuration Service and reduced exposed artifacts.
Date Thu, 12 Oct 2017 10:27:33 GMT
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/BackupRestoreCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/BackupRestoreCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/BackupRestoreCommand.java
index 8434d45..e053bd2 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/BackupRestoreCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/BackupRestoreCommand.java
@@ -22,8 +22,8 @@ import org.apache.karaf.shell.api.action.Action;
 import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.BackupCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
@@ -36,7 +36,7 @@ public class BackupRestoreCommand implements Action{
     String pid;
 
     @org.apache.karaf.shell.api.action.lifecycle.Reference
-    TamayaConfigPlugin configPlugin;
+    TamayaConfigService configPlugin;
 
     @Override
     public Object execute() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnableCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnableCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnableCommand.java
index bbd2b06..1a7ebcf 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnableCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnableCommand.java
@@ -28,8 +28,8 @@ import org.apache.karaf.shell.api.console.Completer;
 import org.apache.karaf.shell.api.console.Session;
 import org.apache.karaf.shell.support.completers.StringsCompleter;
 import org.apache.tamaya.osgi.Policy;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 import java.util.List;
@@ -40,7 +40,7 @@ import java.util.List;
 public class DefaultEnableCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
     @Argument(index = 0, name = "enabled", description = "The boolean value to enabled/disable
Tamaya by default.",
             required = true, multiValued = false)

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnabledCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnabledCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnabledCommand.java
index 251cb6b..7b29af7 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnabledCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultEnabledCommand.java
@@ -27,8 +27,8 @@ import org.apache.karaf.shell.api.console.Completer;
 import org.apache.karaf.shell.api.console.Session;
 import org.apache.karaf.shell.support.completers.StringsCompleter;
 import org.apache.tamaya.osgi.Policy;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 import java.util.List;
@@ -39,7 +39,7 @@ import java.util.List;
 public class DefaultEnabledCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
     @Override
     public Object execute() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/GetPolicyCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/GetPolicyCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/GetPolicyCommand.java
index 7a85f33..71830ca 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/GetPolicyCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/GetPolicyCommand.java
@@ -22,8 +22,8 @@ import org.apache.karaf.shell.api.action.Action;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
@@ -32,7 +32,7 @@ import java.io.IOException;
 public class GetPolicyCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
     @Override
     public Object execute() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteAllCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteAllCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteAllCommand.java
index fab4ccc..cca7c4c 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteAllCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteAllCommand.java
@@ -21,18 +21,23 @@ package org.apache.tamaya.karaf.shell;
 import org.apache.karaf.shell.api.action.Action;
 import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
 import org.apache.tamaya.osgi.commands.HistoryCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
-@Command(scope = "tamaya", name = "tm_history_delete_all", description="Deletes the full
history of changes Tamaya applied to the OSGI configuration.")
+@Command(scope = "tamaya", name = "tm_history_delete_all", description="Deletes the full
getHistory of changes Tamaya applied to the OSGI configuration.")
 @Service
 public class HistoryDeleteAllCommand implements Action{
 
+    @Reference
+    private TamayaConfigService configPlugin;
+
     @Override
     public String execute() throws IOException {
-        return HistoryCommands.clearHistory(null);
+        return HistoryCommands.clearHistory(configPlugin, null);
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteCommand.java
index 655adf1..d9df7e0 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryDeleteCommand.java
@@ -19,12 +19,14 @@
 package org.apache.tamaya.karaf.shell;
 
 import org.apache.karaf.shell.api.action.*;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
 import org.apache.tamaya.osgi.commands.HistoryCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
-@Command(scope = "tamaya", name = "tm_history_delete", description="Deletes the history of
changes Tamaya applied to the OSGI configuration.")
+@Command(scope = "tamaya", name = "tm_history_delete", description="Deletes the getHistory
of changes Tamaya applied to the OSGI configuration.")
 @Service
 public class HistoryDeleteCommand implements Action{
 
@@ -32,9 +34,12 @@ public class HistoryDeleteCommand implements Action{
             required = true, multiValued = false)
     String pid;
 
+    @Reference
+    private TamayaConfigService configPlugin;
+
     @Override
     public String execute() throws IOException {
-        return HistoryCommands.clearHistory(pid);
+        return HistoryCommands.clearHistory(configPlugin, pid);
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryGetCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryGetCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryGetCommand.java
index 5abbbde..ec221fc 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryGetCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryGetCommand.java
@@ -26,18 +26,18 @@ import org.apache.karaf.shell.api.console.Completer;
 import org.apache.karaf.shell.api.console.Session;
 import org.apache.karaf.shell.support.completers.StringsCompleter;
 import org.apache.tamaya.osgi.ConfigHistory;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.HistoryCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 import java.util.List;
 
-@Command(scope = "tamaya", name = "tm_history", description="Gets the history of changes
Tamaya applied to the OSGI configuration.")
+@Command(scope = "tamaya", name = "tm_history", description="Gets the getHistory of changes
Tamaya applied to the OSGI configuration.")
 @Service
 public class HistoryGetCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
     @Argument(index = 0, name = "pid", description = "Allows to filter on the given PID.",
             required = false, multiValued = false)
@@ -50,7 +50,7 @@ public class HistoryGetCommand implements Action{
 
     @Override
     public String execute() throws IOException {
-        return HistoryCommands.getHistory(pid, eventTypes);
+        return HistoryCommands.getHistory(configPlugin, pid, eventTypes);
     }
 
     @Service

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeCommand.java
index d8dd37e..f736e4b 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeCommand.java
@@ -19,19 +19,23 @@
 package org.apache.tamaya.karaf.shell;
 
 import org.apache.karaf.shell.api.action.*;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.ConfigHistory;
 import org.apache.tamaya.osgi.commands.HistoryCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
-@Command(scope = "tamaya", name = "tm_history_maxsize", description="Gets the maximal size
of stored history entries.")
+@Command(scope = "tamaya", name = "tm_history_maxsize", description="Gets the maximal size
of stored getHistory entries.")
 @Service
 public class HistoryMaxsizeCommand implements Action{
 
+    @Reference
+    private TamayaConfigService configPlugin;
+
     @Override
     public Object execute() throws IOException {
-        return(HistoryCommands.getMaxHistorySize());
+        return(HistoryCommands.getMaxHistorySize(configPlugin));
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeSetCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeSetCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeSetCommand.java
index a490dd6..91f09ee 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeSetCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/HistoryMaxsizeSetCommand.java
@@ -23,25 +23,25 @@ import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.HistoryCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
-@Command(scope = "tamaya", name = "tm_history_maxsize_set", description="Sets the maximal
size of Tamaya history entries.")
+@Command(scope = "tamaya", name = "tm_history_maxsize_set", description="Sets the maximal
size of Tamaya getHistory entries.")
 @Service
 public class HistoryMaxsizeSetCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
-    @Argument(index = 0, name = "size", description = "The maximum number of entries in the
history.",
+    @Argument(index = 0, name = "size", description = "The maximum number of entries in the
getHistory.",
             required = true, multiValued = false)
     int maxSize;
 
     @Override
     public Object execute() throws IOException {
-        return(HistoryCommands.setMaxHistorySize(maxSize));
+        return(HistoryCommands.setMaxHistorySize(configPlugin, maxSize));
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/InfoCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/InfoCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/InfoCommand.java
index b543d9c..cb8f826 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/InfoCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/InfoCommand.java
@@ -24,18 +24,15 @@ import org.apache.karaf.shell.api.action.Action;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
-import org.apache.tamaya.osgi.commands.HistoryCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 @Command(scope = "tamaya", name = "tm_info", description="Show he current Tamaya status.")
 @Service
 public class InfoCommand  implements Action {
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
     public Object execute() throws IOException {
         return(ConfigCommands.getInfo(configPlugin));

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/OSGIConfigCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/OSGIConfigCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/OSGIConfigCommand.java
index 807d08d..128aa78 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/OSGIConfigCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/OSGIConfigCommand.java
@@ -23,8 +23,8 @@ import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.Option;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
@@ -41,7 +41,7 @@ public class OSGIConfigCommand implements Action{
     String pid = null;
 
     @org.apache.karaf.shell.api.action.lifecycle.Reference
-    TamayaConfigPlugin configPlugin;
+    TamayaConfigService configPlugin;
 
 
     public Object execute() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicyGetCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicyGetCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicyGetCommand.java
index 9b38018..e38e017 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicyGetCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicyGetCommand.java
@@ -22,8 +22,8 @@ import org.apache.karaf.shell.api.action.Action;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
@@ -32,7 +32,7 @@ import java.io.IOException;
 public class PolicyGetCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
     @Override
     public Object execute() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicySetCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicySetCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicySetCommand.java
index f1d1816..10e317f 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicySetCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PolicySetCommand.java
@@ -29,8 +29,8 @@ import org.apache.karaf.shell.api.console.Completer;
 import org.apache.karaf.shell.api.console.Session;
 import org.apache.karaf.shell.support.completers.StringsCompleter;
 import org.apache.tamaya.osgi.Policy;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 import java.util.List;
@@ -40,7 +40,7 @@ import java.util.List;
 public class PolicySetCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
     @Argument(index = 0, name = "tm_policy_set", description = "The operation policy how
Tamaya intercepts OSGI configuration.",
             required = true, multiValued = false)

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesCommand.java
index 4ad1baa..129e9fc 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesCommand.java
@@ -19,12 +19,10 @@
 package org.apache.tamaya.karaf.shell;
 
 import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
-import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
@@ -35,7 +33,7 @@ import java.io.IOException;
 public class PropagateUpdatesCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesSetCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesSetCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesSetCommand.java
index 3832018..ff5dc95 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesSetCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropagateUpdatesSetCommand.java
@@ -23,8 +23,8 @@ import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.lifecycle.Reference;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
@@ -35,7 +35,7 @@ import java.io.IOException;
 public class PropagateUpdatesSetCommand implements Action{
 
     @Reference
-    private TamayaConfigPlugin configPlugin;
+    private TamayaConfigService configPlugin;
 
     @Argument(index = 0, name = "enabled", description = "Set to true to enable Tamaya's
updating trigger.",
             required = true, multiValued = false)

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertyGetCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertyGetCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertyGetCommand.java
index 932225a..72f5b4a 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertyGetCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertyGetCommand.java
@@ -23,11 +23,7 @@ import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.Option;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertyValue;
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java
index b6d9439..97ff4ae 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java
@@ -22,11 +22,7 @@ import org.apache.karaf.shell.api.action.Action;
 import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertyValue;
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/TamayaConfigCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/TamayaConfigCommand.java
b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/TamayaConfigCommand.java
index b161996..e66d27b 100644
--- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/TamayaConfigCommand.java
+++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/TamayaConfigCommand.java
@@ -19,12 +19,11 @@
 package org.apache.tamaya.karaf.shell;
 
 import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.Option;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
 import org.apache.tamaya.osgi.commands.ConfigCommands;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 
 import java.io.IOException;
 
@@ -41,7 +40,7 @@ public class TamayaConfigCommand implements Action{
     String pid = null;
 
     @org.apache.karaf.shell.api.action.lifecycle.Reference
-    TamayaConfigPlugin configPlugin;
+    TamayaConfigService configPlugin;
 
 
     public Object execute() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/Activator.java
----------------------------------------------------------------------
diff --git a/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/Activator.java b/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/Activator.java
index be72479..a83f18f 100644
--- a/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/Activator.java
+++ b/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/Activator.java
@@ -20,7 +20,7 @@ package org.apache.tamaya.osgi.updater;
 
 import org.apache.tamaya.events.ConfigEventManager;
 import org.apache.tamaya.events.ConfigurationChange;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 import org.osgi.framework.*;
 import org.osgi.service.cm.ConfigurationAdmin;
 
@@ -53,8 +53,8 @@ public class Activator implements BundleActivator {
         listener = new EventListener(context);
         ConfigEventManager.addListener(listener, ConfigurationChange.class);
         LOG.info("Registered Tamaya getConfig trigger for OSGI.");
-        ServiceReference<TamayaConfigPlugin> pluginRef = context.getServiceReference(TamayaConfigPlugin.class);
-        TamayaConfigPlugin tamayaPlugin = context.getService(pluginRef);
+        ServiceReference<TamayaConfigService> pluginRef = context.getServiceReference(TamayaConfigService.class);
+        TamayaConfigService tamayaPlugin = context.getService(pluginRef);
         updateTimer.schedule(new TimerTask() {
             @Override
             public void run() {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2b878fa1/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/EventListener.java
----------------------------------------------------------------------
diff --git a/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/EventListener.java
b/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/EventListener.java
index 29e7712..68e9bcb 100644
--- a/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/EventListener.java
+++ b/osgi/updater/src/main/java/org/apache/tamaya/osgi/updater/EventListener.java
@@ -22,7 +22,7 @@ import org.apache.tamaya.events.ConfigEvent;
 import org.apache.tamaya.events.ConfigEventListener;
 import org.apache.tamaya.events.ConfigurationChange;
 import org.apache.tamaya.osgi.Policy;
-import org.apache.tamaya.osgi.TamayaConfigPlugin;
+import org.apache.tamaya.osgi.commands.TamayaConfigService;
 import org.osgi.framework.*;
 import org.osgi.service.cm.ConfigurationAdmin;
 
@@ -61,8 +61,8 @@ final class EventListener implements ConfigEventListener{
         }
         LOG.finest("Tamya Config change for pids: " + changedPids);
         // Reload the given pids
-        ServiceReference<TamayaConfigPlugin> pluginRef = context.getServiceReference(TamayaConfigPlugin.class);
-        TamayaConfigPlugin tamayaPlugin = context.getService(pluginRef);
+        ServiceReference<TamayaConfigService> pluginRef = context.getServiceReference(TamayaConfigService.class);
+        TamayaConfigService tamayaPlugin = context.getService(pluginRef);
         for(String pid:changedPids) {
             tamayaPlugin.updateConfig(pid);
         }


Mime
View raw message