juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: Config API refactoring.
Date Thu, 15 Feb 2018 14:44:11 GMT
This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 509c916  Config API refactoring.
509c916 is described below

commit 509c9166e5af06a997000f8621dcf92290c0bccc
Author: JamesBognar <jamesbognar@apache.org>
AuthorDate: Thu Feb 15 09:44:08 2018 -0500

    Config API refactoring.
---
 .../java/org/apache/juneau/config/ConfigFile.java  |  5 +++--
 .../apache/juneau/config/ConfigFileBuilder.java    |  1 +
 .../org/apache/juneau/config/ConfigFileImpl.java   | 14 +++++++------
 .../apache/juneau/config/ConfigFileWrapped.java    |  3 ++-
 .../java/org/apache/juneau/config/Section.java     |  3 ++-
 .../apache/juneau/config/{ => encode}/Encoder.java |  4 +++-
 .../juneau/config/{ => encode}/XorEncoder.java     |  3 ++-
 .../juneau/config/{ => encode}/package-info.java   |  4 ++--
 .../ConfigListener.java}                           |  6 ++++--
 .../config/{ => listener}/EntryListener.java       |  8 +++++---
 .../config/{ => listener}/SectionListener.java     |  8 +++++---
 .../juneau/config/{ => listener}/package-info.java |  4 ++--
 .../org/apache/juneau/config/package-info.java     |  2 +-
 .../juneau/config/{source => store}/FileStore.java |  2 +-
 .../config/{source => store}/FileStoreBuilder.java |  4 ++--
 .../config/{source => store}/MemoryStore.java      |  2 +-
 .../{source => store}/MemoryStoreBuilder.java      |  2 +-
 .../juneau/config/{source => store}/Store.java     |  2 +-
 .../config/{source => store}/StoreBuilder.java     |  2 +-
 .../config/{source => store}/StoreListener.java    |  2 +-
 .../juneau/config/{ => store}/package-info.java    |  4 ++--
 .../apache/juneau/config/vars/package-info.java    |  2 +-
 .../juneau/config/ConfigFileBuilderTest.java       |  3 ++-
 .../org/apache/juneau/config/ConfigFileTest.java   | 10 +++++----
 juneau-doc/src/main/javadoc/overview.html          | 24 +++++++++++-----------
 .../apache/juneau/microservice/Microservice.java   |  7 ++++---
 26 files changed, 75 insertions(+), 56 deletions(-)

diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFile.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFile.java
index d7ae935..bdc4ac9 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFile.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFile.java
@@ -25,6 +25,7 @@ import java.lang.reflect.*;
 import java.util.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.config.listener.*;
 import org.apache.juneau.internal.*;
 import org.apache.juneau.parser.*;
 import org.apache.juneau.serializer.*;
