Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5E48B200D21 for ; Mon, 16 Oct 2017 22:07:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5CC1D1609EF; Mon, 16 Oct 2017 20:07:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2FD7B1609E3 for ; Mon, 16 Oct 2017 22:07:35 +0200 (CEST) Received: (qmail 64345 invoked by uid 500); 16 Oct 2017 20:07:34 -0000 Mailing-List: contact commits-help@juneau.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@juneau.incubator.apache.org Delivered-To: mailing list commits@juneau.incubator.apache.org Received: (qmail 64336 invoked by uid 99); 16 Oct 2017 20:07:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2017 20:07:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 56FEF180860 for ; Mon, 16 Oct 2017 20:07:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.221 X-Spam-Level: X-Spam-Status: No, score=-4.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_SHORT=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rbmnDlQbc3Lu for ; Mon, 16 Oct 2017 20:07:21 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 47EFB5F3D1 for ; Mon, 16 Oct 2017 20:07:20 +0000 (UTC) Received: (qmail 63080 invoked by uid 99); 16 Oct 2017 20:07:19 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2017 20:07:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2F0A1DF99F; Mon, 16 Oct 2017 20:07:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jamesbognar@apache.org To: commits@juneau.incubator.apache.org Date: Mon, 16 Oct 2017 20:07:17 -0000 Message-Id: <425210b644964189a7e3cd0a8981552a@git.apache.org> In-Reply-To: <455d14499895431db9ef82b9910794df@git.apache.org> References: <455d14499895431db9ef82b9910794df@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/5] incubator-juneau-website git commit: Break out about page into separate components. archived-at: Mon, 16 Oct 2017 20:07:37 -0000 http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/e87529b2/content/components.html ---------------------------------------------------------------------- diff --git a/content/components.html b/content/components.html new file mode 100644 index 0000000..e1681ee --- /dev/null +++ b/content/components.html @@ -0,0 +1,227 @@ + + + + + + + + + + +
Components
+
+

+ We've strived to keep prerequisites to an absolute minimum in order to make adoption as easy as possible. +

+

+ The library consists of the following artifacts found in the Maven group "org.apache.juneau": +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryMaven ArtifactsDescriptionPrereqs
juneau-corejuneau-marshallSerializers and parsers for: +
    +
  • JSON +
  • XML +
  • HTML +
  • UON +
  • URL-Encoding +
  • MessagePack +
  • SOAP/XML +
  • CSV +
  • BSON (coming soon) +
  • YAML (coming soon) +
  • Protobuf (coming soon) +
+
+
    +
  • Java 6 +
+
juneau-marshall-rdf + Serializers and parsers for: +
    +
  • RDF/XML +
  • RDF/XML-Abbrev +
  • N-Triple +
  • Turtle +
  • N3 +
+
+
    +
  • Java 6 +
  • Apache Jena 2.7.1 +
+
juneau-dto + Data Transfer Objects for: +
    +
  • HTML5 +
  • Atom +
  • Cognos +
  • JSON-Schema +
  • Swagger 2.0 +
+
  • Java 6
juneau-svl + Simple Variable Language API +
  • Java 6
juneau-config + Configuration file API +
  • Java 6
juneau-restjuneau-rest-server + REST Servlet API + +
    +
  • Java 6 +
  • Servlet 3.1 +
+
juneau-rest-server-jaxrs + Optional JAX-RS support + +
    +
  • Java 6 +
  • JAX-RS 2.0 +
+
juneau-rest-client + REST Client API + +
    +
  • Java 6 +
  • Apache HttpClient 4.5.3 +
+
juneau-microservicejuneau-microservice-server + REST Microservice Server API + +
    +
  • Java 8 +
  • Eclipse Jetty 9.4.3 +
+
juneau-microservice-template + Developer template project + +
    +
  • Java 8 +
  • Eclipse Jetty 9.4.3 +
+
juneau-examplesjuneau-examples-core + Core code examples +
juneau-example-rest + REST code examples +
juneau-alljuneau-all + Combination of the following: +
    +
  • juneau-marshall +
  • juneau-dto +
  • juneau-svl +
  • juneau-config +
  • juneau-rest-server +
  • juneau-rest-client +
+
+
    +
  • Java 6 +
  • Servlet 3.1 +
  • Apache HttpClient 4.5.3 +
+
+ +

+ The current version of Juneau is 6.4.0-incubating. + The easiest way to pull in the library is through the following maven dependency: +

+

+ <dependency> + <groupId>org.apache.juneau</groupId> + <artifactId>juneau-all</artifactId> + <version>6.4.0-incubating</version> + </dependency> +

+

