blob: 35622e632d09cb4b653923bf15e74ad6c9a67106 [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.3 (Jun 28, 2014)
<p>
Juno 5.1.0.3 is a moderate update.
</p>
<h5 class='topic w800'>Core API updates</h5>
<ul class='spaced-list'>
<li>Ability to detect and use non-public bean classes, getters/setters, and fields using the following new properties:
<ul>
<li>{@link oaj.BeanContext#BEAN_beanConstructorVisibility} - Control which bean constructors are visible to Juno.
<li>{@link oaj.BeanContext#BEAN_beanClassVisibility} - Control which bean classes are interpreted as beans to Juno.
<li>{@link oaj.BeanContext#BEAN_beanFieldVisibility} - Control which fields are visible to Juno as bean properties.
<li>{@link oaj.BeanContext#BEAN_beanMethodVisibility} - Control which getters/setters are visible to Juno as bean properties.
</ul>
Removed <c>BeanContext.<jsf>INCLUDE_BEAN_FIELD_PROPERTIES</jsf></c> and <c>BeanContext.<jsf>INCLUDE_BEAN_METHOD_PROPERTIES</jsf></c> properties, since ignoring fields and methods
can be accomplished by setting the appropriate properties above to {@link oaj.Visibility#NONE NONE}.
Also, the <dc>@BeanProperty</dc> annotation can now be used on non-public fields/getters/setters to override
the default behavior defined by the <c>VISIBILITY</c> properties identified above. This is a convenient way of identifying protected or
private fields or methods as bean properties. Previously, you could only identify public fields/getters/setters using this annotation.
</li>
<li>New {@link oaj.BeanContext#BEAN_useJavaBeanIntrospector} property that lets Juno use the Java bean <c>Introspector</c>
class to determine bean properties. In the previous release, the method for determining bean properties was a mixture of Juno-based and Introspector-based.
Now it's either pure Juno-based or pure Introspector-based. The result is considerably cleaner code and consistent behavior.
<li>New {@link oaj.annotation.BeanIgnore @BeanIgnore} annotation. Replaces the previous <dc>@BeanProperty(hidden=true)</dc> annotation
for ignoring bean properties. Can also be used on classes that look like beans so that they're not treated as beans.
<li>Support for parsing into non-static member classes. This applies to all parsers.
<li>New {@link oaj.json.annotation.Json#wrapperAttr() @Json(wrapperAttr)} annotation that automatically wraps beans and objects in a wrapper
attribute when serializing to or parsing from JSON.
<li>Changed the default ordering of bean properties to be in parent-to-child class order.
<li>New {@link oaj.transform.BeanFilter#readProperty(Object,String,Object) readProperty()} and {@link oaj.transform.BeanFilter#writeProperty(Object,String,Object) writeProperty()}
methods added to {@link oaj.transform.BeanFilter} class to allow individualized serialization and parsing behavior on a class-by-class basis.
<li>Eliminated previous restriction where bean subtype attributes had to be listed first in JSON objects when using the <dc>Bean.subTypeProperty()</dc> annotation.
The previous behavior was not strictly JSON-compliant since JSON objects are supposed to consist of unordered lists of key/value pairs.
While targeted for JSON, the restriction is also lifted for all other parsers.
<li>New fluent-style {@link oaj.BeanMap#load(String) BeanMap.load()} methods for initializing bean maps.
<li>{@link oaj.html.HtmlDocSerializer} will now embed the data portion of the output in a <c><xt>&lt;div</xt> <xa>id</xa>=<xs>'data'</xs><xt>&gt;</xt></c> element to make it easier to extract the data portion of the page in Javascript in browsers.
</ul>
<h5 class='topic w800'>REST Server API updates</h5>
<ul class='spaced-list'>
<li>New {@link oajr.RestRequest#getJavaMethod()} method for getting access to the method used to handle a request.
Useful for accessing the method name or annotations during requests, such as in calls to {@link oajr.RestGuard#guard(RestRequest,RestResponse)}.
<li>Fixed bug when using Jetty where you tried to read text input after a header was written.
<li>Added new string variables <dc>$A{...}</dc> (request attributes) and <dc>$P{...}</dc> (request parameters) to <c>RestServlet.createRequestVarResolver(RestRequest)</c>.
</ul>