@@ -1164,14 +1165,14 @@ public abstract class ConfigFile implements Map<String,Section>
{
 	 * @return This object (for method chaining).
 	 * @throws UnsupportedOperationException If config file is read only.
 	 */
-	public abstract ConfigFile addListener(ConfigFileListener listener);
+	public abstract ConfigFile addListener(ConfigListener listener);
 
 	/**
 	 * Merges the contents of the specified config file into this config file.
 	 * 
 	 * <p>
 	 * Pretty much identical to just replacing this config file, but causes the
-	 * {@link ConfigFileListener#onChange(ConfigFile, Set)} method to be invoked on differences
between the file.
+	 * {@link ConfigListener#onChange(ConfigFile, Set)} method to be invoked on differences
between the file.
 	 * 
 	 * @param cf The config file whose values should be copied into this config file.
 	 * @return This object (for method chaining).
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileBuilder.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileBuilder.java
index cb7c1df..3d854db 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileBuilder.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileBuilder.java
@@ -20,6 +20,7 @@ import java.nio.charset.*;
 import java.util.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.config.encode.*;
 import org.apache.juneau.internal.FileWriterBuilder;
 import org.apache.juneau.json.*;
 import org.apache.juneau.parser.*;
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileImpl.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileImpl.java
index 23cf228..47d5c31 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileImpl.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileImpl.java
@@ -23,6 +23,8 @@ import java.util.*;
 import java.util.concurrent.locks.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.config.encode.*;
+import org.apache.juneau.config.listener.*;
 import org.apache.juneau.config.vars.*;
 import org.apache.juneau.internal.*;
 import org.apache.juneau.json.*;
@@ -47,7 +49,7 @@ public final class ConfigFileImpl extends ConfigFile {
 	private final ReaderParser parser;
 	private final BeanSession pBeanSession;
 	private final Charset charset;
-	final List<ConfigFileListener> listeners = Collections.synchronizedList(new ArrayList<ConfigFileListener>());
+	final List<ConfigListener> listeners = Collections.synchronizedList(new ArrayList<ConfigListener>());
 
 	Map<String,Section> sections;  // The actual data.
 
@@ -203,7 +205,7 @@ public final class ConfigFileImpl extends ConfigFile {
 		} finally {
 			writeUnlock();
 		}
-		for (ConfigFileListener l : listeners)
+		for (ConfigListener l : listeners)
 			l.onLoad(this);
 		return this;
 	}
@@ -649,7 +651,7 @@ public final class ConfigFileImpl extends ConfigFile {
 				hasBeenModified = false;
 				modifiedTimestamp = file.lastModified();
 			}
-			for (ConfigFileListener l : listeners)
+			for (ConfigListener l : listeners)
 				l.onSave(this);
 			return this;
 		} finally {
@@ -689,7 +691,7 @@ public final class ConfigFileImpl extends ConfigFile {
 	}
 
 	@Override /* ConfigFile */
-	public ConfigFile addListener(ConfigFileListener listener) {
+	public ConfigFile addListener(ConfigListener listener) {
 		assertFieldNotNull(listener, "listener");
 		writeLock();
 		try {
@@ -700,7 +702,7 @@ public final class ConfigFileImpl extends ConfigFile {
 		}
 	}
 
-	List<ConfigFileListener> getListeners() {
+	List<ConfigListener> getListeners() {
 		return listeners;
 	}
 
@@ -815,7 +817,7 @@ public final class ConfigFileImpl extends ConfigFile {
 
 	final void signalChanges(Set<String> changes) {
 		if (changes != null && ! changes.isEmpty())
-			for (ConfigFileListener l : listeners)
+			for (ConfigListener l : listeners)
 				l.onChange(this, changes);
 	}
 }
\ No newline at end of file
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileWrapped.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileWrapped.java
index 08fa782..1ffba8b 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileWrapped.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileWrapped.java
@@ -19,6 +19,7 @@ import java.lang.reflect.*;
 import java.util.*;
 
 import org.apache.juneau.*;
+import org.apache.juneau.config.listener.*;
 import org.apache.juneau.config.vars.*;
 import org.apache.juneau.parser.*;
 import org.apache.juneau.serializer.*;
@@ -224,7 +225,7 @@ public final class ConfigFileWrapped extends ConfigFile {
 	}
 
 	@Override /* ConfigFile */
-	public ConfigFile addListener(ConfigFileListener listener) {
+	public ConfigFile addListener(ConfigListener listener) {
 		cf.addListener(listener);
 		return this;
 	}
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Section.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Section.java
index b65393b..d77f78f 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Section.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Section.java
@@ -21,6 +21,7 @@ import java.util.*;
 import java.util.concurrent.locks.*;
 
 import org.apache.juneau.annotation.*;
+import org.apache.juneau.config.listener.*;
 
 /**
  * Defines a section in a config file.
@@ -563,7 +564,7 @@ public final class Section implements Map<String,String> {
 
 	void signalChanges(Set<String> changes) {
 		if (changes != null && ! changes.isEmpty())
-			for (ConfigFileListener l : configFile.getListeners())
+			for (ConfigListener l : configFile.getListeners())
 				l.onChange(configFile, changes);
 	}
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Encoder.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/Encoder.java
similarity index 95%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Encoder.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/Encoder.java
index e77948e..c297d91 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Encoder.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/Encoder.java
@@ -10,7 +10,9 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config;
+package org.apache.juneau.config.encode;
+
+import org.apache.juneau.config.*;
 
 /**
  * API for defining a string encoding/decoding mechanism for entries in {@link ConfigFile}.
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/XorEncoder.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/XorEncoder.java
similarity index 96%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/XorEncoder.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/XorEncoder.java
index 7bb8083..3b7db9c 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/XorEncoder.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/XorEncoder.java
@@ -10,9 +10,10 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config;
+package org.apache.juneau.config.encode;
 
 import static org.apache.juneau.internal.StringUtils.*;
+
 import static org.apache.juneau.internal.IOUtils.*;
 
 /**
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/package-info.java
similarity index 94%
copy from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
copy to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/package-info.java
index e833c15..bc9ae20 100755
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/encode/package-info.java
@@ -12,7 +12,7 @@
 // ***************************************************************************************************************************
 
 /**
- * INI File Support
+ * Config Encoding Support
  */
-package org.apache.juneau.config;
+package org.apache.juneau.config.encode;
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileListener.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/ConfigListener.java
similarity index 93%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileListener.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/ConfigListener.java
index f9d470f..da22018 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/ConfigFileListener.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/ConfigListener.java
@@ -10,10 +10,12 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config;
+package org.apache.juneau.config.listener;
 
 import java.util.*;
 
+import org.apache.juneau.config.*;
+
 /**
  * Listener that can be used to listen for change events in config files.
  * 
@@ -22,7 +24,7 @@ import java.util.*;
  * 	<li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config.Listeners'>Overview
&gt; juneau-config &gt; Listeners</a>
  * </ul>
  */
-public class ConfigFileListener {
+public class ConfigListener {
 
 	/**
 	 * Gets called immediately after a config file has been loaded.
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/EntryListener.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/EntryListener.java
similarity index 91%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/EntryListener.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/EntryListener.java
index 5aea695..61cb785 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/EntryListener.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/EntryListener.java
@@ -10,10 +10,12 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config;
+package org.apache.juneau.config.listener;
 
 import java.util.*;
 
+import org.apache.juneau.config.*;
+
 /**
  * Listener that can be used to listen for change events for a specific entry in a config
file.
  * 
@@ -22,7 +24,7 @@ import java.util.*;
  * 	<li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config.Listeners'>Overview
&gt; juneau-config &gt; Listeners</a>
  * </ul>
  */
-public class EntryListener extends ConfigFileListener {
+public class EntryListener extends ConfigListener {
 
 	private String fullKey;
 
@@ -35,7 +37,7 @@ public class EntryListener extends ConfigFileListener {
 		this.fullKey = fullKey;
 	}
 
-	@Override /* ConfigFileListener */
+	@Override /* ConfigListener */
 	public void onChange(ConfigFile cf, Set<String> changes) {
 		if (changes.contains(fullKey))
 			onChange(cf);
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/SectionListener.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/SectionListener.java
similarity index 91%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/SectionListener.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/SectionListener.java
index 24d2f86..b6d170c 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/SectionListener.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/SectionListener.java
@@ -10,12 +10,14 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config;
+package org.apache.juneau.config.listener;
 
 import static org.apache.juneau.internal.StringUtils.*;
 
 import java.util.*;
 
+import org.apache.juneau.config.*;
+
 /**
  * Listener that can be used to listen for change events for a specific section in a config
file.
  * 
@@ -25,7 +27,7 @@ import java.util.*;
  * 	<li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config.Listeners'>Overview
&gt; juneau-config &gt; Listeners</a>
  * </ul>
  */
-public class SectionListener extends ConfigFileListener {
+public class SectionListener extends ConfigListener {
 
 	private boolean isDefault;
 	private String prefix;
@@ -40,7 +42,7 @@ public class SectionListener extends ConfigFileListener {
 		prefix = isDefault ? null : (section + '/');
 	}
 
-	@Override /* ConfigFileListener */
+	@Override /* ConfigListener */
 	public void onChange(ConfigFile cf, Set<String> changes) {
 		for (String c : changes) {
 			if (isDefault) {
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/package-info.java
similarity index 94%
copy from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
copy to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/package-info.java
index e833c15..77edd53 100755
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/listener/package-info.java
@@ -12,7 +12,7 @@
 // ***************************************************************************************************************************
 
 /**
- * INI File Support
+ * Config Listener Support
  */
-package org.apache.juneau.config;
+package org.apache.juneau.config.listener;
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
index e833c15..defacc6 100755
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
@@ -12,7 +12,7 @@
 // ***************************************************************************************************************************
 
 /**
- * INI File Support
+ * Config Support
  */
 package org.apache.juneau.config;
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/FileStore.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStore.java
similarity index 99%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/FileStore.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStore.java
index e5a9dc5..d8ee346 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/FileStore.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStore.java
@@ -10,7 +10,7 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config.source;
+package org.apache.juneau.config.store;
 
 import static java.nio.file.StandardWatchEventKinds.*;
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/FileStoreBuilder.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStoreBuilder.java
similarity index 98%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/FileStoreBuilder.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStoreBuilder.java
index 1030f94..f949085 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/FileStoreBuilder.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStoreBuilder.java
@@ -10,9 +10,9 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config.source;
+package org.apache.juneau.config.store;
 
-import static org.apache.juneau.config.source.FileStore.*;
+import static org.apache.juneau.config.store.FileStore.*;
 
 import java.io.*;
 import java.nio.charset.*;
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/MemoryStore.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/MemoryStore.java
similarity index 98%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/MemoryStore.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/MemoryStore.java
index 98a64a8..f24e642 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/MemoryStore.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/MemoryStore.java
@@ -10,7 +10,7 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config.source;
+package org.apache.juneau.config.store;
 
 import static org.apache.juneau.internal.StringUtils.*;
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/MemoryStoreBuilder.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/MemoryStoreBuilder.java
similarity index 98%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/MemoryStoreBuilder.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/MemoryStoreBuilder.java
index 346e298..d475ab8 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/MemoryStoreBuilder.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/MemoryStoreBuilder.java
@@ -10,7 +10,7 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config.source;
+package org.apache.juneau.config.store;
 
 import org.apache.juneau.*;
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/Store.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/Store.java
similarity index 99%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/Store.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/Store.java
index f340ae5..7e16c21 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/Store.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/Store.java
@@ -10,7 +10,7 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config.source;
+package org.apache.juneau.config.store;
 
 import java.io.*;
 import java.util.*;
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/StoreBuilder.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/StoreBuilder.java
similarity index 97%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/StoreBuilder.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/StoreBuilder.java
index c3a7b6e..1ec7056 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/StoreBuilder.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/StoreBuilder.java
@@ -10,7 +10,7 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config.source;
+package org.apache.juneau.config.store;
 
 import org.apache.juneau.*;
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/StoreListener.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/StoreListener.java
similarity index 97%
rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/StoreListener.java
rename to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/StoreListener.java
index 0526e56..8d85ac0 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/source/StoreListener.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/StoreListener.java
@@ -10,7 +10,7 @@
 // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the        *
 // * specific language governing permissions and limitations under the License.         
                                    *
 // ***************************************************************************************************************************
-package org.apache.juneau.config.source;
+package org.apache.juneau.config.store;
 
 /**
  * Listens for changes to stored config files.
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/package-info.java
similarity index 94%
copy from juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
copy to juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/package-info.java
index e833c15..dbfddc7 100755
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/package-info.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/package-info.java
@@ -12,7 +12,7 @@
 // ***************************************************************************************************************************
 
 /**
- * INI File Support
+ * Config Storage Support
  */
-package org.apache.juneau.config;
+package org.apache.juneau.config.store;
 
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/vars/package-info.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/vars/package-info.java
index f0045d6..5c6730b 100755
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/vars/package-info.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/vars/package-info.java
@@ -12,7 +12,7 @@
 // ***************************************************************************************************************************
 
 /**
- * Predefined SVL Variables
+ * Config Predefined SVL Variables
  */
 package org.apache.juneau.config.vars;
 
diff --git a/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/config/ConfigFileBuilderTest.java
b/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/config/ConfigFileBuilderTest.java
index 0cbec5f..1eb752f 100755
--- a/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/config/ConfigFileBuilderTest.java
+++ b/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/config/ConfigFileBuilderTest.java
@@ -20,6 +20,7 @@ import static org.apache.juneau.internal.IOUtils.*;
 
 import java.io.*;
 
+import org.apache.juneau.config.listener.*;
 import org.apache.juneau.svl.*;
 import org.junit.*;
 
@@ -137,7 +138,7 @@ public class ConfigFileBuilderTest {
 		try { cf.removeSection("A"); fail(); } catch (UnsupportedOperationException e) {}
 		try { cf.save(); fail(); } catch (UnsupportedOperationException e) {}
 		try { cf.merge(cf); fail(); } catch (UnsupportedOperationException e) {}
-		try { cf.addListener(new ConfigFileListener(){}); fail(); } catch (UnsupportedOperationException
e) {}
+		try { cf.addListener(new ConfigListener(){}); fail(); } catch (UnsupportedOperationException
e) {}
 
 		// All these should succeed.
 		cf.getObject("A", String.class);
diff --git a/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/config/ConfigFileTest.java
b/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/config/ConfigFileTest.java
index 569a7de..d617e45 100755
--- a/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/config/ConfigFileTest.java
+++ b/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/config/ConfigFileTest.java
@@ -24,6 +24,8 @@ import java.util.concurrent.*;
 
 import org.apache.juneau.*;
 import org.apache.juneau.annotation.*;
+import org.apache.juneau.config.encode.*;
+import org.apache.juneau.config.listener.*;
 import org.apache.juneau.json.*;
 import org.apache.juneau.parser.*;
 import org.apache.juneau.svl.*;
@@ -611,20 +613,20 @@ public class ConfigFileTest {
 			final int[] count = new int[]{0};
 
 			cf.addListener(
-				new ConfigFileListener() {
-					@Override /* ConfigFileListener */
+				new ConfigListener() {
+					@Override /* ConfigListener */
 					public void onLoad(ConfigFile f) {
 						super.onLoad(f);
 						changes.add("<load>");
 						count[0]++;
 					}
-					@Override /* ConfigFileListener */
+					@Override /* ConfigListener */
 					public void onSave(ConfigFile f) {
 						super.onSave(f);
 						changes.add("<save>");
 						count[0]++;
 					}
-					@Override /* ConfigFileListener */
+					@Override /* ConfigListener */
 					public void onChange(ConfigFile f, Set<String> ss) {
 						super.onChange(f, ss);
 						for (String sss : ss)
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index e22fb66..089c8e0 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -5009,8 +5009,8 @@
 	<ck>password*</ck> = <cv>{AwwJVhwUQFZEMg==}</cv>
 		</p>
 		<p>
-			The default encoder is {@link org.apache.juneau.config.XorEncoder} which is a simple XOR+Base64
encoder.
-			<br>If desired, custom encoder can be used by implementing the {@link org.apache.juneau.config.Encoder}
+			The default encoder is {@link org.apache.juneau.config.encode.XorEncoder} which is a simple
XOR+Base64 encoder.
+			<br>If desired, custom encoder can be used by implementing the {@link org.apache.juneau.config.encode.Encoder}
 			interface and creating your own <code>ConfigFileBuilder</code> using the 
 			{@link org.apache.juneau.config.ConfigFileBuilder#encoder(Encoder)} method.
 		</p>
@@ -5024,18 +5024,18 @@
 			The following method is provided for listening to changes made on config files:
 		</p>
 		<p>
-			{@link org.apache.juneau.config.ConfigFile#addListener(ConfigFileListener)}.
+			{@link org.apache.juneau.config.ConfigFile#addListener(ConfigListener)}.
 		</p>
 		<p>
 			Subclasses are provided for listening for different kinds of events:
 		</p>
 		<ul class='spaced-list'>
 			<li>
-				{@link org.apache.juneau.config.ConfigFileListener} - Config file is saved, loaded, or
modified.
+				{@link org.apache.juneau.config.listener.ConfigListener} - Config file is saved, loaded,
or modified.
 			<li>
-				{@link org.apache.juneau.config.SectionListener} - One or more entries in a section are
modified.
+				{@link org.apache.juneau.config.listener.SectionListener} - One or more entries in a
section are modified.
 			<li>
-				{@link org.apache.juneau.config.EntryListener} - An individual entry is modified.
+				{@link org.apache.juneau.config.listener.EntryListener} - An individual entry is modified.
 		</ul>
 		
 		<h5 class="topic">Example:</h5>
@@ -18234,7 +18234,7 @@
 							<li>{@link org.apache.juneau.config.ConfigFile#getSectionMap(String)} - Get
all the resolved values in a section.
 							<li>{@link org.apache.juneau.config.ConfigFile#containsNonEmptyValue(String)}

 							<li>{@link org.apache.juneau.config.ConfigFile#isEncoded(String)} 
-							<li>{@link org.apache.juneau.config.ConfigFile#addListener(ConfigFileListener)}
- Listen for modification events on the config file.
+							<li><code><del>org.apache.juneau.config.ConfigFile.addListener(ConfigFileListener)</del></code>
- Listen for modification events on the config file.
 							<li>{@link org.apache.juneau.config.ConfigFile#merge(ConfigFile)} - Merge the
contents of another config file into this config file.
 							<li>{@link org.apache.juneau.config.ConfigFile#getResolving()}, <del><code>ConfigFile.getResolving(StringVarResolver)</code></del>
- Return an instance of the config file that resolves string variables.
 								Much more efficient than the previous design since the same underlying config file
object is shared.
@@ -18253,13 +18253,13 @@
 						</ul>
 					<li>New interfaces:
 						<ul>
-							<li>{@link org.apache.juneau.config.ConfigFileListener}
-							<li>{@link org.apache.juneau.config.SectionListener}
-							<li>{@link org.apache.juneau.config.EntryListener} 
+							<li><code><del>org.apache.juneau.config.ConfigFileListener</del></code>
+							<li><code><del>org.apache.juneau.config.SectionListener</del></code>
+							<li><code><del>org.apache.juneau.config.EntryListener</del></code>

 						</ul>
-					<li>{@link org.apache.juneau.config.Encoder} methods have access to field names
to use them as salt values.
+					<li><code><del>org.apache.juneau.config.Encoder</del></code>
methods have access to field names to use them as salt values.
 					<li>The name of the default section is now <js>"default"</js>.  Before
it was just <jk>null</jk>.
-					<li>{@link org.apache.juneau.config.XorEncoder} XOR key can be overridden through
the <js>"org.apache.juneau.config.XorEncoder.key"</js> system property.
+					<li><code><del>org.apache.juneau.config.XorEncoder</del></code>
XOR key can be overridden through the <js>"org.apache.juneau.config.XorEncoder.key"</js>
system property.
 				</ul> 
 			<li>Support for converting Strings to POJOs if the POJO class has any of the following
static methods: 
 				<ul>
diff --git a/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/Microservice.java
b/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/Microservice.java
index 5e0b695..8ee55f1 100755
--- a/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/Microservice.java
+++ b/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/Microservice.java
@@ -25,6 +25,7 @@ import java.util.logging.*;
 
 import org.apache.juneau.*;
 import org.apache.juneau.config.*;
+import org.apache.juneau.config.listener.*;
 import org.apache.juneau.config.vars.*;
 import org.apache.juneau.internal.*;
 import org.apache.juneau.microservice.console.*;
@@ -577,12 +578,12 @@ public abstract class Microservice {
 		// --------------------------------------------------------------------------------
 		// Add a config file change listener.
 		// --------------------------------------------------------------------------------
-		cf.addListener(new ConfigFileListener() {
-			@Override /* ConfigFileListener */
+		cf.addListener(new ConfigListener() {
+			@Override /* ConfigListener */
 			public void onSave(ConfigFile cf) {
 				onConfigSave(cf);
 			}
-			@Override /* ConfigFileListener */
+			@Override /* ConfigListener */
 			public void onChange(ConfigFile cf, Set<String> changes) {
 				onConfigChange(cf, changes);
 			}

-- 
To stop receiving notification emails like this one, please contact
jamesbognar@apache.org.

Mime
View raw message