+ If you would like to work with the bleeding-edge code, you can access the 6.4.1-incubating-SNAPSHOT + version through the following repository: +

+

+ <pluginRepositories> + <pluginRepository> + <id>apache.snapshots</id> + <url>http://repository.apache.org/snapshots/</url> + <snapshots> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + </snapshots> + </pluginRepository> + </pluginRepositories> +

+
+ + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/e87529b2/content/config.html ---------------------------------------------------------------------- diff --git a/content/config.html b/content/config.html new file mode 100644 index 0000000..c72943b --- /dev/null +++ b/content/config.html @@ -0,0 +1,140 @@ + + + + + + + + + + +
juneau-config
+
+
Maven Dependency
+

+ <dependency> + <groupId>org.apache.juneau</groupId> + <artifactId>juneau-config</artifactId> + <version>6.4.0-incubating</version> + </dependency> +

+ +
Java Library
+

+ juneau-config-6.4.0-incubating.jar +

+ +
OSGi Module
+

+ org.apache.juneau.config_6.4.0-incubating.jar +

+ +

+ The juneau-config module defines an API allows you to interact with INI files using POJOs. + It builds upon the marshalling and SVL APIs to provide sophisticated dynamic configuration files. +

+

+ #-------------------------- + # My section + #-------------------------- + [MySection] + + # An integer + anInt = 1 + + # A boolean + aBoolean = true + + # An int array + anIntArray = [1,2,3] + + # A POJO that can be converted from a String + aURL = http://foo + + # A POJO that can be converted from JSON + aBean = {foo:'bar',baz:123} + + # A system property + locale = $S{java.locale, en_US} + + # An environment variable + path = $E{PATH, unknown} + + # A manifest file entry + mainClass = $MF{Main-Class} + + # Another value in this config file + sameAsAnInt = $C{MySection/anInt} + + # A command-line argument in the form "myarg=foo" + myArg = $ARG{myarg} + + # The first command-line argument + firstArg = $ARG{0} + + # Look for system property, or env var if that doesn't exist, or command-line arg if that doesn't exist. + nested = $S{mySystemProperty,$E{MY_ENV_VAR,$ARG{0}}} + + # A POJO with embedded variables + aBean2 = {foo:'$ARG{0}',baz:$C{MySection/anInt}} +

+

+ You're probably wondering "why INI files?" + The beauty of these INI files is that they're easy to read and modify, yet sophisticated enough to allow you to + store arbitrary-complex data structures and retrieve them as simple values or complex POJOs: +

+

+ // Load our config file + ConfigFile f = new ConfigFileBuilder().build("MyIniFile.cfg"); + + int anInt = cf.getInt("MySection/anInt"); + boolean aBoolean = cf.getBoolean("MySection/aBoolean"); + int[] anIntArray = cf.getObject(int[].class, "MySection/anIntArray"); + URL aURL = cf.getObject(URL.class, "MySection/aURL"); + MyBean aBean = cf.getObject(MyBean.class, "MySection/aBean"); + Locale locale = cf.getObject(Locale.class, "MySection/locale"); + String path = cf.getString("MySection/path"); + String mainClass = cf.getString("MySection/mainClass"); + int sameAsAnInt = cf.getInt("MySection/sameAsAnInt"); + String myArg = cf.getString("MySection/myArg"); + String firstArg = cf.getString("MySection/firstArg"); +

+

+ By default, values are LAX JSON (i.e. unquoted attributes, single quotes) except for top-level strings which are left unquoted. + Any parsable object types are supported as values (e.g. arrays, collections, beans, swappable objects, enums, etc...). +

+

+ One of the more powerful aspects of the REST servlets is that you can pull values directly from + config files by using the "$C" variable in annotations. +
For example, the HTML stylesheet for your REST servlet can be defined in a config file like so: +

+

