Release 5.0.0.7
Date: Jan 20, 2013
Juno 5.0.0.7 is a major update.
Core API updates
-
Combined previous 3 libraries into a single library.
-
New ParserListener class. Adds ability to find and process unknown bean properties during parsing.
-
Enhancements to XmlParser:
- Coalescing support
- Validations support
- Support for replacing entity references
- Resolver support
- Event allocator support
- Trim-whitespace support
-
Enhanced XML support:
- New @Xml.format annotation. Controls how POJOs get serialized to XML. Also allows you to collapse collections and arrays.
- New
@Xml.namespaces
annotation. Namespaces can be defined at package, class, method, or field levels. - New
@Xml.nsUri
annotation. Shortcut for specifying namespace URIs. - New
@Xml.valAttr
annotation. Serializes a bean property value as an attribute. - Ability to override XS and XSI namespaces on XML and RDF/XML serializers.
- Ability to override RDF namespace on RDF/XML serializer.
- New more-efficient namespace resolution.
-
New configurable property classes for everything are now structured better and easier to locate and identify through the following new classes:
- BeanContext
SerializerContextParserContext
-
Enhancements to BeanContext:
- Ability to mark bean properties as hidden using
@BeanProperty(hidden)so that they don't get serialized. - Simplified
ClassType
ClassMeta API. Combined 4 classes into a single class. - New
@Bean.filterand@BeanProperty.filterannotations. Used for defining filters on bean classes and bean properties instead of just globally throughBeanContext.addTransforms(Class[])
. - New PropertyNamer API / @Bean.propertyNamer annotation. Used for customizing bean property names.
- New
@BeanProperty.beanUriand@BeanProperty.idannotations. Used for associating beans with URLs and IDs. Used by XML serializer to add a url attribute on a bean element. Used by RDF/XML serializer to constructrdf:resource
attributes. - New
BeanProperty.properties()annotation. Used for limiting properties on child elements.
- Ability to mark bean properties as hidden using
-
Automatic support for URL and URI objects.
- Converted to hrefs in HTML.
- Converted to url attributes in XML.
- Converted to resource:about attributes in RDF/XML.
-
Improvements to Javadocs.
-
Improved
PojoQuerysupport.
REST client updates
-
GZIP compression support.
-
Bug fixes.
REST server updates
-
Support for overriding bean context and serializer properties in a REST method call through new
RestResponse.setProperty(String,Object)method. For example, allows you to control whitespace options on a per-request basis. -
Several new annotations on REST servlets:
@RestResource.filters- Associate post-formatting filters on a resource level.@RestResource.guards- Associate resource-level guards.@RestResource.messages- Associate a resource bundle with a REST servlet. Comes with several convenience methods for looking up messages for the client locale.@RestResource.properties- Override default bean context, serializer, and parser properties though an annotation.
-
Several new annotations on REST methods:
@RestMethod(filters)
- Associate post-formatting filters on a method level.@RestMethod(guards)- Associate method-level guards.
-
New annotations on REST method parameters with automatic conversion:
@Attr- A parameter or URL variable value as a parsed POJO.@Param- A query parameter value as a parsed POJO.@PathRemainder- The remainder after a URL pattern match as aString
.@Header- An HTTP header value as a parsed POJO.@Content- The HTTP content as a parsed POJO.- @Method - The HTTP method name as a
String
.
-
HTTP response content POJOs can now simply be returned from methods instead of calling
RestResponse.setOutput(Object).