You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2017/09/17 23:54:28 UTC
[1/3] incubator-juneau git commit: Update javadocs and packaged
artifacts.
Repository: incubator-juneau
Updated Branches:
refs/heads/master 1c5ac9a92 -> 990b5d22a
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-core/.classpath
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-core/.classpath b/juneau-examples/juneau-examples-core/.classpath
index 5adac7b..4e14a6d 100644
--- a/juneau-examples/juneau-examples-core/.classpath
+++ b/juneau-examples/juneau-examples-core/.classpath
@@ -6,19 +6,21 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/assembly"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
+ <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
- <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-core/.gitignore
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-core/.gitignore b/juneau-examples/juneau-examples-core/.gitignore
new file mode 100644
index 0000000..9bb88d3
--- /dev/null
+++ b/juneau-examples/juneau-examples-core/.gitignore
@@ -0,0 +1 @@
+/.DS_Store
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-core/build-overlay/.classpath
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-core/build-overlay/.classpath b/juneau-examples/juneau-examples-core/build-overlay/.classpath
new file mode 100644
index 0000000..0060db7
--- /dev/null
+++ b/juneau-examples/juneau-examples-core/build-overlay/.classpath
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-core/build-overlay/pom.xml
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-core/build-overlay/pom.xml b/juneau-examples/juneau-examples-core/build-overlay/pom.xml
new file mode 100644
index 0000000..b269d93
--- /dev/null
+++ b/juneau-examples/juneau-examples-core/build-overlay/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-examples-core</artifactId>
+ <version>${project.version}</version>
+ <name>Apache Juneau Core Examples</name>
+ <description>Apache Juneau Examples for Core parser functionality</description>
+
+ <properties>
+ <!-- Skip javadoc generation since we generate them in the aggregate pom -->
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-marshall</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-marshall-rdf</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-dto</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-svl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-config</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-core</artifactId>
+ <version>${jena.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-core/pom.xml
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-core/pom.xml b/juneau-examples/juneau-examples-core/pom.xml
index 7c7ab21..17ce444 100644
--- a/juneau-examples/juneau-examples-core/pom.xml
+++ b/juneau-examples/juneau-examples-core/pom.xml
@@ -47,9 +47,47 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-dto</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-svl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-config</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>juneau-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>apache-juneau-examples-core-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/bin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-core/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-core/src/assembly/bin.xml b/juneau-examples/juneau-examples-core/src/assembly/bin.xml
new file mode 100644
index 0000000..db8d6bb
--- /dev/null
+++ b/juneau-examples/juneau-examples-core/src/assembly/bin.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
+-->
+
+<!--
+ This assembly is used to create the template zip file that developers use to import into Eclipse to start their
+ own projects.
+ -->
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
+ <id>bin</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <baseDirectory>/</baseDirectory>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>src/main/**</include>
+ <include>src/test/**</include>
+ <include>.settings/**</include>
+ <include>.project</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/build-overlay</directory>
+ <outputDirectory>/</outputDirectory>
+ <filtered>true</filtered>
+ </fileSet>
+ </fileSets>
+
+</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-core/src/main/resources/empty.txt
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-core/src/main/resources/empty.txt b/juneau-examples/juneau-examples-core/src/main/resources/empty.txt
new file mode 100644
index 0000000..69ece92
--- /dev/null
+++ b/juneau-examples/juneau-examples-core/src/main/resources/empty.txt
@@ -0,0 +1,12 @@
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-core/src/test/java/empty.txt
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-core/src/test/java/empty.txt b/juneau-examples/juneau-examples-core/src/test/java/empty.txt
new file mode 100644
index 0000000..69ece92
--- /dev/null
+++ b/juneau-examples/juneau-examples-core/src/test/java/empty.txt
@@ -0,0 +1,12 @@
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-rest/.classpath
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/.classpath b/juneau-examples/juneau-examples-rest/.classpath
index 0060db7..74a5325 100644
--- a/juneau-examples/juneau-examples-rest/.classpath
+++ b/juneau-examples/juneau-examples-rest/.classpath
@@ -17,6 +17,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
+ <classpathentry kind="src" path="src/assembly"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-rest/build-overlay/.classpath
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/build-overlay/.classpath b/juneau-examples/juneau-examples-rest/build-overlay/.classpath
new file mode 100644
index 0000000..0060db7
--- /dev/null
+++ b/juneau-examples/juneau-examples-rest/build-overlay/.classpath
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-rest/build-overlay/pom.xml
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/build-overlay/pom.xml b/juneau-examples/juneau-examples-rest/build-overlay/pom.xml
new file mode 100644
index 0000000..5662209
--- /dev/null
+++ b/juneau-examples/juneau-examples-rest/build-overlay/pom.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
+-->
+<!--
+ This project is meant to be used as a starting point for developers to use in creating their own REST microservices.
+ It creates a parent REST interface on port 10000 with a single child hello-world resource.
+ This POM is likewise meant to be used as a starting point for developers. It creates an uber-jar
+ to run the microserice from the command line. Copy the jar as well as the .cfg file and start it
+ with java -jar juneau-microservice-template-1.0.0.jar microservice.cfg
+ The group/artifact/version information is meant to be overwritten by developers to match their own needs.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-examples-rest</artifactId>
+ <name>Apache Juneau REST Examples</name>
+ <version>${version}</version>
+ <description>Sample code packaged as a microservice.</description>
+
+ <properties>
+ <encoding>UTF-8</encoding>
+
+ <!-- Java 8 required because Jetty requires it. -->
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ </properties>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-microservice-server</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-core</artifactId>
+ <version>${jena.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>${derby.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>${fileupload.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpmime</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- This runs the _TestSuite class. You must run within the testsuite
+ so the REST microservice is started for the tests. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/_TestSuite.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+
+ <!-- This packages the samples into an executable jar. Use: java -jar
+ juneau-examples-uber.jar Needs the examples.cfg copied below in the same
+ directory. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <createDependencyReducedPom>false</createDependencyReducedPom>
+ <minimizeJar>false</minimizeJar>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <manifestEntries>
+ <Main-Class>org.apache.juneau.microservice.RestMicroservice</Main-Class>
+ <Rest-Resources>org.apache.juneau.examples.rest.RootResources</Rest-Resources>
+ <Main-ConfigFile>examples.cfg</Main-ConfigFile>
+ </manifestEntries>
+ </transformer>
+ </transformers>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Attaches the examples.cfg to this artifact -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.12</version>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>examples.cfg</file>
+ <type>cfg</type>
+ <classifier>samples</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch b/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch
index ba4422c..baf89fb 100644
--- a/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch
+++ b/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<stringAttribute key="bad_container_name" value="/juneau-examples"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/juneau-microservice/src/main/java/org/apache/juneau/microservice/RestMicroservice.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-rest/pom.xml
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/pom.xml b/juneau-examples/juneau-examples-rest/pom.xml
index 4b81a0a..0f38a24 100644
--- a/juneau-examples/juneau-examples-rest/pom.xml
+++ b/juneau-examples/juneau-examples-rest/pom.xml
@@ -155,6 +155,25 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>juneau-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>apache-juneau-examples-rest-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/bin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-examples/juneau-examples-rest/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/juneau-examples/juneau-examples-rest/src/assembly/bin.xml b/juneau-examples/juneau-examples-rest/src/assembly/bin.xml
new file mode 100644
index 0000000..6f29fe6
--- /dev/null
+++ b/juneau-examples/juneau-examples-rest/src/assembly/bin.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
+-->
+
+<!--
+ This assembly is used to create the template zip file that developers use to import into Eclipse to start their
+ own projects.
+ -->
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
+ <id>bin</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <baseDirectory>/</baseDirectory>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>src/main/**</include>
+ <include>src/test/**</include>
+ <include>.settings/**</include>
+ <include>.project</include>
+ <include>jetty.xml</include>
+ <include>juneau-examples-rest.launch</include>
+ <include>examples.cfg</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/build-overlay</directory>
+ <outputDirectory>/</outputDirectory>
+ <filtered>true</filtered>
+ </fileSet>
+ </fileSets>
+
+</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/.DS_Store
----------------------------------------------------------------------
diff --git a/juneau-microservice/.DS_Store b/juneau-microservice/.DS_Store
index b0b1a8b..3dbaec8 100644
Binary files a/juneau-microservice/.DS_Store and b/juneau-microservice/.DS_Store differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/.classpath
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/.classpath b/juneau-microservice/juneau-microservice-template/.classpath
index fd7ad7f..4e17b72 100755
--- a/juneau-microservice/juneau-microservice-template/.classpath
+++ b/juneau-microservice/juneau-microservice-template/.classpath
@@ -6,6 +6,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
+ <classpathentry kind="src" path="src/assembly"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/META-INF/MANIFEST.MF b/juneau-microservice/juneau-microservice-template/META-INF/MANIFEST.MF
index 22d1630..e1589c9 100755
--- a/juneau-microservice/juneau-microservice-template/META-INF/MANIFEST.MF
+++ b/juneau-microservice/juneau-microservice-template/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@ Manifest-Version: 1.0
Main-Class: org.apache.juneau.microservice.RestMicroservice
Rest-Resources:
org.apache.juneau.microservice.sample.RootResources
-Main-ConfigFile: microservice.cfg
+Main-ConfigFile: my-microservice.cfg
Class-Path:
lib/commons-codec-1.9.jar
lib/commons-io-1.2.jar
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/build-overlay/.classpath
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/build-overlay/.classpath b/juneau-microservice/juneau-microservice-template/build-overlay/.classpath
new file mode 100755
index 0000000..fd7ad7f
--- /dev/null
+++ b/juneau-microservice/juneau-microservice-template/build-overlay/.classpath
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/build-overlay/.project
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/build-overlay/.project b/juneau-microservice/juneau-microservice-template/build-overlay/.project
new file mode 100755
index 0000000..82b42ef
--- /dev/null
+++ b/juneau-microservice/juneau-microservice-template/build-overlay/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>my-microservice</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/build-overlay/my-microservice.launch
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/build-overlay/my-microservice.launch b/juneau-microservice/juneau-microservice-template/build-overlay/my-microservice.launch
new file mode 100644
index 0000000..303979a
--- /dev/null
+++ b/juneau-microservice/juneau-microservice-template/build-overlay/my-microservice.launch
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
+-->
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.juneau.microservice.RestMicroservice"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="my-microservice.cfg"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="my-microservice"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/build-overlay/pom.xml
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/build-overlay/pom.xml b/juneau-microservice/juneau-microservice-template/build-overlay/pom.xml
new file mode 100644
index 0000000..633002c
--- /dev/null
+++ b/juneau-microservice/juneau-microservice-template/build-overlay/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
+-->
+<!--
+ This project is meant to be used as a starting point for developers to use in creating their own REST microservices.
+ It creates a parent REST interface on port 10000 with a single child hello-world resource.
+ This POM is likewise meant to be used as a starting point for developers. It creates an uber-jar
+ to run the microserice from the command line. Copy the jar as well as the .cfg file and start it
+ with java -jar juneau-microservice-template-1.0.0.jar microservice.cfg
+ The group/artifact/version information is meant to be overwritten by developers to match their own needs.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>my-microservice-group</groupId>
+ <artifactId>my-microservice</artifactId>
+ <version>1.0</version>
+ <name>My microservice</name>
+ <description>My microservice.</description>
+
+ <properties>
+ <juneau.version>6.4.1-incubating-SNAPSHOT</juneau.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-microservice-server</artifactId>
+ <version>${version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.apache.juneau.microservice.RestMicroservice
+ </mainClass>
+ </manifest>
+ <manifestEntries>
+ <Rest-Resources>org.apache.juneau.microservice.sample.RootResources
+ </Rest-Resources>
+ <Main-ConfigFile>microservice.cfg</Main-ConfigFile>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>3.0.0</version>
+ <configuration>
+ <createDependencyReducedPom>false</createDependencyReducedPom>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <filters>
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>META-INF/*.SF</exclude>
+ <exclude>META-INF/*.RSA</exclude>
+ <exclude>META-INF/*.INF</exclude> <!-- This one may not be required -->
+ </excludes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/build.xml
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/build.xml b/juneau-microservice/juneau-microservice-template/build.xml
deleted file mode 100644
index 814a0a5..0000000
--- a/juneau-microservice/juneau-microservice-template/build.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ***************************************************************************************************************************
- * 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. *
- ***************************************************************************************************************************
--->
-<!--
- Provides a VERY basic ANT script for creating a microservice zip file.
--->
-<project name='Microservice' default='Microservice.Build'>
-
- <target name='Microservice.Build'>
- <tstamp/>
- <loadproperties srcFile='build.properties'/>
-
- <path id='classpath'>
- <fileset dir='lib' includes='*.jar'/>
- </path>
-
- <delete dir='build' quiet='true'/>
-
- <copy todir='build/bin'>
- <fileset dir='src' excludes='**/*.java'/>
- </copy>
- <copy todir='build/microservice'>
- <fileset dir='.' includes='*.cfg,lib/**'/>
- </copy>
-
- <javac srcdir='src' destdir='build/bin' fork='true' source='1.6' target='1.6' debug='true' includeantruntime='false'>
- <classpath refid='classpath'/>
- </javac>
-
- <jar jarfile='build/microservice/${jar}' basedir='build/bin' duplicate='fail' level='9' manifest='META-INF/MANIFEST.MF'>
- <manifest>
- <attribute name='Built-By' value='${user.name}'/>
- <attribute name='Build-Date' value='${TODAY}'/>
- <attribute name='Bundle-Version' value='${version}'/>
- </manifest>
- </jar>
-
- <zip basedir='build/microservice' destfile='build/${zip}'/>
-
- <delete dir='build/bin' quiet='true'/>
- </target>
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/microservice.cfg
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/microservice.cfg b/juneau-microservice/juneau-microservice-template/microservice.cfg
deleted file mode 100755
index e5fdd9a..0000000
--- a/juneau-microservice/juneau-microservice-template/microservice.cfg
+++ /dev/null
@@ -1,118 +0,0 @@
-# ***************************************************************************************************************************
-# * 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. *
-# ***************************************************************************************************************************
-
-#================================================================================
-# Basic configuration file for SaaS microservices
-# Subprojects can use this as a starting point.
-#================================================================================
-
-#================================================================================
-# Services
-#================================================================================
-[Services]
-REST = org.apache.juneau.microservice.rest.RestApplication
-
-#================================================================================
-# REST settings
-#================================================================================
-[REST]
-
-jettyXml = jetty.xml
-
-# Stylesheet to use for HTML views.
-# The default options are:
-# - servlet:/styles/juneau.css
-# - servlet:/styles/devops.css
-# Other stylesheets can be referenced relative to the servlet package or working directory.
-stylesheet = servlet:/styles/devops.css
-
-# What to do when the config file is saved.
-# Possible values:
-# NOTHING - Don't do anything. (default)
-# RESTART_SERVER - Restart the Jetty server.
-# RESTART_SERVICE - Shutdown and exit with code '3'.
-saveConfigAction = RESTART_SERVER
-
-#================================================================================
-# Logger settings
-# See FileHandler Java class for details.
-#================================================================================
-[Logging]
-
-# The directory where to create the log file.
-# Default is "."
-logDir = logs
-
-# 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.
-logFile = microservice.%g.log
-
-# Whether to append to the existing log file or create a new one.
-# Default is false.
-append =
-
-# The SimpleDateFormat format to use for dates.
-# Default is "yyyy.MM.dd hh:mm:ss".
-dateFormat =
-
-# 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".
-format =
-
-# The maximum log file size.
-# Suffixes available for numbers.
-# See ConfigFile.getInt(String,int) for details.
-# Default is 1M.
-limit = 10M
-
-# Max number of log files.
-# Default is 1.
-count = 5
-
-# Default log levels.
-# Keys are logger names.
-# Values are serialized Level POJOs.
-levels = { org.apache.juneau:'INFO' }
-
-# 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.
-useStackTraceHashes = true
-
-# The default level for the console logger.
-# Default is WARNING.
-consoleLevel =
-
-#================================================================================
-# System properties
-#--------------------------------------------------------------------------------
-# These are arbitrary system properties that are set during startup.
-#================================================================================
-[SystemProperties]
-
-# Configure Jetty for StdErrLog Logging
-org.eclipse.jetty.util.log.class = org.eclipse.jetty.util.log.StrErrLog
-
-# Jetty logging level
-org.eclipse.jetty.LEVEL = WARN
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/my-microservice.cfg
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/my-microservice.cfg b/juneau-microservice/juneau-microservice-template/my-microservice.cfg
new file mode 100755
index 0000000..2f461a3
--- /dev/null
+++ b/juneau-microservice/juneau-microservice-template/my-microservice.cfg
@@ -0,0 +1,112 @@
+# ***************************************************************************************************************************
+# * 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. *
+# ***************************************************************************************************************************
+
+#================================================================================
+# Basic configuration file for SaaS microservices
+# Subprojects can use this as a starting point.
+#================================================================================
+
+#================================================================================
+# REST settings
+#================================================================================
+[REST]
+
+jettyXml = jetty.xml
+
+# Stylesheet to use for HTML views.
+# The default options are:
+# - servlet:/styles/juneau.css
+# - servlet:/styles/devops.css
+# Other stylesheets can be referenced relative to the servlet package or working directory.
+stylesheet = servlet:/styles/devops.css
+
+# What to do when the config file is saved.
+# Possible values:
+# NOTHING - Don't do anything. (default)
+# RESTART_SERVER - Restart the Jetty server.
+# RESTART_SERVICE - Shutdown and exit with code '3'.
+saveConfigAction = RESTART_SERVER
+
+#================================================================================
+# Logger settings
+# See FileHandler Java class for details.
+#================================================================================
+[Logging]
+
+# The directory where to create the log file.
+# Default is "."
+logDir = logs
+
+# 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.
+logFile = microservice.%g.log
+
+# Whether to append to the existing log file or create a new one.
+# Default is false.
+append =
+
+# The SimpleDateFormat format to use for dates.
+# Default is "yyyy.MM.dd hh:mm:ss".
+dateFormat =
+
+# 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".
+format =
+
+# The maximum log file size.
+# Suffixes available for numbers.
+# See ConfigFile.getInt(String,int) for details.
+# Default is 1M.
+limit = 10M
+
+# Max number of log files.
+# Default is 1.
+count = 5
+
+# Default log levels.
+# Keys are logger names.
+# Values are serialized Level POJOs.
+levels = { org.apache.juneau:'INFO' }
+
+# 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.
+useStackTraceHashes = true
+
+# The default level for the console logger.
+# Default is WARNING.
+consoleLevel =
+
+#================================================================================
+# System properties
+#--------------------------------------------------------------------------------
+# These are arbitrary system properties that are set during startup.
+#================================================================================
+[SystemProperties]
+
+# Configure Jetty for StdErrLog Logging
+org.eclipse.jetty.util.log.class = org.eclipse.jetty.util.log.StrErrLog
+
+# Jetty logging level
+org.eclipse.jetty.LEVEL = WARN
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/my-microservice.launch
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/my-microservice.launch b/juneau-microservice/juneau-microservice-template/my-microservice.launch
new file mode 100644
index 0000000..7179baa
--- /dev/null
+++ b/juneau-microservice/juneau-microservice-template/my-microservice.launch
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
+-->
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.juneau.microservice.RestMicroservice"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="my-microservice.cfg"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="juneau-microservice-template"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/pom.xml
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/pom.xml b/juneau-microservice/juneau-microservice-template/pom.xml
index 40505ac..876bb05 100644
--- a/juneau-microservice/juneau-microservice-template/pom.xml
+++ b/juneau-microservice/juneau-microservice-template/pom.xml
@@ -51,53 +51,19 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>org.apache.juneau.microservice.RestMicroservice
- </mainClass>
- </manifest>
- <manifestEntries>
- <Rest-Resources>org.apache.juneau.microservice.sample.RootResources
- </Rest-Resources>
- <Main-ConfigFile>microservice.cfg</Main-ConfigFile>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>3.0.0</version>
- <configuration>
- <createDependencyReducedPom>false</createDependencyReducedPom>
- </configuration>
+ <artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
+ <id>juneau-assembly</id>
<phase>package</phase>
<goals>
- <goal>shade</goal>
+ <goal>single</goal>
</goals>
<configuration>
- <filters>
- <filter>
- <artifact>*:*</artifact>
- <excludes>
- <exclude>META-INF/*.SF</exclude>
- <exclude>META-INF/*.RSA</exclude>
- <exclude>META-INF/*.INF</exclude> <!-- This one may not be required -->
- </excludes>
- </filter>
- </filters>
+ <finalName>apache-juneau-my-microservice-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/bin.xml</descriptor>
+ </descriptors>
</configuration>
</execution>
</executions>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/src/assembly/bin.xml b/juneau-microservice/juneau-microservice-template/src/assembly/bin.xml
new file mode 100644
index 0000000..005fdfd
--- /dev/null
+++ b/juneau-microservice/juneau-microservice-template/src/assembly/bin.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ***************************************************************************************************************************
+ * 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. *
+ ***************************************************************************************************************************
+-->
+
+<!--
+ This assembly is used to create the template zip file that developers use to import into Eclipse to start their
+ own projects.
+ -->
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
+ <id>bin</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <baseDirectory>/</baseDirectory>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>src/main/**</include>
+ <include>src/test/**</include>
+ <include>.settings/**</include>
+ <include>META-INF/**</include>
+ <include>jetty.xml</include>
+ <include>my-microservice.cfg</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/build-overlay</directory>
+ <outputDirectory>/</outputDirectory>
+ <filtered>true</filtered>
+ </fileSet>
+ </fileSets>
+
+</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java b/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java
index 140baaf..0551978 100755
--- a/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java
+++ b/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java
@@ -12,24 +12,30 @@
// ***************************************************************************************************************************
package org.apache.juneau.microservice.sample;
-import static org.apache.juneau.html.HtmlDocSerializerContext.HTMLDOC_links;
-
import org.apache.juneau.microservice.ResourceGroup;
import org.apache.juneau.microservice.resources.ConfigResource;
import org.apache.juneau.microservice.resources.LogsResource;
-import org.apache.juneau.rest.annotation.Property;
+import org.apache.juneau.rest.annotation.HtmlDoc;
import org.apache.juneau.rest.annotation.RestResource;
+import org.apache.juneau.rest.widget.ContentTypeMenuItem;
+import org.apache.juneau.rest.widget.StyleMenuItem;
/**
* Root microservice page.
*/
@RestResource(
path="/",
- title="Juneau Microservice Template",
- description="Template for creating REST microservices",
- properties={
- @Property(name=HTMLDOC_links, value="{options:'?method=OPTIONS'}")
- },
+ title="My Microservice",
+ description="Top-level resources page",
+ htmldoc=@HtmlDoc(
+ widgets={
+ ContentTypeMenuItem.class,
+ StyleMenuItem.class
+ },
+ links={
+ "options: servlet:/?method=OPTIONS"
+ }
+ ),
children={
HelloWorldResource.class,
ConfigResource.class,
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/package.html
----------------------------------------------------------------------
diff --git a/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/package.html b/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/package.html
new file mode 100755
index 0000000..8677acb
--- /dev/null
+++ b/juneau-microservice/juneau-microservice-template/src/main/java/org/apache/juneau/microservice/sample/package.html
@@ -0,0 +1,39 @@
+<!--
+/***************************************************************************************************************************
+ * 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>
+ <style type="text/css">
+ /* For viewing in Page Designer */
+ @IMPORT url("../../../../../../org.apache.juneau/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>Sample microservice resources that ship as part of the template</p>
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-releng/juneau-distrib/pom.xml
----------------------------------------------------------------------
diff --git a/juneau-releng/juneau-distrib/pom.xml b/juneau-releng/juneau-distrib/pom.xml
index c4c5daa..5488b56 100644
--- a/juneau-releng/juneau-distrib/pom.xml
+++ b/juneau-releng/juneau-distrib/pom.xml
@@ -193,6 +193,31 @@
<version>${project.version}</version>
</artifactItem>
+ <artifactItem>
+ <outputDirectory>${project.build.directory}/bin/projects</outputDirectory>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-examples-core</artifactId>
+ <classifier>bin</classifier>
+ <type>zip</type>
+ <version>${project.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <outputDirectory>${project.build.directory}/bin/projects</outputDirectory>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-examples-rest</artifactId>
+ <classifier>bin</classifier>
+ <type>zip</type>
+ <version>${project.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <outputDirectory>${project.build.directory}/bin/projects</outputDirectory>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-microservice-template</artifactId>
+ <classifier>bin</classifier>
+ <type>zip</type>
+ <version>${project.version}</version>
+ </artifactItem>
+
</artifactItems>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/package.html
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/package.html b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/package.html
index 3881f3d..32986bd 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/package.html
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/package.html
@@ -904,7 +904,7 @@
<li>
The method must be public.
<li>
- The parameter and return types must be <a href='../../../../overview-summary.html#Core.PojoCategories'>serializable and parsable</a>.
+ The parameter and return types must be <a href='../../../../overview-summary.html#juneau-marshall.PojoCategories'>serializable and parsable</a>.
</ul>
<p>
One significant feature is that the remoteable services servlet is a full-blown REST interface.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestBody.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestBody.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestBody.java
index f5c65df..f51bbd3 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestBody.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RequestBody.java
@@ -135,7 +135,7 @@ public class RequestBody {
* </table>
*
* <p>
- * Refer to <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a> for
+ * Refer to <a class="doclink" href="../../../../overview-summary.html#juneau-marshall.PojoCategories">POJO Categories</a> for
* a complete definition of supported POJOs.
*
* <h5 class='section'>Examples:</h5>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolver.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolver.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolver.java
index 30f9d83..d75d605 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolver.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolver.java
@@ -47,7 +47,7 @@ public interface RestResourceResolver {
* @param c The class to resolve.
* @param config The initialization configuration for the resource.
* @return The instance of that class.
- * @throws RestServletException If class could not be resolved.
+ * @throws Exception If class could not be resolved.
*/
- Object resolve(Class<?> c, RestConfig config) throws RestServletException;
+ Object resolve(Class<?> c, RestConfig config) throws Exception;
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolverSimple.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolverSimple.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolverSimple.java
index 91bf3eb..e49a4c7 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolverSimple.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResourceResolverSimple.java
@@ -18,7 +18,7 @@ import java.lang.reflect.*;
/**
* Denotes the default resolver.
- *
+ *
* <p>
* The default implementation simply instantiates the class using one of the following constructors:
* <ul>
@@ -43,7 +43,7 @@ import java.lang.reflect.*;
public class RestResourceResolverSimple implements RestResourceResolver {
@Override /* RestResourceResolver */
- public Object resolve(Class<?> c, RestConfig config) throws RestServletException {
+ public Object resolve(Class<?> c, RestConfig config) throws Exception {
try {
Constructor<?> c1 = findPublicConstructor(c, RestConfig.class);
if (c1 != null)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
index 817f290..4cb12fc 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
@@ -163,7 +163,7 @@ public final class RestResponse extends HttpServletResponseWrapper {
* <li> {@link InputStream}
* <li> {@link Reader}
* <li> Any serializable type defined in <a class="doclink"
- * href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a>
+ * href="../../../../overview-summary.html#juneau-marshall.PojoCategories">POJO Categories</a>
* </ul>
*
* <p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/package.html
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/package.html b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/package.html
index a3c32f6..344f0db 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/package.html
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/package.html
@@ -582,7 +582,7 @@
<h6 class='topic'>Method Return Type</h6>
<p>
The return type can be any serializable POJO as defined in <a class='doclink'
- href='../../../../overview-summary.html#Core.PojoCategories'>POJO Categories</a>.
+ href='../../../../overview-summary.html#juneau-marshall.PojoCategories'>POJO Categories</a>.
It can also be <jk>void</jk> if the method is not sending any output (e.g. a request redirect) or is
setting the output using the {@link org.apache.juneau.rest.RestResponse#setOutput(Object)} method.
Calling the {@link org.apache.juneau.rest.RestResponse#setOutput(Object)} method is functionally equivalent
@@ -938,7 +938,7 @@
<div class='topic'>
<p>
Annotations are provided for easy access to HTTP body content as any parsable POJO type
- (See <a class='doclink' href='../../../../overview-summary.html#Core.PojoCategories'>POJO Categories</a>).
+ (See <a class='doclink' href='../../../../overview-summary.html#juneau-marshall.PojoCategories'>POJO Categories</a>).
In the example below, we're POSTing beans.
</p>
<p class='bcode'>
@@ -1631,7 +1631,7 @@
<div class='topic'>
<p>
The Juneau serializers and parsers are highly-configurable through properties.
- (See <a class='doclink' href='../../../../overview-summary.html#Core.ConfigurableProperties'>Configurable Properties</a>)
+ (See <a class='doclink' href='../../../../overview-summary.html#juneau-marshall.ConfigurableProperties'>Configurable Properties</a>)
</p>
<p>
There are several ways of defining properties in the REST API.
@@ -1736,7 +1736,7 @@
<div class='topic'>
<p>
The Juneau serializers and parsers can be configured on how to handle POJOs through the use of Transforms.
- (See <a class='doclink' href='../../../../overview-summary.html#Core.Transforms'>Transforms</a>)
+ (See <a class='doclink' href='../../../../overview-summary.html#juneau-marshall.Transforms'>Transforms</a>)
</p>
<p>
The {@link org.apache.juneau.rest.annotation.RestResource#beanFilters() @RestResource.beanFilters()}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remoteable/package.html
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remoteable/package.html b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remoteable/package.html
index 206cf18..6577c04 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remoteable/package.html
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remoteable/package.html
@@ -120,7 +120,7 @@
<li>
The method must be public.
<li>
- The parameter and return types must be <a href='../../../../../overview-summary.html#Core.PojoCategories'>serializable and parsable</a>.
+ The parameter and return types must be <a href='../../../../../overview-summary.html#juneau-marshall.PojoCategories'>serializable and parsable</a>.
</ul>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/widget/package.html
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/widget/package.html b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/widget/package.html
new file mode 100755
index 0000000..536e05a
--- /dev/null
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/widget/package.html
@@ -0,0 +1,39 @@
+<!--
+/***************************************************************************************************************************
+ * 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>
+ <style type="text/css">
+ /* For viewing in Page Designer */
+ @IMPORT url("../../../../../../org.apache.juneau/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>HTML widget API</p>
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 976c80b..43e97ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,6 +81,7 @@
<module>juneau-rest</module>
<module>juneau-microservice</module>
<module>juneau-examples</module>
+ <module>juneau-doc</module>
<module>juneau-releng</module>
</modules>
@@ -169,8 +170,8 @@
<linksource>true</linksource>
<source>1.6</source>
<bootclasspath>${sun.boot.class.path}</bootclasspath>
- <overview>${basedir}/juneau-core/juneau-marshall/src/main/javadoc/overview.html</overview>
- <stylesheetfile>${basedir}/juneau-core/juneau-marshall/src/main/javadoc/javadoc.css</stylesheetfile>
+ <overview>${basedir}/juneau-doc/src/main/javadoc/overview.html</overview>
+ <stylesheetfile>${basedir}/juneau-doc/src/main/javadoc/javadoc.css</stylesheetfile>
<use>false</use>
<additionalparam>-sourcetab 3 -notimestamp -Xdoclint:none</additionalparam>
<verbose>false</verbose>
@@ -181,7 +182,7 @@
<link>http://docs.oracle.com/javaee/5/api/</link>
</links>
<docfilessubdirs>true</docfilessubdirs>
- <javadocDirectory>${basedir}/juneau-core/juneau-marshall/src/main/javadoc</javadocDirectory>
+ <javadocDirectory>${basedir}/juneau-doc/src/main/javadoc</javadocDirectory>
</configuration>
<executions>
<execution>
[2/3] incubator-juneau git commit: Update javadocs and packaged
artifacts.
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index 41225be..17bf8d9 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -56,259 +56,437 @@
}
</script>
<ul class='spaced-list'>
- <li>
- A toolkit for marshalling POJOs to a wide variety of content types using a common framework.
- <li>
- A REST server API for creating self-documenting REST interfaces using POJOs.
- <li>
- A REST client API for interacting with REST interfaces using POJOs.
- <li>
- A remote proxy API built on top of REST.
- <li>
- A sophisticated INI config file API.
- <li>
- A REST microservice API that combines all the features above for creating lightweight stand-alone REST
- interfaces that start up in milliseconds.
+ <li>A universal toolkit for marshalling POJOs to a wide variety of content types using a common framework.
+ <li>A universal REST server API for creating Swagger-based self-documenting REST interfaces using POJOs, simply deployed as
+ one or more top-level servlets in any Servlet 3.1.0+ container.
+ <li>A universal REST client API for interacting with Juneau or 3rd-party REST interfaces using POJOs and proxy interfaces.
+ <li>A sophisticated configuration file API.
+ <li>A REST microservice API that combines all the features above with a simple configurable Jetty server for
+ creating lightweight stand-alone REST interfaces that start up in milliseconds.
+ <li>Built on top of Servlet and Apache HttpClient APIs that allow you to use the newest HTTP/2 features
+ such as request/response multiplexing and server push.
</ul>
<a id='TOC'></a><h5 class='toc'>Table of Contents</h5>
<ol class='toc'>
- <li><p><a class='doclink' href='#Intro'>Juneau - What is it?</a></p>
- <li><p><a class='doclink' href='#Core'>Juneau Core (org.apache.juneau)</a></p>
+ <li><p><a class='doclink' href='#Intro'>Introduction</a></p>
<ol>
- <li><p><a class='doclink' href='#Core.Serializers'>Serializers</a></p>
- <li><p><a class='doclink' href='#Core.Parsers'>Parsers</a></p>
- <li><p><a class='doclink' href='#Core.SerializerAndParserGroups'>SerializerGroups and ParserGroups</a></p>
- <li><p><a class='doclink' href='#Core.ObjectMap'>ObjectMap and ObjectList</a></p>
- <li><p><a class='doclink' href='#Core.ConfigurableProperties'>Configurable Properties</a></p>
- <li><p><a class='doclink' href='#Core.Transforms'>Transforms</a></p>
+ <li><p><a class='doclink' href='#Intro.Features'>Features</a></p>
+ <li><p><a class='doclink' href='#Intro.Components'>Components</a></p>
+ </ol>
+ <li><p><a class='doclink' href='#juneau-core'><i>juneau-core</i></a></p>
+ <ol>
+ <li><p><a class='doclink' href='#juneau-marshall'><i>juneau-marshall</i></a></p>
<ol>
- <li><p><a class='doclink' href='#Core.PojoSwaps'>PojoSwaps</a></p>
- <li><p><a class='doclink' href='#Core.SwapAnnotation'>@Swap annotation</a></p>
- <li><p><a class='doclink' href='#Core.SwapMethods'>Swap methods</a></p>
- <li><p><a class='doclink' href='#Core.BeanFilters'>BeanFilters and @Bean annotations</a></p>
- <li><p><a class='doclink' href='#Core.SerializingReadersAndInputStreams'>Serializing Readers and InputStreams</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.Serializers'>Serializers</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.Parsers'>Parsers</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.SerializerAndParserGroups'>SerializerGroups and ParserGroups</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.ObjectMap'>ObjectMap and ObjectList</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.ConfigurableProperties'>Configurable Properties</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.Transforms'>Transforms</a></p>
+ <ol>
+ <li><p><a class='doclink' href='#juneau-marshall.PojoSwaps'>PojoSwaps</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.SwapAnnotation'>@Swap annotation</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.SwapMethods'>Swap methods</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.BeanFilters'>BeanFilters and @Bean annotations</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.SerializingReadersAndInputStreams'>Serializing Readers and InputStreams</a></p>
+ </ol>
+ <li><p><a class='doclink' href='#juneau-marshall.BeanDictionaries'>Bean Name and Dictionaries</a></p>
+ <ol>
+ <li><p><a class='doclink' href='#juneau-marshall.BeanSubTypes'>Bean Subtypes</a></p>
+ </ol>
+ <li><p><a class='doclink' href='#juneau-marshall.VirtualBeans'>Virtual Beans</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.JacksonComparison'>Comparison with Jackson</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.PojoCategories'>POJO Categories</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.BestPractices'>Best Practices</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall.AdditionalInfo'>Additional Information</a></p>
</ol>
- <li><p><a class='doclink' href='#Core.BeanDictionaries'>Bean Name and Dictionaries</a></p>
+ <li><p><a class='doclink' href='#juneau-marshall-rdf'><i>juneau-marshall-rdf</i></a></p>
+ <li><p><a class='doclink' href='#juneau-dto'><i>juneau-dto</i></a></p>
<ol>
- <li><p><a class='doclink' href='#Core.BeanSubTypes'>Bean Subtypes</a></p>
+ <li><p><a class='doclink' href='#juneau-dto.HTML5'>HTML5</a></p>
+ <li><p><a class='doclink' href='#juneau-dto.Atom'>Atom</a></p>
+ <li><p><a class='doclink' href='#juneau-dto.Swagger'>Swagger</a></p>
+ <li><p><a class='doclink' href='#juneau-dto.JsonSchema'>JSON-Schema</a></p>
</ol>
- <li><p><a class='doclink' href='#Core.VirtualBeans'>Virtual Beans</a></p>
- <li><p><a class='doclink' href='#Core.PojoCategories'>POJO Categories</a></p>
- <li><p><a class='doclink' href='#Core.SimpleVarLanguage'>Simple Variable Language</a></p>
- <li><p><a class='doclink' href='#Core.ConfigFile'>Configuration Files</a></p>
- <li><p><a class='doclink' href='#Core.SupportedLanguages'>Supported Languages</a></p>
- <li><p><a class='doclink' href='#Core.JacksonComparison'>Comparison with Jackson</a></p>
+ <li><p><a class='doclink' href='#juneau-svl'><i>juneau-svl</i></a></p>
+ <li><p><a class='doclink' href='#juneau-config'><i>juneau-config</i></a></p>
</ol>
- <li><p><a class='doclink' href='#DTOs'>Juneau Data Transfer Objects (org.apache.juneau.dto)</a></p>
+ <li><p><a class='doclink' href='#juneau-rest'><i>juneau-rest</i></a></p>
<ol>
- <li><p><a class='doclink' href='#DTOs.HTML5'>HTML5</a></p>
- <li><p><a class='doclink' href='#DTOs.Atom'>Atom</a></p>
- <li><p><a class='doclink' href='#DTOs.Swagger'>Swagger</a></p>
- <li><p><a class='doclink' href='#DTOs.JsonSchema'>JSON-Schema</a></p>
+ <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.Remoteable'>Remoteable Proxies</a></p>
+ <li><p><a class='doclink' href='#juneau-rest-server.Injection'>Using with Spring or other Injection frameworks</a></p>
+ <li><p><a class='doclink' href='#juneau-rest-server.HTTP2'>Using HTTP/2 features</a></p>
+ </ol>
+ <li><p><a class='doclink' href='#juneau-rest-server-jaxrs'><i>juneau-rest-server-jaxrs</i></a></p>
+ <li><p><a class='doclink' href='#juneau-rest-client'><i>juneau-rest-client</i></a></p>
+ <ol>
+ <li><p><a class='doclink' href='#juneau-rest-client.3rdPartyProxies'>Interface proxies against 3rd-party REST interfaces</a></p>
+ </ol>
</ol>
- <li><p><a class='doclink' href='#Server'>Juneau Server (org.apache.juneau.rest)</a></p>
- <li><p><a class='doclink' href='#Client'>Juneau Client (org.apache.juneau.rest.client)</a></p>
- <li><p><a class='doclink' href='#Remoteable'>Remoteable services (org.apache.juneau.rest.remoteable)</a></p>
+ <li><p><a class='doclink' href='#juneau-microservice'><i>juneau-microservice</i></a></p>
<ol>
- <li><p><a class='doclink' href='#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a></p>
+ <li><p><a class='doclink' href='#juneau-microservice-server'><i>juneau-microservice-server</i></a></p>
+ <li><p><a class='doclink' href='#juneau-microservice-template'><i>juneau-microservice-template</i></a></p>
</ol>
- <li><p><a class='doclink' href='#Microservices'>Juneau Microservices (org.apache.juneau.microservice)</a></p>
- <li><p><a class='doclink' href='#Samples'>Samples</a></p>
+ <li><p><a class='doclink' href='#juneau-examples'><i>juneau-examples</i></a></p>
<ol>
- <li><p><a class='doclink' href='#Samples.Installing'>Installing in Eclipse</a></p>
- <li><p><a class='doclink' href='#Samples.Running'>Running in Eclipse</a></p>
- <li><p><a class='doclink' href='#Samples.Building'>Building and Running from Command-Line</a></p>
- <li><p><a class='doclink' href='#Samples.RestResource'>MANIFEST.MF</a></p>
- <li><p><a class='doclink' href='#Samples.RootResources'>RootResources</a></p>
- <li><p><a class='doclink' href='#Samples.HelloWorldResource'>HelloWorldResource</a></p>
- <li><p><a class='doclink' href='#Samples.MethodExampleResource'>MethodExampleResource</a></p>
- <li><p><a class='doclink' href='#Samples.UrlEncodedFormResource'>UrlEncodedFormResource</a></p>
- <li><p><a class='doclink' href='#Samples.RequestEchoResource'>RequestEchoResource</a></p>
- <li><p><a class='doclink' href='#Samples.AddressBookResource'>AddressBookResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-core'><i>juneau-examples-core</i></a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest'><i>juneau-examples-rest</i></a></p>
<ol>
- <li><p><a class='doclink' href='#Samples.AddressBookResource.Classes'>Classes</a></p>
- <li><p><a class='doclink' href='#Samples.AddressBookResource.Demo'>Demo</a></p>
- <li><p><a class='doclink' href='#Samples.AddressBookResource.Traversable'>Traversable</a></p>
- <li><p><a class='doclink' href='#Samples.AddressBookResource.Queryable'>Queryable</a></p>
- <li><p><a class='doclink' href='#Samples.AddressBookResource.Introspectable'>Introspectable</a></p>
- <li><p><a class='doclink' href='#Samples.AddressBookResource.RestClient'>ClientTest</a></p>
- <li><p><a class='doclink' href='#Samples.AddressBookResource.Browser'>Browser Tips</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.RootResources'>RootResources</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.HelloWorldResource'>HelloWorldResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.MethodExampleResource'>MethodExampleResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.UrlEncodedFormResource'>UrlEncodedFormResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.RequestEchoResource'>RequestEchoResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AddressBookResource'>AddressBookResource</a></p>
+ <ol>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AddressBookResource.Classes'>Classes</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AddressBookResource.Demo'>Demo</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AddressBookResource.Traversable'>Traversable</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AddressBookResource.Queryable'>Queryable</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AddressBookResource.Introspectable'>Introspectable</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AddressBookResource.RestClient'>ClientTest</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AddressBookResource.Browser'>Browser Tips</a></p>
+ </ol>
+ <li><p><a class='doclink' href='#juneau-examples-rest.SampleRemoteableServlet'>SampleRemoteableServlet</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.TempDirResource'>TempDirResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.AtomFeedResource'>AtomFeedResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.DockerRegistryResource'>DockerRegistryResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.TumblrParserResource'>TumblrParserResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.PhotosResource'>PhotosResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.JsonSchemaResource'>JsonSchemaResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.SqlQueryResource'>SqlQueryResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.ConfigResource'>ConfigResource</a></p>
+ <li><p><a class='doclink' href='#juneau-examples-rest.LogsResource'>LogsResource</a></p>
</ol>
- <li><p><a class='doclink' href='#Samples.SampleRemoteableServlet'>SampleRemoteableServlet</a></p>
- <li><p><a class='doclink' href='#Samples.TempDirResource'>TempDirResource</a></p>
- <li><p><a class='doclink' href='#Samples.AtomFeedResource'>AtomFeedResource</a></p>
- <li><p><a class='doclink' href='#Samples.DockerRegistryResource'>DockerRegistryResource</a></p>
- <li><p><a class='doclink' href='#Samples.TumblrParserResource'>TumblrParserResource</a></p>
- <li><p><a class='doclink' href='#Samples.PhotosResource'>PhotosResource</a></p>
- <li><p><a class='doclink' href='#Samples.JsonSchemaResource'>JsonSchemaResource</a></p>
- <li><p><a class='doclink' href='#Samples.SqlQueryResource'>SqlQueryResource</a></p>
- <li><p><a class='doclink' href='#Samples.ConfigResource'>ConfigResource</a></p>
- <li><p><a class='doclink' href='#Samples.LogsResource'>LogsResource</a></p>
</ol>
- <li><p><a class='doclink' href='#BestPractices'>Best Practices</a></p>
- <li><p><a class='doclink' href='#ImportantLinks'>Important Documentation Links</a></p>
<li><p><a class='doclink' href='#ReleaseNotes'>Release Notes</a></p>
</ol>
-<!-- ======================================================================================================== -->
+<!-- =============================================================================================================== -->
<a id="Intro"></a>
-<h2 class='topic' onclick='toggle(this)'>1 - Juneau - What is it?</h2>
+<h2 class='topic' onclick='toggle(this)'>1 - Introduction</h2>
<div class='topic'>
<p>
- Juneau started off as a popular internal IBM toolkit called Juno.
- Originally used for serializing POJOs to and from JSON, it later expanded in scope to include a variety of
- content types, and then later REST servlet, client, and microservice APIs.
- It's use grew to more than 50 projects and was one of the most popular community source projects within IBM.
+ Juneau is a single cohesive framework consisting of the following parts:
</p>
+ <ul class='spaced-list'>
+ <li>A universal toolkit for marshalling POJOs to a wide variety of content types using a common framework.
+ <li>A universal REST server API for creating Swagger-based self-documenting REST interfaces using POJOs, simply
+ deployed as one or more top-level servlets in any Servlet 3.1.0+ container.
+ <li>A universal REST client API for interacting with Juneau or 3rd-party REST interfaces using POJOs and proxy
+ interfaces.
+ <li>A sophisticated configuration file API.
+ <li>A REST microservice API that combines all the features above with a simple configurable Jetty server for
+ creating lightweight stand-alone REST interfaces that start up in milliseconds.
+ <li>Built on top of Servlet and Apache HttpClient APIs that allow you to use the newest HTTP/2 features
+ such as request/response multiplexing and server push.
+ </ul>
<p>
- In 2016, the code was donated to the Apache Foundation under the project <l>Apache Juneau</l>.
- </p>
-
- <h5 class='toc'>Features</h5>
- <ol class='toc'>
- <li>
- <p>Extensive and extensible support for a large variety of POJOs, including structured data (beans) and
- unstructured data (<code>Maps</code> and <code>Collections</code>).</p>
- <li>
- <p>Serialization support:</p>
- <ul>
- <li>JSON (including variants)
- <li>XML
- <li>HTML
- <li>URL-Encoding
- <li>UON (URL-Encoded Object Notation)
- <li>MessagePack
- <li>RDF/XML
- <li>RDF/XML-Abbrev
- <li>N-Triple
- <li>Turtle
- <li>N3
- <li>SOAP/XML
- </ul>
- <li>
- <p>Parsing support:</p>
- <ul>
- <li>JSON (including lax syntax, comments, concatenated strings)
- <li>XML
- <li>HTML
- <li>URL-Encoding
- <li>UON (URL-Encoded Object Notation)
- <li>MessagePack
- <li>RDF/XML
- <li>RDF/XML-Abbrev
- <li>N-Triple
- <li>Turtle
- <li>N3
- </ul>
- <li>
- <p>Data Transfer Objects:</p>
- <ul>
- <li>HTML5
- <li>ATOM
- <li>Swagger
- <li>Cognos
- <li>JSON-Schema
- </ul>
- <p>DTOs can be used with any serializers and parsers (e.g. ATOM as JSON).
- <li>
- <p>Serialization of POJO meta-models (e.g. the POJO class structure itself) to:</p>
- <ul>
- <li>JSON-Schema
- <li>XML-Schema
- <li>HTML-Schema
- </ul>
- <li>
- <p>
- Serializers/parsers require only Java 6+.
- (RDF support requires Jena 2.7.1+)
- </p>
- <li>
- <p>
- REST APIs require only Java 6+ and JEE 1.3+.
- (JAX/RS integration component requires JAX/RS provider)
- </p>
- </ol>
-
- <h5 class='topic'>Components</h5>
- <p>
- Juneau ships as a single Java library called <l>juneau.jar</l>.
+ Questions via email to <a class='doclink' href='mailto:dev@juneau.apache.org?Subject=Apache%20Juneau%20question'>dev@juneau.apache.org</a> are always welcome.
</p>
<p>
- Juneau requires Java 6+. The majority of the code has no other dependencies except for the following packages:
+ Juneau is packed with features that may not be obvious at first.
+ Users are encouraged to ask for code reviews by providing links to specific source files such as through GitHub.
+ Not only can we help you with feedback, but it helps us understand usage patterns to further improve the product.
</p>
- <ul class='doctree'>
- <li class='jp'>
- <a class='doclink' href='org/apache/juneau/jena/package-summary.html#TOC'>org.apache.juneau.jena</a>
- - RDF support. Requires Apache Jena 2.7.1+.
- <li class='jp'>
- <a class='doclink' href='org/apache/juneau/rest/package-summary.html#TOC'>org.apache.juneau.rest</a>
- - REST servlet support. Requires JEE 1.3+.
- <li class='jp'>
- <a class='doclink' href='org/apache/juneau/rest/client/package-summary.html#TOC'>org.apache.juneau.rest.client</a>
- - REST client support. Requires Apache HttpClient 4.5+.
- </ul>
+
+ <h6 class='topic'>History</h6>
<p>
- OSGi bundles are also provided that break down Juneau into the following components:
+ Juneau started off as a popular internal IBM toolkit called Juno.
+ Originally used for serializing POJOs to and from JSON, it later expanded in scope to include a variety of
+ content types, and then later REST servlet, client, and microservice APIs.
+ It's use grew to more than 50 projects and was one of the most popular community source projects within IBM.
</p>
- <ul class='spaced-list'>
- <li>
- <l>org.apache.juneau.core.jar</l> - Serializers, parsers, INI file support.
- <li>
- <l>org.apache.juneau.rest.jar</l> - REST servlet support.
- <li>
- <l>org.apache.juneau.rest.client.jar</l> - REST client support.
- <li>
- <l>org.apache.juneau.microservice.jar</l> - Microservice support.
- </ul>
<p>
- The following zip files are also provided:
+ In June of 2016, the code was donated to the Apache Foundation under the project <l>Apache Juneau</l> where it
+ has continued to evolve to where it is today.
</p>
- <ul class='spaced-list'>
- <li>
- <l>microservice-project.zip</l> - Contains a template Eclipse project for quickly creating REST resources
- as executable jars.
- <li>
- <l>microservice-samples-project.zip</l> - Contains sample code demonstrating various aspects of Juneau.
- <br>These are discussed in detail in the <a class='doclink' href="#Samples">Samples</a> section.
- </ul>
- <ul class='doctree'>
- <li class='info'>
- Many of the examples below use beans with public field properties instead of standard getters/setters.
- This is to simplify the examples.
- </ul>
+ <!-- =========================================================================================================== -->
+ <a id="Intro.Features"></a>
+ <h3 class='topic' onclick='toggle(this)'>1.1 - Features</h3>
+ <div class='topic'>
+ <ul class='spaced-list'>
+ <li>
+ KISS is our mantra! No auto-wiring. No code generation. No dependency injection (but still compatible with).
+ Just add it to your classpath and use it. Extremely simple unit testing!
+ <li>
+ Extensive and extensible support for a large variety of POJOs, including structured data (beans) and
+ unstructured data (<code>Maps</code> and <code>Collections</code>).
+ <li>
+ Sophisticated configurable serializers and parsers.
+ <br>For example, the JSON serializers and parsers can handle strict or lax syntax, comments,
+ concatenated strings, etc...
+ <li>Tiny - ~1MB
+ <li>Exhaustively tested
+ </ul>
+ </div>
+
+ <!-- =========================================================================================================== -->
+ <a id="Intro.Components"></a>
+ <h3 class='topic' onclick='toggle(this)'>1.2 - Components</h3>
+ <div class='topic'>
+ <p>
+ We've strived to keep prerequisites to an absolute minimum in order to make adoption as easy as possible.
+ </p>
+ <p>
+ The library consists of the following artifacts found in the Maven group <code>"org.apache.juneau"</code>:
+ </p>
+ <table class='styled' style='min-width:800px;'>
+ <tr>
+ <th>Category</th><th>Maven Artifacts</th><th>Description</th><th>Prerequisites</th>
+ </tr>
+ <tr class='dark bb'>
+ <td rowspan="5" style='text-align:center;font-weight:bold;padding:20px;' class='code'><a class='doclink' href='#juneau-core'>juneau-core</a></td>
+ <td class='code'><a class='doclink' href='#juneau-marshall'>juneau-marshall</a></td>
+ <td>Serializers and parsers for:
+ <ul style='margin:0px 10px;'>
+ <li>JSON
+ <li>XML
+ <li>HTML
+ <li>UON
+ <li>URL-Encoding
+ <li>MessagePack
+ <li>SOAP/XML
+ <li>CSV
+ <li>BSON (coming soon)
+ <li>YAML (coming soon)
+ <li>Protobuf (coming soon)
+ </ul>
+ </td>
+ <td>
+ <ul style='margin:0px 10px;'>
+ <li>Java 6
+ </ul>
+ </td>
+ </tr>
+ <tr class='dark bb'>
+ <td class='code'><a class='doclink' href='#juneau-marshall-rdf'>juneau-marshall-rdf</a></td>
+ <td>
+ Serializers and parsers for:
+ <ul style='margin:0px 10px;'>
+ <li>RDF/XML
+ <li>RDF/XML-Abbrev
+ <li>N-Triple
+ <li>Turtle
+ <li>N3
+ </ul>
+ </td>
+ <td>
+ <ul style='margin:0px 10px;'>
+ <li>Java 6
+ <li>Apache Jena 2.7.1
+ </ul>
+ </td>
+ </tr>
+ <tr class='dark bb'>
+ <td class='code'><a class='doclink' href='#juneau-dto'>juneau-dto</a></td>
+ <td>
+ Data Transfer Objects for:
+ <ul style='margin:0px 10px;'>
+ <li>HTML5
+ <li>Atom
+ <li>Cognos
+ <li>JSON-Schema
+ <li>Swagger 2.0
+ </ul>
+ </td>
+ <td><ul style='margin:0px 10px;'><li>Java 6</li></ul></td>
+ </tr>
+ <tr class='dark bb'>
+ <td class='code'><a class='doclink' href='#juneau-svl'>juneau-svl</a></td>
+ <td>
+ Simple Variable Language API
+ </td>
+ <td><ul style='margin:0px 10px;'><li>Java 6</li></ul></td>
+ </tr>
+ <tr class='dark bb'>
+ <td class='code'><a class='doclink' href='#juneau-config'>juneau-config</a></td>
+ <td>
+ Configuration file API
+ </td>
+ <td><ul style='margin:0px 10px;'><li>Java 6</li></ul></td>
+ </tr>
+ <tr class='light bb'>
+ <td rowspan="3" style='text-align:center;font-weight:bold;padding:20px;' class='code'><a class='doclink' href='#juneau-rest'>juneau-rest</a></td>
+ <td class='code'><a class='doclink' href='#juneau-rest-server'>juneau-rest-server</a></td>
+ <td>
+ REST Servlet API
+ </td>
+ <td>
+ <ul style='margin:0px 10px;'>
+ <li>Java 6
+ <li>Servlet 3.1
+ </ul>
+ </td>
+ </tr>
+ <tr class='light bb'>
+ <td class='code'><a class='doclink' href='#juneau-rest-server-jaxrs'>juneau-rest-server-jaxrs</a></td>
+ <td>
+ Optional JAX-RS support
+ </td>
+ <td>
+ <ul style='margin:0px 10px;'>
+ <li>Java 6
+ <li>JAX-RS 2.0
+ </ul>
+ </td>
+ </tr>
+ <tr class='light bb'>
+ <td class='code'><a class='doclink' href='#juneau-rest-client'>juneau-rest-client</a></td>
+ <td>
+ REST Client API
+ </td>
+ <td>
+ <ul style='margin:0px 10px;'>
+ <li>Java 6
+ <li>Apache HttpClient 4.5
+ </ul>
+ </td>
+ </tr>
+ <tr class='dark bb'>
+ <td rowspan="2" style='text-align:center;font-weight:bold;padding:20px;' class='code'><a class='doclink' href='#juneau-microservice'>juneau-microservice</a></td>
+ <td class='code'><a class='doclink' href='#juneau-microservice-server'>juneau-microservice-server</a></td>
+ <td>
+ REST Microservice Server API
+ </td>
+ <td>
+ <ul style='margin:0px 10px;'>
+ <li>Java 8
+ <li>Eclipse Jetty 9.4.3
+ </ul>
+ </td>
+ </tr>
+ <tr class='dark bb'>
+ <td class='code'><a class='doclink' href='#juneau-microservice-template'>juneau-microservice-template</a></td>
+ <td>
+ Developer template project
+ </td>
+ <td>
+ <ul style='margin:0px 10px;'>
+ <li>Java 8
+ <li>Eclipse Jetty 9.4.3
+ </ul>
+ </td>
+ </tr>
+ <tr class='light bb'>
+ <td rowspan="2" style='text-align:center;font-weight:bold;padding:20px;' class='code'><a class='doclink' href='#juneau-examples'>juneau-examples</a></td>
+ <td class='code'><a class='doclink' href='#juneau-examples-core'>juneau-examples-core</a></td>
+ <td>
+ Core code examples
+ </td>
+ <td></td>
+ </tr>
+ <tr class='light bb'>
+ <td class='code'><a class='doclink' href='#juneau-examples-rest'>juneau-examples-rest</a></td>
+ <td>
+ REST code examples
+ </td>
+ <td></td>
+ </tr>
+ <tr class='dark bb'>
+ <td rowspan="1" style='text-align:center;font-weight:bold;padding:20px;' class='code'>juneau-all</td>
+ <td class='code'><code>juneau-all</code></td>
+ <td>
+ Combination of the following:
+ <ul style='margin:0px 10px;'>
+ <li>juneau-marshall
+ <li>juneau-dto
+ <li>juneau-svl
+ <li>juneau-config
+ <li>juneau-rest-server
+ <li>juneau-rest-client
+ </ul>
+ </td>
+ <td>
+ <ul style='margin:0px 10px;'>
+ <li>Java 6
+ <li>Servlet 3.1
+ <li>Apache HttpClient 4.5.3
+ </ul>
+ </td>
+ </tr>
+ </table>
+
+ <p>
+ Each component are also packaged as stand-alone OSGi modules.
+ </p>
+ </div>
+
</div>
-<!-- ======================================================================================================== -->
-<a id="Core"></a>
-<h2 class='topic' onclick='toggle(this)'>2 - Juneau Core (org.apache.juneau)</h2>
+<!-- =============================================================================================================== -->
+<a id="juneau-core"></a>
+<h2 class='topic' onclick='toggle(this)'>2 - juneau-core</h2>
<div class='topic'>
+
<p>
- The core packages of Juneau contains serializers and parsers for converting POJOs to and from a wide variety of
- content types.
- It uses a common API for defining serializers and parsers.
- </p>
- <p>
- One of the goals of Juneau was to make serialization as simple as possible.
- In a single line of code, you should be able to serialize and parse most POJOs.
- Despite this simplicity, Juneau provides lots of extensibility and configuration properties for tailoring how
- POJOs are serialized and parsed.
+ The core Maven artifacts of Juneau consist of the following:
</p>
-
- <!-- ======================================================================================================== -->
- <a id="Core.Serializers"></a>
- <h3 class='topic' onclick='toggle(this)'>2.1 - Serializers</h3>
+ <ul class='spaced-list'>
+ <li><a class='doclink' href='#juneau-marshall'>juneau-marshall</a>
+ - Serializers and parsers for converting POJOs to and from a wide variety of content types using a
+ universal API.
+ <li><a class='doclink' href='#juneau-marshall-rdf'>juneau-marshall-rdf</a>
+ - RDF serializers and parsers that use Apache Jena for marshalling.
+ <li><a class='doclink' href='#juneau-dto'>juneau-dto</a>
+ - Data transfer objects for a variety of languages.
+ <li><a class='doclink' href='#juneau-svl'>juneau-svl</a>
+ - A sophisticated yet simple variable language.
+ <li><a class='doclink' href='#juneau-config'>juneau-config</a>
+ - A sophisticated configuration file API.
+ </ul>
+
+ <!-- =========================================================================================================== -->
+ <a id="juneau-marshall"></a>
+ <h3 class='topic' onclick='toggle(this)'>2.1 - juneau-marshall</h3>
<div class='topic'>
+
+ <h6 class='figure'>Maven Dependency</h6>
+ <p class='bcode'>
+ <<xt>dependency</xt>>
+ <<xt>groupId</xt>>org.apache.juneau<<xt>/groupId</xt>>
+ <<xt>artifactId</xt>>juneau-marshall<<xt>/artifactId</xt>>
+ <<xt>version</xt>>6.4.0-incubating<<xt>/version</xt>>
+ <<xt>/dependency</xt>>
+ </p>
+
+ <h6 class='figure'>OSGi Module</h6>
+ <p class='bcode'>
+ juneau-marshall-6.4.0-incubating.jar
+ </p>
+
<p>
- The built-in serializers in Juneau are fast, efficient, and highly configurable.
- They work by serializing POJOs directly to streams instead of using intermediate Document Object Model
- objects.
+ The <code>juneau-marshall</code> artifact contains the API for defining serializers and parsers, and
+ marshalling support for JSON, XML, HTML, URL-Encoding, UON and others.
</p>
<p>
- In most cases, you can serialize objects in one line of code by using one of the default serializers:
+ It also defines many convenience utility classes used throughout the framework.
</p>
- <p class='bcode'>
+
+ <!-- ======================================================================================================= -->
+ <a id="juneau-marshall.Serializers"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.1 - Serializers</h4>
+ <div class='topic'>
+ <p>
+ One of the goals of Juneau was to make serialization as simple as possible.
+ In a single line of code, you should be able to serialize and parse most POJOs.
+ Despite this simplicity, Juneau provides lots of extensibility and configuration properties for tailoring how
+ POJOs are serialized and parsed.
+ </p>
+ <p>
+ The built-in serializers in Juneau are fast, efficient, and highly configurable.
+ They work by serializing POJOs directly to streams instead of using intermediate Document Object Model
+ objects.
+ </p>
+ <p>
+ In most cases, you can serialize objects in one line of code by using one of the default serializers:
+ </p>
+ <p class='bcode'>
<jc>// A simple bean</jc>
<jk>public class</jk> Person {
<jk>public</jk> String <jf>name</jf> = <js>"John Smith"</js>;
@@ -348,13 +526,13 @@
<jc>// Produces:
// 82 A4 6E 61 6D 65 AA 4A 6F 68 6E 20 53 6D 69 74 68 A3 61 67 65 15 </jc>
<jk>byte</jk>[] b = MsgPackSerializer.<jsf>DEFAULT</jsf>.serialize(p);
- </p>
-
- <p>
- In addition to the default serializers, customized serializers can be created using various built-in options:
- </p>
-
- <p class='bcode'>
+ </p>
+
+ <p>
+ In addition to the default serializers, customized serializers can be created using various built-in options:
+ </p>
+
+ <p class='bcode'>
<jc>// Use one of the default serializers to serialize a POJO</jc>
String json = JsonSerializer.<jsf>DEFAULT</jsf>.serialize(someObject);
@@ -366,35 +544,35 @@
<jc>// Serialize a POJO to JSON</jc>
String json = serializer.serialize(someObject);
- </p>
- <p>
- Default serialization support is provided for Java primitives, <code>Maps</code>, <code>Collections</code>,
- beans, and arrays.
- <br>Extensible support for other data types such as <code>Calendars</code>, <code>Dates</code>,
- <code>Iterators</code> is available through the use of POJO swaps (described later).
- </p>
-
- <h6 class='topic'>Additional Information</h6>
- <ul class='doctree'>
- <li class='jp'>
- <a class='doclink' href='org/apache/juneau/serializer/package-summary.html#TOC'>org.apache.juneau.serializer</a>
- - Serializer API Javadoc
- </ul>
- </div>
+ </p>
+ <p>
+ Default serialization support is provided for Java primitives, <code>Maps</code>, <code>Collections</code>,
+ beans, and arrays.
+ <br>Extensible support for other data types such as <code>Calendars</code>, <code>Dates</code>,
+ <code>Iterators</code> is available through the use of POJO swaps (described later).
+ </p>
+
+ <h6 class='topic'>Additional Information</h6>
+ <ul class='doctree'>
+ <li class='jp'>
+ <a class='doclink' href='org/apache/juneau/serializer/package-summary.html#TOC'>org.apache.juneau.serializer</a>
+ - Serializer API Javadoc
+ </ul>
+ </div>
- <!-- ======================================================================================================== -->
- <a id="Core.Parsers"></a>
- <h3 class='topic' onclick='toggle(this)'>2.2 - Parsers</h3>
- <div class='topic'>
- <p>
- Parsers work by parsing input directly into POJOs instead of having to create intermediate Document Object
- Models.
- This allows them to parse input with minimal object creation.
- </p>
- <p>
- Like the serializers, you can often parse objects in one line of code by using one of the default parsers:
- </p>
- <p class='bcode'>
+ <!-- ======================================================================================================= -->
+ <a id="juneau-marshall.Parsers"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.2 - Parsers</h4>
+ <div class='topic'>
+ <p>
+ Parsers work by parsing input directly into POJOs instead of having to create intermediate Document Object
+ Models.
+ This allows them to parse input with minimal object creation.
+ </p>
+ <p>
+ Like the serializers, you can often parse objects in one line of code by using one of the default parsers:
+ </p>
+ <p class='bcode'>
<jc>// Use one of the predefined parsers.</jc>
Parser parser = JsonParser.<jsf>DEFAULT</jsf>;
@@ -427,11 +605,11 @@
json = <js>"[1,2,3]"</js>;
List<Integer> l6 = parser.parse(json, LinkedList.<jk>class</jk>, Integer.<jk>class</jk>);
<jk>int</jk>[] i7 = parser.parse(json, <jk>int</jk>[].<jk>class</jk>);
- </p>
- <p>
- The parsers can also be used to populating existing bean and collection objects:
- </p>
- <p class='bcode'>
+ </p>
+ <p>
+ The parsers can also be used to populating existing bean and collection objects:
+ </p>
+ <p class='bcode'>
<jc>// Use one of the predefined parsers.</jc>
Parser parser = JsonParser.<jsf>DEFAULT</jsf>;
@@ -449,36 +627,36 @@
json = <js>"{a:{name:'John Smith',age:21},b:{name:'Joe Smith',age:42}}"</js>;
Map<String,Person> m3 = <jk>new</jk> TreeMap<String,Person>();
parser.parseIntoMap(json, m3, String.<jk>class</jk>, Person.<jk>class</jk>);
- </p>
- <ul class='doctree'>
- <li class='info'>
- In the example above, we're parsing "lax" JSON (single quotes, unquoted attributes).
- The JSON parser can handle any valid JSON syntax (such as quoted or unquoted attributes, single or double
- quotes).
- <br>It can also handle JSON fragments and embedded Javascript comments.
- Many of the JSON examples provided will use lax syntax which is easier to read since we don't have to deal
- with escapes.
- </ul>
-
- <h6 class='topic'>Additional Information</h6>
- <ul class='doctree'>
- <li class='jp'>
- <a class='doclink' href='org/apache/juneau/parser/package-summary.html#TOC'>org.apache.juneau.parser</a>
- - Parser API Javadoc
- </ul>
- </div>
+ </p>
+ <ul class='doctree'>
+ <li class='info'>
+ In the example above, we're parsing "lax" JSON (single quotes, unquoted attributes).
+ The JSON parser can handle any valid JSON syntax (such as quoted or unquoted attributes, single or double
+ quotes).
+ <br>It can also handle JSON fragments and embedded Javascript comments.
+ Many of the JSON examples provided will use lax syntax which is easier to read since we don't have to deal
+ with escapes.
+ </ul>
+
+ <h6 class='topic'>Additional Information</h6>
+ <ul class='doctree'>
+ <li class='jp'>
+ <a class='doclink' href='org/apache/juneau/parser/package-summary.html#TOC'>org.apache.juneau.parser</a>
+ - Parser API Javadoc
+ </ul>
+ </div>
- <!-- ======================================================================================================== -->
- <a id="Core.SerializerAndParserGroups"></a>
- <h3 class='topic' onclick='toggle(this)'>2.3 - SerializerGroups and ParserGroups</h3>
- <div class='topic'>
- <p>
- Above the serializers and parsers are the {@link org.apache.juneau.serializer.SerializerGroup} and
- {@link org.apache.juneau.parser.ParserGroup} classes.
- These classes allow serializers and parsers to be retrieved by W3C-compliant HTTP <code>Accept</code>
- and <code>Content-Type</code> values...
- </p>
- <p class='bcode'>
+ <!-- ======================================================================================================= -->
+ <a id="juneau-marshall.Groups"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.3 - SerializerGroups and ParserGroups</h4>
+ <div class='topic'>
+ <p>
+ Above the serializers and parsers are the {@link org.apache.juneau.serializer.SerializerGroup} and
+ {@link org.apache.juneau.parser.ParserGroup} classes.
+ These classes allow serializers and parsers to be retrieved by W3C-compliant HTTP <code>Accept</code>
+ and <code>Content-Type</code> values...
+ </p>
+ <p class='bcode'>
<jc>// Construct a new serializer group with configuration parameters that get applied to all serializers.</jc>
SerializerGroup sg = <jk>new</jk> SerializerGroupBuilder()
.append(JsonSerializer.<jk>class</jk>, UrlEncodingSerializer.<jk>class</jk>);
@@ -497,80 +675,80 @@
.build();
Person p = pg.getParser(<js>"text/json"</js>).parse(myReader, Person.<jk>class</jk>);
- </p>
- <p>
- The REST servlet API builds upon the <code>SerializerGroup</code> and <code>ParserGroup</code> classes
- to provide annotated REST servlets that automatically negotiate the HTTP media types and allow the developer
- to work with requests and responses as POJOs.
- </p>
-
- <h6 class='topic'>Additional Information</h6>
- <ul class='doctree'>
- <li class='jc'>
- {@link org.apache.juneau.serializer.SerializerGroup}
- <li class='jc'>
- {@link org.apache.juneau.parser.ParserGroup}
- </ul>
- </div>
+ </p>
+ <p>
+ The REST servlet API builds upon the <code>SerializerGroup</code> and <code>ParserGroup</code> classes
+ to provide annotated REST servlets that automatically negotiate the HTTP media types and allow the developer
+ to work with requests and responses as POJOs.
+ </p>
+
+ <h6 class='topic'>Additional Information</h6>
+ <ul class='doctree'>
+ <li class='jc'>
+ {@link org.apache.juneau.serializer.SerializerGroup}
+ <li class='jc'>
+ {@link org.apache.juneau.parser.ParserGroup}
+ </ul>
+ </div>
- <!-- ======================================================================================================== -->
- <a id="Core.ObjectMap"></a>
- <h3 class='topic' onclick='toggle(this)'>2.4 - ObjectMap and ObjectList</h3>
- <div class='topic'>
- <p>
- The {@link org.apache.juneau.ObjectMap} and {@link org.apache.juneau.ObjectList} classes are generic Java
- representations of JSON objects and arrays.
- These classes can be used to create "unstructured" models for serialization (as opposed to "structured"
- models consisting of beans).
- If you want to quickly generate JSON/XML/HTML from generic maps/collections, or parse JSON/XML/HTML into
- generic maps/collections, these classes work well.
- </p>
- <p>
- These classes extend directly from the following JCF classes:
- </p>
- <ul class='doctree'>
- <li class='jc'>
- {@link java.util.LinkedHashMap java.util.LinkedHashMap}
- <ul>
- <li class='jc'>
- {@link org.apache.juneau.ObjectMap org.apache.juneau.ObjectMap}
- </ul>
- </li>
- <li class='jc'>
- {@link java.util.LinkedList java.util.LinkedList}
- <ul>
- <li class='jc'>
- {@link org.apache.juneau.ObjectMap org.apache.juneau.ObjectList}
- </ul>
- </li>
- </ul>
- <p>
- The <l>ObjectMap</l> and <l>ObjectList</l> classes are very similar to the <l>JSONObject</l> and
- <l>JSONArray</l> classes found in other libraries.
- However, the names were chosen because the concepts of <l>Maps</l> and <l>Lists</l> are already familiar to
- Java programmers, and these classes can be used with any of the serializers or parsers.
- </p>
- <p>
- These object can be serialized in one of two ways:
- </p>
- <ol class='spaced-list'>
- <li>
- Using the provided {@link org.apache.juneau.ObjectMap#serializeTo(java.io.Writer)} or
- {@link org.apache.juneau.ObjectList#serializeTo(java.io.Writer)} methods.
- <li>
- Passing them to one of the {@link org.apache.juneau.serializer.Serializer} serialize methods.
- <li>
- Simply calling the {@link org.apache.juneau.ObjectMap#toString()} or {@link org.apache.juneau.ObjectList#toString()}
- methods which will serialize it as Simplified JSON.
- </ol>
- <p>
- Any valid JSON can be parsed into an unstructured model consisting of generic
- {@link org.apache.juneau.ObjectMap} and {@link org.apache.juneau.ObjectList} objects.
- <br>
- (In theory, any valid XML can also be parsed into an unstructured model, although this has not been
- officially 'tested')
- </p>
- <p class='bcode'>
+ <!-- ======================================================================================================= -->
+ <a id="juneau-marshall.ObjectMap"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.4 - ObjectMap and ObjectList</h4>
+ <div class='topic'>
+ <p>
+ The {@link org.apache.juneau.ObjectMap} and {@link org.apache.juneau.ObjectList} classes are generic Java
+ representations of JSON objects and arrays.
+ These classes can be used to create "unstructured" models for serialization (as opposed to "structured"
+ models consisting of beans).
+ If you want to quickly generate JSON/XML/HTML from generic maps/collections, or parse JSON/XML/HTML into
+ generic maps/collections, these classes work well.
+ </p>
+ <p>
+ These classes extend directly from the following JCF classes:
+ </p>
+ <ul class='doctree'>
+ <li class='jc'>
+ {@link java.util.LinkedHashMap java.util.LinkedHashMap}
+ <ul>
+ <li class='jc'>
+ {@link org.apache.juneau.ObjectMap org.apache.juneau.ObjectMap}
+ </ul>
+ </li>
+ <li class='jc'>
+ {@link java.util.LinkedList java.util.LinkedList}
+ <ul>
+ <li class='jc'>
+ {@link org.apache.juneau.ObjectMap org.apache.juneau.ObjectList}
+ </ul>
+ </li>
+ </ul>
+ <p>
+ The <l>ObjectMap</l> and <l>ObjectList</l> classes are very similar to the <l>JSONObject</l> and
+ <l>JSONArray</l> classes found in other libraries.
+ However, the names were chosen because the concepts of <l>Maps</l> and <l>Lists</l> are already familiar to
+ Java programmers, and these classes can be used with any of the serializers or parsers.
+ </p>
+ <p>
+ These object can be serialized in one of two ways:
+ </p>
+ <ol class='spaced-list'>
+ <li>
+ Using the provided {@link org.apache.juneau.ObjectMap#serializeTo(java.io.Writer)} or
+ {@link org.apache.juneau.ObjectList#serializeTo(java.io.Writer)} methods.
+ <li>
+ Passing them to one of the {@link org.apache.juneau.serializer.Serializer} serialize methods.
+ <li>
+ Simply calling the {@link org.apache.juneau.ObjectMap#toString()} or {@link org.apache.juneau.ObjectList#toString()}
+ methods which will serialize it as Simplified JSON.
+ </ol>
+ <p>
+ Any valid JSON can be parsed into an unstructured model consisting of generic
+ {@link org.apache.juneau.ObjectMap} and {@link org.apache.juneau.ObjectList} objects.
+ <br>
+ (In theory, any valid XML can also be parsed into an unstructured model, although this has not been
+ officially 'tested')
+ </p>
+ <p class='bcode'>
<jc>// Parse an arbitrary JSON document into an unstructered data model
// consisting of ObjectMaps, ObjectLists, and java primitive objects.</jc>
Parser parser = JsonParser.<jsf>DEFAULT</jsf>;
@@ -588,250 +766,279 @@
<jc>// Or just use toString().</jc>
json = m.toString();
- </p>
- <ul class='doctree'>
- <li class='info'>
- As a general rule, if you do not specify a target type during parsing, or if the target type cannot be
- determined through reflection, the parsers automatically generate <l>ObjectMaps</l> and <l>ObjectLists</l>.
- </ul>
-
- <h6 class='topic'>Additional Information</h6>
- <ul class='doctree'>
- <li class='jc'>
- {@link org.apache.juneau.ObjectMap}
- <li class='jc'>
- {@link org.apache.juneau.ObjectList}
- </ul>
- </div>
-
- <!-- ======================================================================================================== -->
- <a id="Core.ConfigurableProperties"></a>
- <h3 class='topic' onclick='toggle(this)'>2.5 - Configurable Properties</h3>
- <div class='topic'>
- <p>
- Serializers and parsers have a wide variety of configurable properties.
- <br>For example, the following code shows how to configure a JSON serializer:
- </p>
- <p class='bcode'>
- JsonSerializer s = <jk>new</jk> JsonSerializerBuilder().simple().ws().sq().build();
- </p>
- <p>
- However, each of the serializers and parsers already contain reusable instances with common configurations.
- <br>For example, JSON has the following predefined reusable serializers and parsers:
- </p>
- <ul class='doctree'>
- <li class='jc'>
- {@link org.apache.juneau.json.JsonSerializer}
- <ul>
- <li class='jf'>
- {@link org.apache.juneau.json.JsonSerializer#DEFAULT DEFAULT}
- <li class='jf'>
- {@link org.apache.juneau.json.JsonSerializer#DEFAULT_LAX DEFAULT_LAX}
- <li class='jf'>
- {@link org.apache.juneau.json.JsonSerializer#DEFAULT_READABLE DEFAULT_READABLE}
- <li class='jf'>
- {@link org.apache.juneau.json.JsonSerializer#DEFAULT_LAX_READABLE DEFAULT_LAX_READABLE}
- </ul>
- </li>
- <li class='jc'>
- {@link org.apache.juneau.json.JsonParser}
- <ul>
- <li class='jf'>
- {@link org.apache.juneau.json.JsonParser#DEFAULT DEFAULT}
- <li class='jf'>
- {@link org.apache.juneau.json.JsonParser#DEFAULT_STRICT DEFAULT_STRICT}
- </ul>
- </li>
- </ul>
- <p>
- These can be used directly, as follows:
- </p>
- <p class='bcode'>
- <jc>// Serialize a POJO to LAX JSON.</jc>
- String json = JsonSerializer.<jsf>DEFAULT_LAX</jsf>.serialize(myPojo);
- </p>
- <p>
- Serializers and parsers can be locked to prevent further modification to the properties.
- They can also be cloned to copy the configuration of other serializers and parsers.
- </p>
- <p class='bcode'>
- <jc>// Clone and customize an existing serializer.</jc>
- JsonSerializer s = JsonSerializer.<jsf>DEFAULT_LAX</jsf>
- .builder()
- .quoteChar(<js>'"'</js>)
- .build();
-
- <jc>// Lock it so that the configuration cannot be changed.</jc>
- s.lock();
- </p>
-
- <h6 class='topic'>Additional Information</h6>
- <p>
- The following is a list of all configurable properties across all serializers and parsers.
- </p>
- <ul class='doctree'>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/BeanContext.html#ConfigProperties'>BeanContext</a>
- - Properties associated with handling beans on serializers and parsers.
- <ul>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/serializer/SerializerContext.html#ConfigProperties'>SerializerContext</a>
- - Configurable properties common to all serializers.
- <ul>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/html/HtmlSerializerContext.html#ConfigProperties'>HtmlSerializerContext</a>
- - Configurable properties on the HTML serializer.
- <ul>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/html/HtmlDocSerializerContext.html#ConfigProperties'>HtmlDocSerializerContext</a>
- - Configurable properties on the HTML document serializer.
- </ul>
- </li>
- <li class='jic'>
- <a class='doclink' href='org/apache/juneau/jena/RdfCommonContext.html#ConfigProperties'>RdfCommonContext</a>
- - Configurable properties common to the RDF serializers and parsers.
- <ul>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/jena/RdfSerializerContext.html#ConfigProperties'>RdfSerializerContext</a>
- - Configurable properties on the RDF serializers.
- </ul>
- </li>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/json/JsonSerializerContext.html#ConfigProperties'>JsonSerializerContext</a>
- - Configurable properties on the JSON serializer.
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/msgpack/MsgPackSerializerContext.html#ConfigProperties'>MsgPackSerializerContext</a>
- - Configurable properties on the MessagePack serializer.
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/soap/SoapXmlSerializerContext.html#ConfigProperties'>SoapXmlSerializerContext</a>
- - Configurable properties on the SOAP/XML serializer.
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/urlencoding/UonSerializerContext.html#ConfigProperties'>UonSerializerContext</a>
- - Configurable properties on the URL-Encoding and UON serializers.
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/xml/XmlSerializerContext.html#ConfigProperties'>XmlSerializerContext</a>
- - Configurable properties on the XML serializer.
- </ul>
- </li>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/parser/ParserContext.html#ConfigProperties'>ParserContext</a>
- - Configurable properties common to all parsers.
- <ul>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/html/HtmlParserContext.html#ConfigProperties'>HtmlParserContext</a>
- - Configurable properties on the HTML parser.
- <li class='jic'>
- <a class='doclink' href='org/apache/juneau/jena/RdfCommonContext.html#ConfigProperties'>RdfCommonContext</a>
- - Configurable properties common to the RDF serializers and parsers.
- <ul>
- <li class='jc'><a class='doclink' href='org/apache/juneau/jena/RdfParserContext.html#ConfigProperties'>RdfParserContext</a>
- - Configurable properties on the RDF parsers.
- </ul>
- </li>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/json/JsonParserContext.html#ConfigProperties'>JsonParserContext</a>
- - Configurable properties on the JSON parser.
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/msgpack/MsgPackParserContext.html#ConfigProperties'>MsgPackParserContext</a>
- - Configurable properties on the MessagePack parser.
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/urlencoding/UonParserContext.html#ConfigProperties'>UonParserContext</a>
- - Configurable properties on the URL-Encoding and UON parsers.
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/xml/XmlParserContext.html#ConfigProperties'>XmlParserContext</a>
- - Configurable properties on the XML parser.
- </ul>
- </li>
- </ul>
- </li>
- <li class='jc'>
- <a class='doclink' href='org/apache/juneau/server/RestContext.html#ConfigProperties'>RestContext</a>
- - Configurable properties on the REST servlet.
- </li>
- </ul>
- </div>
-
- <!-- ======================================================================================================== -->
- <a id="Core.Transforms"></a>
- <h3 class='topic' onclick='toggle(this)'>2.6 - Transforms</h3>
- <div class='topic'>
- <p>
- By default, the Juneau framework can serialize and parse a wide variety of POJOs out-of-the-box.
- However, two special classes are provided tailor how certain Java objects are handled by the framework.
- These classes are:
- </p>
- <ul class='doctree'>
- <li class='jc'>
- {@link org.apache.juneau.transform.PojoSwap}
- - Tailor how specific non-bean classes are handled by the framework.
- <li class='jc'>
- {@link org.apache.juneau.transform.BeanFilter}
- - Tailor how specific bean classes are handled by the framework.
- </ul>
- <p>
- Annotations are also provided that allow you to use transformations directly on class definitions:
- </p>
- <ul class='doctree'>
- <li class='ja'>
- {@link org.apache.juneau.annotation.Swap @Swap}
- - Used to tailor how non-bean POJOs get interpreted by the framework.
- <li class='ja'>
- {@link org.apache.juneau.annotation.Bean @Bean}
- - Used to tailor how beans get interpreted by the framework.
- <li class='ja'>
- {@link org.apache.juneau.annotation.BeanConstructor @BeanConstructor}
- - Maps constructor arguments to property names on beans with read-only properties.
- <li class='ja'>
- {@link org.apache.juneau.annotation.BeanIgnore @BeanIgnore}
- - Ignore classes, fields, and methods from being interpreted as bean or bean components.
- <li class='ja'>
- {@link org.apache.juneau.annotation.BeanProperty @BeanProperty}
- - Used to tailor how bean properties get interpreted by the framework.
- <li class='ja'>
- {@link org.apache.juneau.annotation.NameProperty @NameProperty}
- - Identifies a setter as a method for setting the name of a POJO as it's known by its parent object.
- <li class='ja'>
- {@link org.apache.juneau.annotation.ParentProperty @ParentProperty}
- - Identifies a setter as a method for adding a parent reference to a child object.
- <li class='ja'>
- {@link org.apache.juneau.annotation.URI @URI}
- - Used to identify a class or bean property as a URI.
- </ul>
+ </p>
+ <p>
+ The <code>ObjectMap</code> and <code>ObjectList</code> classes have many convenience features:
+ </p>
+ <p class='bcode'>
+ <jc>// Convert the map to a bean.</jc>
+ MyBean m = objectMap.cast(MyBean.<jk>class</jk>);
+
+ <jc>// Find entries by multiple keys.</jc>
+ MyBean m = objectMap.find(MyBean.<jk>class</jk>, <js>"key1"</js>, <js>"key2"</js>);
+
+ <jc>// Fluent-style appenders.</jc>
+ objectMap.append(<js>"key1"</js>, <js>"val1"</js>).append(<js>"key2"</js>, <js>"val2"</js>);
+
+ <jc>// REST-like functions for manipulating nodes in the data structure using URL-like notation.</jc>
+ objectMap.getAt(<js>"foo/bar/myBean"</js>, MyBean.<jk>class</jk>);
+ objectMap.putAt(<js>"foo/bar/myBean"</js>, MyBean.<jk>class</jk>);
+ objectMap.postAt(<js>"foo/bar/myListOfBeans"</js>, MyBean.<jk>class</jk>);
+ objectMap.deleteAt(<js>"foo/bar/myBean"</js>);
+
+ <jc>// Copy with inclusion or exclusion.</jc>
+ ObjectMap m2 = objectMap.include(<js>"key1"</js>, <js>"key2"</js>, <js>"key3"</js>);
+ ObjectMap m3 = objectMap.exclude(<js>"key1"</js>, <js>"key2"</js>, <js>"key3"</js>);
- <!-- ======================================================================================================== -->
- <a id="Core.PojoSwaps"></a>
- <h4 class='topic' onclick='toggle(this)'>2.6.1 - PojoSwaps</h4>
+ <jc>// Serialize using another serializer.</jc>
+ String xml = objectMap.serializeTo(XmlSerializer.<jsf>DEFAULT</jsf>);
+
+ <jc>// Nested maps.</jc>
+ objectMap.setInner(objectMapInner);
+ </p>
+
+ <ul class='doctree'>
+ <li class='info'>
+ As a general rule, if you do not specify a target type during parsing, or if the target type cannot be
+ determined through reflection, the parsers automatically generate <l>ObjectMaps</l> and <l>ObjectLists</l>.
+ </ul>
+
+ <h6 class='topic'>Additional Information</h6>
+ <ul class='doctree'>
+ <li class='jc'>
+ {@link org.apache.juneau.ObjectMap}
+ <li class='jc'>
+ {@link org.apache.juneau.ObjectList}
+ </ul>
+ </div>
+
+ <!-- ======================================================================================================= -->
+ <a id="juneau-marshall-ConfigurableProperties"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.5 - Configurable Properties</h4>
<div class='topic'>
<p>
- {@link org.apache.juneau.transform.PojoSwap PojoSwaps} are a critical component of Juneau.
- They allow the serializers and parsers to handle Java objects that wouldn't normally be serializable.
+ Serializers and parsers have a wide variety of configurable properties.
+ <br>For example, the following code shows how to configure a JSON serializer:
+ </p>
+ <p class='bcode'>
+ JsonSerializer s = <jk>new</jk> JsonSerializerBuilder().simple().ws().sq().build();
</p>
<p>
- Swaps are very easy to understand.
- Simply put, they can be thought of as 'object swappers' that swap in serializable objects for
- non-serializable ones during serialization, and vis-versa during parsing.
+ However, each of the serializers and parsers already contain reusable instances with common configurations.
+ <br>For example, JSON has the following predefined reusable serializers and parsers:
</p>
+ <ul class='doctree'>
+ <li class='jc'>
+ {@link org.apache.juneau.json.JsonSerializer}
+ <ul>
+ <li class='jf'>
+ {@link org.apache.juneau.json.JsonSerializer#DEFAULT DEFAULT}
+ <li class='jf'>
+ {@link org.apache.juneau.json.JsonSerializer#DEFAULT_LAX DEFAULT_LAX}
+ <li class='jf'>
+ {@link org.apache.juneau.json.JsonSerializer#DEFAULT_READABLE DEFAULT_READABLE}
+ <li class='jf'>
+ {@link org.apache.juneau.json.JsonSerializer#DEFAULT_LAX_READABLE DEFAULT_LAX_READABLE}
+ <li class='jf'>
+ {@link org.apache.juneau.json.JsonSerializer#DEFAULT_LAX_READABLE_SAFE DEFAULT_LAX_READABLE_SAFE}
+ </ul>
+ </li>
+ <li class='jc'>
+ {@link org.apache.juneau.json.JsonParser}
+ <ul>
+ <li class='jf'>
+ {@link org.apache.juneau.json.JsonParser#DEFAULT DEFAULT}
+ <li class='jf'>
+ {@link org.apache.juneau.json.JsonParser#DEFAULT_STRICT DEFAULT_STRICT}
+ </ul>
+ </li>
+ </ul>
<p>
- Some examples of non-serializable POJOs are <code>File</code>, <code>Reader</code>,
- <code>Iterable</code>, etc...
- These are classes that aren't beans and cannot be represented as simple maps, collections, or primitives.
+ These can be used directly, as follows:
+ </p>
+ <p class='bcode'>
+ <jc>// Serialize a POJO to LAX JSON.</jc>
+ String json = JsonSerializer.<jsf>DEFAULT_LAX</jsf>.serialize(myPojo);
</p>
<p>
- In the following example, we introduce a <code>PojoSwap</code> that will swap in ISO8601 strings for
- <code>Date</code> objects:
+ For performance reasons, serializers and parsers are immutable.
+ However, they can be 'copied' and modified using the <code>builder()</code> method.
</p>
<p class='bcode'>
- <jc>// Sample swap for converting Dates to ISO8601 strings.</jc>
- <jk>public class</jk> MyDateSwap <jk>extends</jk> PojoSwap<Date,String> {
-
- <jc>// ISO8601 formatter.</jc>
- <jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>);
-
- <jd>/** Converts a Date object to an ISO8601 string. */</jd>
- <ja>@Override</ja>
- <jk>public</jk> String swap(BeanSession session, Date o) {
- <jk>return</jk> <jf>format</jf>.format(o);
- }
+ <jc>// Clone and customize an existing serializer.</jc>
+ JsonSerializer s = JsonSerializer.<jsf>DEFAULT_LAX</jsf>
+ .builder()
+ .quoteChar(<js>'"'</js>) <jc>// Use a different quote character.</jc>
+ .build();
+ </p>
+
+ <h6 class='topic'>Additional Information</h6>
+ <p>
+ The following is a list of all configurable properties across all serializers and parsers.
+ </p>
+ <ul class='doctree'>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/BeanContext.html#ConfigProperties'>BeanContext</a>
+ - Properties associated with handling beans on serializers and parsers.
+ <ul>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/serializer/SerializerContext.html#ConfigProperties'>SerializerContext</a>
+ - Configurable properties common to all serializers.
+ <ul>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/html/HtmlSerializerContext.html#ConfigProperties'>HtmlSerializerContext</a>
+ - Configurable properties on the HTML serializer.
+ <ul>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/html/HtmlDocSerializerContext.html#ConfigProperties'>HtmlDocSerializerContext</a>
+ - Configurable properties on the HTML document serializer.
+ </ul>
+ </li>
+ <li class='jic'>
+ <a class='doclink' href='org/apache/juneau/jena/RdfCommonContext.html#ConfigProperties'>RdfCommonContext</a>
+ - Configurable properties common to the RDF serializers and parsers.
+ <ul>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/jena/RdfSerializerContext.html#ConfigProperties'>RdfSerializerContext</a>
+ - Configurable properties on the RDF serializers.
+ </ul>
+ </li>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/json/JsonSerializerContext.html#ConfigProperties'>JsonSerializerContext</a>
+ - Configurable properties on the JSON serializer.
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/msgpack/MsgPackSerializerContext.html#ConfigProperties'>MsgPackSerializerContext</a>
+ - Configurable properties on the MessagePack serializer.
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/soap/SoapXmlSerializerContext.html#ConfigProperties'>SoapXmlSerializerContext</a>
+ - Configurable properties on the SOAP/XML serializer.
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/urlencoding/UonSerializerContext.html#ConfigProperties'>UonSerializerContext</a>
+ - Configurable properties on the URL-Encoding and UON serializers.
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/xml/XmlSerializerContext.html#ConfigProperties'>XmlSerializerContext</a>
+ - Configurable properties on the XML serializer.
+ </ul>
+ </li>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/parser/ParserContext.html#ConfigProperties'>ParserContext</a>
+ - Configurable properties common to all parsers.
+ <ul>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/html/HtmlParserContext.html#ConfigProperties'>HtmlParserContext</a>
+ - Configurable properties on the HTML parser.
+ <li class='jic'>
+ <a class='doclink' href='org/apache/juneau/jena/RdfCommonContext.html#ConfigProperties'>RdfCommonContext</a>
+ - Configurable properties common to the RDF serializers and parsers.
+ <ul>
+ <li class='jc'><a class='doclink' href='org/apache/juneau/jena/RdfParserContext.html#ConfigProperties'>RdfParserContext</a>
+ - Configurable properties on the RDF parsers.
+ </ul>
+ </li>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/json/JsonParserContext.html#ConfigProperties'>JsonParserContext</a>
+ - Configurable properties on the JSON parser.
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/msgpack/MsgPackParserContext.html#ConfigProperties'>MsgPackParserContext</a>
+ - Configurable properties on the MessagePack parser.
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/urlencoding/UonParserContext.html#ConfigProperties'>UonParserContext</a>
+ - Configurable properties on the URL-Encoding and UON parsers.
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/xml/XmlParserContext.html#ConfigProperties'>XmlParserContext</a>
+ - Configurable properties on the XML parser.
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li class='jc'>
+ <a class='doclink' href='org/apache/juneau/server/RestContext.html#ConfigProperties'>RestContext</a>
+ - Configurable properties on the REST servlet.
+ </li>
+ </ul>
+ </div>
+
+ <!-- ======================================================================================================= -->
+ <a id="juneau-marshall-Transforms"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.6 - Transforms</h4>
+ <div class='topic'>
+ <p>
+ By default, the Juneau framework can serialize and parse a wide variety of POJOs out-of-the-box.
+ However, two special classes are provided tailor how certain Java objects are handled by the framework.
+ These classes are:
+ </p>
+ <ul class='doctree'>
+ <li class='jc'>
+ {@link org.apache.juneau.transform.PojoSwap}
+ - Tailor how specific non-bean classes are handled by the framework.
+ <li class='jc'>
+ {@link org.apache.juneau.transform.BeanFilter}
+ - Tailor how specific bean classes are handled by the framework.
+ </ul>
+ <p>
+ Annotations are also provided that allow you to use transformations directly on class definitions:
+ </p>
+ <ul class='doctree'>
+ <li class='ja'>
+ {@link org.apache.juneau.annotation.Swap @Swap}
+ - Used to tailor how non-bean POJOs get interpreted by the framework.
+ <li class='ja'>
+ {@link org.apache.juneau.annotation.Bean @Bean}
+ - Used to tailor how beans get interpreted by the framework.
+ <li class='ja'>
+ {@link org.apache.juneau.annotation.BeanConstructor @BeanConstructor}
+ - Maps constructor arguments to property names on beans with read-only properties.
+ <li class='ja'>
+ {@link org.apache.juneau.annotation.BeanIgnore @BeanIgnore}
+ - Ignore classes, fields, and methods from being interpreted as bean or bean components.
+ <li class='ja'>
+ {@link org.apache.juneau.annotation.BeanProperty @BeanProperty}
+ - Used to tailor how bean properties get interpreted by the framework.
+ <li class='ja'>
+ {@link org.apache.juneau.annotation.NameProperty @NameProperty}
+ - Identifies a setter as a method for setting the name of a POJO as it's known by its parent object.
+ <li class='ja'>
+ {@link org.apache.juneau.annotation.ParentProperty @ParentProperty}
+ - Identifies a setter as a method for adding a parent reference to a child object.
+ <li class='ja'>
+ {@link org.apache.juneau.annotation.URI @URI}
+ - Used to identify a class or bean property as a URI.
+ </ul>
+
+ <!-- =================================================================================================== -->
+ <a id="juneau-marshall.PojoSwaps"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.6.1 - PojoSwaps</h4>
+ <div class='topic'>
+ <p>
+ {@link org.apache.juneau.transform.PojoSwap PojoSwaps} are a critical component of Juneau.
+ They allow the serializers and parsers to handle Java objects that wouldn't normally be serializable.
+ </p>
+ <p>
+ Swaps are very easy to understand.
+ Simply put, they can be thought of as 'object swappers' that swap in serializable objects for
+ non-serializable ones during serialization, and vis-versa during parsing.
+ </p>
+ <p>
+ Some examples of non-serializable POJOs are <code>File</code>, <code>Reader</code>,
+ <code>Iterable</code>, etc...
+ These are classes that aren't beans and cannot be represented as simple maps, collections, or primitives.
+ </p>
+ <p>
+ In the following example, we introduce a <code>PojoSwap</code> that will swap in ISO8601 strings for
+ <code>Date</code> objects:
+ </p>
+ <p class='bcode'>
+ <jc>// Sample swap for converting Dates to ISO8601 strings.</jc>
+ <jk>public class</jk> MyDateSwap <jk>extends</jk> PojoSwap<Date,String> {
+
+ <jc>// ISO8601 formatter.</jc>
+ <jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>);
+
+ <jd>/** Converts a Date object to an ISO8601 string. */</jd>
+ <ja>@Override</ja>
+ <jk>public</jk> String swap(BeanSession session, Date o) {
+ <jk>return</jk> <jf>format</jf>.format(o);
+ }
<jd>/** Converts an ISO8601 string to a Date object. */</jd>
<ja>@Override</ja>
@@ -843,11 +1050,11 @@
}
}
}
- </p>
- <p>
- The swap can then be associated with serializers and parsers like so:
- </p>
- <p class='bcode'>
+ </p>
+ <p>
+ The swap can then be associated with serializers and parsers like so:
+ </p>
+ <p class='bcode'>
<jc>// Sample bean with a Date field.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> Date <jf>date</jf> = <jk>new</jk> Date(112, 2, 3, 4, 5, 6);
@@ -861,55 +1068,129 @@
ReaderParser parser = <jk>new</jk> JsonParserBuilder().pojoSwaps(MyDateSwap.<jk>class</jk>).build();
MyBean bean = parser.parse(json, MyBean.<jk>class</jk>);
<jk>int</jk> day = bean.<jf>date</jf>.getDay(); <jc>// == 3</jc>
- </p>
- <p>
- Several <code>PojoSwaps</code> are already provided for common Java objects:
- </p>
- <ul class='doctree'>
- <li class='jp'>
- <a class='doclink' href='org/apache/juneau/transforms/package-summary.html#TOC'>org.apache.juneau.transforms</a>
- <ul>
- <li class='jc'>
- {@link org.apache.juneau.transforms.ByteArrayBase64Swap}
- <li class='jac'>
- {@link org.apache.juneau.transforms.CalendarSwap}
- <li class='jac'>
- {@link org.apache.juneau.transforms.DateSwap}
- <li class='jc'>
- {@link org.apache.juneau.transforms.EnumerationSwap}
- <li class='jc'>
- {@link org.apache.juneau.transforms.IteratorSwap}
- <li class='jc'>
- {@link org.apache.juneau.transforms.ReaderSwap}
- <li class='jc'>
- {@link org.apache.juneau.transforms.XMLGregorianCalendarSwap}
- </ul>
- </li>
- </ul>
- <p>
- In particular, the {@link org.apache.juneau.transforms.CalendarSwap} and
- {@link org.apache.juneau.transforms.DateSwap} transforms provide a large number of customized swaps to
- ISO, RFC, or localized strings.
- </p>
- <ul class='doctree'>
- <li class='info'>
- The 'swapped' class type must be a serializable type.
- <br>See the definition for Category 4 objects in <a class='doclink'
- href='#Core.PojoCategories'>POJO Categories</a>.
- </ul>
- </div>
+ </p>
+ <p>
+ Several <code>PojoSwaps</code> are already provided for common Java objects:
+ </p>
+ <ul class='doctree'>
+ <li class='jp'>
+ <a class='doclink' href='org/apache/juneau/transforms/package-summary.html#TOC'>org.apache.juneau.transforms</a>
+ <ul>
+ <li class='jc'>
+ {@link org.apache.juneau.transforms.ByteArrayBase64Swap}
+ <li class='jac'>
+ {@link org.apache.juneau.transforms.CalendarSwap}
+ <li class='jac'>
+ {@link org.apache.juneau.transforms.DateSwap}
+ <li class='jc'>
+ {@link org.apache.juneau.transforms.EnumerationSwap}
+ <li class='jc'>
+ {@link org.apache.juneau.transforms.IteratorSwap}
+ <li class='jc'>
+ {@link org.apache.juneau.transforms.ReaderSwap}
+ <li class='jc'>
+ {@link org.apache.juneau.transforms.XMLGregorianCalendarSwap}
+ </ul>
+ </li>
+ </ul>
+ <p>
+ In particular, the {@link org.apache.juneau.transforms.CalendarSwap} and
+ {@link org.apache.juneau.transforms.DateSwap} transforms provide a large number of customized swaps to
+ ISO, RFC, or localized strings.
+ </p>
- <!-- ======================================================================================================== -->
- <a id="Core.SwapAnnotation"></a>
- <h4 class='topic' onclick='toggle(this)'>2.6.2 - @Swap annotation</h4>
- <div class='topic'>
- <p>
- {@link org.apache.juneau.annotation.Swap @Swap} can be used to associate a swap class using an
- annotation.
- This is often cleaner than using the builder <code>pojoSwaps()</code> method since you can keep
- your swap class near your POJO class.
- </p>
- <p class='bcode'>
+ <p>
+ Swaps can also be defined per-media-type.
+ The {@link org.apache.juneau.transform.PojoSwap#forMediaTypes()} method can be overridden to
+ provide a set of media types that the swap is invoked on.
+ It's also possible to define multiple swaps against the same POJO as long as they're differentiated
+ by media type.
+ When multiple swaps are defined, the best-match media type is used.
+ </p>
+ <p>
+ In the following example, we define 3 swaps against the same POJO.
+ One for JSON, one for XML, and one for all other types.
+ </p>
+ <p class='bcode'>
+ <jk>public class</jk> PojoSwapTest {
+
+ <jk>public static class</jk> MyPojo {}
+
+ <jk>public static class</jk> MyJsonSwap <jk>extends</jk> PojoSwap<MyPojo,String> {
+
+ <jk>public</jk> MediaType[] forMediaTypes() {
+ <jk>return</jk> MediaType.<jsm>forStrings</jsm>(<js>"*/json"</js>);
+ }
+
+ <jk>public</jk> String swap(BeanSession session, MyPojo o) <jk>throws</jk> Exception {
+ <jk>return</jk> <js>"It's JSON!"</js>;
+ }
+ }
+
+ <jk>public static class</jk> MyXmlSwap <jk>extends</jk> PojoSwap<MyPojo,String> {
+
+ <jk>public</jk> MediaType[] forMediaTypes() {
+ <jk>return</jk> MediaType.<jsm>forStrings</jsm>(<js>"*/xml"</js>);
+ }
+
+ <jk>public</jk> String swap(BeanSession session, MyPojo o) <jk>throws</jk> Exception {
+ <jk>return</jk> <js>"It's XML!"</js>;
+ }
+ }
+
+ <jk>public static class</jk> MyOtherSwap <jk>extends</jk> PojoSwap<MyPojo,String> {
+
+ <jk>public</jk> MediaType[] forMediaTypes() {
+ <jk>return</jk> MediaType.<jsm>forStrings</jsm>(<js>"*/*"</js>);
+ }
+
+ <jk>public</jk> String swap(BeanSession session, MyPojo o) <jk>throws</jk> Exception {
+ <jk>return</jk> <js>"It's something else!"</js>;
+ }
+ }
+
+ <ja>@Test</ja>
+ <jk>public void</jk> doTest() <jk>throws</jk> Exception {
+
+ SerializerGroup g = <jk>new</jk> SerializerGroupBuilder()
+ .append(JsonSerializer.<jk>class</jk>, XmlSerializer.<jk>class</jk>, HtmlSerializer.<jk>class</jk>)
+ .sq()
+ .pojoSwaps(MyJsonSwap.<jk>class</jk>, MyXmlSwap.<jk>class</jk>, MyOtherSwap.<jk>class</jk>)
+ .build();
+
+ MyPojo myPojo = <jk>new</jk> MyPojo();
+
+ String json = g.getWriterSerializer(<js>"text/json"</js>).serialize(myPojo);
+ <jsm>assertEquals</jsm>(<js>"'It\\'s JSON!'"</js>, json);
+
+ String xml = g.getWriterSerializer(<js>"text/xml"</js>).serialize(myPojo);
+ <jsm>assertEquals</jsm>(<js>"<string>It's XML!</string>"</js>, xml);
+
+ String html = g.getWriterSerializer(<js>"text/html"</js>).serialize(myPojo);
+ <jsm>assertEquals</jsm>(<js>"<string>It's something else!</string>"</js>, html);
+ }
+ }
+ </p>
+
+ <ul class='doctree'>
+ <li class='info'>
+ The 'swapped' class type must be a serializable type.
+ <br>See the definition for Category 4 objects in <a class='doclink'
+ href='#juneau-marshall.PojoCategories'>POJO Categories</a>.
+ </ul>
+ </div>
+
+ <!-- =================================================================================================== -->
+ <a id="juneau-marshall.SwapAnnotation"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.6.2 - @Swap annotation</h4>
+ <div class='topic'>
+ <p>
+ {@link org.apache.juneau.annotation.Swap @Swap} can be used to associate a swap class using an
+ annotation.
+ This is often cleaner than using the builder <code>pojoSwaps()</code> method since you can keep
+ your swap class near your POJO class.
+ </p>
+ <p class='bcode'>
<ja>@Swap</ja>(MyPojoSwap.<jk>class</jk>)
<jk>public class</jk> MyPojo {
...
@@ -923,74 +1204,105 @@
<jk>return</jk> o.toSomeSerializableForm();
}
}
- </p>
- </div>
+ </p>
+
+ <p>
+ Multiple swaps can be associated with a POJO by using the {@link org.apache.juneau.annotation.Swaps @Swaps} annotation:
+ </p>
+ <p class='bcode'>
+ <ja>@Swaps</ja>(
+ {
+ <ja>@Swap</ja>(MyJsonSwap.<jk>class</jk>),
+ <ja>@Swap</ja>(MyXmlSwap.<jk>class</jk>),
+ <ja>@Swap</ja>(MyOtherSwap.<jk>class</jk>)
+ }
+ )
+ <jk>public class</jk> MyPojo {}
+ </p>
+ <p>
+ <code>Readers</code> get serialized directly to the output of a serializer.
+ Therefore it's possible to implement a swap that provides fully-customized output.
+ </p>
+ <p class='bcode'>
+ <jk>public class</jk> MyJsonSwap <jk>extends</jk> PojoSwap<MyPojo,Reader> {
- <!-- ======================================================================================================== -->
- <a id="Core.SwapMethods"></a>
- <h4 class='topic' onclick='toggle(this)'>2.6.3 - Swap methods</h4>
- <div class='topic'>
- <p>
- Various methods can be defined on a class directly to affect how it gets serialized.
- This can often be simpler than using <code>PojoSwaps</code>.
- </p>
- <p>
- Objects serialized as <code>Strings</code> can be parsed back into their original objects by
- implementing one of the following methods on the class:
- </p>
- <ul class='spaced-list'>
- <li>
- <code><jk>public static</jk> T fromString(String)</code> method.
- <br>Any of the following method names also work:
- <ul>
- <li><code>valueOf(String)</code>
- <li><code>parse(String)</code>
- <li><code>parseString(String)</code>
- <li><code>forName(String)</code>
- <li><code>forString(String)</code>
- </ul>
- <li>
- <code><jk>public</jk> T(String)</code> constructor.
- </ul>
- <p>
- Note that these methods cover conversion from several built-in Java types, meaning the parsers can
- automatically construct these objects from strings:
- </p>
- <ul>
- <li><code>fromString(String)</code> - {@link java.util.UUID}
- <li><code>valueOf(String)</code> - {@link java.lang.Boolean}, {@link java.lang.Byte},
- {@link java.lang.Double}, {@link java.lang.Float},
- {@link java.lang.Integer}, {@link java.lang.Long}, {@link java.lang.Short}, {@link java.sql.Date},
- {@link java.sql.Time}, {@link java.sql.Timestamp}
- <li><code>parse(String)</code> - {@link java.text.DateFormat}, {@link java.text.MessageFormat},
- {@link java.text.NumberFormat}, {@link java.util.Date}, {@link java.util.logging.Level}
- <li><code>parseString(String)</code> - {@link javax.xml.bind.DatatypeConverter}
- <li><code>forName(String)</code> - {@link java.lang.Class}
- </ul>
- <p>
- If you want to force a bean-like class to be serialized as a string, you can use the
- {@link org.apache.juneau.annotation.BeanIgnore @BeanIgnore} annotation on the class to force it to be
- serialized to a string using the <code>toString()</code> method.
- </p>
- <p>
- Serializing to other intermediate objects can be accomplished by defining a swap method directly on the
- class:
- </p>
- <ul>
- <li><code><jk>public</jk> X swap(BeanSession)</code> method, where <code>X</code> is any serializable
- object.
- </ul>
- <p>
- The <code>BeanSession</code> parameter allows you access to various information about the current
- serialization session.
- For example, you could provide customized results based on the media type being produced
- ({@link org.apache.juneau.BeanSession#getMediaType()}).
- </p>
- <p>
- The following example shows how an HTML5 form template object can be created that gets serialized as a
- populated HTML5 {@link org.apache.juneau.dto.html5.Form} bean.
- </p>
- <p class='bcode'>
+ <jk>public</jk> MediaType[] forMediaTypes() {
+ <jk>return</jk> MediaType.<jsm>forStrings</jsm>(<js>"*/json"</js>);
+ }
+
+ <jk>public</jk> Reader swap(BeanSession session, MyPojo o) <jk>throws</jk> Exception {
+ <jk>return new</jk> StringReader(<js>"{message:'Custom JSON!'}"</js>);
+ }
+ }
+ </p>
+
+ </div>
+
+ <!-- ======================================================================================================= -->
+ <a id="juneau-marshall.SwapMethods"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.6.3 - Swap methods</h4>
+ <div class='topic'>
+ <p>
+ Various methods can be defined on a class directly to affect how it gets serialized.
+ This can often be simpler than using <code>PojoSwaps</code>.
+ </p>
+ <p>
+ Objects serialized as <code>Strings</code> can be parsed back into their original objects by
+ implementing one of the following methods on the class:
+ </p>
+ <ul class='spaced-list'>
+ <li>
+ <code><jk>public static</jk> T fromString(String)</code> method.
+ <br>Any of the following method names also work:
+ <ul>
+ <li><code>valueOf(String)</code>
+ <li><code>parse(String)</code>
+ <li><code>parseString(String)</code>
+ <li><code>forName(String)</code>
+ <li><code>forString(String)</code>
+ </ul>
+ <li>
+ <code><jk>public</jk> T(String)</code> constructor.
+ </ul>
+ <p>
+ Note that these methods cover conversion from several built-in Java types, meaning the parsers can
+ automatically construct these objects from strings:
+ </p>
+ <ul>
+ <li><code>fromString(String)</code> - {@link java.util.UUID}
+ <li><code>valueOf(String)</code> - {@link java.lang.Boolean}, {@link java.lang.Byte},
+ {@link java.lang.Double}, {@link java.lang.Float},
+ {@link java.lang.Integer}, {@link java.lang.Long}, {@link java.lang.Short}, {@link java.sql.Date},
+ {@link java.sql.Time}, {@link java.sql.Timestamp}
+ <li><code>parse(String)</code> - {@link java.text.DateFormat}, {@link java.text.MessageFormat},
+ {@link java.text.NumberFormat}, {@link java.util.Date}, {@link java.util.logging.Level}
+ <li><code>parseString(String)</code> - {@link javax.xml.bind.DatatypeConverter}
+ <li><code>forName(String)</code> - {@link java.lang.Class}
+ </ul>
+ <p>
+ If you want to force a bean-like class to be serialized as a string, you can use the
+ {@link org.apache.juneau.annotation.BeanIgnore @BeanIgnore} annotation on the class to force it to be
+ serialized to a string using the <code>toString()</code> method.
+ </p>
+ <p>
+ Serializing to other intermediate objects can be accomplished by defining a swap method directly on the
+ class:
+ </p>
+ <ul>
+ <li><code><jk>public</jk> X swap(BeanSession)</code> method, where <code>X</code> is any serializable
+ object.
+ </ul>
+ <p>
+ The <code>BeanSession</code> parameter allows you access to various information about the current
+ serialization session.
+ For example, you could provide customized results based on the media type being produced
+ ({@link org.apache.juneau.BeanSession#getMediaType()}).
+ </p>
+ <p>
+ The following example shows how an HTML5 form template object can be created that gets serialized as a
+ populated HTML5 {@link org.apache.juneau.dto.html5.Form} bean.
+ </p>
+ <p class='bcode'>
<jk>import static</jk> org.apache.juneau.dto.html5.HtmlBuilder.*;
<jd>/**
@@ -1017,21 +1329,21 @@
);
}
}
- </p>
- <p>
- Swapped objects can be converted back into their original form by the parsers by specifying one of the
- following methods:
- </p>
- <ul>
- <li><code><jk>public static</jk> T unswap(BeanSession, X)</code> method where <code>X</code> is the
- swap class type.
- <li><code><jk>public</jk> T(X)</code> constructor where <code>X</code> is the swap class type.
- </ul>
- <p>
- The following shows how our form template class can be modified to allow the parsers to reconstruct our
- original object:
- </p>
- <p class='bcode'>
+ </p>
+ <p>
+ Swapped objects can be converted back into their original form by the parsers by specifying one of the
+ following methods:
+ </p>
+ <ul>
+ <li><code><jk>public static</jk> T unswap(BeanSession, X)</code> method where <code>X</code> is the
+ swap class type.
+ <li><code><jk>public</jk> T(X)</code> constructor where <code>X</code> is the swap class type.
+ </ul>
+ <p>
+ The following shows how our form template class can be modified to allow the parsers to reconstruct our
+ original object:
+ </p>
+ <p class='bcode'>
<jk>import static</jk> org.apache.juneau.dto.html5.HtmlBuilder.*;
<jd>/**
@@ -1067,40 +1379,40 @@
);
}
}
- </div>
-
- <!-- ======================================================================================================== -->
- <a id="Core.BeanFilters"></a>
- <h4 class='topic' onclick='toggle(this)'>2.6.4 - BeanFilters and @Bean annotations</h4>
- <div class='topic'>
- <p>
- {@link org.apache.juneau.transform.BeanFilter BeanFilters} are used to control aspects of how beans are
- handled during serialization and parsing.
- They allow you to control various aspects of beans, such as...
- </p>
- <ul>
- <li>Which properties to include or exclude.
- <li>Property order.
- <li>Property naming conventions.
- <li>Overriding reading and writing of properties.
- </ul>
- <p>
- In practice, however, it's simpler to use the {@link org.apache.juneau.annotation.Bean @Bean} and
- {@link org.apache.juneau.annotation.BeanProperty @BeanProperty} annotations on your bean classes.
- The annotations are functionally equivalent to the bean filter class.
- </p>
- <p class='bcode'>
+ </div>
+
+ <!-- ======================================================================================================= -->
+ <a id="juneau-marshall.BeanFilters"></a>
+ <h4 class='topic' onclick='toggle(this)'>2.1.6.4 - BeanFilters and @Bean annotations</h4>
+ <div class='topic'>
+ <p>
+ {@link org.apache.juneau.transform.BeanFilter BeanFilters} are used to control aspects of how beans are
+ handled during serialization and parsing.
+ They allow you to control various aspects of beans, such as...
+ </p>
+ <ul>
+ <li>Which properties to include or exclude.
+ <li>Property order.
+ <li>Property naming conventions.
+ <li>Overriding reading and writing of properties.
+ </ul>
+ <p>
+ In practice, however, it's simpler to use the {@link org.apache.juneau.annotation.Bean @Bean} and
+ {@link org.apache.juneau.annotation.BeanProperty @BeanProperty} annotations on your bean classes.
+ The annotations are functionally equivalent to the bean filter class.
+ </p>
+ <p class='bcode'>
<jc>// Address class with only street/city/state properties (in that order).</jc>
<jc>// All other properties are ignored.</jc>
<ja>@Bean</ja>(properties=<js>"street,city,state"</js>)
<jk>public class</jk> Address {
...
- </p>
- <p>
- Bean filters are defined through {@link org.apache.juneau.transform.BeanFilterBuilder BeanFilterBuilders}.
- The programmatic equivalent to the the annotation above would be:
- </p>
- <p class='bcode'>
+ </p>
+ <p>
+ Bean filters are defined through {@link org.apache.juneau.transform.BeanFilterBuilder BeanFilterBuilders}.
+ The programmatic equivalent to the the annotation above would be:
+ </p>
+ <p class='bcode'>
<jk>public class</jk> MyAddressBeanFilter <jk>extends</jk> BeanFilterBuilder {
<jc>// Must provide a no-arg constructor!</jc>
@@ -1109,27 +1421,27 @@
setIncludeProperties(<js>"street,city,state"</js>); <jc>// The properties we want exposed.</jc>
}
}
- </p>
- <p>
- Bean filters are added to serializers and parsers using the <code>*BeanFilters(Class...)</code> methods.
- For example:
- </p>
- <p class='bcode'>
+ </p>
+ <p>
+ Bean filters are added to serializers and parsers using the <code>*Be
<TRUNCATED>
[3/3] incubator-juneau git commit: Update javadocs and packaged
artifacts.
Posted by ja...@apache.org.
Update javadocs and packaged artifacts.
Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/990b5d22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/990b5d22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/990b5d22
Branch: refs/heads/master
Commit: 990b5d22adc125472bcb1c9dc69c3e6adf9f46dc
Parents: 1c5ac9a
Author: JamesBognar <ja...@apache.org>
Authored: Sun Sep 17 19:54:20 2017 -0400
Committer: JamesBognar <ja...@apache.org>
Committed: Sun Sep 17 19:54:20 2017 -0400
----------------------------------------------------------------------
eclipse-preferences/user-dictionary.txt | 7 +
.../org/apache/juneau/dto/html5/package.html | 2 +-
.../java/org/apache/juneau/jena/package.html | 2 +-
.../java/org/apache/juneau/annotation/Bean.java | 6 +-
.../java/org/apache/juneau/json/package.html | 2 +-
.../java/org/apache/juneau/parser/Parser.java | 2 +-
.../juneau/plaintext/PlainTextParser.java | 2 +-
.../apache/juneau/remoteable/Remoteable.java | 4 +-
.../org/apache/juneau/transform/package.html | 2 +-
.../juneau/transforms/BeanStringSwap.java | 2 +-
.../java/org/apache/juneau/uon/package.html | 2 +-
.../org/apache/juneau/urlencoding/package.html | 2 +-
.../java/org/apache/juneau/xml/package.html | 2 +-
.../javadoc/doc-files/Samples.Building.1.png | Bin 14082 -> 0 bytes
.../javadoc/doc-files/Samples.Building.2.png | Bin 5543 -> 0 bytes
.../javadoc/doc-files/Samples.Installing.1.png | Bin 52312 -> 0 bytes
.../javadoc/doc-files/Samples.Installing.2.png | Bin 59664 -> 0 bytes
.../javadoc/doc-files/Samples.Installing.3.png | Bin 25927 -> 0 bytes
.../doc-files/juneau-examples-core.import1.png | Bin 0 -> 84524 bytes
.../doc-files/juneau-examples-core.import2.png | Bin 0 -> 102104 bytes
.../doc-files/juneau-examples-core.import3.png | Bin 0 -> 133875 bytes
.../doc-files/juneau-examples-rest.import1.png | Bin 0 -> 84524 bytes
.../doc-files/juneau-examples-rest.import2.png | Bin 0 -> 101789 bytes
.../doc-files/juneau-examples-rest.import3.png | Bin 0 -> 242539 bytes
.../doc-files/juneau-examples-rest.import4.png | Bin 0 -> 405372 bytes
.../juneau-microservice-template.import1.png | Bin 0 -> 84524 bytes
.../juneau-microservice-template.import2.png | Bin 0 -> 101323 bytes
.../juneau-microservice-template.import3.png | Bin 0 -> 127563 bytes
.../juneau-microservice-template.import4.png | Bin 0 -> 77752 bytes
juneau-doc/src/main/javadoc/overview.html | 8307 ++++++++++--------
juneau-examples/juneau-examples-core/.classpath | 10 +-
juneau-examples/juneau-examples-core/.gitignore | 1 +
.../build-overlay/.classpath | 31 +
.../juneau-examples-core/build-overlay/pom.xml | 67 +
juneau-examples/juneau-examples-core/pom.xml | 38 +
.../juneau-examples-core/src/assembly/bin.xml | 48 +
.../src/main/resources/empty.txt | 12 +
.../src/test/java/empty.txt | 12 +
juneau-examples/juneau-examples-rest/.classpath | 1 +
.../build-overlay/.classpath | 31 +
.../juneau-examples-rest/build-overlay/pom.xml | 160 +
.../juneau-examples-rest.launch | 7 -
juneau-examples/juneau-examples-rest/pom.xml | 19 +
.../juneau-examples-rest/src/assembly/bin.xml | 51 +
juneau-microservice/.DS_Store | Bin 6148 -> 10244 bytes
.../juneau-microservice-template/.classpath | 1 +
.../META-INF/MANIFEST.MF | 2 +-
.../build-overlay/.classpath | 26 +
.../build-overlay/.project | 23 +
.../build-overlay/my-microservice.launch | 26 +
.../build-overlay/pom.xml | 103 +
.../juneau-microservice-template/build.xml | 55 -
.../microservice.cfg | 118 -
.../my-microservice.cfg | 112 +
.../my-microservice.launch | 26 +
.../juneau-microservice-template/pom.xml | 48 +-
.../src/assembly/bin.xml | 50 +
.../microservice/sample/RootResources.java | 22 +-
.../juneau/microservice/sample/package.html | 39 +
juneau-releng/juneau-distrib/pom.xml | 25 +
.../org/apache/juneau/rest/client/package.html | 2 +-
.../org/apache/juneau/rest/RequestBody.java | 2 +-
.../juneau/rest/RestResourceResolver.java | 4 +-
.../juneau/rest/RestResourceResolverSimple.java | 4 +-
.../org/apache/juneau/rest/RestResponse.java | 2 +-
.../java/org/apache/juneau/rest/package.html | 8 +-
.../apache/juneau/rest/remoteable/package.html | 2 +-
.../org/apache/juneau/rest/widget/package.html | 39 +
pom.xml | 7 +-
69 files changed, 5463 insertions(+), 4115 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/eclipse-preferences/user-dictionary.txt
----------------------------------------------------------------------
diff --git a/eclipse-preferences/user-dictionary.txt b/eclipse-preferences/user-dictionary.txt
index 712d0c0..68ec86f 100644
--- a/eclipse-preferences/user-dictionary.txt
+++ b/eclipse-preferences/user-dictionary.txt
@@ -484,3 +484,10 @@ bpx
bpi
tooltip
templated
+marshall
+dto
+svl
+mantra
+strived
+protobuf
+maven
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/package.html b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/package.html
index 19cd4b5..21d70bd 100644
--- a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/package.html
+++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/package.html
@@ -337,7 +337,7 @@
}
</p>
<p>
- Refer to <a class='doclink' href='../../../../../overview-summary.html#Core.SwapMethods'>Swap methods</a>
+ Refer to <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.SwapMethods'>Swap methods</a>
for information about defining swap methods on classes.
</p>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html
index 34ef9e7..3d35186 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/package.html
@@ -122,7 +122,7 @@
type and method annotations.
</p>
<p>
- Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a>
+ Refer to <a href='../../../../overview-summary.html#juneau-marshall.PojoCategories' class='doclink'>POJO Categories</a>
for a complete definition of supported POJOs.
</p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
index d71ba6f..6354740 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
@@ -65,7 +65,7 @@ public @interface Bean {
* <ja>@Bean</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {
* <jc>// A bean property where the object types cannot be inferred since it's an Object[].</jc>
- * <ja>@BeanProperty</ja>(typeDictionary={Bar.<jk>class</jk>,Baz.<jk>class</jk>})
+ * <ja>@BeanProperty</ja>(beanDictionary={Bar.<jk>class</jk>,Baz.<jk>class</jk>})
* <jk>public</jk> Object[] x = <jk>new</jk> Object[]{<jk>new</jk> Bar(), <jk>new</jk> Baz()};
* }
*
@@ -81,7 +81,7 @@ public @interface Bean {
* <p class='bcode'>
* <xt><foo></xt>
* <xt><x></xt>
- * <xt><bar/>v
+ * <xt><bar/></xt>
* <xt><baz/></xt>
* <xt></x></xt>
* <xt></foo></xt>
@@ -245,7 +245,7 @@ public @interface Bean {
* JsonSerializer s = JsonSerializer.<jsf>DEFAULT_LAX</jsf>;
* A1 a1 = <jk>new</jk> A1();
* String r = s.serialize(a1);
- * <jsm>assertEquals</jsm>(<js>"{f0:'f0'}"</js>, r); // Note f1 is not serialized.
+ * <jsm>assertEquals</jsm>(<js>"{f0:'f0'}"</js>, r); <jc>// Note f1 is not serialized.</jc>
* </p>
*
* <p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html
index 59f6db2..3c3e845 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/package.html
@@ -110,7 +110,7 @@
serializable forms.
</ul>
<p>
- Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a>
+ Refer to <a href='../../../../overview-summary.html#juneau-marshall.PojoCategories' class='doclink'>POJO Categories</a>
for a complete definition of supported POJOs.
</p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java
index b365a54..c951683 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java
@@ -28,7 +28,7 @@ import org.apache.juneau.utils.*;
* <h6 class='topic'>Valid data conversions</h6>
*
* Parsers can parse any parsable POJO types, as specified in the <a class="doclink"
- * href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a>.
+ * href="../../../../overview-summary.html#juneau-marshall.PojoCategories">POJO Categories</a>.
*
* <p>
* Some examples of conversions are shown below...
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
index 959560a..76fd0a4 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
@@ -17,7 +17,7 @@ import org.apache.juneau.parser.*;
import org.apache.juneau.transform.*;
/**
- * Parsers HTTP plain text request bodies into <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">Group 5</a>
+ * Parsers HTTP plain text request bodies into <a class="doclink" href="../../../../overview-summary.html#juneau-marshall.PojoCategories">Group 5</a>
* POJOs.
*
* <h5 class='section'>Media types:</h5>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remoteable/Remoteable.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remoteable/Remoteable.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remoteable/Remoteable.java
index 4cb1964..e423ccc 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remoteable/Remoteable.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remoteable/Remoteable.java
@@ -23,7 +23,9 @@ import java.lang.annotation.*;
* <h6 class='topic'>Additional Information</h6>
* <ul class='doctree'>
* <li class='link'>
- * <a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a>
+ * <a class='doclink' href='../../../../overview-summary.html#juneau-rest-server.Remoteable'>Remoteable Proxies</a>
+ * <li class='link'>
+ * <a class='doclink' href='../../../../overview-summary.html#juneau-rest-client.3rdPartyProxies'>Interface proxies against 3rd-party REST interfaces</a>
* <li class='jp'>
* <a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a>
* </ul>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/package.html
index 9c4be10..4f7ea14 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/package.html
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/package.html
@@ -518,7 +518,7 @@
<h6 class='topic'>Valid swapped class types</h6>
<p>
The swapped class type can be any serializable class type as defined in the
- <a href='../../../../overview-summary.html#Core.PojoCategories'>POJO categories</a> table.
+ <a href='../../../../overview-summary.html#juneau-marshall.PojoCategories'>POJO categories</a> table.
</p>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
index 6a190a5..9f49c73 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
@@ -26,7 +26,7 @@ import org.apache.juneau.transform.*;
* <p>
* This is usually a one-way transform.
* Beans serialized as strings cannot be reconstituted using a parser unless it is a
- * <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">Type 5 POJO</a>.
+ * <a class="doclink" href="../../../../overview-summary.html#juneau-marshall.PojoCategories">Type 5 POJO</a>.
*
* @param <T> The class type of the bean.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html
index 2d75ac9..8f5652f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/uon/package.html
@@ -116,7 +116,7 @@
serializable forms.
</ul>
<p>
- Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a>
+ Refer to <a href='../../../../overview-summary.html#juneau-marshall.PojoCategories' class='doclink'>POJO Categories</a>
for a complete definition of supported POJOs.
</p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html
index e880ec0..0a3d6ea 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/urlencoding/package.html
@@ -115,7 +115,7 @@
serializable forms.
</ul>
<p>
- Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a>
+ Refer to <a href='../../../../overview-summary.html#juneau-marshall.PojoCategories' class='doclink'>POJO Categories</a>
for a complete definition of supported POJOs.
</p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html
index 70fec82..4136008 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/package.html
@@ -128,7 +128,7 @@
properties through type and method annotations.
</p>
<p>
- Refer to <a href='../../../../overview-summary.html#Core.PojoCategories' class='doclink'>POJO Categories</a>
+ Refer to <a href='../../../../overview-summary.html#juneau-marshall.PojoCategories' class='doclink'>POJO Categories</a>
for a complete definition of supported POJOs.
</p>
<p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/Samples.Building.1.png
----------------------------------------------------------------------
diff --git a/juneau-doc/src/main/javadoc/doc-files/Samples.Building.1.png b/juneau-doc/src/main/javadoc/doc-files/Samples.Building.1.png
deleted file mode 100644
index b87be9e..0000000
Binary files a/juneau-doc/src/main/javadoc/doc-files/Samples.Building.1.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/Samples.Building.2.png
----------------------------------------------------------------------
diff --git a/juneau-doc/src/main/javadoc/doc-files/Samples.Building.2.png b/juneau-doc/src/main/javadoc/doc-files/Samples.Building.2.png
deleted file mode 100644
index 7f4e892..0000000
Binary files a/juneau-doc/src/main/javadoc/doc-files/Samples.Building.2.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.1.png
----------------------------------------------------------------------
diff --git a/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.1.png b/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.1.png
deleted file mode 100644
index 81c6239..0000000
Binary files a/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.1.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.2.png
----------------------------------------------------------------------
diff --git a/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.2.png b/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.2.png
deleted file mode 100644
index 9873f17..0000000
Binary files a/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.2.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.3.png
----------------------------------------------------------------------
diff --git a/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.3.png b/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.3.png
deleted file mode 100644
index 9c3fd34..0000000
Binary files a/juneau-doc/src/main/javadoc/doc-files/Samples.Installing.3.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import1.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
new file mode 100644
index 0000000..3b9b4e1
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import1.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import2.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.import2.png
new file mode 100644
index 0000000..96648a4
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import2.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import3.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.import3.png
new file mode 100644
index 0000000..6c8521c
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-core.import3.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import1.png
----------------------------------------------------------------------
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.import1.png
new file mode 100644
index 0000000..3b9b4e1
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import1.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import2.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.import2.png
new file mode 100644
index 0000000..b4472e7
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import2.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import3.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.import3.png
new file mode 100644
index 0000000..82792c0
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import3.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import4.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.import4.png
new file mode 100644
index 0000000..cd366dc
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest.import4.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import1.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-microservice-template.import1.png
new file mode 100644
index 0000000..3b9b4e1
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import1.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import2.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
new file mode 100644
index 0000000..b65dce1
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import2.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import3.png
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..207b291
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import3.png differ
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/990b5d22/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import4.png
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..0f27f36
Binary files /dev/null and b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-template.import4.png differ