+ @RestResource( + path="/myResource", + config="$S{my.config.file}", // Path to config file (here pulled from a system property) + stylesheet="$C{MyResourceSettings/myStylesheet}" // Stylesheet location pulled from config file. + ) + public class MyResource extends RestServlet { +

+

+ Other features: +

+
    +
  • A listener API that allows you to, for example, reinitialize your REST resource if the config file + changes, or listen for changes to particular sections or values. +
  • Config files can be modified through the ConfigFile class (e.g. add/remove/modify sections and keys, add/remove comments and whitespace, etc...). +
    When using these APIs, you DO NOT lose formatting in your existing configuration file. + All existing whitespace and comments are preserved for you! +
  • Config file sections can be used to directly populate beans. +
  • Config file sections can be accessed and manipulated through Java interface proxies. +
+ + +
+ + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/e87529b2/content/doap.rdf ---------------------------------------------------------------------- diff --git a/content/doap.rdf b/content/doap.rdf index 221ee8f..dbd7546 100644 --- a/content/doap.rdf +++ b/content/doap.rdf @@ -54,7 +54,6 @@ under the License. 6.4.0 2017-10-05 - 0.16.0 http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/e87529b2/content/dto.html ---------------------------------------------------------------------- diff --git a/content/dto.html b/content/dto.html new file mode 100644 index 0000000..c257a1b --- /dev/null +++ b/content/dto.html @@ -0,0 +1,255 @@ + + + + + + + + + + +
juneau-dto
+
+
Maven Dependency
+

+ <dependency> + <groupId>org.apache.juneau</groupId> + <artifactId>juneau-dto</artifactId> + <version>6.4.0-incubating</version> + </dependency> +

+ +
Java Library
+

+ juneau-dto-6.4.0-incubating.jar +

+ +
OSGi Module
+

+ org.apache.juneau.dto_6.4.0-incubating.jar +

+ +

+ Data Transfer Object libraries are provided for a variety of languages that allow you to serialize commonly-used + documents. +

+
    +
  • HTML5 +
  • Atom +
  • Cognos +
  • JSON-Schema +
  • Swagger 2.0 +
+

+ HTML5 documents and fragments can be constructed using the HTML5 DTOs and HTML or XML serializers: +

+

+ import static org.apache.juneau.dto.html5.HtmlBuilder.*; + + Object myform = + form().action("/submit").method("POST") + .children( + "Position (1-10000): ", input("number").name("pos").value(1), br(), + "Limit (1-10000): ", input("number").name("limit").value(100), br(), + button("submit", "Submit"), + button("reset", "Reset") + ); + + String html = HtmlSerializer.DEFAULT.serialize(myform); +

+

+ <form action='/submit' method='POST'> + Position (1-10000): <input name='pos' type='number' value='1'/><br/> + Limit (1-10000): <input name='pos' type='number' value='100'/><br/> + <button type='submit'>Submit</button> + <button type='reset'>Reset</button> + </form> +

+

+ And you're not limited to just HTML. The HTML5 beans are POJOs that can be serialized using any + of the serializers, such as lax JSON: +

+

+ { + _type: 'form', + a: { action: '/submit', method: 'POST' }, + c: [ + 'Position (1-10000): ', + { _type: 'input', a: { type: 'number', name: 'pos', value: 1 } }, + { _type: 'br' }, + 'Limit (1-10000): ', + { _type: 'input', a: { type: 'number', name: 'limit', value: 100 } }, + { _type: 'br' }, + { _type: 'button', a: { type: 'submit' }, c: [ 'Submit' ] }, + { _type: 'button', a: { type: 'reset' }, c: [ 'Reset' ] } + ] + } +

+ +

+ ATOM feeds can be constructed using the ATOM DTOs and XML serializer: +

+

+ import static org.apache.juneau.dto.atom.AtomBuilder.*; + + Feed feed = + feed("tag:juneau.apache.org", "Juneau ATOM specification", "2016-01-02T03:04:05Z") + .subtitle(text("html").text("Describes <em>stuff</em> about Juneau")) + .links( + link("alternate", "text/html", "http://juneau.apache.org/").hreflang("en"), + link("self", "application/atom+xml", "http://juneau.apache.org/feed.atom") + ) + .rights("Copyright (c) 2016, Apache Foundation") + .entries( + entry("tag:juneau.sample.com,2013:1.2345", "Juneau ATOM specification snapshot", "2016-01-02T03:04:05Z") + .published("2016-01-02T03:04:05Z") + .content( + content("xhtml") + .lang("en") + .base("http://www.apache.org/") + .text("<div><p><i>[Update: Juneau supports ATOM.]</i></p></div>") + ) + ); + + // Serialize to ATOM/XML + String atomXml = XmlSerializer.DEFAULT.serialize(feed); +

+

+ <feed> + <id> + tag:juneau.apache.org + </id> + <link href='http://juneau.apache.org/' rel='alternate' type='text/html' hreflang='en'/> + <link href='http://juneau.apache.org/feed.atom' rel='self' type='application/atom+xml'/> + <rights> + Copyright (c) 2016, Apache Foundation + </rights> + <title type='text'> + Juneau ATOM specification + </title> + <updated>2016-01-02T03:04:05Z</updated> + <subtitle type='html'> + Describes <em>stuff</em> about Juneau + </subtitle> + <entry> + <id> + tag:juneau.apache.org + </id> + <title> + Juneau ATOM specification snapshot + </title> + <updated>2016-01-02T03:04:05Z</updated> + <content base='http://www.apache.org/' lang='en' type='xhtml'> + <div xmlns="http://www.w3.org/1999/xhtml"><p><i>[Update: Juneau supports ATOM.]</i></p></div> + </content> + <published>2016-01-02T03:04:05Z</published> + </entry> + </feed> +

+

+ Swagger documents can be constructed using the Swagger DTOs and JSON serializer: +

+

+ import static org.apache.juneau.dto.swagger.SwaggerBuilder.*; + + Swagger swagger = swagger() + .swagger("2.0") + .info( + info("Swagger Petstore", "1.0.0") + .description("This is a sample server Petstore server.") + .termsOfService("http://swagger.io/terms/") + .contact( + contact().email("apiteam@swagger.io") + ) + .license( + license("Apache 2.0").url("http://www.apache.org/licenses/LICENSE-2.0.html") + ) + ) + .path("/pet", "post", + operation() + .tags("pet") + .summary("Add a new pet to the store") + .description("") + .operationId("addPet") + .consumes(MediaType.JSON, MediaType.XML) + .produces(MediaType.JSON, MediaType.XML) + .parameters( + parameterInfo("body", "body") + .description("Pet object that needs to be added to the store") + .required(true) + ) + .response(405, responseInfo("Invalid input")) + ); + + // Serialize to Swagger/JSON + String swaggerJson = JsonSerializer.DEFAULT_READABLE.serialize(swagger); +

+

+ { + "swagger": "2.0", + "info": { + "title": "Swagger Petstore", + "description": "This is a sample server Petstore server.", + "version": "1.0.0", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "paths": { + "/pet": { + "post": { + "tags": [ + "pet" + ], + "summary": "Add a new pet to the store", + "description": "", + "operationId": "addPet", + "consumes": [ + "application/json", + "text/xml" + ], + "produces": [ + "application/json", + "text/xml" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Pet object that needs to be added to the store", + "required": true + } + ], + "responses": { + "405": { + "description": "Invalid input" + } + } + } + } + }, + } +

+

+ Note that these DTOs can also be serialized to any of the other supported languages such as JSON or MessagePack! + And they can be parsed back into their original objects! +

+

+ As a convenience, you can also simply call toString() on any of these DTOs and they will + be serialized directly to a string in the typical language (e.g. HTML5 beans to HTML, Swagger to JSON, etc...). +

+ + +
+ + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/e87529b2/content/examples.html ---------------------------------------------------------------------- diff --git a/content/examples.html b/content/examples.html new file mode 100644 index 0000000..cb60c1a --- /dev/null +++ b/content/examples.html @@ -0,0 +1,90 @@ + + + + + + + + + + +
juneau-examples
+
+ + + + + +
juneau-examples-core
+
+ +
Archive File
+

+ juneau-examples-core-6.4.0-incubating.zip +

+ +

+ The juneau-examples-core project contains various code examples for using the core APIs. +

+

+ The project project can be loaded into your workspace by importing the + juneau-examples-core-6.4.0-incubating.zip file. +

+

+ Once loaded, you should see the following project structure: +

+ + +

+ FYI...
+ The Core library samples are currently a work-in-progress so there's not much here yet. +

+ + + +
+ + + + + +
juneau-examples-rest
+
+ +
Archive File
+

+ juneau-examples-rest-6.4.0-incubating.zip +

+ +

+ The juneau-examples-core project provides various code examples on how to use the core + libraries. +

+

+ The project project can be loaded into your workspace by importing the + juneau-examples-rest-6.4.0-incubating.zip file. +

+

+ Once loaded, you should see the following project structure: +

+ +

+ The microservice can be started from the juneau-examples-rest.launch file. + It will start up the microservice on port 10000 which you can then view through a browser: +

+ + + +
+ +
+ + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/e87529b2/content/index.html ---------------------------------------------------------------------- diff --git a/content/index.html b/content/index.html index 714e030..c3d9a03 100644 --- a/content/index.html +++ b/content/index.html @@ -41,7 +41,7 @@ } nav { float: left; - width: 160px; + width: 150px; margin: 40px 20px; padding: 1em; border: 1px solid gray; @@ -54,6 +54,8 @@ } nav ul { list-style-type: none; padding: 0; } nav ul li { padding: 5px 0px; } + nav ul ul { padding: 0px 10px; } + nav ul ul li { padding: 5px 0px 0px 3px; font-size: smaller; } nav ul a { text-decoration: none; color: rgb(44, 69, 87); } nav ul a:hover { font-weight: normal; } nav ul a.selected { font-weight: normal; } @@ -145,14 +147,26 @@