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 3d5f879 Javadocs.
3d5f879 is described below
commit 3d5f879b9c7cca3f9b25b32e184c38f8849be6fc
Author: JamesBognar <[email protected]>
AuthorDate: Wed Aug 29 12:22:17 2018 -0400
Javadocs.
---
.../org/apache/juneau/remote/RemoteInterface.java | 2 +-
.../apache/juneau/remote/RemoteInterfaceMeta.java | 2 +-
.../juneau/remote/RemoteInterfaceMethod.java | 2 +-
juneau-doc/docs.txt | 2 +-
juneau-doc/juneau-doc.jar | Bin 18889 -> 20178 bytes
.../juneau-microservice.UiCustomization.1.png | Bin 0 -> 56726 bytes
.../org/apache/juneau/doc/internal/Console.java | 100 ++++----
.../apache/juneau/doc/internal/DocGenerator.java | 29 ++-
.../apache/juneau/doc/internal/DocLinkTester.java | 14 +-
.../org/apache/juneau/doc/internal/DocTag.java | 6 +-
.../juneau-microservice.UiCustomization.1.png | Bin 0 -> 56726 bytes
juneau-doc/src/main/javadoc/overview.html | 275 ++++++++++++++++-----
.../10.Transforms/09.BeanPropertyAnnotation.html | 21 +-
.../02.juneau-marshall/11.BeanDictionaries.html | 14 +-
.../25.OpenApiDetails/02.Serializers.html | 2 +-
.../25.OpenApiDetails/03.Parsers.html | 2 +-
.../03.Instantiation/05.ResourceResolvers.html | 2 +-
.../{07.rRPC.html => 07.restRPC.html} | 22 +-
.../27.HtmlDocAnnotation/03.UiCustomization.html | 66 ++++-
.../08.UiCustomization.html | 110 ++++++++-
.../juneau-microservice.UiCustomization.1.png | Bin 0 -> 56726 bytes
.../08.SampleRemoteableServlet.html | 2 +-
.../my-microservice.cfg | 10 +-
.../juneau/rest/remote/RemoteInterfaceServlet.java | 2 +-
24 files changed, 510 insertions(+), 175 deletions(-)
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
index 2fc0023..6bc3b54 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
@@ -22,7 +22,7 @@ import java.lang.annotation.*;
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
- * <li class='link'>{@doc juneau-rest-server.rRPC}
+ * <li class='link'>{@doc juneau-rest-server.restRPC}
* </ul>
*/
@Documented
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMeta.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMeta.java
index 1b48504..f45f7ce 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMeta.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMeta.java
@@ -27,7 +27,7 @@ import java.util.*;
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
- * <li class='link'>{@doc juneau-rest-server.rRPC}
+ * <li class='link'>{@doc juneau-rest-server.restRPC}
* </ul>
*/
public class RemoteInterfaceMeta {
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMethod.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMethod.java
index 3740c92..64261cb 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMethod.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMethod.java
@@ -26,7 +26,7 @@ import org.apache.juneau.internal.*;
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
- * <li class='link'>{@doc juneau-rest-server.rRPC}
+ * <li class='link'>{@doc juneau-rest-server.restRPC}
* </ul>
*/
public class RemoteInterfaceMethod {
diff --git a/juneau-doc/docs.txt b/juneau-doc/docs.txt
index c29b0ca..f353faa 100644
--- a/juneau-doc/docs.txt
+++ b/juneau-doc/docs.txt
@@ -318,7 +318,7 @@ juneau-rest-server.Transforms =
#juneau-rest-server.Transforms, Overview > junea
juneau-rest-server.URIs = #juneau-rest-server.URIs, Overview >
juneau-rest-server > URIs
juneau-rest-server.UnitTesting = #juneau-rest-server.UnitTesting, Overview >
juneau-rest-server > Serverless Unit Testing
juneau-rest-server.UsingWithOsgi = #juneau-rest-server.UsingWithOsgi, Overview
> juneau-rest-server > Using with OSGi
-juneau-rest-server.rRPC = #juneau-rest-server.rRPC, Overview >
juneau-rest-server > rRPC
+juneau-rest-server.restRPC = #juneau-rest-server.restRPC, Overview >
juneau-rest-server > restRPC
juneau-svl = #juneau-svl, Overview > juneau-svl
juneau-svl.OtherNotes = #juneau-svl.OtherNotes, Overview > juneau-svl > Other
Notes
juneau-svl.SimpleVarLanguage = #juneau-svl.SimpleVarLanguage, Overview >
juneau-svl > Simple Variable Language
diff --git a/juneau-doc/juneau-doc.jar b/juneau-doc/juneau-doc.jar
index fb39f62..402c75c 100644
Binary files a/juneau-doc/juneau-doc.jar and b/juneau-doc/juneau-doc.jar differ
diff --git a/juneau-doc/juneau-microservice.UiCustomization.1.png
b/juneau-doc/juneau-microservice.UiCustomization.1.png
new file mode 100644
index 0000000..490cf48
Binary files /dev/null and
b/juneau-doc/juneau-microservice.UiCustomization.1.png differ
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
b/juneau-doc/src/main/java/org/apache/juneau/doc/internal/Console.java
similarity index 64%
copy from
juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
copy to juneau-doc/src/main/java/org/apache/juneau/doc/internal/Console.java
index 2fc0023..531b157 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
+++ b/juneau-doc/src/main/java/org/apache/juneau/doc/internal/Console.java
@@ -1,46 +1,54 @@
-//
***************************************************************************************************************************
-// * 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. *
-//
***************************************************************************************************************************
-package org.apache.juneau.remote;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * Identifies a remote proxy REST interface.
- *
- * <h5 class='section'>See Also:</h5>
- * <ul class='doctree'>
- * <li class='link'>{@doc juneau-rest-server.rRPC}
- * </ul>
- */
-@Documented
-@Target({TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface RemoteInterface {
-
- /**
- * REST service path.
- *
- * <p>
- * The possible values are:
- * <ul class='spaced-list'>
- * <li>An absolute URL.
- * <li>A relative URL interpreted as relative to the root URL
defined on the <code>RestClient</code>
- * <li>No path interpreted as the class name (e.g.
<js>"http://localhost/root-url/org.foo.MyInterface"</js>)
- * </ul>
- */
- String path() default "";
-}
+//
***************************************************************************************************************************
+// * 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. *
+//
***************************************************************************************************************************
+package org.apache.juneau.doc.internal;
+
+import java.text.*;
+
+/**
+ * Console utilities.
+ */
+public class Console {
+
+ /**
+ * Print a console [INFO] message.
+ *
+ * @param msg Message.
+ * @param args Message arguments.
+ */
+ public static void info(String msg, Object...args) {
+ System.out.println("[INFO] " + MessageFormat.format(msg, args));
+ System.out.flush();
+ }
+
+ /**
+ * Print a console [WARNING] message.
+ *
+ * @param msg Message.
+ * @param args Message arguments.
+ */
+ public static void warning(String msg, Object...args) {
+ System.err.println("[WARNING] " + MessageFormat.format(msg,
args));
+ System.err.flush();
+ }
+
+ /**
+ * Print a console [ERROR] message.
+ *
+ * @param msg Message.
+ * @param args Message arguments.
+ */
+ public static void error(String msg, Object...args) {
+ System.err.println("[ERROR] " + MessageFormat.format(msg,
args));
+ System.err.flush();
+ }
+}
diff --git
a/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocGenerator.java
b/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocGenerator.java
index 4d2383c..7c9e572 100644
--- a/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocGenerator.java
+++ b/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocGenerator.java
@@ -12,6 +12,8 @@
//
***************************************************************************************************************************
package org.apache.juneau.doc.internal;
+import static org.apache.juneau.doc.internal.Console.*;
+
import java.io.*;
import java.nio.file.*;
import java.util.*;
@@ -21,6 +23,8 @@ import java.util.*;
*/
public class DocGenerator {
+ static List<String> WARNINGS = new ArrayList<>();
+
/**
* Entry point.
*
@@ -29,6 +33,7 @@ public class DocGenerator {
public static void main(String[] args) {
if (args.length == 0 || args.length == 1 &&
args[0].equals("build"))
build();
+ printWarnings();
}
@@ -130,7 +135,7 @@ public class DocGenerator {
ds.save(new File("docs.txt"));
- System.err.println("Generated target/overview.html in
"+(System.currentTimeMillis()-startTime)+"ms"); // NOT DEBUG
+ info("Generated target/overview.html in {0}ms",
System.currentTimeMillis()-startTime);
startTime = System.currentTimeMillis();
for (File f : new
File("src/main/javadoc/doc-files").listFiles())
@@ -139,7 +144,8 @@ public class DocGenerator {
Files.copy(f.toPath(),
Paths.get("src/main/javadoc/doc-files", f.getName()));
for (File f : releaseNotes.docFiles)
Files.copy(f.toPath(),
Paths.get("src/main/javadoc/doc-files", f.getName()));
- System.err.println("Copied doc-files in
"+(System.currentTimeMillis()-startTime)+"ms"); // NOT DEBUG
+
+ info("Copied doc-files in {0}ms",
System.currentTimeMillis()-startTime);
} catch (IOException e) {
e.printStackTrace();
@@ -216,13 +222,16 @@ public class DocGenerator {
tags = title.substring(1,
title.indexOf('}'));
title =
title.substring(tags.length()+2).trim();
}
+ if (s.contains("{@link org.apache.juneau."))
+ WARNINGS.add("Found {@link
org.apache.juneau...} in file " + f.getAbsolutePath());
contents = s.substring(i).trim()
.replaceAll("oaj\\.",
"org.apache.juneau.")
.replaceAll("oajr\\.",
"org.apache.juneau.rest.")
.replaceAll("oajrc\\.",
"org.apache.juneau.rest.client.")
;
} catch (Exception e) {
- throw new RuntimeException("Problem with file "
+ f.getAbsolutePath());
+ WARNINGS.add("Problem with file " +
f.getAbsolutePath() +", " + e.getMessage());
+ return;
}
for (File d : f.getParentFile().listFiles()) {
@@ -256,12 +265,12 @@ public class DocGenerator {
void reorder(int i) {
if (pageNumber != i) {
File f2 = new File(file.getParentFile(),
String.format("%0"+num.length()+"d", i) + '.' + id + ".html");
- System.err.println("Renaming "+file.getName()+"
to "+f2.getName());
+ info("Renaming {0} to {1}", file.getName(),
f2.getName());
file.renameTo(f2);
}
if (dir != null && dirNumber != i) {
File f2 = new File(file.getParentFile(),
String.format("%0"+num.length()+"d", i) + '.' + id);
- System.err.println("Renaming "+dir.getName()+"
to "+f2.getName());
+ info("Renaming {0} to {1}", dir.getName(),
f2.getName());
dir.renameTo(f2);
}
}
@@ -272,6 +281,16 @@ public class DocGenerator {
}
}
+ static void printWarnings() {
+ if (WARNINGS.isEmpty())
+ info("No DocGenerator warnings.");
+ else {
+ warning(WARNINGS.size()+" DocGenerator warnings:");
+ for (int i = 0; i < WARNINGS.size(); i++)
+ warning("["+(i+1)+"] " + WARNINGS.get(i));
+ }
+ }
+
static class ReleaseFile implements Comparable<ReleaseFile> {
String name, version, title, contents;
diff --git
a/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocLinkTester.java
b/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocLinkTester.java
index 4980110..67aaa46 100644
--- a/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocLinkTester.java
+++ b/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocLinkTester.java
@@ -12,6 +12,8 @@
//
***************************************************************************************************************************
package org.apache.juneau.doc.internal;
+import static org.apache.juneau.doc.internal.Console.*;
+
import java.io.*;
import java.util.*;
import java.util.regex.*;
@@ -38,14 +40,13 @@ public class DocLinkTester {
try {
long startTime = System.currentTimeMillis();
File root = new
File("../target/site/apidocs").getCanonicalFile();
- System.out.println("Checking " + root);
+ info("Checking links in {0}", root);
process(root);
- System.out.println("Checked "+links+" links in " +
files + " files in " + directories + " directories in
"+(System.currentTimeMillis()-startTime)+"ms");
+ info("Checked {0} links in {1} files in {2} directories
in {3}ms", links, files, directories, System.currentTimeMillis()-startTime);
if (errors == 0)
- System.out.println("No errors");
+ info("No link errors");
else {
- System.out.flush();
- System.err.println(errors + " errors"); // NOT
DEBUG
+ Console.error(errors + " errors"); // NOT DEBUG
}
} catch (Exception e) {
e.printStackTrace();
@@ -116,7 +117,6 @@ public class DocLinkTester {
private static void error(File f, String msg) {
errors++;
- System.out.flush();
- System.err.println("ERROR: " + f.getAbsolutePath() + ", " +
msg); // NOT DEBUG
+ Console.error("{0}: {1}", f.getAbsolutePath(), msg);
}
}
diff --git
a/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocTag.java
b/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocTag.java
index db787a5..15abe13 100644
--- a/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocTag.java
+++ b/juneau-doc/src/main/java/org/apache/juneau/doc/internal/DocTag.java
@@ -12,6 +12,8 @@
//
***************************************************************************************************************************
package org.apache.juneau.doc.internal;
+import static org.apache.juneau.doc.internal.Console.*;
+
import com.sun.tools.doclets.Taglet;
import com.sun.javadoc.*;
@@ -107,7 +109,7 @@ public class DocTag implements Taglet {
}
DocStore.Link l = STORE.getLink(key);
if (l == null) {
- System.err.println("Unknown doc tag '" + key +
"'");
+ error("Unknown doc tag: {0}", key);
return tag.text();
}
href = l.href;
@@ -124,7 +126,7 @@ public class DocTag implements Taglet {
while (true) {
f = f.getParentFile();
if (f == null) {
- System.err.println("Unknown doc tag
href: " + tag.text());
+ error("Unknown doc tag href: {0}",
tag.text());
return tag.text();
}
if (f.getName().equals("java"))
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice.UiCustomization.1.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice.UiCustomization.1.png
new file mode 100644
index 0000000..490cf48
Binary files /dev/null and
b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice.UiCustomization.1.png
differ
diff --git a/juneau-doc/src/main/javadoc/overview.html
b/juneau-doc/src/main/javadoc/overview.html
index b9a80aa..eeade7d 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -188,8 +188,8 @@
<li><p class='new'><a class='doclink'
href='#juneau-marshall.OpenApiDetails'>OpenAPI Details</a></p>
<ol>
<li><p class='new'><a class='doclink'
href='#juneau-marshall.OpenApiDetails.Methodology'>OpenAPI Methodology</a></p>
- <li><p class='todo'><a class='doclink'
href='#juneau-marshall.OpenApiDetails.Serializers'>OpenAPI Serializers</a></p>
- <li><p class='todo'><a class='doclink'
href='#juneau-marshall.OpenApiDetails.Parsers'>OpenAPI Parsers</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-marshall.OpenApiDetails.Serializers'>OpenAPI Serializers</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-marshall.OpenApiDetails.Parsers'>OpenAPI Parsers</a></p>
</ol>
<li><p class=''><a class='doclink'
href='#juneau-marshall.BestPractices'>Best Practices</a></p>
</ol>
@@ -297,7 +297,7 @@
<li><p class='new'><a class='doclink'
href='#juneau-rest-server.RestMethod.PredefinedExceptions'>Predefined
Exceptions</a></p>
<li><p class='new'><a class='doclink'
href='#juneau-rest-server.RestMethod.PredefinedHelperBeans'>Predefined Helper
Beans</a></p>
</ol>
- <li><p class='updated'><a class='doclink'
href='#juneau-rest-server.rRPC'>rRPC</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-rest-server.restRPC'>restRPC</a></p>
<li><p class='new'><a class='doclink'
href='#juneau-rest-server.OpenApiSchemaPartParsing'>OpenAPI Schema Part
Parsing</a></p>
<li><p class='new'><a class='doclink'
href='#juneau-rest-server.OpenApiSchemaPartSerializing'>OpenAPI Schema Part
Serializing</a></p>
<li><p class='new'><a class='doclink'
href='#juneau-rest-server.HttpPartAnnotations'>HTTP-Part Annotations</a></p>
@@ -338,7 +338,7 @@
<ol>
<li><p class=''><a class='doclink'
href='#juneau-rest-server.HtmlDocAnnotation.Widgets'>Widgets</a></p>
<li><p class='todo'><a class='doclink'
href='#juneau-rest-server.HtmlDocAnnotation.PredefinedWidgets'>Predefined
Widgets</a></p>
- <li><p class='todo'><a class='doclink'
href='#juneau-rest-server.HtmlDocAnnotation.UiCustomization'>UI
Customization</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-rest-server.HtmlDocAnnotation.UiCustomization'>UI
Customization</a></p>
<li><p class=''><a class='doclink'
href='#juneau-rest-server.HtmlDocAnnotation.Stylesheets'>Stylesheets</a></p>
</ol>
<li><p class=''><a class='doclink'
href='#juneau-rest-server.DefaultHeaders'>Default Headers</a></p>
@@ -409,7 +409,7 @@
<ol>
<li><p class=''><a class='doclink'
href='#juneau-microservice-server.RestMicroservice.Extending'>Extending
RestMicroservice</a></p>
</ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-server.UiCustomization'>UI Customization</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-microservice-server.UiCustomization'>UI Customization</a></p>
</ol>
<li><p class='toc2 '><a class='doclink'
href='#juneau-examples-core'>juneau-examples-core</a></p>
<li><p class='toc2 '><a class='doclink'
href='#juneau-examples-rest'>juneau-examples-rest</a></p>
@@ -2629,12 +2629,13 @@
<jc>// Identify concrete type as a HashMap.</jc>
<ja>@BeanProperty</ja>(type=HashMap.<jk>class</jk>)
<jk>public</jk> Map <jf>p1</jf>;
- </p>
- <p>
- The {@link
org.apache.juneau.annotation.BeanProperty#params() @BeanProperty(params)}
annotation
- is for bean properties of type map or
collection.
- <br>It's used to identify the class types of
the contents of the bean property object when
- the general parameter types are interfaces or
abstract classes.
+ }
+</p>
+<p>
+ The {@link org.apache.juneau.annotation.BeanProperty#params()
@BeanProperty(params)} annotation
+ is for bean properties of type map or collection.
+ <br>It's used to identify the class types of the contents of the bean
property object when
+ the general parameter types are interfaces or abstract classes.
</p>
<p class='bpcode w800'>
<jk>public class</jk> MyBean {
@@ -2670,10 +2671,10 @@
<jc>// Renders "{x1:{f1:1}}"</jc>
String json = JsonSerializer.<jsf>DEFAULT</jsf>.serialize(<jk>new</jk>
MyClass());
- </p>
- <p>
- The {@link
org.apache.juneau.annotation.BeanProperty#format() @BeanProperty(format)}
- annotation specifies a String format for
converting a bean property value to a formatted string.
+</p>
+<p>
+ The {@link org.apache.juneau.annotation.BeanProperty#format()
@BeanProperty(format)}
+ annotation specifies a String format for converting a bean property
value to a formatted string.
</p>
<p class='bpcode w800'>
<jc>// Serialize a float as a string with 2 decimal places.</jc>
@@ -3284,13 +3285,13 @@
{_type:<js>'baz'</js>}
]
}
- </p>
- <p>
- Type names can be represented slightly differently in different
languages.
- <br>For example, the dictionary name is used as element names
when serialized to XML.
- <br>This allows the <code>typeName</code> annotation to be used
as a shortcut for defining element names for
- beans.
- </p>
+</p>
+<p>
+ Type names can be represented slightly differently in different
languages.
+ <br>For example, the dictionary name is used as element names when
serialized to XML.
+ <br>This allows the <code>typeName</code> annotation to be used as a
shortcut for defining element names for
+ beans.
+</p>
<p>
When serialized as XML, the bean is rendered as:
</p>
@@ -8814,7 +8815,7 @@
<!--
====================================================================================================
-->
-<h4 class='topic todo' onclick='toggle(this)'><a
href='#juneau-marshall.OpenApiDetails.Serializers'
id='juneau-marshall.OpenApiDetails.Serializers'>2.25.2 - OpenAPI
Serializers</a></h4>
+<h4 class='topic new' onclick='toggle(this)'><a
href='#juneau-marshall.OpenApiDetails.Serializers'
id='juneau-marshall.OpenApiDetails.Serializers'>2.25.2 - OpenAPI
Serializers</a></h4>
<div class='topic'><!-- START: 2.25.2 -
juneau-marshall.OpenApiDetails.Serializers -->
<p>
The {@link org.apache.juneau.oapi.OpenApiSerializer} class is used to
convert POJOs to HTTP parts.
@@ -9253,7 +9254,7 @@
<!--
====================================================================================================
-->
-<h4 class='topic todo' onclick='toggle(this)'><a
href='#juneau-marshall.OpenApiDetails.Parsers'
id='juneau-marshall.OpenApiDetails.Parsers'>2.25.3 - OpenAPI Parsers</a></h4>
+<h4 class='topic new' onclick='toggle(this)'><a
href='#juneau-marshall.OpenApiDetails.Parsers'
id='juneau-marshall.OpenApiDetails.Parsers'>2.25.3 - OpenAPI Parsers</a></h4>
<div class='topic'><!-- START: 2.25.3 - juneau-marshall.OpenApiDetails.Parsers
-->
<p>
The {@link org.apache.juneau.oapi.OpenApiParser} class is used to
convert HTTP parts back into POJOs.
@@ -13273,7 +13274,7 @@
<li class='jm'><code><jk>public</jk> T()</code>
<li class='jm'><code><jk>public</jk> T(RestContextBuilder)</code>
</ul>
- <p>
+<p>
The latter constructor can be used to get access to the {@link
org.apache.juneau.rest.RestContextBuilder} object to make
any configurations to the resource before it's initialized.
</p>
@@ -14838,10 +14839,10 @@
<!--
====================================================================================================
-->
-<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-rest-server.rRPC' id='juneau-rest-server.rRPC'>7.7 - rRPC</a></h3>
-<div class='topic'><!-- START: 7.7 - juneau-rest-server.rRPC -->
+<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-rest-server.restRPC' id='juneau-rest-server.restRPC'>7.7 -
restRPC</a></h3>
+<div class='topic'><!-- START: 7.7 - juneau-rest-server.restRPC -->
<p>
- The rRPC (RPC over REST) API allows the creation of client-side remote
proxy interfaces for calling methods on server-side POJOs using entirely REST.
+ The restRPC (RPC over REST) API allows the creation of client-side
remote proxy interfaces for calling methods on server-side POJOs using entirely
REST.
</p>
<h5 class='topic'>Remote Interfaces</h5>
@@ -15027,7 +15028,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.1.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.1.png'>
<p>
Clicking the hyperlinks on each shows you the list of methods that can
be invoked on that service.
<br>Note that the <code>IAddressBook</code> link shows that you can
only invoke methods defined on that
@@ -15037,7 +15038,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote/org.apache.juneau.examples.addressbook.IAddressBook
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.2.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.2.png'>
<p>
Since <code>AddressBook</code> extends from <code>LinkedList</code>,
you may notice familiar collections
framework methods listed.
@@ -15046,7 +15047,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote/org.apache.juneau.examples.addressbook.AddressBook
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.3.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.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.
@@ -15100,12 +15101,12 @@
<br>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 w400' src='doc-files/juneau-rest-server.rRPC.4.png'>
+<img class='bordered w400' src='doc-files/juneau-rest-server.restRPC.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 w400' src='doc-files/juneau-rest-server.rRPC.5.png'>
+<img class='bordered w400' src='doc-files/juneau-rest-server.restRPC.5.png'>
<p>
From there, we could use the following code snippet to reconstruct the
response object from JSON:
</p>
@@ -15132,7 +15133,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote/org.apache.juneau.examples.addressbook.IAddressBook/getPeople?method=POST
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.6.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.6.png'>
<p>
Here we call the <code>findPerson(<jk>int</jk>)</code> method to
retrieve a person and get the
returned POJO (in this case as HTML since that's what's in the
<code>Accept</code> header when calling from a
@@ -15141,7 +15142,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote/org.apache.juneau.examples.addressbook.IAddressBook/findPerson(int)?method=POST&body=@(3)
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.7.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.7.png'>
<p>
When specifying the POST body as a <code>&body</code> parameter,
the method arguments should be in UON
notation.
@@ -15155,10 +15156,10 @@
passing parameters in UON notation as URL-encoded form posts.
</p>
<h5 class='figure'>Sample form entry page</h5>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.8.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.8.png'>
<h5 class='figure'>Sample form entry page results</h5>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.9.png'>
-</div><!-- END: 7.7 - juneau-rest-server.rRPC -->
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.9.png'>
+</div><!-- END: 7.7 - juneau-rest-server.restRPC -->
<!--
====================================================================================================
-->
@@ -18754,7 +18755,7 @@ TODO(7.2.0)
<!--
====================================================================================================
-->
-<h4 class='topic todo' onclick='toggle(this)'><a
href='#juneau-rest-server.HtmlDocAnnotation.UiCustomization'
id='juneau-rest-server.HtmlDocAnnotation.UiCustomization'>7.27.3 - UI
Customization</a></h4>
+<h4 class='topic updated' onclick='toggle(this)'><a
href='#juneau-rest-server.HtmlDocAnnotation.UiCustomization'
id='juneau-rest-server.HtmlDocAnnotation.UiCustomization'>7.27.3 - UI
Customization</a></h4>
<div class='topic'><!-- START: 7.27.3 -
juneau-rest-server.HtmlDocAnnotation.UiCustomization -->
<p>
The HTML views of POJOs can somewhat be considered a rudimentary User
Interface.
@@ -18779,8 +18780,47 @@ TODO(7.2.0)
<br>Instead, it just uses the existing open-ended API for defining
branding.
</p>
<p>
- The Juneau icon shown is a result of the header annotation on the
{@link org.apache.juneau.rest.BasicRestServlet} class:
+ The Juneau icon shown is a result of the header annotation on the
{@link org.apache.juneau.rest.BasicRestConfig} class:
</p>
+<p class='bpcode w800'>
+ <ja>@RestResource</ja>(
+ ...
+ <jc>// HTML-page specific settings</jc>
+ htmldoc=<ja>@HtmlDoc</ja>(
+
+ <jc>// Default page header contents.</jc>
+ header={
+
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
+
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
+ <js>"$C{REST/header}"</js> <jc>// Extra header
HTML defined in external config file.</jc>
+ },
+
+ <jc>// Default stylesheet to use for the page.
+ // Can be overridden from external config file.
+ // Default is DevOps look-and-feel (aka Depression
look-and-feel).</jc>
+
stylesheet=<js>"$C{REST/theme,servlet:/htdocs/themes/devops.css}"</js>,
+
+ <jc>// Default contents to add to the <head>
section of the HTML page.
+ // Use it to add a favicon link to the page.</jc>
+ head={
+ <js>"<link rel='icon'
href='$U{$C{REST/favicon}}'/>"</js>
+ },
+
+ <jc>// No default page footer contents.
+ // Can be overridden from external config file.</jc>
+ footer=<js>"$C{REST/footer}"</js>
+ ),
+
+ <jc>// Optional external configuration file.</jc>
+ config=<js>"$S{juneau.configFile}"</js>,
+
+ <jc>// These are static files that are served up by the servlet
under the specified sub-paths.
+ // For example, "/servletPath/htdocs/javadoc.css" resolves to
the file "[servlet-package]/htdocs/javadoc.css"
+ // By default, we define static files through the external
configuration file.</jc>
+ staticFiles=<js>"$C{REST/staticFiles}"</js>
+ )
+ <jk>public interface</jk> BasicRestConfig {}
+</p>
<p class='bpcode w800'>
<ja>@RestResource</ja>(
...
@@ -18788,19 +18828,20 @@ TODO(7.2.0)
header={
<js>"<h1>$R{resourceTitle}</h1>"</js>,
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>,
- <js>"<a
href='http://juneau.apache.org'>"</js>
- +<js>"<img
src='$U{servlet:/htdocs/juneau.png}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/>"</js>
+ <js>"<a
href='http://my.project.org'>"</js>
+ +<js>"<img
src='$U{servlet:/my-htdocs/my-project.png}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/>"</js>
+<js>"</a>"</js>
},
head={
<jc>// Browser tab icon.</jc>
- <js>"<link rel='icon'
href='$U{servlet:/htdocs/juneau.png}'/>"</js>
+ <js>"<link rel='icon'
href='$U{servlet:/my-htdocs/my-project.png}'/>"</js>
}
),
- staticFiles={<js>"htdocs:htdocs"</js>}
+ staticFiles={<js>"my-htdocs:my-htdocs"</js>}
)
- <jk>public abstract class</jk> BasicRestServlet <jk>extends</jk>
RestServlet {...}
+ <jk>public abstract class</jk> BasicRestServlet <jk>extends</jk>
RestServlet <jk>implements</jk> BasicRestConfig {...}
</p>
+
<p>
The <js>"juneau.png"</js> image file is located in
<code>org.apache.juneau.rest.htdocs</code> package and
is served up via the <code>staticFiles</code> annotation (i.e. anything
in the <code>org.apache.juneau.rest.htdocs</code>
@@ -18874,10 +18915,14 @@ TODO(7.2.0)
...
)
<jk>public class</jk> MyResourceBaseClass <jk>extends</jk>
BasicRestServlet {...}
- </p>
- <p>
- Note how the "User Interface" is open-ended to pretty much lets
you do whatever you want.
- </p>
+</p>
+<p>
+ Note how the "User Interface" is open-ended to pretty much lets you do
whatever you want.
+</p>
+<h5 class='figure'>See Also:</h5>
+<ul>
+ <li class='doclink'>{@doc juneau-microservice-server.UiCustomization}
+</ul>
</div><!-- END: 7.27.3 - juneau-rest-server.HtmlDocAnnotation.UiCustomization
-->
<!--
====================================================================================================
-->
@@ -20109,8 +20154,6 @@ TODO(7.2.0)
<li class='ja'>{@link
org.apache.juneau.http.annotation.FormData FormData}
<li class='ja'>{@link org.apache.juneau.http.annotation.Query
Query}
<li class='ja'>{@link org.apache.juneau.http.annotation.Path
Path}
- <li class='ja'>{@link
org.apache.juneau.http.annotation.HasFormData HasFormData}
- <li class='ja'>{@link
org.apache.juneau.http.annotation.HasQuery HasQuery}
<li class='ja'>{@link org.apache.juneau.http.annotation.Request
Request}
<li class='ja'>{@link
org.apache.juneau.http.annotation.Response Response}
</ul>
@@ -20992,25 +21035,18 @@ TODO(7.2.0)
<h4 class='topic new' onclick='toggle(this)'><a
href='#juneau-rest-client.RestProxies.Response'
id='juneau-rest-client.RestProxies.Response'>9.1.9 - @Response</a></h4>
<div class='topic'><!-- START: 9.1.9 - juneau-rest-client.RestProxies.Response
-->
<p>
- The {@link org.apache.juneau.http.annotation.Response @Response}
annotation can be applied to either <ja>@RemoteMethod</ja>-annotated methods
- or types returned by <ja>@RemoteMethod</ja>-annotated methods.
+ The {@link org.apache.juneau.http.annotation.Response @Response}
annotation can be applied to types returned by <ja>@RemoteMethod</ja>-annotated
methods.
</p>
<ul class='doctree'>
<li class='ja'>{@link org.apache.juneau.http.annotation.Response
Response}
<ul>
<li class='jf'>{@link
org.apache.juneau.http.annotation.Response#partParser() partParser} - Override
the part parser.
- <li class='jf'>{@link
org.apache.juneau.http.annotation.Response#schema() schema} - Swagger schema.
</ul>
</ul>
-<h5 class='topic'>On @RemoteMethod-annotated methods</h5>
<p>
- The annotation can be used to provide schema information about the
response body to provide OpenAPI schema based part parsing and validation.
-</p>
-
-<h5 class='topic'>Response interfaces</h5>
-<p>
- The <ja>@Response</ja> annotation can also be used to define interfaces
for retrieving response parts using a bean-like proxies.
+ The <ja>@Response</ja> annotation can be used to define interfaces for
retrieving response parts using a bean-like proxy.
</p>
+<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
<ja>@RemoteResource</ja>
<jk>public interface</jk> PetStore {
@@ -21052,6 +21088,9 @@ TODO(7.2.0)
<li class='ja'>{@link org.apache.juneau.http.annotation.ResponseHeader
ResponseHeader}
<li class='ja'>{@link org.apache.juneau.http.annotation.ResponseStatus
ResponseStatus}
</ul>
+<p>
+ The behavior and functionality of all of the annotations are the same
as if they were used on method arguments directly. This means full support for
OpenAPI serialization and validation.
+</p>
</div><!-- END: 9.1.9 - juneau-rest-client.RestProxies.Response -->
</div><!-- END: 9.1 - juneau-rest-client.RestProxies -->
@@ -22529,9 +22568,117 @@ TODO(7.2.0)
<!--
====================================================================================================
-->
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-server.UiCustomization'
id='juneau-microservice-server.UiCustomization'>10.8 - UI Customization</a></h3>
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-microservice-server.UiCustomization'
id='juneau-microservice-server.UiCustomization'>10.8 - UI Customization</a></h3>
<div class='topic'><!-- START: 10.8 -
juneau-microservice-server.UiCustomization -->
-TODO(7.2.0)
+<p>
+ The Microservice project contains a <code>files/htdocs</code> working
directly folder with predefined stylesheets and
+ images.
+</p>
+<img style='width:200px'
src='doc-files/juneau-microservice.UiCustomization.1.png'>
+<p>
+ These files can be used to tailor the look-and-feel of your
microservice.
+</p>
+<p class='bpcode w800'>
+ http://localhost:10000/helloWorld
+</p>
+<img class='bordered w800'
src='doc-files/juneau-rest-server.UiCustomization.1.png'>
+<p>
+ The REST configuration section of your microservice configuration file
can be used to tailor the header and footer on the pages:
+</p>
+<p class='bpcode w800'>
+
<cc>#=======================================================================================================================
+ # REST settings
+
#=======================================================================================================================</cc>
+ <cs>[REST]</cs>
+
+ <ck>staticFiles</ck> = <cv>htdocs:files/htdocs</cv>
+
+ <cc># Stylesheet to use for HTML views.</cc>
+ <ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+
+ <ck>headerIcon</ck> = <cv>servlet:/htdocs/images/juneau.png</cv>
+ <ck>headerLink</ck> = <cv>http://juneau.apache.org</cv>
+ <ck>footerIcon</ck> = <cv>servlet:/htdocs/images/asf.png</cv>
+ <ck>footerLink</ck> = <cv>http://www.apache.org</cv>
+
+ <ck>favicon</ck> = <cv>$C{REST/headerIcon}</cv>
+ <ck>header</ck> =
+ <cv><a href='$U{$C{REST/headerLink}}'></cv>
+ <cv><img src='$U{$C{REST/headerIcon}}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/></cv>
+ <cv></a></cv>
+ <ck>footer</ck> =
+ <cv><a href='$U{$C{REST/footerLink}}'></cv>
+ <cv><img src='$U{$C{REST/footerIcon}}'
style='float:right;padding-right:20px;height:32px'/></cv>
+ <cv></a></cv>
+</p>
+<p>
+ The {@link org.apache.juneau.rest.BasicRestConfig} interface (which
defines the default settings for {@link
org.apache.juneau.rest.BasicRestServlet}
+ pulls in this information using {@link
org.apache.juneau.config.vars.ConfigVar $C} and {@link
org.apache.juneau.rest.vars.UrlVar $U} variables:
+</p>
+<p class='bpcode w800'>
+ <ja>@RestResource</ja>(
+ ...
+ <jc>// HTML-page specific settings</jc>
+ htmldoc=<ja>@HtmlDoc</ja>(
+
+ <jc>// Default page header contents.</jc>
+ header={
+
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
+
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
+ <js>"$C{REST/header}"</js> <jc>// Extra header
HTML defined in external config file.</jc>
+ },
+
+ <jc>// Default stylesheet to use for the page.
+ // Can be overridden from external config file.
+ // Default is DevOps look-and-feel (aka Depression
look-and-feel).</jc>
+
stylesheet=<js>"$C{REST/theme,servlet:/htdocs/themes/devops.css}"</js>,
+
+ <jc>// Default contents to add to the <head>
section of the HTML page.
+ // Use it to add a favicon link to the page.</jc>
+ head={
+ <js>"<link rel='icon'
href='$U{$C{REST/favicon}}'/>"</js>
+ },
+
+ <jc>// No default page footer contents.
+ // Can be overridden from external config file.</jc>
+ footer=<js>"$C{REST/footer}"</js>
+ ),
+
+ <jc>// Optional external configuration file.</jc>
+ config=<js>"$S{juneau.configFile}"</js>,
+
+ <jc>// These are static files that are served up by the servlet
under the specified sub-paths.
+ // For example, "/servletPath/htdocs/javadoc.css" resolves to
the file "[servlet-package]/htdocs/javadoc.css"
+ // By default, we define static files through the external
configuration file.</jc>
+ staticFiles=<js>"$C{REST/staticFiles}"</js>
+ )
+ <jk>public interface</jk> BasicRestConfig {}
+</p>
+<p>
+ Note that the <code>files/htdocs</code> directory is mapped to
<js>"servlet:/htdocs"</js> using the <code>staticFiles</code>
+ setting. This allows those files to be served up through the servlet
through the URL <js>"/[servlet-path]/htdocs"</js>
+</p>
+<p>
+ The theme files are externally accessible and can be modified to
produce any look-and-feel you desire.
+ The microservice still works without the files directory. An embedded
<code>devops.css</code> is included in the jar as a default spreadsheet.
+</p>
+<p>
+ If you're testing out changes in the theme stylesheets, you may want to
set the following system property that prevents caching of those files so
+ that you don't need to restart the microservice each time a change is
made:
+</p>
+<p class='bpcode w800'>
+
<cc>#=======================================================================================================================
+ # System properties
+
#-----------------------------------------------------------------------------------------------------------------------
+ # These are arbitrary system properties that are set during startup.
+
#=======================================================================================================================</cc>
+ <cs>[SystemProperties]</cs>
+
+ <cc># Disable classpath resource caching.
+ # Useful if you're attached using a debugger and you're modifying
classpath resources while running.</cc>
+ <ck>RestContext.useClasspathResourceCaching.b</ck> = <cv>false</cv>
+
+</p>
</div><!-- END: 10.8 - juneau-microservice-server.UiCustomization -->
</div><!-- END: 10 - juneau-microservice-server -->
@@ -24826,7 +24973,7 @@ TODO(7.2.0)
</ul>
<h5 class='section'>See Also:</h5>
<ul>
- <li class='link'>{@doc juneau-rest-server.rRPC}
+ <li class='link'>{@doc juneau-rest-server.restRPC}
</ul>
</div><!-- END: 12.8 - juneau-examples-rest.SampleRemoteableServlet -->
diff --git
a/juneau-doc/src/main/resources/Topics/02.juneau-marshall/10.Transforms/09.BeanPropertyAnnotation.html
b/juneau-doc/src/main/resources/Topics/02.juneau-marshall/10.Transforms/09.BeanPropertyAnnotation.html
index f52c7a9..d2ab0d6 100644
---
a/juneau-doc/src/main/resources/Topics/02.juneau-marshall/10.Transforms/09.BeanPropertyAnnotation.html
+++
b/juneau-doc/src/main/resources/Topics/02.juneau-marshall/10.Transforms/09.BeanPropertyAnnotation.html
@@ -146,12 +146,13 @@
<jc>// Identify concrete type as a HashMap.</jc>
<ja>@BeanProperty</ja>(type=HashMap.<jk>class</jk>)
<jk>public</jk> Map <jf>p1</jf>;
- </p>
- <p>
- The {@link oaj.annotation.BeanProperty#params()
@BeanProperty(params)} annotation
- is for bean properties of type map or
collection.
- <br>It's used to identify the class types of
the contents of the bean property object when
- the general parameter types are interfaces or
abstract classes.
+ }
+</p>
+<p>
+ The {@link oaj.annotation.BeanProperty#params() @BeanProperty(params)}
annotation
+ is for bean properties of type map or collection.
+ <br>It's used to identify the class types of the contents of the bean
property object when
+ the general parameter types are interfaces or abstract classes.
</p>
<p class='bpcode w800'>
<jk>public class</jk> MyBean {
@@ -187,10 +188,10 @@
<jc>// Renders "{x1:{f1:1}}"</jc>
String json = JsonSerializer.<jsf>DEFAULT</jsf>.serialize(<jk>new</jk>
MyClass());
- </p>
- <p>
- The {@link oaj.annotation.BeanProperty#format()
@BeanProperty(format)}
- annotation specifies a String format for
converting a bean property value to a formatted string.
+</p>
+<p>
+ The {@link oaj.annotation.BeanProperty#format() @BeanProperty(format)}
+ annotation specifies a String format for converting a bean property
value to a formatted string.
</p>
<p class='bpcode w800'>
<jc>// Serialize a float as a string with 2 decimal places.</jc>
diff --git
a/juneau-doc/src/main/resources/Topics/02.juneau-marshall/11.BeanDictionaries.html
b/juneau-doc/src/main/resources/Topics/02.juneau-marshall/11.BeanDictionaries.html
index 7b1b98b..a2b0ef0 100644
---
a/juneau-doc/src/main/resources/Topics/02.juneau-marshall/11.BeanDictionaries.html
+++
b/juneau-doc/src/main/resources/Topics/02.juneau-marshall/11.BeanDictionaries.html
@@ -64,13 +64,13 @@ Bean Names and Dictionaries
{_type:<js>'baz'</js>}
]
}
- </p>
- <p>
- Type names can be represented slightly differently in different
languages.
- <br>For example, the dictionary name is used as element names
when serialized to XML.
- <br>This allows the <code>typeName</code> annotation to be used
as a shortcut for defining element names for
- beans.
- </p>
+</p>
+<p>
+ Type names can be represented slightly differently in different
languages.
+ <br>For example, the dictionary name is used as element names when
serialized to XML.
+ <br>This allows the <code>typeName</code> annotation to be used as a
shortcut for defining element names for
+ beans.
+</p>
<p>
When serialized as XML, the bean is rendered as:
</p>
diff --git
a/juneau-doc/src/main/resources/Topics/02.juneau-marshall/25.OpenApiDetails/02.Serializers.html
b/juneau-doc/src/main/resources/Topics/02.juneau-marshall/25.OpenApiDetails/02.Serializers.html
index b7fce15..8cf3325 100644
---
a/juneau-doc/src/main/resources/Topics/02.juneau-marshall/25.OpenApiDetails/02.Serializers.html
+++
b/juneau-doc/src/main/resources/Topics/02.juneau-marshall/25.OpenApiDetails/02.Serializers.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{todo} OpenAPI Serializers
+{new} OpenAPI Serializers
<p>
The {@link oaj.oapi.OpenApiSerializer} class is used to convert POJOs
to HTTP parts.
diff --git
a/juneau-doc/src/main/resources/Topics/02.juneau-marshall/25.OpenApiDetails/03.Parsers.html
b/juneau-doc/src/main/resources/Topics/02.juneau-marshall/25.OpenApiDetails/03.Parsers.html
index c5d61fd..a50978a 100644
---
a/juneau-doc/src/main/resources/Topics/02.juneau-marshall/25.OpenApiDetails/03.Parsers.html
+++
b/juneau-doc/src/main/resources/Topics/02.juneau-marshall/25.OpenApiDetails/03.Parsers.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{todo} OpenAPI Parsers
+{new} OpenAPI Parsers
<p>
The {@link oaj.oapi.OpenApiParser} class is used to convert HTTP parts
back into POJOs.
diff --git
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/03.Instantiation/05.ResourceResolvers.html
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/03.Instantiation/05.ResourceResolvers.html
index d5f9dab..034604d 100644
---
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/03.Instantiation/05.ResourceResolvers.html
+++
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/03.Instantiation/05.ResourceResolvers.html
@@ -23,7 +23,7 @@ Resource Resolvers
<li class='jm'><code><jk>public</jk> T()</code>
<li class='jm'><code><jk>public</jk> T(RestContextBuilder)</code>
</ul>
- <p>
+<p>
The latter constructor can be used to get access to the {@link
oajr.RestContextBuilder} object to make
any configurations to the resource before it's initialized.
</p>
diff --git
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/07.rRPC.html
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/07.restRPC.html
similarity index 93%
rename from
juneau-doc/src/main/resources/Topics/07.juneau-rest-server/07.rRPC.html
rename to
juneau-doc/src/main/resources/Topics/07.juneau-rest-server/07.restRPC.html
index 038072b..d1e29c5 100644
--- a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/07.rRPC.html
+++ b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/07.restRPC.html
@@ -13,10 +13,10 @@
***************************************************************************************************************************/
-->
-{updated} rRPC
+{updated} restRPC
<p>
- The rRPC (RPC over REST) API allows the creation of client-side remote
proxy interfaces for calling methods on server-side POJOs using entirely REST.
+ The restRPC (RPC over REST) API allows the creation of client-side
remote proxy interfaces for calling methods on server-side POJOs using entirely
REST.
</p>
<h5 class='topic'>Remote Interfaces</h5>
@@ -202,7 +202,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.1.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.1.png'>
<p>
Clicking the hyperlinks on each shows you the list of methods that can
be invoked on that service.
<br>Note that the <code>IAddressBook</code> link shows that you can
only invoke methods defined on that
@@ -212,7 +212,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote/org.apache.juneau.examples.addressbook.IAddressBook
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.2.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.2.png'>
<p>
Since <code>AddressBook</code> extends from <code>LinkedList</code>,
you may notice familiar collections
framework methods listed.
@@ -221,7 +221,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote/org.apache.juneau.examples.addressbook.AddressBook
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.3.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.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.
@@ -275,12 +275,12 @@
<br>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 w400' src='doc-files/juneau-rest-server.rRPC.4.png'>
+<img class='bordered w400' src='doc-files/juneau-rest-server.restRPC.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 w400' src='doc-files/juneau-rest-server.rRPC.5.png'>
+<img class='bordered w400' src='doc-files/juneau-rest-server.restRPC.5.png'>
<p>
From there, we could use the following code snippet to reconstruct the
response object from JSON:
</p>
@@ -307,7 +307,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote/org.apache.juneau.examples.addressbook.IAddressBook/getPeople?method=POST
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.6.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.6.png'>
<p>
Here we call the <code>findPerson(<jk>int</jk>)</code> method to
retrieve a person and get the
returned POJO (in this case as HTML since that's what's in the
<code>Accept</code> header when calling from a
@@ -316,7 +316,7 @@
<p class='bpcode w800'>
http://localhost:10000/remote/org.apache.juneau.examples.addressbook.IAddressBook/findPerson(int)?method=POST&body=@(3)
</p>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.7.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.7.png'>
<p>
When specifying the POST body as a <code>&body</code> parameter,
the method arguments should be in UON
notation.
@@ -330,6 +330,6 @@
passing parameters in UON notation as URL-encoded form posts.
</p>
<h5 class='figure'>Sample form entry page</h5>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.8.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.8.png'>
<h5 class='figure'>Sample form entry page results</h5>
-<img class='bordered w800' src='doc-files/juneau-rest-server.rRPC.9.png'>
+<img class='bordered w800' src='doc-files/juneau-rest-server.restRPC.9.png'>
diff --git
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/03.UiCustomization.html
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/03.UiCustomization.html
index 3de217d..8b54444 100644
---
a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/03.UiCustomization.html
+++
b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/27.HtmlDocAnnotation/03.UiCustomization.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{todo} UI Customization
+{updated} UI Customization
<p>
The HTML views of POJOs can somewhat be considered a rudimentary User
Interface.
@@ -38,8 +38,47 @@
<br>Instead, it just uses the existing open-ended API for defining
branding.
</p>
<p>
- The Juneau icon shown is a result of the header annotation on the
{@link oajr.BasicRestServlet} class:
+ The Juneau icon shown is a result of the header annotation on the
{@link oajr.BasicRestConfig} class:
</p>
+<p class='bpcode w800'>
+ <ja>@RestResource</ja>(
+ ...
+ <jc>// HTML-page specific settings</jc>
+ htmldoc=<ja>@HtmlDoc</ja>(
+
+ <jc>// Default page header contents.</jc>
+ header={
+
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
+
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
+ <js>"$C{REST/header}"</js> <jc>// Extra header
HTML defined in external config file.</jc>
+ },
+
+ <jc>// Default stylesheet to use for the page.
+ // Can be overridden from external config file.
+ // Default is DevOps look-and-feel (aka Depression
look-and-feel).</jc>
+
stylesheet=<js>"$C{REST/theme,servlet:/htdocs/themes/devops.css}"</js>,
+
+ <jc>// Default contents to add to the <head>
section of the HTML page.
+ // Use it to add a favicon link to the page.</jc>
+ head={
+ <js>"<link rel='icon'
href='$U{$C{REST/favicon}}'/>"</js>
+ },
+
+ <jc>// No default page footer contents.
+ // Can be overridden from external config file.</jc>
+ footer=<js>"$C{REST/footer}"</js>
+ ),
+
+ <jc>// Optional external configuration file.</jc>
+ config=<js>"$S{juneau.configFile}"</js>,
+
+ <jc>// These are static files that are served up by the servlet
under the specified sub-paths.
+ // For example, "/servletPath/htdocs/javadoc.css" resolves to
the file "[servlet-package]/htdocs/javadoc.css"
+ // By default, we define static files through the external
configuration file.</jc>
+ staticFiles=<js>"$C{REST/staticFiles}"</js>
+ )
+ <jk>public interface</jk> BasicRestConfig {}
+</p>
<p class='bpcode w800'>
<ja>@RestResource</ja>(
...
@@ -47,19 +86,20 @@
header={
<js>"<h1>$R{resourceTitle}</h1>"</js>,
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>,
- <js>"<a
href='http://juneau.apache.org'>"</js>
- +<js>"<img
src='$U{servlet:/htdocs/juneau.png}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/>"</js>
+ <js>"<a
href='http://my.project.org'>"</js>
+ +<js>"<img
src='$U{servlet:/my-htdocs/my-project.png}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/>"</js>
+<js>"</a>"</js>
},
head={
<jc>// Browser tab icon.</jc>
- <js>"<link rel='icon'
href='$U{servlet:/htdocs/juneau.png}'/>"</js>
+ <js>"<link rel='icon'
href='$U{servlet:/my-htdocs/my-project.png}'/>"</js>
}
),
- staticFiles={<js>"htdocs:htdocs"</js>}
+ staticFiles={<js>"my-htdocs:my-htdocs"</js>}
)
- <jk>public abstract class</jk> BasicRestServlet <jk>extends</jk>
RestServlet {...}
+ <jk>public abstract class</jk> BasicRestServlet <jk>extends</jk>
RestServlet <jk>implements</jk> BasicRestConfig {...}
</p>
+
<p>
The <js>"juneau.png"</js> image file is located in
<code>org.apache.juneau.rest.htdocs</code> package and
is served up via the <code>staticFiles</code> annotation (i.e. anything
in the <code>org.apache.juneau.rest.htdocs</code>
@@ -133,7 +173,11 @@
...
)
<jk>public class</jk> MyResourceBaseClass <jk>extends</jk>
BasicRestServlet {...}
- </p>
- <p>
- Note how the "User Interface" is open-ended to pretty much lets
you do whatever you want.
- </p>
+</p>
+<p>
+ Note how the "User Interface" is open-ended to pretty much lets you do
whatever you want.
+</p>
+<h5 class='figure'>See Also:</h5>
+<ul>
+ <li class='doclink'>{@doc juneau-microservice-server.UiCustomization}
+</ul>
diff --git
a/juneau-doc/src/main/resources/Topics/10.juneau-microservice-server/08.UiCustomization.html
b/juneau-doc/src/main/resources/Topics/10.juneau-microservice-server/08.UiCustomization.html
index bd5d408..f31d2be 100644
---
a/juneau-doc/src/main/resources/Topics/10.juneau-microservice-server/08.UiCustomization.html
+++
b/juneau-doc/src/main/resources/Topics/10.juneau-microservice-server/08.UiCustomization.html
@@ -15,4 +15,112 @@
{todo} UI Customization
-TODO(7.2.0)
\ No newline at end of file
+<p>
+ The Microservice project contains a <code>files/htdocs</code> working
directly folder with predefined stylesheets and
+ images.
+</p>
+<img style='width:200px'
src='doc-files/juneau-microservice.UiCustomization.1.png'>
+<p>
+ These files can be used to tailor the look-and-feel of your
microservice.
+</p>
+<p class='bpcode w800'>
+ http://localhost:10000/helloWorld
+</p>
+<img class='bordered w800'
src='doc-files/juneau-rest-server.UiCustomization.1.png'>
+<p>
+ The REST configuration section of your microservice configuration file
can be used to tailor the header and footer on the pages:
+</p>
+<p class='bpcode w800'>
+
<cc>#=======================================================================================================================
+ # REST settings
+
#=======================================================================================================================</cc>
+ <cs>[REST]</cs>
+
+ <ck>staticFiles</ck> = <cv>htdocs:files/htdocs</cv>
+
+ <cc># Stylesheet to use for HTML views.</cc>
+ <ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+
+ <ck>headerIcon</ck> = <cv>servlet:/htdocs/images/juneau.png</cv>
+ <ck>headerLink</ck> = <cv>http://juneau.apache.org</cv>
+ <ck>footerIcon</ck> = <cv>servlet:/htdocs/images/asf.png</cv>
+ <ck>footerLink</ck> = <cv>http://www.apache.org</cv>
+
+ <ck>favicon</ck> = <cv>$C{REST/headerIcon}</cv>
+ <ck>header</ck> =
+ <cv><a href='$U{$C{REST/headerLink}}'></cv>
+ <cv><img src='$U{$C{REST/headerIcon}}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/></cv>
+ <cv></a></cv>
+ <ck>footer</ck> =
+ <cv><a href='$U{$C{REST/footerLink}}'></cv>
+ <cv><img src='$U{$C{REST/footerIcon}}'
style='float:right;padding-right:20px;height:32px'/></cv>
+ <cv></a></cv>
+</p>
+<p>
+ The {@link oajr.BasicRestConfig} interface (which defines the default
settings for {@link oajr.BasicRestServlet}
+ pulls in this information using {@link oaj.config.vars.ConfigVar $C}
and {@link oajr.vars.UrlVar $U} variables:
+</p>
+<p class='bpcode w800'>
+ <ja>@RestResource</ja>(
+ ...
+ <jc>// HTML-page specific settings</jc>
+ htmldoc=<ja>@HtmlDoc</ja>(
+
+ <jc>// Default page header contents.</jc>
+ header={
+
<js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
+
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
+ <js>"$C{REST/header}"</js> <jc>// Extra header
HTML defined in external config file.</jc>
+ },
+
+ <jc>// Default stylesheet to use for the page.
+ // Can be overridden from external config file.
+ // Default is DevOps look-and-feel (aka Depression
look-and-feel).</jc>
+
stylesheet=<js>"$C{REST/theme,servlet:/htdocs/themes/devops.css}"</js>,
+
+ <jc>// Default contents to add to the <head>
section of the HTML page.
+ // Use it to add a favicon link to the page.</jc>
+ head={
+ <js>"<link rel='icon'
href='$U{$C{REST/favicon}}'/>"</js>
+ },
+
+ <jc>// No default page footer contents.
+ // Can be overridden from external config file.</jc>
+ footer=<js>"$C{REST/footer}"</js>
+ ),
+
+ <jc>// Optional external configuration file.</jc>
+ config=<js>"$S{juneau.configFile}"</js>,
+
+ <jc>// These are static files that are served up by the servlet
under the specified sub-paths.
+ // For example, "/servletPath/htdocs/javadoc.css" resolves to
the file "[servlet-package]/htdocs/javadoc.css"
+ // By default, we define static files through the external
configuration file.</jc>
+ staticFiles=<js>"$C{REST/staticFiles}"</js>
+ )
+ <jk>public interface</jk> BasicRestConfig {}
+</p>
+<p>
+ Note that the <code>files/htdocs</code> directory is mapped to
<js>"servlet:/htdocs"</js> using the <code>staticFiles</code>
+ setting. This allows those files to be served up through the servlet
through the URL <js>"/[servlet-path]/htdocs"</js>
+</p>
+<p>
+ The theme files are externally accessible and can be modified to
produce any look-and-feel you desire.
+ The microservice still works without the files directory. An embedded
<code>devops.css</code> is included in the jar as a default spreadsheet.
+</p>
+<p>
+ If you're testing out changes in the theme stylesheets, you may want to
set the following system property that prevents caching of those files so
+ that you don't need to restart the microservice each time a change is
made:
+</p>
+<p class='bpcode w800'>
+
<cc>#=======================================================================================================================
+ # System properties
+
#-----------------------------------------------------------------------------------------------------------------------
+ # These are arbitrary system properties that are set during startup.
+
#=======================================================================================================================</cc>
+ <cs>[SystemProperties]</cs>
+
+ <cc># Disable classpath resource caching.
+ # Useful if you're attached using a debugger and you're modifying
classpath resources while running.</cc>
+ <ck>RestContext.useClasspathResourceCaching.b</ck> = <cv>false</cv>
+
+</p>
diff --git
a/juneau-doc/src/main/resources/Topics/10.juneau-microservice-server/doc-files/juneau-microservice.UiCustomization.1.png
b/juneau-doc/src/main/resources/Topics/10.juneau-microservice-server/doc-files/juneau-microservice.UiCustomization.1.png
new file mode 100644
index 0000000..490cf48
Binary files /dev/null and
b/juneau-doc/src/main/resources/Topics/10.juneau-microservice-server/doc-files/juneau-microservice.UiCustomization.1.png
differ
diff --git
a/juneau-doc/src/main/resources/Topics/12.juneau-examples-rest/08.SampleRemoteableServlet.html
b/juneau-doc/src/main/resources/Topics/12.juneau-examples-rest/08.SampleRemoteableServlet.html
index 4b8e4a3..218c952 100644
---
a/juneau-doc/src/main/resources/Topics/12.juneau-examples-rest/08.SampleRemoteableServlet.html
+++
b/juneau-doc/src/main/resources/Topics/12.juneau-examples-rest/08.SampleRemoteableServlet.html
@@ -27,5 +27,5 @@ SampleRemoteInterfaceServlet
</ul>
<h5 class='section'>See Also:</h5>
<ul>
- <li class='link'>{@doc juneau-rest-server.rRPC}
+ <li class='link'>{@doc juneau-rest-server.restRPC}
</ul>
diff --git
a/juneau-microservice/juneau-microservice-template/my-microservice.cfg
b/juneau-microservice/juneau-microservice-template/my-microservice.cfg
index 5fde384..05c7638 100755
--- a/juneau-microservice/juneau-microservice-template/my-microservice.cfg
+++ b/juneau-microservice/juneau-microservice-template/my-microservice.cfg
@@ -56,8 +56,14 @@ footerIcon = servlet:/htdocs/images/asf.png
footerLink = http://www.apache.org
favicon = $C{REST/headerIcon}
-header = <a href='$U{$C{REST/headerLink}}'><img src='$U{$C{REST/headerIcon}}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/></a>
-footer = <a href='$U{$C{REST/footerLink}}'><img
style='float:right;padding-right:20px;height:32px'
src='$U{$C{REST/footerIcon}}'>
+header =
+ <a href='$U{$C{REST/headerLink}}'>
+ <img src='$U{$C{REST/headerIcon}}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/>
+ </a>
+footer =
+ <a href='$U{$C{REST/footerLink}}'>
+ <img src='$U{$C{REST/footerIcon}}'
style='float:right;padding-right:20px;height:32px'/>
+ </a>
#=======================================================================================================================
# Console settings
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RemoteInterfaceServlet.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RemoteInterfaceServlet.java
index 3e90e0c..ccf2150 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RemoteInterfaceServlet.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RemoteInterfaceServlet.java
@@ -46,7 +46,7 @@ import org.apache.juneau.rest.exception.*;
*
* <h5 class='section'>See Also:</h5>
* <ul>
- * <li class='link'>{@doc juneau-rest-server.rRPC}
+ * <li class='link'>{@doc juneau-rest-server.restRPC}
* </ul>
*/
@SuppressWarnings({"serial","javadoc"})