blob: 4e2f049589e9118ff3cf9093750d25963257ad2d [file] [log] [blame]
<!--
/***************************************************************************************************************************
* 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.
***************************************************************************************************************************/
-->
5.1.0.20 (Sept 5, 2015)
<p>
Juno 5.1.0.20 is a moderate update.
The biggest improvement is the ability to associate external INI config files with REST servlets using the <dc>ConfigFile</dc> functionality.
</p>
<h5 class='topic w800'>Core</h5>
<ul class='spaced-list'>
<li>Significant API changes to <c>org.apache.juneau.config</c> API.
<ul>
<li><dc>ConfigFile</dc> is now thread safe and can be shared across multiple threads.
<li>New <dc>ConfigMgr</dc> class for managing configuration files.
<li>Serializers and parsers can be associated with config files for storing and retrieving POJOs.
Default support provided for JSON.
</ul>
</li>
<li>New {@link oaj.html.SimpleHtmlWriter} class.
Can be used for simple HTML DOM construction.
<li>New {@link oaj.utils.ProcBuilder} class for calling external processes.
<li>New <dc>ObjectMap.remove(Class,String,Object)</dc> method.
<li><js>"class='link'"</js> added to links generated by {@link oaj.html.HtmlDocSerializer}.
<li>New <dc>EncoderGroup#append(EncoderGroup)</dc> method.
<li>New <c>HtmlDocSerializerContext.HTMLDOC_addLinks</c> configuration property.
<li>Modified the <c>Parser.createContext(ObjectMap,Method,Object)</c> method.
Outer context objects can be passed in to create instances of non-static inner classes.
<li>Fixed bug in {@link oaj.html.HtmlStrippedDocSerializer} where exception was thrown when trying to serialize primitive arrays.
<li>{@link oaj.json.JsonParser} now handles parsing JSON boolean/numeric values as strings to bean properties of type boolean or number.
<li>{@link oaj.urlencoding.UrlEncodingSerializer} and {@link oaj.urlencoding.UrlEncodingParser} now
represent arrays and collections as key-value pairs where the keys are numbers (e.g. <js>"?0=foo&amp;1=bar"</js>).
<li>Various internal improvements to {@link oaj.utils.IOPipe}.
<li>New <dc>ReflectionUtils.getResource(Class,String)</dc> method.
<li>{@link oaj.internal.StringUtils#parseNumber(String,Class)} now returns zero for empty strings.
This affects the way most parsers handle blank values.
</ul>
<h5 class='topic w800'>Server</h5>
<ul class='spaced-list'>
<li>You can now parse into non-static inner classes of a servlet for parameters/attributes/content.
Useful if you like to define your marshaller beans inside your servlet.
<li>Changes to {@link oajr.RestServlet}:
<ul>
<li>New methods for accessing external INI config files:<br>
<dc>RestServlet.getConfig()</dc><br>
<dc>RestServlet.createConfigFile()</dc>
<li>New <js>"$C{...}"</js> variable that resolve to INI config file values.
<li>New <js>"$UE{...}"</js> variable that URL-encodes the value inside the variable.
<li>New convenience methods for retrieving classpath resource files:<br>
<dc>RestServlet.getResource(String)</dc><br>
<dc>RestServlet.getResourceAsString(String)</dc><br>
<dc>RestServlet.getResource(Class,String,String)</dc>.
Useful if you want to load predefined POJOs from JSON files in your classpath.
<li>New <dc>RestServlet.handleNotFound(int,RestRequest,RestResponse)</dc> method for customized handling
of when a resource or method was not found.
</ul>
<li>{@link oajr.BasicRestServlet} now automatically processes <js>"/favicon.ico"</js> requests by
overriding the new <dc>RestServlet.handleNotFound(int,RestRequest,RestResponse)</dc> method.
<li>New {@link oajr.RestRequest} methods:
<ul>
<li><dc>RestRequest.resolveVars(String)</dc>
<li><c>RestRequest.getVarResource(String)</c>
<li><dc>RestRequest.getConfig()</dc>
</ul>
<li>New {@link oajr.RestResponse} methods:
<ul>
<li>{@link oajr.RestResponse#getDirectWriter(String)}.
<li>{@link oajr.RestResponse#getNegotiatedWriter()}.
<c>getWriter()</c> now returns an unnegotiated writer.
<c>getUnbufferedWriter()</c> has been removed.
</ul>
<li>New {@link oajr.annotation.RestMethod#encoders() @RestMethod(encoders)} and
<dc>RestMethod.inheritEncoders()</dc> annotations.
Allows encoders to be fine-tuned at the method level.
<li>New <dc>@RestResource(config)</dc> annotation for associating external <dc>ConfigFile</dc> config files with servlets.
<li><dc>ResourceLink</dc>.
<li>New <c>org.apache.juneau.rest.matchers</c> package for commonly-used {@link oajr.RestMatcher RestMatchers}:
<ul>
<li>{@link oajr.matchers#MultipartFormDataMatcher}
<li>{@link oajr.matchers#UrlEncodedFormMatcher}
</ul>
</ul>
<h5 class='topic w800'>Microservice</h5>
<ul class='spaced-list'>
<li>New juneau-microservice.jar file that encapsulates all 3 juneau jars with code necessary for creating fast and efficent jetty-powered REST microservices.<br>
Contains the following:
<ul>
<li>Jetty 8.0
<li>Apache HttpClient 4.3.5
<li>Apache Commons FileUpload 1.3.1
</ul>
<li>Microservice now supports Java 6 (previously required Java 7)
</ul>