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 6517c1f Javadoc updates. 6517c1f is described below commit 6517c1f7805241d37bca1f64accc1dd14d8748a7 Author: JamesBognar <jamesbog...@apache.org> AuthorDate: Thu Feb 8 19:18:13 2018 -0500 Javadoc updates. --- .../java/org/apache/juneau/ini/ConfigFile.java | 4 +- .../org/apache/juneau/ini/ConfigFileBuilder.java | 5 + .../java/org/apache/juneau/ini/ConfigFileImpl.java | 5 + .../org/apache/juneau/ini/ConfigFileListener.java | 6 +- .../org/apache/juneau/ini/ConfigFileWrapped.java | 7 +- .../org/apache/juneau/ini/ConfigFileWritable.java | 5 + .../main/java/org/apache/juneau/ini/Encoder.java | 5 + .../java/org/apache/juneau/ini/EntryListener.java | 6 +- .../org/apache/juneau/ini/SectionListener.java | 7 +- .../java/org/apache/juneau/ini/XorEncoder.java | 5 + .../juneau/ini/{Encoder.java => package-info.java} | 23 +- .../main/java/org/apache/juneau/ini/package.html | 661 ------------------- .../org/apache/juneau/ini/vars/ConfigFileVar.java | 1 + .../doc-files/MicroserviceServer.Building.1.png | Bin 2633 -> 0 bytes .../doc-files/MicroserviceServer.Building.2.png | Bin 8634 -> 0 bytes .../doc-files/MicroserviceServer.Installing.3.png | Bin 20755 -> 0 bytes .../src/main/javadoc/doc-files/Microservices.1.png | Bin 22345 -> 0 bytes .../{HtmlRender_1.png => ReleaseNotes.630.1.png} | Bin ...{NewExamplesPage.png => ReleaseNotes.630.2.png} | Bin ...ng => ReleaseNotes.631.ContentTypeMenuItem.png} | Bin ...sStyle.png => ReleaseNotes.631.DevopsStyle.png} | Bin ...htStyle.png => ReleaseNotes.631.LightStyle.png} | Bin ...tyle.png => ReleaseNotes.631.OriginalStyle.png} | Bin ...Item.png => ReleaseNotes.631.QueryMenuItem.png} | Bin ...Item.png => ReleaseNotes.631.StyleMenuItem.png} | Bin ...arkStyle.png => ReleaseNotes.632.DarkStyle.png} | Bin ...oreAdd.png => ReleaseNotes.632.PetStoreAdd.png} | Bin .../main/javadoc/doc-files/Server.Html.french.png | Bin 166608 -> 0 bytes .../src/main/javadoc/doc-files/Server.Html.png | Bin 122741 -> 0 bytes .../src/main/javadoc/doc-files/Server.Json.png | Bin 29692 -> 0 bytes .../src/main/javadoc/doc-files/Server.N3.png | Bin 45391 -> 0 bytes .../src/main/javadoc/doc-files/Server.NTuple.png | Bin 55713 -> 0 bytes .../src/main/javadoc/doc-files/Server.Options.png | Bin 583155 -> 0 bytes .../src/main/javadoc/doc-files/Server.RdfXml.png | Bin 45274 -> 0 bytes .../main/javadoc/doc-files/Server.SimpleXml.png | Bin 36746 -> 0 bytes .../doc-files/Server.SystemPropertiesResource.png | Bin 98276 -> 0 bytes .../src/main/javadoc/doc-files/Server.Turtle.png | Bin 45180 -> 0 bytes .../src/main/javadoc/doc-files/Server.Xml.png | Bin 45446 -> 0 bytes .../doc-files/juneau-config.Serializing.1.png | Bin .../doc-files/juneau-config.Serializing.2.png | Bin .../doc-files/juneau-config.Serializing.3.png | Bin ...late.import1.png => juneau-examples-core.1.png} | Bin ...core.import2.png => juneau-examples-core.2.png} | Bin ...core.import3.png => juneau-examples-core.3.png} | Bin .../doc-files/juneau-examples-core.import1.png | Bin 84524 -> 0 bytes ...rest.import1.png => juneau-examples-rest.1.png} | Bin ...rest.import2.png => juneau-examples-rest.2.png} | Bin ...rest.import3.png => juneau-examples-rest.3.png} | Bin ...rest.import4.png => juneau-examples-rest.4.png} | Bin ...=> juneau-microservice-server.Installing.1.png} | Bin ...=> juneau-microservice-server.Installing.2.png} | Bin ...neau-microservice-server.ResourceClasses.1.png} | Bin ...ng => juneau-microservice-server.Running.1.png} | Bin .../juneau-microservice-template.import2.png | Bin 101323 -> 0 bytes .../juneau-microservice-template.import3.png | Bin 127563 -> 0 bytes .../juneau-microservice-template.import4.png | Bin 77752 -> 0 bytes ... => juneau-rest-server.HelloWorldExample.1.png} | Bin ...s.png => juneau-rest-server.OptionsPages.1.png} | Bin ... juneau-rest-server.PredefinedLabelBeans.1.png} | Bin ... juneau-rest-server.PredefinedLabelBeans.2.png} | Bin ... juneau-rest-server.PredefinedLabelBeans.3.png} | Bin ...-rest-server.RemoteableProxiesServerSide.1.png} | Bin ...-rest-server.RemoteableProxiesServerSide.2.png} | Bin ...-rest-server.RemoteableProxiesServerSide.3.png} | Bin ...-rest-server.RemoteableProxiesServerSide.4.png} | Bin ...-rest-server.RemoteableProxiesServerSide.5.png} | Bin ...-rest-server.RemoteableProxiesServerSide.6.png} | Bin ...es.png => juneau-rest-server.RouterPages.1.png} | Bin ....1.png => juneau-rest-server.Stylesheets.1.png} | Bin ....2.png => juneau-rest-server.Stylesheets.2.png} | Bin ....3.png => juneau-rest-server.Stylesheets.3.png} | Bin ...ng => juneau-rest-server.UiCustomization.1.png} | Bin ...ng => juneau-rest-server.UiCustomization.2.png} | Bin ...ng => juneau-rest-server.UiCustomization.3.png} | Bin juneau-doc/src/main/javadoc/overview.html | 696 +++++++++++++++++++-- 75 files changed, 685 insertions(+), 751 deletions(-) diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFile.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFile.java index f879a0d..452a154 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFile.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFile.java @@ -34,8 +34,8 @@ import org.apache.juneau.svl.*; * Implements the API for accessing the contents of a config file. * * <h5 class='section'>See Also:</h5> - * <ul> - * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.ini</a> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config'>Overview > juneau-config</a> * </ul> */ public abstract class ConfigFile implements Map<String,Section> { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java index 8f573d8..fe21db6 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileBuilder.java @@ -34,6 +34,11 @@ import org.apache.juneau.utils.*; * ConfigFile cf = ConfigFile.<jsm>create</jsm>().build(<js>"MyConfig.cfg"</js>); * String setting = cf.get(<js>"MySection/mysetting"</js>); * </p> + * + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config'>Overview > juneau-config</a> + * </ul> */ public class ConfigFileBuilder { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java index 820abb8..49c8232 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileImpl.java @@ -33,6 +33,11 @@ import org.apache.juneau.svl.vars.*; /** * Implementation class for {@link ConfigFile}. + * + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config'>Overview > juneau-config</a> + * </ul> */ public final class ConfigFileImpl extends ConfigFile { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileListener.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileListener.java index 2cb5453..0892ba1 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileListener.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileListener.java @@ -17,8 +17,10 @@ import java.util.*; /** * Listener that can be used to listen for change events in config files. * - * <p> - * Use the {@link ConfigFile#addListener(ConfigFileListener)} method to register listeners. + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config.Listeners'>Overview > juneau-config > Listeners</a> + * </ul> */ public class ConfigFileListener { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java index 11dd437..789d876 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileWrapped.java @@ -33,7 +33,12 @@ import org.apache.juneau.svl.*; * * <p> * This class overrides the {@link #getString(String, String)} to resolve string variables. - * All other method calls are passed through to the inner config file. + * <br>All other method calls are passed through to the inner config file. + * + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config'>Overview > juneau-config</a> + * </ul> */ public final class ConfigFileWrapped extends ConfigFile { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileWritable.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileWritable.java index b8c504c..7849d6a 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileWritable.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/ConfigFileWritable.java @@ -19,6 +19,11 @@ import org.apache.juneau.http.*; /** * Wraps a {@link ConfigFile} in a {@link Writable} to be rendered as plain text. + * + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config'>Overview > juneau-config</a> + * </ul> */ class ConfigFileWritable implements Writable { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/Encoder.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/Encoder.java index 5be664e..9910ceb 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/Encoder.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/Encoder.java @@ -14,6 +14,11 @@ package org.apache.juneau.ini; /** * API for defining a string encoding/decoding mechanism for entries in {@link ConfigFile}. + * + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config.EncodedEntries'>Overview > juneau-config > Encoded Entries</a> + * </ul> */ public interface Encoder { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/EntryListener.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/EntryListener.java index a3c3346..b4e6b7a 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/EntryListener.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/EntryListener.java @@ -17,8 +17,10 @@ import java.util.*; /** * Listener that can be used to listen for change events for a specific entry in a config file. * - * <p> - * Use the {@link ConfigFile#addListener(ConfigFileListener)} method to register listeners. + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config.Listeners'>Overview > juneau-config > Listeners</a> + * </ul> */ public class EntryListener extends ConfigFileListener { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/SectionListener.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/SectionListener.java index 5c6271b..2740a88 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/SectionListener.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/SectionListener.java @@ -19,8 +19,11 @@ import java.util.*; /** * Listener that can be used to listen for change events for a specific section in a config file. * - * <p> - * Use the {@link ConfigFile#addListener(ConfigFileListener)} method to register listeners. + * + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config.Listeners'>Overview > juneau-config > Listeners</a> + * </ul> */ public class SectionListener extends ConfigFileListener { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/XorEncoder.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/XorEncoder.java index de810d3..b473d6e 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/XorEncoder.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/XorEncoder.java @@ -20,6 +20,11 @@ import static org.apache.juneau.internal.IOUtils.*; * * <p> * This is not intended to be used as strong encryption. + * + * <h5 class='section'>See Also:</h5> + * <ul class='doctree'> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#juneau-config.EncodedEntries'>Overview > juneau-config > Encoded Entries</a> + * </ul> */ public final class XorEncoder implements Encoder { diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/Encoder.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/package-info.java old mode 100644 new mode 100755 similarity index 72% copy from juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/Encoder.java copy to juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/package-info.java index 5be664e..01c171b --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/Encoder.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/package-info.java @@ -10,28 +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.ini; /** - * API for defining a string encoding/decoding mechanism for entries in {@link ConfigFile}. + * INI File Support */ -public interface Encoder { - - /** - * Encode a string. - * - * @param fieldName The field name being encoded. - * @param in The unencoded input string. - * @return The encoded output string. - */ - public String encode(String fieldName, String in); +package org.apache.juneau.ini; - /** - * Decode a string. - * - * @param fieldName The field name being decoded. - * @param in The encoded input string. - * @return The decoded output string. - */ - public String decode(String fieldName, String in); -} diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/package.html b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/package.html deleted file mode 100644 index aa13cca..0000000 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/package.html +++ /dev/null @@ -1,661 +0,0 @@ -<!DOCTYPE HTML> -<!-- -/*************************************************************************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an - * "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. - * - ***************************************************************************************************************************/ - --> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <style type="text/css"> - /* For viewing in Page Designer */ - @IMPORT url("../../../../../../javadoc.css"); - - /* For viewing in REST interface */ - @IMPORT url("../htdocs/javadoc.css"); - body { - margin: 20px; - } - </style> - <script> - /* Replace all @code and @link tags. */ - window.onload = function() { - document.body.innerHTML = document.body.innerHTML.replace(/\{\@code ([^\}]+)\}/g, '<code>$1</code>'); - document.body.innerHTML = document.body.innerHTML.replace(/\{\@link (([^\}]+)\.)?([^\.\}]+)\}/g, '<code>$3</code>'); - } - </script> -</head> -<body> -<p>INI File Support</p> - -<script> - function toggle(x) { - var div = x.nextSibling; - while (div != null && div.nodeType != 1) - div = div.nextSibling; - if (div != null) { - var d = div.style.display; - if (d == 'block' || d == '') { - div.style.display = 'none'; - x.className += " closed"; - } else { - div.style.display = 'block'; - x.className = x.className.replace(/(?:^|\s)closed(?!\S)/g , '' ); - } - } - } -</script> - -<a id='TOC'></a><h5 class='toc'>Table of Contents</h5> -<ol class='toc'> - <li><p><a class='doclink' href='#Overview'>Overview</a></p> - <li><p><a class='doclink' href='#Variables'>Variables</a></p> - <li><p><a class='doclink' href='#Encoded'>Encoded Entries</a></p> - <li><p><a class='doclink' href='#Listeners'>Listeners</a></p> - <li><p><a class='doclink' href='#CommandLine'>Command Line API</a></p> - <li><p><a class='doclink' href='#Serializing'>Serializing Config Files</a></p> - <li><p><a class='doclink' href='#Merging'>Merging Config Files</a></p> -</ol> - -<!-- ======================================================================================================== --> -<a id="Overview"></a> -<h2 class='topic' onclick='toggle(this)'>1 - Overview</h2> -<div class='topic'> - <p> - The {@link org.apache.juneau.ini.ConfigFileBuilder} and {@link org.apache.juneau.ini.ConfigFile} classes - implement an API for working with INI-style configuration files such as the following: - </p> - <p class='bcode'> - <cc>#--------------------------</cc> - <cc># Default section</cc> - <cc>#--------------------------</cc> - <ck>key1</ck> = <cv>1</cv> - <ck>key2</ck> = <cv>true</cv> - <ck>key3</ck> = <cv>1,2,3</cv> - <ck>key4</ck> = <cv>http://foo</cv> - - <cc>#--------------------------</cc> - <cc># A comment about Section 1</cc> - <cc>#--------------------------</cc> - <cs>[Section1]</cs> - <ck>key1</ck> = <cv>2</cv> - <ck>key2</ck> = <cv>false</cv> - <ck>key3</ck> = <cv>4,5,6</cv> - <ck>key4</ck> = <cv>http://bar</cv> - </p> - - <p> - The {@link org.apache.juneau.ini.ConfigFileBuilder} class is used to instantiate instances of - {@link org.apache.juneau.ini.ConfigFile} which can then be used to retrieve config file values through either - <js>"key"</js> or <js>"Section/key"</js> identifiers. - </p> - - <p class='bcode'> - <jk>int</jk> key1; - <jk>boolean</jk> key2; - <jk>int</jk>[] key3; - URL key4; - - <jc>// Get our config file using the default config manager</jc> - ConfigFile f = ConfigFile.<jsm>create</jsm>().build(<js>"C:/temp/MyConfig.cfg"</js>); - - <jc>// Read values from default section</jc> - key1 = f.getInt(<js>"key1"</js>); - key2 = f.getBoolean(<js>"key2"</js>); - key3 = f.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"key3"</js>); - key4 = f.getObject(URL.<jk>class</jk>, <js>"key4"</js>); - - <jc>// Read values from Section #1</jc> - key1 = f.getInt(<js>"Section1/key1"</js>); - key2 = f.getBoolean(<js>"Section1/key2"</js>); - key3 = f.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"Section1/key3"</js>); - key4 = f.getObject(URL.<jk>class</jk>, <js>"Section1/key4"</js>); - </p> - - <p> - The interface also allows config files to be constructed programmatically... - </p> - - <p class='bcode'> - <jc>// Construct the sample INI file programmatically</jc> - ConfigFile f = ConfigFile.<jsm>create</jsm>().build(<js>"C:/temp/MyConfig.cfg"</js>, <jk>true</jk>) - .addLines(<jk>null</jk>, <jc>// The default 'null' section</jc> - <js>"# Default section"</js>, <jc>// A regular comment</jc> - <js>"key1 = 1"</js>, <jc>// A numeric entry</jc> - <js>"key2 = true"</js>, <jc>// A boolean entry</jc> - <js>"key3 = 1,2,3"</js>, <jc>// An array entry</jc> - <js>"key4 = http://foo"</js>, <jc>// A POJO entry</jc> - <js>""</js>) <jc>// A blank line</jc> - .addHeaderComments(<js>"Section1"</js>, <jc>// The 'Section1' section</jc> - <js>"A comment about Section 1"</js>) <jc>// A header comment</jc> - .addLines(<js>"Section1"</js>, <jc>// The 'Section1' section</jc> - <js>"key1 = 2"</js>, <jc>// A numeric entry</jc> - <js>"key2 = false"</js>, <jc>// A boolean entry</jc> - <js>"key3 = 4,5,6"</js>, <jc>// An array entry</jc> - <js>"key4 = http://bar"</js>) <jc>// A POJO entry</jc> - .save(); <jc>// Save to MyConfig.cfg</jc> - </p> - - <p> - The following is equivalent, except uses {@link org.apache.juneau.ini.ConfigFile#put(String,Object)} to set values. - Note how we're setting values as POJOs which will be automatically converted to strings when persisted to disk. - <p class='bcode'> - <jc>// Construct the sample INI file programmatically</jc> - ConfigFile f = ConfigFile.<jsm>create</jsm>().build(<js>"C:/temp/MyConfig.cfg"</js>, <jk>true</jk>) - .addLines(<jk>null</jk>, - <js>"# Default section"</js>) - .addHeaderComments(<js>"Section1"</js>, - <js>"A comment about Section 1"</js>); - cf.put(<js>"key1"</js>, 1); - cf.put(<js>"key2"</js>, <jk>true</jk>); - cf.put(<js>"key3"</js>, <jk>new int</jk>[]{1,2,3}); - cf.put(<js>"key4"</js>, <jk>new</jk> URL(<js>"http://foo"</js>)); - cf.put(<js>"Section1/key1"</js>, 2); - cf.put(<js>"Section1/key2"</js>, <jk>false</jk>); - cf.put(<js>"Section1/key3"</js>, <jk>new int</jk>[]{4,5,6}); - cf.put(<js>"Section1/key4"</js>, <jk>new</jk> URL(<js>"http://bar"</js>)); - cf.save(); - </p> - <p> - Refer to {@link org.apache.juneau.ini.ConfigFile#put(String,Object,boolean)} for a description of - formats for various data types. - </p> - <p> - Various convenience getter methods are provided for retrieving different data types: - </p> - <p class='bcode'> - <jc>// Strings with default values</jc> - <jc>// key1 = foobar</jc> - String key1 = cf.getString(<js>"key1"</js>); - - <jc>// Numbers</jc> - <jc>// key2 = 123</jc> - <jk>float</jk> key2 = cf.getObject(<jk>float</jk>.<jk>class</jk>, <js>"key2"</js>); - - <jc>// Booleans</jc> - <jc>// key3 = true</jc> - <jk>boolean</jk> key3 = cf.getBoolean(<js>"key3"</js>); - - <jc>// Objects convertable to and from strings using the JSON serializer and parser</jc> - <jc>// key4 = http://foo</jc> - URL key4 = cf.getObject(URL.<jk>class</jk>, <js>"key4"</js>); - - <jc>// Arrays of strings</jc> - <jc>// key5 = foo, bar</jc> - String[] key5 = cf.getStringArray(<js>"key5"</js>); - - <jc>// Arrays of objects</jc> - <jc>// key6 = http://foo,http://bar</jc> - URL[] key6 = cf.getObject(URL[].<jk>class</jk>, <js>"key6"</js>); - - <jc>// Arrays of primitives</jc> - <jc>// key7 = 1,2,3</jc> - <jk>int</jk>[] key7 = cf.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"key7"</js>); - - <jc>// Enums</jc> - <jc>// key8 = MINUTES</jc> - TimeUnit key8 = cf.getObject(TimeUnit.<jk>class</jk>, <js>"key8"</js>); - - <jc>// Beans</jc> - <jc>// key9 = {name:'John Smith', addresses:[{street:'101 Main St', city:'Anywhere', state:'TX'}]}</jc> - Person key9 = cf.getObject(Person.<jk>class</jk>, <js>"key9"</js>); - - <jc>// Generic Maps</jc> - <jc>// key10 = {foo:'bar', baz:123}</jc> - Map key10 = cf.getObject(ObjectMap.<jk>class</jk>, <js>"key10"</js>); - </p> -</div> - -<!-- ======================================================================================================== --> -<a id="Variables"></a> -<h2 class='topic' onclick='toggle(this)'>2 - Variables</h2> -<div class='topic'> - <p> - Config files can contain variables that get resolved dynamically using the - {@link org.apache.juneau.svl.VarResolver} API. - </p> - <p> - Resolving config files can be retrieved through the following methods: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.ini.ConfigFile#getResolving()} - Returns a config file that resolves a default - set of variables. - <li> - {@link org.apache.juneau.ini.ConfigFile#getResolving(VarResolver)} - Returns a config file that resolves - a custom set of variables. - </ul> - <p> - The default {@link org.apache.juneau.ini.ConfigFile#getResolving()} method returns a config file that resolves - the following variables: - </p> - <ul class='spaced-list'> - <li> - <code>$S{key}</code>, <code>$S{key,default}</code> - System properties. - <li> - <code>$E{key}</code>, <code>$E{key,default}</code> - Environment variables. - <li> - <code>$C{key}</code>, <code>$C{key,default}</code> - Values in this configuration file. - </ul> - - <h5 class='topic'>Examples:</h5> - <p class='bcode'> - <cc>#--------------------------</cc> - <cc># Examples </cc> - <cc>#--------------------------</cc> - <cs>[MyProperties]</cs> - <ck>javaHome</ck> = <cv>$S{java.home}</cv> - <ck>path</ck> = <cv>$E{PATH}</cv> - <ck>customMessage</ck> = <cv>Java home is $C{MyProperties/javaHome} and the environment path is $C{MyProperties/path}.</cv> - </p> - <p> - Support for variables is extensible. You can add support for your own variables by implementing custom - {@link org.apache.juneau.svl.VarResolver VarResolvers}. - <br>For example, the microservice <code>Resource</code> class provides access to config files that - can contain any of the following variables: - </p> - <ul> - <li><code>$C</code> - Config variables. - <li><code>$S</code> - System properties. - <li><code>$E</code> - Environment variables. - <li><code>$I</code> - Servlet init parameters. - <li><code>$ARG</code> - JVM command-line arguments. - <li><code>$MF</code> - Main jar manifest file entries. - <li><code>$L</code> - Localized strings. - <li><code>$A</code> - HTTP request attributes. - <li><code>$P</code> - HTTP request URL parameters. - <li><code>$R</code> - HTTP request variables. - <li><code>$UE</code> - URL-encoding function. - </ul> -</div> - -<!-- ======================================================================================================== --> -<a id="Encoded"></a> -<h2 class='topic' onclick='toggle(this)'>3 - Encoded Entries</h2> -<div class='topic'> - <p> - If a config file contains sensitive information such as passwords, those values can be - marked for encoding by appending <js>'*'</js> to the end of the key name. - <br>If a marked and unencoded value is detected in the file during load, it will be encoded and saved immediately. - </p> - <p> - For example, the following password is marked for encoding.... - </p> - <p class='bcode'> - <cs>[MyHost]</cs> - <ck>url</ck> = <cv>http://localhost:9080/foo</cv> - <ck>user</ck> = <cv>me</cv> - <ck>password*</ck> = <cv>mypassword</cv> - </p> - <p> - After initial loading, the file contents will contain an encoded value... - </p> - <p class='bcode'> - <cs>[MyHost]</cs> - <ck>url</ck> = <cv>http://localhost:9080/foo</cv> - <ck>user</ck> = <cv>me</cv> - <ck>password*</ck> = <cv>{AwwJVhwUQFZEMg==}</cv> - </p> - <p> - The default encoder is {@link org.apache.juneau.ini.XorEncoder} which is a simple XOR+Base64 encoder. - <br>If desired, custom encoder can be used by implementing the {@link org.apache.juneau.ini.Encoder} - interface and creating your own <code>ConfigFileBuilder</code> using the - {@link org.apache.juneau.ini.ConfigFileBuilder#encoder(Encoder)} method. - </p> -</div> - -<!-- ======================================================================================================== --> -<a id="Listeners"></a> -<h2 class='topic' onclick='toggle(this)'>4 - Listeners</h2> -<div class='topic'> - <p> - The following method is provided for listening to changes made on config files: - </p> - <p> - {@link org.apache.juneau.ini.ConfigFile#addListener(ConfigFileListener)}. - </p> - <p> - Subclasses are provided for listening for different kinds of events: - </p> - <ul class='spaced-list'> - <li> - {@link org.apache.juneau.ini.ConfigFileListener} - Config file is saved, loaded, or modified. - <li> - {@link org.apache.juneau.ini.SectionListener} - One or more entries in a section are modified. - <li> - {@link org.apache.juneau.ini.EntryListener} - An individual entry is modified. - </ul> - - <h5 class="topic">Example:</h5> - <p class='bcode'> - <jc>// Get our config file using the default config manager</jc> - ConfigFile f = ConfigFile.<jsm>create</jsm>().build(<js>"C:/temp/MyConfig.cfg"</js>); - - <jc>// Add a listener for an entry</jc> - f.addListener( - <jk>new</jk> EntryListener(<js>"Section1/key1"</js>) { - <ja>@Override</ja> - <jk>public void</jk> onChange(ConfigFile cf) { - System.<jsf>err</jsf>.println(<js>"Entry changed! New value is "</js> + cf.getString(<js>"Section1/key1"</js>)); - } - } - ); - </p> -</div> - -<!-- ======================================================================================================== --> -<a id="CommandLine"></a> -<h2 class='topic' onclick='toggle(this)'>5 - Command Line API</h2> -<div class='topic'> - <p> - The {@link org.apache.juneau.ini.ConfigFileBuilder} class contains a - {@link org.apache.juneau.ini.ConfigFileBuilder#main(String[])} method that can be used to work with config - files through a command-line prompt. - <br>This is invoked as a normal Java command: - </p> - <p class='bcode'> - java -jar juneau.jar org.apache.juneau.ini.ConfigFileBuilder [args] - </p> - <p> - Arguments can be any of the following... - </p> - <ul class='spaced-list'> - <li> - No arguments - <br>Prints usage message. - <li> - <code>createBatchEnvFile -configfile <configFile> -envfile <batchFile> [-verbose]</code> - <br>Creates a batch file that will set each config file entry as an environment variable. - <br>Characters in the keys that are not valid as environment variable names (e.g. <js>'/'</js> and <js>'.'</js>) - will be converted to underscores. - <li> - <code>createShellEnvFile -configFile <configFile> -envFile <configFile> [-verbose]</code> - Creates a shell script that will set each config file entry as an environment variable. - <br>Characters in the keys that are not valid as environment variable names (e.g. <js>'/'</js> and <js>'.'</js>) - will be converted to underscores. - <li> - <code>setVals -configFile <configFile> -vals [var1=val1 [var2=val2...]] [-verbose]</code> - Sets values in config files. - </ul> - <p> - For example, the following command will create the file <code>'MyConfig.bat'</code> from the contents of the - file <code>'MyConfig.cfg'</code>. - </p> - <p class='bcode'> - java org.apache.juneau.ini.ConfigFileBuilder createBatchEnvFile -configfile C:\foo\MyConfig.cfg -batchfile C:\foo\MyConfig.bat - </p> -</div> - -<!-- ======================================================================================================== --> -<a id="Serializing"></a> -<h2 class='topic' onclick='toggle(this)'>6 - Serializing Config Files</h2> -<div class='topic'> - <p> - Instances of {@link org.apache.juneau.ini.ConfigFile} are POJOs that can be serialized to and parsed from - all supported Juneau languages. - </p> - <p> - The <code>org.apache.juneau.microservice.resources.ConfigResource</code> is a predefined REST interface that - allows access to the config file used by a microservice. - <br>The <code>juneau-examples-rest</code> project is a microservice that includes this resource - at <code>http://localhost:10000/sample/config</code>. - <br>The sample microservice uses the following config file <code>juneau-examples.cfg</code>: - </p> - <p class='bcode'> - <cc>#================================================================================ - # Basic configuration file for SaaS microservices - # Subprojects can use this as a starting point. - #================================================================================</cc> - - <cc>#================================================================================ - # REST settings - #================================================================================</cc> - <cs>[REST]</cs> - - <cc># The HTTP port number to use. - # Default is Rest-Port setting in manifest file, or 8000.</cc> - <ck>port</ck> = <cv>10000</cv> - - <cc># A JSON map of servlet paths to servlet classes. - # Example: - # resourceMap = {'/*':'com.foo.MyServlet'} - # Either resourceMap or resources must be specified.</cc> - <ck>resourceMap</ck> = - - <cc># A comma-delimited list of names of classes that extend from Servlet. - # Resource paths are pulled from @RestResource.path() annotation, or - # "/*" if annotation not specified. - # Example: - # resources = com.foo.MyServlet - # Default is Rest-Resources in manifest file. - # Either resourceMap or resources must be specified.</cc> - <ck>resources</ck> = - - <cc># The context root of the Jetty server. - # Default is Rest-ContextPath in manifest file, or "/".</cc> - <ck>contextPath</ck> = - - <cc># Authentication: NONE, BASIC.</cc> - <ck>authType</ck> = <cv>NONE</cv> - - <cc># The BASIC auth username. - # Default is Rest-LoginUser in manifest file.</cc> - <ck>loginUser</ck> = - - <cc># The BASIC auth password. - # Default is Rest-LoginPassword in manifest file.</cc> - <ck>loginPassword</ck> = - - <cc># The BASIC auth realm. - # Default is Rest-AuthRealm in manifest file.</cc> - <ck>authRealm</ck> = - - <cc># Stylesheet to use for HTML views. - # The default options are: - # - styles/juneau.css - # - styles/devops.css - # Other stylesheets can be referenced relative to the servlet package or working - # directory.</cc> - <ck>stylesheet</ck> = <cv>styles/devops.css</cv> - - <cc># What to do when the config file is saved. - # Possible values: - # NOTHING - Don't do anything. - # RESTART_SERVER - Restart the Jetty server. - # RESTART_SERVICE - Shutdown and exit with code '3'.</cc> - <ck>saveConfigAction</ck> = <cv>RESTART_SERVER</cv> - - <cc># Enable SSL support.</cc> - <ck>useSsl</ck> = false - - <cc>#================================================================================ - # Bean properties on the org.eclipse.jetty.util.ssl.SslSocketFactory class - #-------------------------------------------------------------------------------- - # Ignored if REST/useSsl is false. - #================================================================================</cc> - <cs>[REST-SslContextFactory]</cs> - <ck>keyStorePath</ck> = <cv>client_keystore.jks</cv> - <ck>keyStorePassword*</ck> = <cv>{HRAaRQoT}</cv> - <ck>excludeCipherSuites</ck> = <cv>TLS_DHE.*, TLS_EDH.*</cv> - <ck>excludeProtocols</ck> = <cv>SSLv3</cv> - <ck>allowRenegotiate</ck> = <cv>false</cv> - - <cc>#================================================================================ - # Logger settings - # See FileHandler Java class for details. - #================================================================================</cc> - <cs>[Logging]</cs> - - <cc># The directory where to create the log file. - # Default is "."</cc> - <ck>logDir</ck> = <cv>logs</cv> - - <cc># The name of the log file to create for the main logger. - # The logDir and logFile make up the pattern that's passed to the FileHandler - # constructor. - # If value is not specified, then logging to a file will not be set up.</cc> - <ck>logFile</ck> = <cv>microservice.%g.log</cv> - - <cc># Whether to append to the existing log file or create a new one. - # Default is false.</cc> - <ck>append</ck> = - - <cc># The SimpleDateFormat format to use for dates. - # Default is "yyyy.MM.dd hh:mm:ss".</cc> - <ck>dateFormat</ck> = - - <cc># The log message format. - # The value can contain any of the following variables: - # {date} - The date, formatted per dateFormat. - # {class} - The class name. - # {method} - The method name. - # {logger} - The logger name. - # {level} - The log level name. - # {msg} - The log message. - # {threadid} - The thread ID. - # {exception} - The localized exception message. - # Default is "[{date} {level}] {msg}%n".</cc> - <ck>format</ck> = - - <cc># The maximum log file size. - # Suffixes available for numbers. - # See ConfigFile.getInt(String,int) for details. - # Default is 1M.</cc> - <ck>limit</ck> = <cv>10M</cv> - - <cc># Max number of log files. - # Default is 1.</cc> - <ck>count</ck> = <cv>5</cv> - - <cc># Default log levels. - # Keys are logger names. - # Values are serialized Level POJOs.</cc> - <ck>levels</ck> = <cv>{ org.apache.juneau:'INFO' }</cv> - - <cc># Only print unique stack traces once and then refer to them by a simple 8 character hash identifier. - # Useful for preventing log files from filling up with duplicate stack traces. - # Default is false.</cc> - <ck>useStackTraceHashes</ck> = <cv>true</cv> - - <cc># The default level for the console logger. - # Default is WARNING.</cc> - <ck>consoleLevel</ck> = - - <cc>#================================================================================ - # System properties - #-------------------------------------------------------------------------------- - # These are arbitrary system properties that are set during startup. - #================================================================================</cc> - <cs>[SystemProperties]</cs> - - <cc># Configure Jetty for StdErrLog Logging</cc> - <ck>org.eclipse.jetty.util.log.class</ck> = <cv>org.eclipse.jetty.util.log.StrErrLog</cv> - - <cc># Jetty logging level</cc> - <ck>org.eclipse.jetty.LEVEL</ck> = <cv>WARN</cv> - </p> - <p> - The config file looks deceivingly simple. - However, it should be noticed that the config file is a VERY powerful feature with many capabilities including: - </p> - <p> - When you point your browser to this resource, you'll notice that the contents of the config file are being - serialized to HTML as a POJO: - </p> - <img class='bordered' src="doc-files/config1.png"> - <p> - Likewise, the config file can also be serialized as any of the supported languages such as JSON: - </p> - <img class='bordered' src="doc-files/config2.png"> - <p> - The code for implementing this page could not be any simpler, since it simply returns the config file returned - by the <code>RestServlet.getConfig()</code> method. - </p> - <p class='bcode'> - <jd>/** - * [GET /] - Show contents of config file. - * - * <ja>@return</ja> The config file. - * <ja>@throws</ja> Exception - */</jd> - <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/"</js>, description=<js>"Show contents of config file."</js>) - <jk>public</jk> ConfigFile getConfigContents() <jk>throws</jk> Exception { - <jk>return</jk> getConfig(); - } - </p> - <p> - The edit page takes you to an editor that allows you to modify the contents of the config file: - </p> - <img class='bordered' src="doc-files/config3.png"> - <p> - This latter page uses the {@link org.apache.juneau.ini.ConfigFile#toString()} method to retrieve the - contents of the config file in INI format. - </p> - <p> - Since config files are serializable, that mean they can also be retrieved through the <code>RestClient</code> - API. - </p> - <p class='bcode'> - <jc>// Create a new REST client with JSON support</jc> - RestClient c = RestClient.<jsm>create</jsm>().build(); - - <jc>// Retrieve config file through REST interface</jc> - ConfigFile cf = c.doGet(<js>"http://localhost:10000/sample/config"</js>).getResponse(ConfigFileImpl.<jk>class</jk>); - </p> -</div> - -<!-- ======================================================================================================== --> -<a id="Merging"></a> -<h2 class='topic' onclick='toggle(this)'>7 - Merging Config Files</h2> -<div class='topic'> - <p> - In the previous example, an edit page was shown that allows you to edit config files through - a REST interface. - <br>Note that if only a single entry is modified in the config file, we only want to trigger - listeners for that change, not trigger all listeners. - <br>This is where the {@link org.apache.juneau.ini.ConfigFile#merge(ConfigFile)} method comes into play. - <br>This method will copy the contents of one config file over to another config file, but only - trigger listeners when the values are different. - </p> - <p> - The edit page is implemented with this method which is a simple PUT with the contents of the new INI file as - the body of the HTTP request: - </p> - <p class='bcode'> - <jd>/** - * [PUT /] - Sets contents of config file. - * - * <ja>@param</ja> contents The new contents of the config file. - * <ja>@return</ja> The new config file contents. - * <ja>@throws</ja> Exception - */</jd> - <ja>@RestMethod</ja>(name=<jsf>PUT</jsf>, path=<js>"/"</js>, - description=<js>"Sets contents of config file."</js>, - parameters={ - <ja>@Parameter</ja>(in=<js>"body"</js>, description=<js>"New contents in INI file format."</js>) - } - ) - <jk>public</jk> ConfigFile setConfigContents(<ja>@Body</ja> Reader contents) <jk>throws</jk> Exception { - - <jc>// Create a new in-memory config file based on the contents of the HTTP request.</jc> - ConfigFile cf2 = new ConfigFileBuilder.build().load(contents); - - <jc>// Merge the in-memory config file into the existing config file and save it. - // Then return the modified config file to be parsed as a POJO.</jc> - <jk>return</jk> getConfig().merge(cf2).save(); - } - </p> -</div> - -</body> -</html> \ No newline at end of file diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/vars/ConfigFileVar.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/vars/ConfigFileVar.java index 75f25df..4161f26 100644 --- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/vars/ConfigFileVar.java +++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/vars/ConfigFileVar.java @@ -46,6 +46,7 @@ import org.apache.juneau.svl.*; * <h5 class='section'>See Also:</h5> * <ul> * <li class='link'><a class="doclink" href="../../../../../overview-summary.html#juneau-svl.VarResolvers">Overview > juneau-svl > VarResolvers and VarResolverSessions</a> + * <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-config.Variables'>Overview > juneau-config > Variables</a> * </ul> */ public class ConfigFileVar extends DefaultingVar { diff --git a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Building.1.png b/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Building.1.png deleted file mode 100755 index 008c6b5..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Building.1.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Building.2.png b/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Building.2.png deleted file mode 100755 index 9e55346..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Building.2.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.3.png b/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.3.png deleted file mode 100755 index 21808c0..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.3.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Microservices.1.png b/juneau-doc/src/main/javadoc/doc-files/Microservices.1.png deleted file mode 100644 index e730d32..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Microservices.1.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/HtmlRender_1.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.630.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/HtmlRender_1.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.630.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/NewExamplesPage.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.630.2.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/NewExamplesPage.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.630.2.png diff --git a/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_ContentTypeMenuItem.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.ContentTypeMenuItem.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_ContentTypeMenuItem.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.ContentTypeMenuItem.png diff --git a/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_DevopsStyle.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.DevopsStyle.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_DevopsStyle.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.DevopsStyle.png diff --git a/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_LightStyle.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.LightStyle.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_LightStyle.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.LightStyle.png diff --git a/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_OriginalStyle.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.OriginalStyle.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_OriginalStyle.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.OriginalStyle.png diff --git a/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_QueryMenuItem.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.QueryMenuItem.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_QueryMenuItem.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.QueryMenuItem.png diff --git a/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_StyleMenuItem.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.StyleMenuItem.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_631_StyleMenuItem.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.631.StyleMenuItem.png diff --git a/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_632_DarkStyle.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.632.DarkStyle.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_632_DarkStyle.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.632.DarkStyle.png diff --git a/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_632_PetStoreAdd.png b/juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.632.PetStoreAdd.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/ReleaseNotes_632_PetStoreAdd.png rename to juneau-doc/src/main/javadoc/doc-files/ReleaseNotes.632.PetStoreAdd.png diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.Html.french.png b/juneau-doc/src/main/javadoc/doc-files/Server.Html.french.png deleted file mode 100644 index 015c5cc..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.Html.french.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.Html.png b/juneau-doc/src/main/javadoc/doc-files/Server.Html.png deleted file mode 100644 index b8881d8..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.Html.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.Json.png b/juneau-doc/src/main/javadoc/doc-files/Server.Json.png deleted file mode 100644 index 1bd3738..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.Json.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.N3.png b/juneau-doc/src/main/javadoc/doc-files/Server.N3.png deleted file mode 100644 index 8ada07c..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.N3.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.NTuple.png b/juneau-doc/src/main/javadoc/doc-files/Server.NTuple.png deleted file mode 100644 index 1e25554..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.NTuple.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.Options.png b/juneau-doc/src/main/javadoc/doc-files/Server.Options.png deleted file mode 100644 index fee32de..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.Options.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.RdfXml.png b/juneau-doc/src/main/javadoc/doc-files/Server.RdfXml.png deleted file mode 100644 index 7a8b02c..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.RdfXml.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.SimpleXml.png b/juneau-doc/src/main/javadoc/doc-files/Server.SimpleXml.png deleted file mode 100644 index 9eb1fcd..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.SimpleXml.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.SystemPropertiesResource.png b/juneau-doc/src/main/javadoc/doc-files/Server.SystemPropertiesResource.png deleted file mode 100644 index 5cce399..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.SystemPropertiesResource.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.Turtle.png b/juneau-doc/src/main/javadoc/doc-files/Server.Turtle.png deleted file mode 100644 index 77ec6ad..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.Turtle.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/Server.Xml.png b/juneau-doc/src/main/javadoc/doc-files/Server.Xml.png deleted file mode 100644 index 1012ea0..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/Server.Xml.png and /dev/null differ diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/doc-files/config1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-config.Serializing.1.png similarity index 100% rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/doc-files/config1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-config.Serializing.1.png diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/doc-files/config2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-config.Serializing.2.png similarity index 100% rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/doc-files/config2.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-config.Serializing.2.png diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/doc-files/config3.png b/juneau-doc/src/main/javadoc/doc-files/juneau-config.Serializing.3.png similarity index 100% rename from juneau-core/juneau-config/src/main/java/org/apache/juneau/ini/doc-files/config3.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-config.Serializing.3.png diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.2.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import2.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.2.png diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import3.png b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.3.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import3.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.3.png diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import1.png deleted file mode 100644 index 3b9b4e1..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import1.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.2.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import2.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.2.png diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import3.png b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.3.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import3.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.3.png diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import4.png b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.4.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import4.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.4.png diff --git a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-server.Installing.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-microservice-server.Installing.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-server.Installing.2.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.2.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-microservice-server.Installing.2.png diff --git a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.ResourceClasses.1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-server.ResourceClasses.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.ResourceClasses.1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-microservice-server.ResourceClasses.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.6.png b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-server.Running.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/MicroserviceServer.Installing.6.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-microservice-server.Running.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import2.png deleted file mode 100644 index b65dce1..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import2.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import3.png b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import3.png deleted file mode 100644 index 207b291..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import3.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import4.png b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import4.png deleted file mode 100644 index 0f27f36..0000000 Binary files a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import4.png and /dev/null differ diff --git a/juneau-doc/src/main/javadoc/doc-files/HelloWorldResource.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.HelloWorldExample.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/HelloWorldResource.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.HelloWorldExample.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/HelloWorldOptions.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.OptionsPages.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/HelloWorldOptions.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.OptionsPages.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/PredefinedLabelBeans.1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.PredefinedLabelBeans.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/PredefinedLabelBeans.1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.PredefinedLabelBeans.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/PredefinedLabelBeans.2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.PredefinedLabelBeans.2.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/PredefinedLabelBeans.2.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.PredefinedLabelBeans.2.png diff --git a/juneau-doc/src/main/javadoc/doc-files/PredefinedLabelBeans.3.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.PredefinedLabelBeans.3.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/PredefinedLabelBeans.3.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.PredefinedLabelBeans.3.png diff --git a/juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.2.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.2.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.2.png diff --git a/juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.3.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.3.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.3.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.3.png diff --git a/juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.4.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.4.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.4.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.4.png diff --git a/juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.5.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.5.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.5.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.5.png diff --git a/juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.6.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.6.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/RemoteableProxiesServerSide.6.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RemoteableProxiesServerSide.6.png diff --git a/juneau-doc/src/main/javadoc/doc-files/Samples_RootResources.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RouterPages.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/Samples_RootResources.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.RouterPages.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/Stylesheets.1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.Stylesheets.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/Stylesheets.1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.Stylesheets.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/Stylesheets.2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.Stylesheets.2.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/Stylesheets.2.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.Stylesheets.2.png diff --git a/juneau-doc/src/main/javadoc/doc-files/Stylesheets.3.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.Stylesheets.3.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/Stylesheets.3.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.Stylesheets.3.png diff --git a/juneau-doc/src/main/javadoc/doc-files/UiCustomization.1.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.UiCustomization.1.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/UiCustomization.1.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.UiCustomization.1.png diff --git a/juneau-doc/src/main/javadoc/doc-files/UiCustomization.2.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.UiCustomization.2.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/UiCustomization.2.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.UiCustomization.2.png diff --git a/juneau-doc/src/main/javadoc/doc-files/UiCustomization.3.png b/juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.UiCustomization.3.png similarity index 100% rename from juneau-doc/src/main/javadoc/doc-files/UiCustomization.3.png rename to juneau-doc/src/main/javadoc/doc-files/juneau-rest-server.UiCustomization.3.png diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html index 95929d0..ea15798 100644 --- a/juneau-doc/src/main/javadoc/overview.html +++ b/juneau-doc/src/main/javadoc/overview.html @@ -143,6 +143,15 @@ <li><p><a class='doclink' href='#juneau-svl.OtherNotes'>Other Notes</a></p> </ol> <li><p><a class='doclink' href='#juneau-config'><i>juneau-config</i></a></p> + <ol> + <li><p><a class='doclink' href='#juneau-config.Overview'>Overview</a></p> + <li><p><a class='doclink' href='#juneau-config.Variables'>Variables</a></p> + <li><p><a class='doclink' href='#juneau-config.EncodedEntries'>Encoded Entries</a></p> + <li><p><a class='doclink' href='#juneau-config.Listeners'>Listeners</a></p> + <li><p><a class='doclink' href='#juneau-config.CommandLine'>Command Line API</a></p> + <li><p><a class='doclink' href='#juneau-config.Serializing'>Serializing Config Files</a></p> + <li><p><a class='doclink' href='#juneau-config.Merging'>Merging Config Files</a></p> + </ol> <li><p><a class='doclink' href='#juneau-rest-server'><i>juneau-rest-server</i></a></p> <ol> <li><p><a class='doclink' href='#juneau-rest-server.HelloWorldExample'>Hello World Example</a></p> @@ -219,9 +228,9 @@ <li><p><a class='doclink' href='#juneau-rest-server.UsingWithOsgi'>Using with OSGi</a></p> <li><p><a class='doclink' href='#juneau-rest-server.RemoteableProxies'>Remoteable Proxies</a></p> <ol> - <li><p><a class='doclink' href='#juneau-rest-server.RemoteableProxiesClientSide'>Remoteable Proxies - Client Side</a></p> - <li><p><a class='doclink' href='#juneau-rest-server.RemoteableProxiesServerSide'>Remoteable Proxies - Server Side</a></p> - <li><p><a class='doclink' href='#juneau-rest-server.RemoteableProxiesRemoteableAnnotation'>Remoteable Proxies - @Remoteable Annotation</a></p> + <li><p><a class='doclink' href='#juneau-rest-server.RemoteableProxiesClientSide'>Client Side</a></p> + <li><p><a class='doclink' href='#juneau-rest-server.RemoteableProxiesServerSide'>Server Side</a></p> + <li><p><a class='doclink' href='#juneau-rest-server.RemoteableProxiesRemoteableAnnotation'>@Remoteable Annotation</a></p> </ol> <li><p><a class='doclink' href='#juneau-rest-server.Injection'>Using with Spring and Injection frameworks</a></p> <li><p><a class='doclink' href='#juneau-rest-server.HTTP2'>Using HTTP/2 features</a></p> @@ -4874,16 +4883,583 @@ cf.save(); </p> - <h5 class='toc'>Additional Information - org.apache.juneau.ini</h5> - <ol class='toc'> - <li><p><a class='doclink' href='org/apache/juneau/ini/package-summary.html#Overview'>Overview</a></p> - <li><p><a class='doclink' href='org/apache/juneau/ini/package-summary.html#Variables'>Variables</a></p> - <li><p><a class='doclink' href='org/apache/juneau/ini/package-summary.html#Encoded'>Encoded Entries</a></p> - <li><p><a class='doclink' href='org/apache/juneau/ini/package-summary.html#Listeners'>Listeners</a></p> - <li><p><a class='doclink' href='org/apache/juneau/ini/package-summary.html#CommandLine'>Command Line API</a></p> - <li><p><a class='doclink' href='org/apache/juneau/ini/package-summary.html#Serializing'>Serializing Config Files</a></p> - <li><p><a class='doclink' href='org/apache/juneau/ini/package-summary.html#Merging'>Merging Config Files</a></p> - </ol> + <!-- ======================================================================================================== --> + <a id="juneau-config.Overview"></a> + <h3 class='topic' onclick='toggle(this)'>6.1 - Overview</h3> + <div class='topic'> + <p> + The {@link org.apache.juneau.ini.ConfigFileBuilder} and {@link org.apache.juneau.ini.ConfigFile} classes + implement an API for working with INI-style configuration files such as the following: + </p> + <p class='bcode'> + <cc>#--------------------------</cc> + <cc># Default section</cc> + <cc>#--------------------------</cc> + <ck>key1</ck> = <cv>1</cv> + <ck>key2</ck> = <cv>true</cv> + <ck>key3</ck> = <cv>1,2,3</cv> + <ck>key4</ck> = <cv>http://foo</cv> + + <cc>#--------------------------</cc> + <cc># A comment about Section 1</cc> + <cc>#--------------------------</cc> + <cs>[Section1]</cs> + <ck>key1</ck> = <cv>2</cv> + <ck>key2</ck> = <cv>false</cv> + <ck>key3</ck> = <cv>4,5,6</cv> + <ck>key4</ck> = <cv>http://bar</cv> + </p> + + <p> + The {@link org.apache.juneau.ini.ConfigFileBuilder} class is used to instantiate instances of + {@link org.apache.juneau.ini.ConfigFile} which can then be used to retrieve config file values through either + <js>"key"</js> or <js>"Section/key"</js> identifiers. + </p> + + <p class='bcode'> + <jk>int</jk> key1; + <jk>boolean</jk> key2; + <jk>int</jk>[] key3; + URL key4; + + <jc>// Get our config file using the default config manager</jc> + ConfigFile f = ConfigFile.<jsm>create</jsm>().build(<js>"C:/temp/MyConfig.cfg"</js>); + + <jc>// Read values from default section</jc> + key1 = f.getInt(<js>"key1"</js>); + key2 = f.getBoolean(<js>"key2"</js>); + key3 = f.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"key3"</js>); + key4 = f.getObject(URL.<jk>class</jk>, <js>"key4"</js>); + + <jc>// Read values from Section #1</jc> + key1 = f.getInt(<js>"Section1/key1"</js>); + key2 = f.getBoolean(<js>"Section1/key2"</js>); + key3 = f.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"Section1/key3"</js>); + key4 = f.getObject(URL.<jk>class</jk>, <js>"Section1/key4"</js>); + </p> + + <p> + The interface also allows config files to be constructed programmatically... + </p> + + <p class='bcode'> + <jc>// Construct the sample INI file programmatically</jc> + ConfigFile f = ConfigFile.<jsm>create</jsm>().build(<js>"C:/temp/MyConfig.cfg"</js>, <jk>true</jk>) + .addLines(<jk>null</jk>, <jc>// The default 'null' section</jc> + <js>"# Default section"</js>, <jc>// A regular comment</jc> + <js>"key1 = 1"</js>, <jc>// A numeric entry</jc> + <js>"key2 = true"</js>, <jc>// A boolean entry</jc> + <js>"key3 = 1,2,3"</js>, <jc>// An array entry</jc> + <js>"key4 = http://foo"</js>, <jc>// A POJO entry</jc> + <js>""</js>) <jc>// A blank line</jc> + .addHeaderComments(<js>"Section1"</js>, <jc>// The 'Section1' section</jc> + <js>"A comment about Section 1"</js>) <jc>// A header comment</jc> + .addLines(<js>"Section1"</js>, <jc>// The 'Section1' section</jc> + <js>"key1 = 2"</js>, <jc>// A numeric entry</jc> + <js>"key2 = false"</js>, <jc>// A boolean entry</jc> + <js>"key3 = 4,5,6"</js>, <jc>// An array entry</jc> + <js>"key4 = http://bar"</js>) <jc>// A POJO entry</jc> + .save(); <jc>// Save to MyConfig.cfg</jc> + </p> + + <p> + The following is equivalent, except uses {@link org.apache.juneau.ini.ConfigFile#put(String,Object)} to set values. + Note how we're setting values as POJOs which will be automatically converted to strings when persisted to disk. + <p class='bcode'> + <jc>// Construct the sample INI file programmatically</jc> + ConfigFile f = ConfigFile.<jsm>create</jsm>().build(<js>"C:/temp/MyConfig.cfg"</js>, <jk>true</jk>) + .addLines(<jk>null</jk>, + <js>"# Default section"</js>) + .addHeaderComments(<js>"Section1"</js>, + <js>"A comment about Section 1"</js>); + cf.put(<js>"key1"</js>, 1); + cf.put(<js>"key2"</js>, <jk>true</jk>); + cf.put(<js>"key3"</js>, <jk>new int</jk>[]{1,2,3}); + cf.put(<js>"key4"</js>, <jk>new</jk> URL(<js>"http://foo"</js>)); + cf.put(<js>"Section1/key1"</js>, 2); + cf.put(<js>"Section1/key2"</js>, <jk>false</jk>); + cf.put(<js>"Section1/key3"</js>, <jk>new int</jk>[]{4,5,6}); + cf.put(<js>"Section1/key4"</js>, <jk>new</jk> URL(<js>"http://bar"</js>)); + cf.save(); + </p> + <p> + Refer to {@link org.apache.juneau.ini.ConfigFile#put(String,Object,boolean)} for a description of + formats for various data types. + </p> + <p> + Various convenience getter methods are provided for retrieving different data types: + </p> + <p class='bcode'> + <jc>// Strings with default values</jc> + <jc>// key1 = foobar</jc> + String key1 = cf.getString(<js>"key1"</js>); + + <jc>// Numbers</jc> + <jc>// key2 = 123</jc> + <jk>float</jk> key2 = cf.getObject(<jk>float</jk>.<jk>class</jk>, <js>"key2"</js>); + + <jc>// Booleans</jc> + <jc>// key3 = true</jc> + <jk>boolean</jk> key3 = cf.getBoolean(<js>"key3"</js>); + + <jc>// Objects convertable to and from strings using the JSON serializer and parser</jc> + <jc>// key4 = http://foo</jc> + URL key4 = cf.getObject(URL.<jk>class</jk>, <js>"key4"</js>); + + <jc>// Arrays of strings</jc> + <jc>// key5 = foo, bar</jc> + String[] key5 = cf.getStringArray(<js>"key5"</js>); + + <jc>// Arrays of objects</jc> + <jc>// key6 = http://foo,http://bar</jc> + URL[] key6 = cf.getObject(URL[].<jk>class</jk>, <js>"key6"</js>); + + <jc>// Arrays of primitives</jc> + <jc>// key7 = 1,2,3</jc> + <jk>int</jk>[] key7 = cf.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"key7"</js>); + + <jc>// Enums</jc> + <jc>// key8 = MINUTES</jc> + TimeUnit key8 = cf.getObject(TimeUnit.<jk>class</jk>, <js>"key8"</js>); + + <jc>// Beans</jc> + <jc>// key9 = {name:'John Smith', addresses:[{street:'101 Main St', city:'Anywhere', state:'TX'}]}</jc> + Person key9 = cf.getObject(Person.<jk>class</jk>, <js>"key9"</js>); + + <jc>// Generic Maps</jc> + <jc>// key10 = {foo:'bar', baz:123}</jc> + Map key10 = cf.getObject(ObjectMap.<jk>class</jk>, <js>"key10"</js>); + </p> + </div> + + <!-- ======================================================================================================== --> + <a id="juneau-config.Variables"></a> + <h3 class='topic' onclick='toggle(this)'>6.2 - Variables</h3> + <div class='topic'> + <p> + Config files can contain variables that get resolved dynamically using the + {@link org.apache.juneau.svl.VarResolver} API. + </p> + <p> + Resolving config files can be retrieved through the following methods: + </p> + <ul class='spaced-list'> + <li> + {@link org.apache.juneau.ini.ConfigFile#getResolving()} - Returns a config file that resolves a default + set of variables. + <li> + {@link org.apache.juneau.ini.ConfigFile#getResolving(VarResolver)} - Returns a config file that resolves + a custom set of variables. + </ul> + <p> + The default {@link org.apache.juneau.ini.ConfigFile#getResolving()} method returns a config file that resolves + the following variables: + </p> + <ul class='spaced-list'> + <li> + <code>$S{key}</code>, <code>$S{key,default}</code> - System properties. + <li> + <code>$E{key}</code>, <code>$E{key,default}</code> - Environment variables. + <li> + <code>$C{key}</code>, <code>$C{key,default}</code> - Values in this configuration file. + </ul> + + <h5 class='topic'>Examples:</h5> + <p class='bcode'> + <cc>#--------------------------</cc> + <cc># Examples </cc> + <cc>#--------------------------</cc> + <cs>[MyProperties]</cs> + <ck>javaHome</ck> = <cv>$S{java.home}</cv> + <ck>path</ck> = <cv>$E{PATH}</cv> + <ck>customMessage</ck> = <cv>Java home is $C{MyProperties/javaHome} and the environment path is $C{MyProperties/path}.</cv> + </p> + <p> + Support for variables is extensible. You can add support for your own variables by implementing custom + {@link org.apache.juneau.svl.VarResolver VarResolvers}. + <br>For example, the microservice <code>Resource</code> class provides access to config files that + can contain any of the following variables: + </p> + <ul> + <li><code>$C</code> - Config variables. + <li><code>$S</code> - System properties. + <li><code>$E</code> - Environment variables. + <li><code>$I</code> - Servlet init parameters. + <li><code>$ARG</code> - JVM command-line arguments. + <li><code>$MF</code> - Main jar manifest file entries. + <li><code>$L</code> - Localized strings. + <li><code>$A</code> - HTTP request attributes. + <li><code>$P</code> - HTTP request URL parameters. + <li><code>$R</code> - HTTP request variables. + <li><code>$UE</code> - URL-encoding function. + </ul> + </div> + + <!-- ======================================================================================================== --> + <a id="juneau-config.EncodedEntries"></a> + <h3 class='topic' onclick='toggle(this)'>6.3 - Encoded Entries</h3> + <div class='topic'> + <p> + If a config file contains sensitive information such as passwords, those values can be + marked for encoding by appending <js>'*'</js> to the end of the key name. + <br>If a marked and unencoded value is detected in the file during load, it will be encoded and saved immediately. + </p> + <p> + For example, the following password is marked for encoding.... + </p> + <p class='bcode'> + <cs>[MyHost]</cs> + <ck>url</ck> = <cv>http://localhost:9080/foo</cv> + <ck>user</ck> = <cv>me</cv> + <ck>password*</ck> = <cv>mypassword</cv> + </p> + <p> + After initial loading, the file contents will contain an encoded value... + </p> + <p class='bcode'> + <cs>[MyHost]</cs> + <ck>url</ck> = <cv>http://localhost:9080/foo</cv> + <ck>user</ck> = <cv>me</cv> + <ck>password*</ck> = <cv>{AwwJVhwUQFZEMg==}</cv> + </p> + <p> + The default encoder is {@link org.apache.juneau.ini.XorEncoder} which is a simple XOR+Base64 encoder. + <br>If desired, custom encoder can be used by implementing the {@link org.apache.juneau.ini.Encoder} + interface and creating your own <code>ConfigFileBuilder</code> using the + {@link org.apache.juneau.ini.ConfigFileBuilder#encoder(Encoder)} method. + </p> + </div> + + <!-- ======================================================================================================== --> + <a id="juneau-config.Listeners"></a> + <h3 class='topic' onclick='toggle(this)'>6.4 - Listeners</h3> + <div class='topic'> + <p> + The following method is provided for listening to changes made on config files: + </p> + <p> + {@link org.apache.juneau.ini.ConfigFile#addListener(ConfigFileListener)}. + </p> + <p> + Subclasses are provided for listening for different kinds of events: + </p> + <ul class='spaced-list'> + <li> + {@link org.apache.juneau.ini.ConfigFileListener} - Config file is saved, loaded, or modified. + <li> + {@link org.apache.juneau.ini.SectionListener} - One or more entries in a section are modified. + <li> + {@link org.apache.juneau.ini.EntryListener} - An individual entry is modified. + </ul> + + <h5 class="topic">Example:</h5> + <p class='bcode'> + <jc>// Get our config file using the default config manager</jc> + ConfigFile f = ConfigFile.<jsm>create</jsm>().build(<js>"C:/temp/MyConfig.cfg"</js>); + + <jc>// Add a listener for an entry</jc> + f.addListener( + <jk>new</jk> EntryListener(<js>"Section1/key1"</js>) { + <ja>@Override</ja> + <jk>public void</jk> onChange(ConfigFile cf) { + System.<jsf>err</jsf>.println(<js>"Entry changed! New value is "</js> + cf.getString(<js>"Section1/key1"</js>)); + } + } + ); + </p> + </div> + + <!-- ======================================================================================================== --> + <a id="juneau-config.CommandLine"></a> + <h3 class='topic' onclick='toggle(this)'>6.5 - Command Line API</h3> + <div class='topic'> + <p> + The {@link org.apache.juneau.ini.ConfigFileBuilder} class contains a + {@link org.apache.juneau.ini.ConfigFileBuilder#main(String[])} method that can be used to work with config + files through a command-line prompt. + <br>This is invoked as a normal Java command: + </p> + <p class='bcode'> + java -jar juneau.jar org.apache.juneau.ini.ConfigFileBuilder [args] + </p> + <p> + Arguments can be any of the following... + </p> + <ul class='spaced-list'> + <li> + No arguments + <br>Prints usage message. + <li> + <code>createBatchEnvFile -configfile <configFile> -envfile <batchFile> [-verbose]</code> + <br>Creates a batch file that will set each config file entry as an environment variable. + <br>Characters in the keys that are not valid as environment variable names (e.g. <js>'/'</js> and <js>'.'</js>) + will be converted to underscores. + <li> + <code>createShellEnvFile -configFile <configFile> -envFile <configFile> [-verbose]</code> + Creates a shell script that will set each config file entry as an environment variable. + <br>Characters in the keys that are not valid as environment variable names (e.g. <js>'/'</js> and <js>'.'</js>) + will be converted to underscores. + <li> + <code>setVals -configFile <configFile> -vals [var1=val1 [var2=val2...]] [-verbose]</code> + Sets values in config files. + </ul> + <p> + For example, the following command will create the file <code>'MyConfig.bat'</code> from the contents of the + file <code>'MyConfig.cfg'</code>. + </p> + <p class='bcode'> + java org.apache.juneau.ini.ConfigFileBuilder createBatchEnvFile -configfile C:\foo\MyConfig.cfg -batchfile C:\foo\MyConfig.bat + </p> + </div> + + <!-- ======================================================================================================== --> + <a id="juneau-config.Serializing"></a> + <h3 class='topic' onclick='toggle(this)'>6.6 - Serializing Config Files</h3> + <div class='topic'> + <p> + Instances of {@link org.apache.juneau.ini.ConfigFile} are POJOs that can be serialized to and parsed from + all supported Juneau languages. + </p> + <p> + The <code>org.apache.juneau.microservice.resources.ConfigResource</code> is a predefined REST interface that + allows access to the config file used by a microservice. + <br>The <code>juneau-examples-rest</code> project is a microservice that includes this resource + at <code>http://localhost:10000/sample/config</code>. + <br>The sample microservice uses the following config file <code>juneau-examples.cfg</code>: + </p> + <p class='bcode'> + <cc>#================================================================================ + # Basic configuration file for SaaS microservices + # Subprojects can use this as a starting point. + #================================================================================</cc> + + <cc>#================================================================================ + # REST settings + #================================================================================</cc> + <cs>[REST]</cs> + + <cc># The HTTP port number to use. + # Default is Rest-Port setting in manifest file, or 8000.</cc> + <ck>port</ck> = <cv>10000</cv> + + <cc># A JSON map of servlet paths to servlet classes. + # Example: + # resourceMap = {'/*':'com.foo.MyServlet'} + # Either resourceMap or resources must be specified.</cc> + <ck>resourceMap</ck> = + + <cc># A comma-delimited list of names of classes that extend from Servlet. + # Resource paths are pulled from @RestResource.path() annotation, or + # "/*" if annotation not specified. + # Example: + # resources = com.foo.MyServlet + # Default is Rest-Resources in manifest file. + # Either resourceMap or resources must be specified.</cc> + <ck>resources</ck> = + + <cc># The context root of the Jetty server. + # Default is Rest-ContextPath in manifest file, or "/".</cc> + <ck>contextPath</ck> = + + <cc># Authentication: NONE, BASIC.</cc> + <ck>authType</ck> = <cv>NONE</cv> + + <cc># The BASIC auth username. + # Default is Rest-LoginUser in manifest file.</cc> + <ck>loginUser</ck> = + + <cc># The BASIC auth password. + # Default is Rest-LoginPassword in manifest file.</cc> + <ck>loginPassword</ck> = + + <cc># The BASIC auth realm. + # Default is Rest-AuthRealm in manifest file.</cc> + <ck>authRealm</ck> = + + <cc># Stylesheet to use for HTML views. + # The default options are: + # - styles/juneau.css + # - styles/devops.css + # Other stylesheets can be referenced relative to the servlet package or working + # directory.</cc> + <ck>stylesheet</ck> = <cv>styles/devops.css</cv> + + <cc># What to do when the config file is saved. + # Possible values: + # NOTHING - Don't do anything. + # RESTART_SERVER - Restart the Jetty server. + # RESTART_SERVICE - Shutdown and exit with code '3'.</cc> + <ck>saveConfigAction</ck> = <cv>RESTART_SERVER</cv> + + <cc># Enable SSL support.</cc> + <ck>useSsl</ck> = false + + <cc>#================================================================================ + # Bean properties on the org.eclipse.jetty.util.ssl.SslSocketFactory class + #-------------------------------------------------------------------------------- + # Ignored if REST/useSsl is false. + #================================================================================</cc> + <cs>[REST-SslContextFactory]</cs> + <ck>keyStorePath</ck> = <cv>client_keystore.jks</cv> + <ck>keyStorePassword*</ck> = <cv>{HRAaRQoT}</cv> + <ck>excludeCipherSuites</ck> = <cv>TLS_DHE.*, TLS_EDH.*</cv> + <ck>excludeProtocols</ck> = <cv>SSLv3</cv> + <ck>allowRenegotiate</ck> = <cv>false</cv> + + <cc>#================================================================================ + # Logger settings + # See FileHandler Java class for details. + #================================================================================</cc> + <cs>[Logging]</cs> + + <cc># The directory where to create the log file. + # Default is "."</cc> + <ck>logDir</ck> = <cv>logs</cv> + + <cc># The name of the log file to create for the main logger. + # The logDir and logFile make up the pattern that's passed to the FileHandler + # constructor. + # If value is not specified, then logging to a file will not be set up.</cc> + <ck>logFile</ck> = <cv>microservice.%g.log</cv> + + <cc># Whether to append to the existing log file or create a new one. + # Default is false.</cc> + <ck>append</ck> = + + <cc># The SimpleDateFormat format to use for dates. + # Default is "yyyy.MM.dd hh:mm:ss".</cc> + <ck>dateFormat</ck> = + + <cc># The log message format. + # The value can contain any of the following variables: + # {date} - The date, formatted per dateFormat. + # {class} - The class name. + # {method} - The method name. + # {logger} - The logger name. + # {level} - The log level name. + # {msg} - The log message. + # {threadid} - The thread ID. + # {exception} - The localized exception message. + # Default is "[{date} {level}] {msg}%n".</cc> + <ck>format</ck> = + + <cc># The maximum log file size. + # Suffixes available for numbers. + # See ConfigFile.getInt(String,int) for details. + # Default is 1M.</cc> + <ck>limit</ck> = <cv>10M</cv> + + <cc># Max number of log files. + # Default is 1.</cc> + <ck>count</ck> = <cv>5</cv> + + <cc># Default log levels. + # Keys are logger names. + # Values are serialized Level POJOs.</cc> + <ck>levels</ck> = <cv>{ org.apache.juneau:'INFO' }</cv> + + <cc># Only print unique stack traces once and then refer to them by a simple 8 character hash identifier. + # Useful for preventing log files from filling up with duplicate stack traces. + # Default is false.</cc> + <ck>useStackTraceHashes</ck> = <cv>true</cv> + + <cc># The default level for the console logger. + # Default is WARNING.</cc> + <ck>consoleLevel</ck> = + + <cc>#================================================================================ + # System properties + #-------------------------------------------------------------------------------- + # These are arbitrary system properties that are set during startup. + #================================================================================</cc> + <cs>[SystemProperties]</cs> + + <cc># Configure Jetty for StdErrLog Logging</cc> + <ck>org.eclipse.jetty.util.log.class</ck> = <cv>org.eclipse.jetty.util.log.StrErrLog</cv> + + <cc># Jetty logging level</cc> + <ck>org.eclipse.jetty.LEVEL</ck> = <cv>WARN</cv> + </p> + <p> + The config file looks deceivingly simple. + However, it should be noticed that the config file is a VERY powerful feature with many capabilities including: + </p> + <p> + When you point your browser to this resource, you'll notice that the contents of the config file are being + serialized to HTML as a POJO: + </p> + <img class='bordered' src="doc-files/juneau-config.Serializing.1.png"> + <p> + Likewise, the config file can also be serialized as any of the supported languages such as JSON: + </p> + <img class='bordered' src="doc-files/juneau-config.Serializing.2.png"> + <p> + The code for implementing this page could not be any simpler, since it simply returns the config file returned + by the <code>RestServlet.getConfig()</code> method. + </p> + <p class='bcode'> + <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/"</js>, description=<js>"Show contents of config file."</js>) + <jk>public</jk> ConfigFile getConfigContents() <jk>throws</jk> Exception { + <jk>return</jk> getConfig(); + } + </p> + <p> + The edit page takes you to an editor that allows you to modify the contents of the config file: + </p> + <img class='bordered' src="doc-files/juneau-config.Serializing.3.png"> + <p> + This latter page uses the {@link org.apache.juneau.ini.ConfigFile#toString()} method to retrieve the + contents of the config file in INI format. + </p> + <p> + Since config files are serializable, that mean they can also be retrieved through the <code>RestClient</code> + API. + </p> + <p class='bcode'> + <jc>// Create a new REST client with JSON support</jc> + RestClient c = RestClient.<jsm>create</jsm>().build(); + + <jc>// Retrieve config file through REST interface</jc> + ConfigFile cf = c.doGet(<js>"http://localhost:10000/sample/config"</js>).getResponse(ConfigFileImpl.<jk>class</jk>); + </p> + </div> + + <!-- ======================================================================================================== --> + <a id="juneau-config.Merging"></a> + <h3 class='topic' onclick='toggle(this)'>6.7 - Merging Config Files</h3> + <div class='topic'> + <p> + In the previous example, an edit page was shown that allows you to edit config files through + a REST interface. + <br>Note that if only a single entry is modified in the config file, we only want to trigger + listeners for that change, not trigger all listeners. + <br>This is where the {@link org.apache.juneau.ini.ConfigFile#merge(ConfigFile)} method comes into play. + <br>This method will copy the contents of one config file over to another config file, but only + trigger listeners when the values are different. + </p> + <p> + The edit page is implemented with this method which is a simple PUT with the contents of the new INI file as + the body of the HTTP request: + </p> + <p class='bcode'> + <ja>@RestMethod</ja>(name=<jsf>PUT</jsf>, path=<js>"/"</js>, + description=<js>"Sets contents of config file."</js>, + parameters={ + <ja>@Parameter</ja>(in=<js>"body"</js>, description=<js>"New contents in INI file format."</js>) + } + ) + <jk>public</jk> ConfigFile setConfigContents(<ja>@Body</ja> Reader contents) <jk>throws</jk> Exception { + + <jc>// Create a new in-memory config file based on the contents of the HTTP request.</jc> + ConfigFile cf2 = new ConfigFileBuilder.build().load(contents); + + <jc>// Merge the in-memory config file into the existing config file and save it. + // Then return the modified config file to be parsed as a POJO.</jc> + <jk>return</jk> getConfig().merge(cf2).save(); + } + </p> + </div> + </div> <!-- =========================================================================================================== --> @@ -5064,7 +5640,7 @@ <p> This is what it looks like in a browser: </p> - <img class='bordered' src='doc-files/HelloWorldResource.png' style='width:800px'> + <img class='bordered' src='doc-files/juneau-rest-server.HelloWorldExample.1.png' style='width:800px'> <p> It doesn't much simpler than that. <br>In this case, we're simply returning a string that will be converted to any of the supported languages (e.g. @@ -5377,7 +5953,7 @@ When you bring up this resource in a browser, you see the following that provides a list of navigable links to your child resources: </p> - <img class='bordered' src="doc-files/Samples_RootResources.png" style='width:800px;'/> + <img class='bordered' src="doc-files/juneau-rest-server.RouterPages.1.png" style='width:800px;'/> <p> The {@link org.apache.juneau.rest.RestServletGroupDefault} class is nothing more than a subclass of {@link org.apache.juneau.rest.RestServletDefault} with a <l>getChildren()</l> method mapped to the servlet @@ -7903,7 +8479,7 @@ </p> <h5 class='figure'>OPTIONS page for HelloWorld sample resource</h5> - <img class='bordered' src='doc-files/HelloWorldOptions.png' style='width:800px;'> + <img class='bordered' src='doc-files/juneau-rest-server.OptionsPages.1.png' style='width:800px;'> <p> The {@link org.apache.juneau.rest.RestServletDefault} class implements the page by creating a method mapped to the <l>OPTIONS</l> HTTP method that simply returns a Swagger bean: @@ -8348,12 +8924,12 @@ <p> The sample root page below includes some default branding for Juneau and Apache: </p> - <img class='bordered' src='doc-files/UiCustomization.1.png' style='width:800px'/> + <img class='bordered' src='doc-files/juneau-rest-server.UiCustomization.1.png' style='width:800px'/> <p> In particular, you may want to replace these icons: </p> - <img class='bordered' src='doc-files/UiCustomization.2.png'/> - <img class='bordered' src='doc-files/UiCustomization.3.png'/> + <img class='bordered' src='doc-files/juneau-rest-server.UiCustomization.2.png'/> + <img class='bordered' src='doc-files/juneau-rest-server.UiCustomization.3.png'/> <p> The Juneau REST framework does not provide specific branding support (i.e. there is no concept of a brand icon). <br>Instead, it just uses the existing open-ended API for defining branding. @@ -8471,15 +9047,15 @@ <p> The sample root page provides a dropdown widget to try out the other default look-and-feels: </p> - <img class='bordered' src='doc-files/Stylesheets.1.png'/> + <img class='bordered' src='doc-files/juneau-rest-server.Stylesheets.1.png'/> <p> For example, the "light" look-and-feel: </p> - <img class='bordered' src='doc-files/Stylesheets.2.png' style='width:800px'/> + <img class='bordered' src='doc-files/juneau-rest-server.Stylesheets.2.png' style='width:800px'/> <p> And the "dark" look-and-feel: </p> - <img class='bordered' src='doc-files/Stylesheets.3.png' style='width:800px'/> + <img class='bordered' src='doc-files/juneau-rest-server.Stylesheets.3.png' style='width:800px'/> <p> The stylesheet URL is controlled by the {@link org.apache.juneau.rest.annotation.HtmlDoc#stylesheet() @HtmlDoc.stylesheet()} annotation. <br>The {@link org.apache.juneau.rest.RestServletDefault} class defines the stylesheet served up as a static file: @@ -9241,7 +9817,7 @@ <!-- ======================================================================================================== --> <a id="juneau-rest-server.RemoteableProxiesClientSide"></a> - <h4 class='topic' onclick='toggle(this)'>7.32.1 - Remoteable Proxies - Client Side</h4> + <h4 class='topic' onclick='toggle(this)'>7.32.1 - Client Side</h4> <div class='topic'> <p> Remoteable interface proxies are retrieved through the existing {@link org.apache.juneau.rest.client.RestClient} @@ -9281,7 +9857,7 @@ <!-- ======================================================================================================== --> <a id="juneau-rest-server.RemoteableProxiesServerSide"></a> - <h4 class='topic' onclick='toggle(this)'>7.32.2 - Remoteable Proxies - Server Side</h4> + <h4 class='topic' onclick='toggle(this)'>7.32.2 - Server Side</h4> <div class='topic'> <p> The server side is only slightly more complex, but boasts useful debugging and discovery capabilities. @@ -9328,7 +9904,7 @@ <p> If you point your browser to that URL, you get a list of available interfaces: </p> - <img class='bordered' src="doc-files/RemoteableProxiesServerSide.1.png"> + <img class='bordered' src="doc-files/juneau-rest-server.RemoteableProxiesServerSide.1.png"> <p> Clicking the hyperlinks on each shows you the list of methods that can be invoked on that service. Note that the <code>IAddressBook</code> link shows that you can only invoke methods defined on that @@ -9336,8 +9912,8 @@ Since <code>AddressBook</code> extends from <code>LinkedList</code>, you may notice familiar collections framework methods listed. </p> - <img class='bordered' src="doc-files/RemoteableProxiesServerSide.2.png"> - <img class='bordered' src="doc-files/RemoteableProxiesServerSide.3.png"> + <img class='bordered' src="doc-files/juneau-rest-server.RemoteableProxiesServerSide.2.png"> + <img class='bordered' src="doc-files/juneau-rest-server.RemoteableProxiesServerSide.3.png"> <p> Let's see how we can interact with this interface through nothing more than REST calls to get a better idea on how this works. @@ -9386,12 +9962,12 @@ We also want the results to be returned as JSON, so we set the <code>Accept</code> header to <code>text/json</code> as well. </p> - <img class='bordered' src="doc-files/RemoteableProxiesServerSide.4.png"> + <img class='bordered' src="doc-files/juneau-rest-server.RemoteableProxiesServerSide.4.png"> <p> When we execute the POST, we should see the following successful response whose body contains the returned <code>Person</code> bean serialized to JSON: </p> - <img class='bordered' src="doc-files/RemoteableProxiesServerSide.5.png"> + <img class='bordered' src="doc-files/juneau-rest-server.RemoteableProxiesServerSide.5.png"> <p> From there, we could use the following code snippet to reconstruct the response object from JSON: </p> @@ -9417,7 +9993,7 @@ returned POJO (in this case as HTML since that's what's in the <code>Accept</code> header when calling from a browser): </p> - <img class='bordered' src="doc-files/RemoteableProxiesServerSide.6.png"> + <img class='bordered' src="doc-files/juneau-rest-server.RemoteableProxiesServerSide.6.png"> <p> When specifying the POST body as a <code>&content</code> parameter, the method arguments should be in UON notation. @@ -9431,7 +10007,7 @@ <!-- ======================================================================================================== --> <a id="juneau-rest-server.RemoteableProxiesRemoteableAnnotation"></a> <a id="RemoteableAnnotation"></a> - <h4 class='topic' onclick='toggle(this)'>7.32.3 - Remoteable Proxies - @Remoteable Annotation</h4> + <h4 class='topic' onclick='toggle(this)'>7.32.3 - @Remoteable Annotation</h4> <div class='topic'> <p> What if you want fine-tuned control over which methods are exposed in an interface instead of just all public @@ -9629,7 +10205,7 @@ <p> It get rendered as a table of name/description columns with links to child methods: </p> - <img class='bordered' src='doc-files/PredefinedLabelBeans.1.png' style='width:240px'/> + <img class='bordered' src='doc-files/juneau-rest-server.PredefinedLabelBeans.1.png' style='width:240px'/> <p> The internals of the class show it simply has two bean properties with a link annotation defined on the name property: @@ -9656,7 +10232,7 @@ <p> This example renders the following: </p> - <img class='bordered' src='doc-files/PredefinedLabelBeans.2.png' style='width:584px'/> + <img class='bordered' src='doc-files/juneau-rest-server.PredefinedLabelBeans.2.png' style='width:584px'/> <p> The {@link org.apache.juneau.html.annotation.HtmlLink @HtmlLink} annotation can also be useful for rendering custom hyperlinks: @@ -9682,7 +10258,7 @@ <p> This example renders the following consisting of a list of hyperlinks: </p> - <img class='bordered' src='doc-files/PredefinedLabelBeans.3.png' style='width:92px'/> + <img class='bordered' src='doc-files/juneau-rest-server.PredefinedLabelBeans.3.png' style='width:92px'/> <h5 class='section'>See Also:</h5> <ul> @@ -10981,11 +11557,11 @@ In your Eclipse workspace, go to <b>File -> Import -> General -> Existing Projects into Workspace</b> and select the zip file and click <b>Finish</b>. <br><br> - <img class='bordered' src="doc-files/MicroserviceServer.Installing.1.png" style='width:549px'> + <img class='bordered' src="doc-files/juneau-microservice-server.Installing.1.png" style='width:549px'> <li> In your workspace, you should now see the following project: <br><br> - <img class='bordered' src="doc-files/MicroserviceServer.Installing.2.png" style='width:299px'> + <img class='bordered' src="doc-files/juneau-microservice-server.Installing.2.png" style='width:299px'> </ol> <p> The important elements in this project are: @@ -11209,7 +11785,7 @@ Now open your browser and point to <l>http://localhost:10000</l>. You should see the following: </p> - <img class='bordered' src="doc-files/MicroserviceServer.Installing.6.png" style='width:800px;'> + <img class='bordered' src="doc-files/MicroserviceServer.Running.6.png" style='width:800px;'> <p> You have started a REST interface on port 10000. <br>You can enter the command <code>exit</code> to shut it down. @@ -11539,7 +12115,7 @@ Now let's take a look at the resource classes themselves. <br>The top-level page... </p> - <img class='bordered' src='doc-files/MicroserviceServer.Installing.6.png' style='width:800px;'> + <img class='bordered' src='doc-files/MicroserviceServer.Running.6.png' style='width:800px;'> <p> ...is generated by this class... <p class='bcode'> @@ -11583,7 +12159,7 @@ <p> If you click the <l>helloWorld</l> link in your application, you'll get a simple hello world message: </p> - <img class='bordered' src='doc-files/MicroserviceServer.ResourceClasses.1.png' style='width:800px;'> + <img class='bordered' src='doc-files/juneau-microservice-server.ResourceClasses.1.png' style='width:800px;'> <p> ...which is generated by this class... </p> @@ -11735,15 +12311,15 @@ Download the <code>juneau-examples-core-7.0.0.zip</code> file from the downloads page (located in the binaries) and import it into your workspace as an existing project: </p> - <img class='bordered' src='doc-files/juneau-examples-core.import1.png' style='width:512px'> + <img class='bordered' src='doc-files/juneau-examples-core.1.png' style='width:512px'> <p> Select the archive file and import the project: </p> - <img class='bordered' src='doc-files/juneau-examples-core.import2.png' style='width:523px'> + <img class='bordered' src='doc-files/juneau-examples-core.2.png' style='width:523px'> <p> Once loaded, you should see the following project structure: </p> - <img class='bordered' src='doc-files/juneau-examples-core.import3.png' style='width:459px'> + <img class='bordered' src='doc-files/juneau-examples-core.3.png' style='width:459px'> <p> The Core library samples are currently a work-in-progress so there's not much here yet. @@ -11775,20 +12351,20 @@ Download the <code>juneau-examples-rest-7.0.0.zip</code> file from the downloads page (located in the binaries) and import it into your workspace as an existing project: </p> - <img class='bordered' src='doc-files/juneau-examples-rest.import1.png' style='width:524px'> + <img class='bordered' src='doc-files/juneau-examples-rest.1.png' style='width:524px'> <p> Select the archive file and import the project: </p> - <img class='bordered' src='doc-files/juneau-examples-rest.import2.png' style='width:523px'> + <img class='bordered' src='doc-files/juneau-examples-rest.2.png' style='width:523px'> <p> Once loaded, you should see the following project structure: </p> - <img class='bordered' src='doc-files/juneau-examples-rest.import3.png' style='width:412px'> + <img class='bordered' src='doc-files/juneau-examples-rest.3.png' style='width:412px'> <p> The microservice can be started from the <code>juneau-examples-rest.launch</code> file. It will start up the microservice on port 10000 which you can then view through a browser: </p> - <img class='bordered' src='doc-files/juneau-examples-rest.import4.png' style='width:466px'> + <img class='bordered' src='doc-files/juneau-examples-rest.4.png' style='width:466px'> <!-- ======================================================================================================= --> <a id="juneau-examples-rest.RootResources"></a> @@ -16286,7 +16862,7 @@ New tooltip template: {@link org.apache.juneau.rest.widget.Tooltip} <li> New dark theme: - <br><img src='doc-files/ReleaseNotes_632_DarkStyle.png'> + <br><img src='doc-files/ReleaseNotes.632.DarkStyle.png'> <li> Stylesheet selection now stored in HTTP session when passed in via <code>?stylesheet</code> query parameter. <li> @@ -16333,7 +16909,7 @@ <ul class='spaced-list'> <li> New example of adding a menu-item widget to the Pet Store resource (including tooltips): - <br><img src='doc-files/ReleaseNotes_632_PetStoreAdd.png'> + <br><img src='doc-files/ReleaseNotes.632.PetStoreAdd.png'> </ul> </div> @@ -16379,11 +16955,11 @@ <ul class='spaced-list'> <li> New 'light' stylesheet: - <br><img src='doc-files/ReleaseNotes_631_LightStyle.png'> + <br><img src='doc-files/ReleaseNotes.631.LightStyle.png'> <br>Compared with previous 'devops': - <br><img src='doc-files/ReleaseNotes_631_DevopsStyle.png'> + <br><img src='doc-files/ReleaseNotes.631.DevopsStyle.png'> <br>For those nolstalgic for old times, there's also 'original': - <br><img src='doc-files/ReleaseNotes_631_OriginalStyle.png'> + <br><img src='doc-files/ReleaseNotes.631.OriginalStyle.png'> <li> Simplified the stylesheets and HTML code. <br>For example, the nav links are now an ordered list of elements which makes rendering as as side-bar @@ -16459,16 +17035,16 @@ <li> New {@link org.apache.juneau.rest.widget.ContentTypeMenuItem} widget that provides a pull-down menu with hyperlinks for all supported languages for that page: - <br><img src='doc-files/ReleaseNotes_631_ContentTypeMenuItem.png'> + <br><img src='doc-files/ReleaseNotes.631.ContentTypeMenuItem.png'> <li> Improved {@link org.apache.juneau.rest.widget.QueryMenuItem} widget that provides a pull-down menu of a search/view/order-by/page form: - <br><img src='doc-files/ReleaseNotes_631_QueryMenuItem.png'> + <br><img src='doc-files/ReleaseNotes.631.QueryMenuItem.png'> <br>Fields are now pre-filled with current query parameters. <li> New {@link org.apache.juneau.rest.widget.StyleMenuItem} widget that provides a pull-down menu with hyperlinks to show the content in the default stylesheets: - <br><img src='doc-files/ReleaseNotes_631_StyleMenuItem.png'> + <br><img src='doc-files/ReleaseNotes.631.StyleMenuItem.png'> </ul> <li> New/modified annotations on {@link org.apache.juneau.rest.annotation.HtmlDoc @HtmlDoc}: @@ -16676,7 +17252,7 @@ <li>{@link org.apache.juneau.rest.annotation.RestResource#parserListener() @RestResource.parserListener()} <li><code><del>RestConfig.parserListener(Class)</del></code> <li><code><del>RestClientBuilder.listeners(Class,Class)</del></code> - </ul> + </ul>juneau-examples-core.import1.pngjuneau-examples-core.import1.png <li>The {@link org.apache.juneau.BeanContext#BEAN_debug} flag will now capture parser input and make it available through the <code><del>ParserSession.getInputAsString()</del></code> method so that it can be used in the listeners. @@ -16685,7 +17261,7 @@ <ul> <li>New {@link org.apache.juneau.html.annotation.Html#render() @Html.render()} annotation and {@link org.apache.juneau.html.HtmlRender} class that allows you to customize the HTML output and CSS style on bean properties: - <br><img class='bordered' src='doc-files/HtmlRender_1.png'> + <br><img class='bordered' src='doc-files/ReleaseNotes.630.1.png'> <br>Annotation can be applied to POJO classes and bean properties. <li>Several new properties for customizing parts of the HTML page: <ul> @@ -16960,7 +17536,7 @@ <li>All pages now render aside comments to help explain what feature they're trying to explain using the new features that allow you to customize various elements of the page. <br> - <img class='bordered' width="50%" src='doc-files/NewExamplesPage.png'> + <img class='bordered' width="50%" src='doc-files/ReleaseNotes.630.2.png'> </ul> </div> @@ -17757,7 +18333,7 @@ <h5 class='topic'>Core</h5> <ul class='spaced-list'> - <li>Significant changes and enhancements to the <a class='doclink' href='org/apache/juneau/ini/package-summary.html#TOC'>org.apache.juneau.ini</a> API. + <li>Significant changes and enhancements to the <code>org.apache.juneau.ini</code> API. <ul> <li>More consistent handling of comma-delimited lists of objects. <li>New methods in {@link org.apache.juneau.ini.ConfigFile}: @@ -18162,7 +18738,7 @@ <h5 class='topic'>Documentation Updates</h5> <ul class='spaced-list'> <li><del>org.apache.juneau.microservice</del> - New package-level javadoc. - <li><a href='org/apache/juneau/ini/package-summary.html#TOC'>org.apache.juneau.ini</a> - New package-level javadoc. + <li><del>org.apache.juneau.ini</del> - New package-level javadoc. <li><del><code>StringVarResolver</code></del> - New documentation. <li><del>org.apache.juneau.rest.client</del> - New package-level javadoc. <li><code><del>Overview / Samples</del></code> - New section. @@ -18182,7 +18758,7 @@ <h5 class='topic'>Core</h5> <ul class='spaced-list'> - <li>Significant API changes to <a class='doclink' href='org/apache/juneau/ini/package-summary.html#TOC'>org.apache.juneau.ini</a> API. + <li>Significant API changes to <code>org.apache.juneau.ini</code> API. <ul> <li>{@link org.apache.juneau.ini.ConfigFile} is now thread safe and can be shared across multiple threads. <li>New <code><del>ConfigMgr</del></code> class for managing configuration files. -- To stop receiving notification emails like this one, please contact jamesbog...@apache.org.