camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: [CAMEL-10824] Improve DefaultRuntimeProvider abstraction
Date Tue, 14 Feb 2017 11:40:34 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x ff71bb7fc -> 6ea18cb91
  refs/heads/master 1b58a7e34 -> 605710dd2


[CAMEL-10824] Improve DefaultRuntimeProvider abstraction


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/605710dd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/605710dd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/605710dd

Branch: refs/heads/master
Commit: 605710dd26419c4f005bc64663591eaa92a3f151
Parents: 1b58a7e
Author: Thomas Diesler <thomas.diesler@jboss.com>
Authored: Tue Feb 14 11:08:31 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Feb 14 12:40:01 2017 +0100

----------------------------------------------------------------------
 .../camel/catalog/DefaultRuntimeProvider.java   | 24 ++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/605710dd/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultRuntimeProvider.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultRuntimeProvider.java
b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultRuntimeProvider.java
index 2fe0ca7..5e3ec9b 100644
--- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultRuntimeProvider.java
+++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultRuntimeProvider.java
@@ -86,10 +86,26 @@ public class DefaultRuntimeProvider implements RuntimeProvider {
         return OTHER_DIR;
     }
 
+    protected String getComponentsCatalog() {
+        return COMPONENTS_CATALOG;
+    }
+
+    protected String getDataFormatsCatalog() {
+        return DATA_FORMATS_CATALOG;
+    }
+
+    protected String getLanguageCatalog() {
+        return LANGUAGE_CATALOG;
+    }
+
+    protected String getOtherCatalog() {
+        return OTHER_CATALOG;
+    }
+
     @Override
     public List<String> findComponentNames() {
         List<String> names = new ArrayList<String>();
-        InputStream is = camelCatalog.getVersionManager().getResourceAsStream(COMPONENTS_CATALOG);
+        InputStream is = getCamelCatalog().getVersionManager().getResourceAsStream(getComponentsCatalog());
         if (is != null) {
             try {
                 CatalogHelper.loadLines(is, names);
@@ -103,7 +119,7 @@ public class DefaultRuntimeProvider implements RuntimeProvider {
     @Override
     public List<String> findDataFormatNames() {
         List<String> names = new ArrayList<String>();
-        InputStream is = camelCatalog.getVersionManager().getResourceAsStream(DATA_FORMATS_CATALOG);
+        InputStream is = getCamelCatalog().getVersionManager().getResourceAsStream(getDataFormatsCatalog());
         if (is != null) {
             try {
                 CatalogHelper.loadLines(is, names);
@@ -117,7 +133,7 @@ public class DefaultRuntimeProvider implements RuntimeProvider {
     @Override
     public List<String> findLanguageNames() {
         List<String> names = new ArrayList<String>();
-        InputStream is = camelCatalog.getVersionManager().getResourceAsStream(LANGUAGE_CATALOG);
+        InputStream is = getCamelCatalog().getVersionManager().getResourceAsStream(getLanguageCatalog());
         if (is != null) {
             try {
                 CatalogHelper.loadLines(is, names);
@@ -131,7 +147,7 @@ public class DefaultRuntimeProvider implements RuntimeProvider {
     @Override
     public List<String> findOtherNames() {
         List<String> names = new ArrayList<String>();
-        InputStream is = camelCatalog.getVersionManager().getResourceAsStream(OTHER_CATALOG);
+        InputStream is = getCamelCatalog().getVersionManager().getResourceAsStream(getOtherCatalog());
         if (is != null) {
             try {
                 CatalogHelper.loadLines(is, names);


Mime
View raw message