Release Notes 5.x
This page collects every release in the 5.x line, newest first.
Release 5.2.0.1
Date: Mar 23, 2016
Juno 5.2.0.1 is a moderate update.
com.ibm.team.juno
-
Improved support for multi-line values in config files. Any line that begins with whitespace is interpreted as a continuation of the previous line.
-
Support for
'\uXXXX'character sequences in config files. -
Fixed issue in XmlSerializer where
'\r'and'\n'characters were not being handled per XML specs. -
New methods on
ObjectList:ObjectList.getAt(Class,String)ObjectList.putAt(String,Object)ObjectList.postAt(String,Object)ObjectList.deleteAt(String)
-
New methods on
ObjectMap:ObjectMap.getAt(Class,String)ObjectMap.putAt(String,Object)ObjectMap.postAt(String,Object)ObjectMap.deleteAt(String)
-
@ThreadSafeannotation. -
New
ClassFilterclass. -
ConfigFile.getResolving(StringVarResolver,boolean)method. -
ConfigFile.getStringVar()method. -
New
ParserContext.PARSER_trimStringsproperty. -
New
SerializerContext.SERIALIZER_trimStringsproperty. -
Args.getStringVar()method. -
New ManifestFile class
-
New
MessageBundleclass. ReplacesSafeResourceBundle/SafeResourceMultiBundle/RestNls. -
New
StringMapVarclass. -
New
StringVarsclass with reusable commonStringVarinstances. -
New
JuneauLoggerclass. -
Default value for
XmlParserContext.XML_trimWhitespacechanged totrue.
Server
- New methods on RestContext:
Client
-
Fixed potential issue in RestClient where the HTTP connection pool could end up exhausted if an error occurred.
-
Improved thread safety on RestClient.
-
New warning message is logged if a RestClient is garbage collected without being closed:
"WARNING: RestClient garbage collected before it was finalized."
Release 5.2.0.0
Date: Dec 30, 2015
Juno 5.2.0.0 is a major update.
Major changes have been made to the microservice architecture and config INI file APIs.
Core
-
Significant changes and enhancements to the
org.apache.juneau.configAPI.- More consistent handling of comma-delimited lists of objects.
- New methods in
ConfigFile:ConfigFile.getStringArray(String),ConfigFile.getStringArray(String,String[])ConfigFile.getSectionAsBean(String,Class)- Instantiate a new bean with property values in the specified section.ConfigFile.writeProperties(String,Object,boolean,Class[])- Copy the properties in a config file section into properties on an existing bean or POJO.ConfigFile.getSectionMap(String)- Get all the resolved values in a section.ConfigFile.containsNonEmptyValue(String)ConfigFile.isEncoded(String)ConfigFile.addListener(ConfigFileListener)- Listen for modification events on the config file.ConfigFile.merge(ConfigFile)- Merge the contents of another config file into this config file.ConfigFile.getResolving(),ConfigFile.getResolving(StringVarResolver)- Return an instance of the config file that resolves string variables. Much more efficient than the previous design since the same underlying config file object is shared.ConfigFile.toWritable()- Wraps the config file in aWritableinterface so that it can be serialized by the REST interface as a plain-text INI file instead of as a serialized POJO.ConfigFile.getInt(String)- Now supports"M"and"K"to identify millions and thousands.
- New methods in
ConfigMgr:ConfigMgr.create(),ConfigMgr.create(Reader),ConfigMgr.create(File)ConfigMgr.deleteAll()
- New methods in
Section:Section.setParent(ConfigFileImpl)- Used by parsers to set the config file for this section.Section.setName(String)- Used by parsers to set the name for this section.
- New interfaces:
ConfigFileListenerSectionListenerEntryListener
Encodermethods have access to field names to use them as salt values.- The name of the default section is now
"default". Before it was justnull. XorEncoderXOR key can be overridden through the"org.apache.juneau.config.XorEncoder.key"system property.
-
Support for converting Strings to POJOs if the POJO class has any of the following static methods:
fromString(String)valueOf(String)(e.g. enums)parse(String)(e.g. loggingLevelclass)parseString(String)forName(String)(e.g.ClassandCharsetclasses)
-
Support for parsing into objects with unbound type variables. For example, if you have a class
Pair<S,T>and you try to parse into this class (e.g.parser.parse(in, Pair.class)), the unbound type variables is interpreted asObjectinstead of throwing an exception. -
Support for serializing/parsing the following new types:
AtomicIntegerAtomicLongBigIntegerBigDecimal
-
Parsers have been enhanced to allow parent POJOs and field names to be passed into child POJOs. New @NameProperty and @ParentProperty annotations are provided for identifying methods for setting names and parent POJOs on child POJOs. For example, the config file
Sectionclass represents a section in a config file. It needs to know it's own name and have a link to theConfigFilethat it belongs to. With these new annotations, config files can be reconstructed using any of the parsers. -
New classes and interfaces:
Streamableinterface for identifying objects that can be serialized directly to an output stream.Writableinterface for identifying objects that can be serialized directly to a writer.StringObjectclass that can be used for delayed object serialization.ByteArrayCacheByteArrayInOutStreamFileUtilsThrowableUtilsStringVarMultipartStringVarWithDefault
-
New fields on
ObjectList:ObjectList.EMPTY_LIST
-
New fields and methods on
ObjectMap:ObjectMap.EMPTY_MAPObjectMap.getStringArray(String)ObjectMap.getStringArray(String,String[])ObjectMap.putIfNull(String,Object)ObjectMap.putIfEmpty(String,Object)
-
New methods in ArrayUtils:
ArrayUtils.contains(Object,Object[])ArrayUtils.indexOf(Object,Object[])ArrayUtils.toPrimitiveArray(Object)
-
New methods in
IOUtils:IOUtils.pipe(Reader,Writer)IOUtils.read(File)IOUtils.readFile(String)IOUtils.write(File,Reader)
-
New methods on
PojoRest:PojoRest.get(Class,String,Object)PojoRest.getString(String)PojoRest.getString(String,String)PojoRest.getInt(String)PojoRest.getInt(String,Integer)PojoRest.getLong(String)PojoRest.getLong(String,Long)PojoRest.getBoolean(String)PojoRest.getBoolean(String,Boolean)PojoRest.getMap(String)PojoRest.getMap(String,Map)PojoRest.getList(String)PojoRest.getList(String,List)getObjectMap(String)getObjectMap(String,ObjectMap)getObjectList(String)getObjectList(String,ObjectList)
-
New methods on
ProcBuilder:ProcBuilder.pipeTo(Writer,boolean)ProcBuilder.pipeTo(Writer)ProcBuilder.logTo(Writer,boolean)ProcBuilder.logTo(Writer)ProcBuilder.logTo(Level,Logger)ProcBuilder.maxExitStatus(int)
-
New methods on
StringUtils:StringUtils.isEmpty(Object)StringUtils.nullIfEmpty(String)StringUtils.base64EncodeToString(String)StringUtils.base64Encode(byte[])StringUtils.base64DecodeToString(String)StringUtils.base64Decode(String)StringUtils.generateUUID(int)StringUtils.trim(String)StringUtils.parseISO8601Date(String)StringUtils.replaceVars(String,Map)StringUtils.pathStartsWith(String,String)StringUtils.pathStartsWith(String,String[])
-
New
StringVar.doResolve(String)method. -
New
StringVarResolver.DEFAULTfield. -
Eliminated dependency on
javax.mail.internet.MimeUtilityby implementing our ownStringUtils.base64Encode(byte[])method. -
CalendarSwapandDateSwapclasses now handle blank input better. Returnsnullinstead of throwing an exception. -
HtmlDocSerializer specifies the default CSS location as
/servletPath/style.cssinstead of/servletPath/htdocs/juneau.css. This coincides with enhancements made in the server code for specifying styles. -
HtmlDocSerializer wraps output in two div tags instead of one (e.g.
<div class='outerdata'><div class='data' id='data'>...</div></div>). Needed for supporting the new devops look-and-feel. -
Fixed indentation inconsistencies in HtmlDocSerializer.
-
Renamed
HtmlSchemaSerializertoHtmlSchemaDocSerializer. -
RDF serializers and parsers now support
RdfProperties.RDF_looseCollectionloose collections. -
RDF parser handles case where resources point to themselves (an unfortunate behavior in JFS RDF documents).
-
JSON parser with throw an exception in strict mode if it encounters numbers that are valid in Java but invalid in JSON (e.g. octal, hexadecimal numbers).
-
Parser methods now check for
nullinput. -
SerializerGroupandParserGroupignores serializers and parsers if they throwNoClassDefFoundErrors. -
UrlEncodingParser creates lists if the same attribute name is encountered more than once. Before it would just replace the previous value with the new value.
-
New
UrlEncodingSerializer.DEFAULT_SIMPLE_EXPANDEDserializer. -
Changes to
Args:getMainArg(int)changed toArgs.getArg(int). Non-existent arguments are returned asnullinstead of blank strings. This is more inline with the behavior of the rest of the library.- New
Args.hasArg(int)method.
-
Removed
org.apache.juneau.utils.CharsetUtilsclass. -
Removed
org.apache.juneau.utils.ConcurrentIdentityListclass. -
Fixed bug in
MultiIterableclass. -
PojoIntrospectormust now be instantiated with aReaderParser. Simplifies the API on the class. -
PojoRestmust now be instantiated with aReaderParser. Simplifies the API on the class. -
MessageBundleandSafeResourceMultiBundlemoved from server component. -
Several bug fixes and performance improvements in
StringVarResolver. -
Various enhancements to
TeeWriterandTeeOutputStream. -
Renamed
CharSettoAsciiSet. -
SerializerGroupandParserGroupnow ignoresNoClassDefFoundErrorsso that resources that include Jena support can continue to operate even if the Jena libraries are not present. -
New FileUtils.createTempFile(String) method.
-
New
PojoQuerymodified to handle bean getters that throw exceptions.
Client
-
Upgraded to use Apache HttpClient 4.5.
-
New classes:
AllowAllRedirectsHttpMethodResponsePatternSimpleX509TrustManagerSSLOpts
-
Removed
org.apache.juneau.rest.client.LaxRedirectStrategy. Use HTTP Client equivalent. -
New methods on
RestCall:RestCall.addInterceptor(RestCallInterceptor)RestCall.pipeTo(Writer)RestCall.pipeTo(Writer,boolean)RestCall.pipeTo(String,Writer,boolean)RestCall.getWriter(String)RestCall.pipeTo(OutputStream)RestCall.pipeTo(OutputStream,boolean)RestCall.pipeTo(String,OutputStream,boolean)RestCall.getOutputStream(String)RestCall.byLines()RestCall.captureResponse()RestCall.successPattern(String)RestCall.failurePattern(String)RestCall.addResponsePattern(ResponsePattern)RestCall.run()- Renamed fromexecute().RestCall.getCapturedResponse()RestCall.getResponsePojoRest(Class)RestCall.getResponsePojoRest()RestCall.logTo(Level,Logger)RestCall.setConfig(RequestConfig)
-
New lifecycle listener methods on
RestCallInterceptor:RestCallInterceptor.onInit(RestCall)RestCallInterceptor.onClose(RestCall)
-
New methods on RestClient:
RestClient.setBasicAuth(String,int,String,String)RestClient.logTo(Level,Logger)RestClient.setRootUrl(String)RestClient.enableSSL(SSLOpts)RestClient.enableLaxSSL()RestClient.doCall(HttpMethod,Object,Object)RestClient.createHttpClientBuilder()
-
New passthrough methods on RestClient defined on
HttpClientBuilder:RestClient.setRedirectStrategy(RedirectStrategy)RestClient.setDefaultCookieSpecRegistry(Lookup)RestClient.setRequestExecutor(HttpRequestExecutor)RestClient.setSSLHostnameVerifier(HostnameVerifier)RestClient.setPublicSuffixMatcher(PublicSuffixMatcher)RestClient.setSSLContext(SSLContext)RestClient.setSSLSocketFactory(LayeredConnectionSocketFactory)RestClient.setMaxConnTotal(int)RestClient.setMaxConnPerRoute(int)RestClient.setDefaultSocketConfig(SocketConfig)RestClient.setDefaultConnectionConfig(ConnectionConfig)RestClient.setConnectionTimeToLive(long,TimeUnit)RestClient.setConnectionManager(HttpClientConnectionManager)RestClient.setConnectionManagerShared(boolean)RestClient.setConnectionReuseStrategy(ConnectionReuseStrategy)RestClient.setKeepAliveStrategy(ConnectionKeepAliveStrategy)RestClient.setTargetAuthenticationStrategy(AuthenticationStrategy)RestClient.setProxyAuthenticationStrategy(AuthenticationStrategy)RestClient.setUserTokenHandler(UserTokenHandler)RestClient.disableConnectionState()RestClient.setSchemePortResolver(SchemePortResolver)setUserAgent(String)RestClient.setDefaultHeaders(Collection)RestClient.addInterceptorFirst(HttpResponseInterceptor)RestClient.addInterceptorLast(HttpResponseInterceptor)RestClient.addInterceptorFirst(HttpRequestInterceptor)RestClient.addInterceptorLast(HttpRequestInterceptor)RestClient.disableCookieManagement()RestClient.disableContentCompression()RestClient.disableAuthCaching()RestClient.setHttpProcessor(HttpProcessor)RestClient.setRetryHandler(HttpRequestRetryHandler)RestClient.disableAutomaticRetries()RestClient.setProxy(HttpHost)RestClient.setRoutePlanner(HttpRoutePlanner)RestClient.disableRedirectHandling()RestClient.setConnectionBackoffStrategy(ConnectionBackoffStrategy)RestClient.setBackoffManager(BackoffManager)RestClient.setServiceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy)RestClient.setDefaultCookieStore(CookieStore)RestClient.setDefaultCredentialsProvider(CredentialsProvider)RestClient.setDefaultAuthSchemeRegistry(Lookup)RestClient.setContentDecoderRegistry(Map)RestClient.setDefaultRequestConfig(RequestConfig)RestClient.useSystemProperties()RestClient.evictExpiredConnections()RestClient.evictIdleConnections(long,TimeUnit)
-
JazzRestClientnow supports OIDC authentication. -
These classes are now deprecated and will be removed in a future release:
org.apache.juneau.rest.client.jazz.CertificateStoreorg.apache.juneau.rest.client.jazz.ICertificateValidatororg.apache.juneau.rest.client.jazz.ITrustStoreProviderorg.apache.juneau.rest.client.jazz.LenientCertificateValidatororg.apache.juneau.rest.client.jazz.SharedTrustStoreProviderorg.apache.juneau.rest.client.jazz.ValidatingX509TrustManager
Server
-
New
ReaderResourceclass. Represents the contents of a text file with convenience methods for resolvingStringVarvariables and adding HTTP response headers. REST Java methods can return instances of these to serializeReaderscontaining text withStringVarResolvervariables in them. -
New
StreamResourceclass. REST Java methods can return instances of these to serializeOutputStreams. -
Fixed a bug in the stack trace hash algorithm in
RestException. -
New methods in RestRequest:
RestRequest.getReaderResource(String)- ReplacesgetVarResource(String).RestRequest.getReaderResource(String,boolean)RestRequest.getReaderResource(String,boolean,String)
-
Changes in RestResponse:
- Don't set
Content-Encoding: identitywhen no encoding is used. Some clients don't interpret it correctly.
- Don't set
-
New methods in
RestServlet:RestServlet.getChildClasses()- Programmatic equivalent to@RestResource(children)annotation.RestServlet.shouldLog(HttpServletRequest,HttpServletResponse,RestException)RestServlet.shouldLogStackTrace(HttpServletRequest,HttpServletResponse,RestException)RestServlet.logObjects(Level,String,Object[])RestServlet.resolveStaticFile(String)RestServlet.createStyleSheet()RestServlet.createFavIcon()RestServlet.createStaticFilesMap()RestServlet.getConfigMgr()
-
Removed
JsoParserfromBasicRestServletandRestServletJenaDefault. These may represent a security risk if not handled correctly, so removed them as a precaution. -
Removed
RestServletProperties.REST_htDocsFolder. Replaced with@RestResource(staticFiles). -
New annotations on
@RestResource.RestResource.stylesheet()RestResource.favicon()@RestResource(staticFiles)
-
Eliminated
org.apache.juneau.rest.jaxrs.JsonProviderclass. Some JAX-RS implementations use code scanning to find providers, so if you were usingDefaultJenaProvider, it would pick upJsonProvideras well. It's easy enough to create your own implementation if needed. -
OPTIONS pages now specify
consumesandproducesfields instead ofacceptandcontentTypewhich was confusing. -
Eliminated
propertiesfrom OPTIONS pages. -
New
ResourceLink.ResourceLink(String,RestRequest,String,Object[])constructor. -
New response handlers:
StreamableHandler- Allows REST Java methods to return instances ofStreamable.WritableHandler- Allows REST Java methods to return instances ofWritable.
-
New DevOps stylesheet.
-
Servlet initialization and HTTP requests are now logged at
FINElevel. -
Added
abstractmodifier on variousRestServletsubclasses to indicate that they're meant to be subclassed. -
New
RestUtils.trimPathInfo(StringBuffer,String,String)method.
Microservice
-
Completely revamped API.
-
New Microservice class that serves as a generic interface for microservices and their lifecycles.
-
New
RestMicroserviceclass that implements a microservice consisting of a REST interface.- REST resources and configuration settings can be defined through either manifest files or config files.
- Enhanced logging support.
- Easy-to-configure SSL support.
- BASIC auth support.
- Automatic restartability if the config file changes.
-
Eliminated
org.apache.juneau.microservice.Mainclass. This is replaced by the microservice classes defined above. -
ResourceandResourceGroupclasses now support the following new string variables: -
"$A{key,default}""- Command line arguments. -
"$MF{key,default}""- Manifest file entries. -
CSS stylesheet now configurable through config file entry
"REST/stylesheet". -
New
BasicRestServletJenaclass if you want your REST interface to support RDF. -
Eliminated the following classes:
org.apache.juneau.microservice.RootResourceorg.apache.juneau.microservice.SampleResource
-
New predefined reusable resources:
- ConfigResource - REST resource for viewing and editing microservice config file.
- LogsResource - REST resource for viewing log files.
- SampleRootResource - Sample REST resource that contains the config and logs resource as children.
- ShutdownResource - REST resource for stopping the microservice JVM. Useful for testing purposes.
Samples
-
Converted to a REST microservice.
-
Look-and-feel changed to IBM DevOps.
Documentation Updates
microservice- New package-level javadoc.config- New package-level javadoc.StringVarResolver- New documentation.client- New package-level javadoc.Overview / Samples- New section.org.apache.juneau.swap / Stop Classes- New section.rest- Extensive updates.
Release 5.1.0.20
Date: Sept 5, 2015
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
ConfigFile functionality.
Core
-
Significant API changes to
org.apache.juneau.configAPI.ConfigFileis now thread safe and can be shared across multiple threads.- New
ConfigMgrclass for managing configuration files. - Serializers and parsers can be associated with config files for storing and retrieving POJOs. Default support provided for JSON.
-
New SimpleHtmlWriter class. Can be used for simple HTML DOM construction.
-
New
ProcBuilderclass for calling external processes. -
New
ObjectMap.remove(Class,String,Object)method. -
"class='link'"added to links generated by HtmlDocSerializer. -
New
EncoderGroup.append(EncoderGroup)method. -
New
HtmlDocSerializerContext.HTMLDOC_addLinksconfiguration property. -
Modified the
Parser.createContext(ObjectMap,Method,Object)method. Outer context objects can be passed in to create instances of non-static inner classes. -
Fixed bug in HtmlStrippedDocSerializer where exception was thrown when trying to serialize primitive arrays.
-
JsonParser now handles parsing JSON boolean/numeric values as strings to bean properties of type boolean or number.
-
UrlEncodingSerializer and UrlEncodingParser now represent arrays and collections as key-value pairs where the keys are numbers (e.g.
"?0=foo&1=bar"). -
Various internal improvements to
IOPipe. -
New
ReflectionUtils.getResource(Class,String)method. -
StringUtils.parseNumber(String,Class)now returns zero for empty strings. This affects the way most parsers handle blank values.
Server
-
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.
-
Changes to
RestServlet:- New methods for accessing external INI config files:
RestServlet.getConfig()RestServlet.createConfigFile() - New
"$C{...}"variable that resolve to INI config file values. - New
"$UE{...}"variable that URL-encodes the value inside the variable. - New convenience methods for retrieving classpath resource files:
RestServlet.getResource(String)RestServlet.getResourceAsString(String)RestServlet.getResource(Class,String,String). Useful if you want to load predefined POJOs from JSON files in your classpath. - New
RestServlet.handleNotFound(int,RestRequest,RestResponse)method for customized handling of when a resource or method was not found.
- New methods for accessing external INI config files:
-
BasicRestServletnow automatically processes"/favicon.ico"requests by overriding the new ~~ RestServlet.handleNotFound(int,RestRequest,RestResponse)~~ method. -
New RestRequest methods:
RestRequest.resolveVars(String)RestRequest.getVarResource(String)RestRequest.getConfig()
-
New RestResponse methods:
- RestResponse.getDirectWriter(String).
- RestResponse.getNegotiatedWriter().
getWriter()now returns an unnegotiated writer.getUnbufferedWriter()has been removed.
-
New
RestMethod.encoders() @RestMethod(encoders)andRestMethod.inheritEncoders()annotations. Allows encoders to be fine-tuned at the method level. -
New
@RestResource(config)annotation for associating externalConfigFileconfig files with servlets. -
ResourceLink. -
New
org.apache.juneau.rest.matcherpackage for commonly-usedRestMatchers:MultipartFormDataMatcherUrlEncodedFormMatcher
Microservice
-
New juneau-microservice.jar file that encapsulates all 3 juneau jars with code necessary for creating fast and efficent jetty-powered REST microservices. Contains the following:
- Jetty 8.0
- Apache HttpClient 4.3.5
- Apache Commons FileUpload 1.3.1
-
Microservice now supports Java 6 (previously required Java 7)
Release 5.1.0.19
Date: Aug 15, 2015
Juno 5.1.0.19 is a minor update in terms of core functionality.
But it introduces a Microservices project for building REST microservices and docker containers.
Core
-
Beans can now be serialized to and parsed from
ObjectMaps. See Serializing to ObjectMaps for details. -
New
ObjectMap.include(String[])andObjectMap.exclude(String[])methods. -
@Html annotations can now be applied to bean properties.
-
New
IOPipeutility class. -
Behavior change on
StringVarResolver.nullinput now results in blank strings instead ofnull.
Client
- New
RestClient.doCallback(String)method.
Server
-
New RestRequest.getHeaders() method.
-
New
RestResponse.getUnbufferedWriter()method. -
Fixed bug that was preventing
x-response-headersparameter from working correctly. -
Added @Bean.properties annotations to the various classes in
org.apache.juneau.rest.labelsso that the order of the bean properties are consistent on all JVMs. On IBM JVMs this is unnecessary because the order of the properties as defined in the class are stored in the bytecode. Other JVMs such as OpenJRE do not implement this feature causing the bean properties to be in random order. -
New
ResourceDescription.ResourceDescription(RestRequest,String,String)constructor.
Release 5.1.0.18
Date: Aug 5, 2015
Juno 5.1.0.18 is a minor update affecting the server component only.
Server
-
Fixed bug where localized strings weren't resolving when using chained resource bundles.
-
Servlet and method labels and descriptions can now contain embedded string variables.
-
New
RestMethod.input()andRestMethod.responses()annotations. These replace the variousdescriptionannotations added 2 days ago with a simpler design. -
New methods on
RestServlet:RestServlet.getMethodDescription(String,RestRequest)so that subclasses can override the method description in the OPTIONS page.RestServlet.createRequestVarResolver(RestRequest)so that subclasses can override and augment the variable resolver.RestServlet.resolveChild(Class)andRestServlet.replaceChild(RestServlet)classes that allows customized resolution of servlet instances (e.g. if services are defined in OSGi).
-
Reverted the
MethodDescriptionback to 5.1.0.16 since it was being used by someone.
Release 5.1.0.17
Date: Aug 3, 2015
Juno 5.1.0.17 is a major update.
Core
-
BeanMap.get(Object) and BeanMap.put(String,Object) now automatically performs filtering if filters are defined on the bean property or bean property class.
- Deleted the following methods which are now unnecessary:
BeanMap.getFiltered(String)BeanMap.putFiltered(String,Object)BeanMapEntry.getFiltered(String)BeanMapEntry.putFiltered(String,Object)BeanMapEntry.putFiltered(String,Object)BeanPropertyMeta.getFiltered()BeanPropertyMeta.setFiltered(Object)BeanPropertyMeta.getTransformedClassMeta()
- BeanPropertyMeta.getClassMeta() now returns the filtered type of the property.
- Deleted the following methods which are now unnecessary:
-
StringVarResolvernow has support for chained resolvers. -
StringVarResolvernow resolves variables inside resolved values. i.e. if a resolved variable value itself contains a variable, it now resolves that variable too. -
Fixed bug where inner interface classes being used in
RestResource.filters()were being interpreted as surrogate classes because they have hidden 1-arg constructors due to being inner classes. -
Fixed bug in MultiSet where exception was being thrown if last set was empty.
-
New
ZipFileListclass for providing efficiently zipped directories through the REST interface. -
New
RdfProperties.RDF_useXmlNamespacesproperty. -
New
XmlParserContext.XML_preserveRootElementproperty. -
Worked around bug in Sun VM on OS/X where XML parser was throwing an exception when trying to set a reporter.
Server
-
New
ZipFileListResponseHandlerclass. -
Simplified labels in servlet resource bundles:
"[ClassName].ResourceDescription"is now"[ClassName].label"."[ClassName].MethodDescription.[methodName]"is now"[ClassName].[methodName]".
-
Several changes to RestRequest:
- Added new methods:
RestRequest.getQueryParameterMap()RestRequest.getQueryParameterNames()RestRequest.getPathInfoUndecoded()RestRequest.getPathRemainderUndecoded()RestRequest.getTrimmedRequestURI()RestRequest.getTrimmedRequestURL()RestRequest.getServletTitle()RestRequest.getServletDescription()RestRequest.getMethodDescription()
- Behavior changes to
RestRequest.getPathInfo()to follow Servlet specs. Returnsnullinstead of blank for no path info. RestRequest.getPathRemainder()now automatically decodes the path remainder. UseRestRequest.getPathRemainderUndecoded()to get the unencoded path remainder.- Bug fixes in
RestRequest.getRequestParentURI()when servlet is mapped to"/*". - Bug fixes in
RestRequest.getServletURI()when servlet is mapped to"/*".
- Added new methods:
-
New string replacement variables:
$R{contextPath}- Returns value from RestRequest.getContextPath()$R{methodDescription}- Returns value fromRestRequest.getMethodDescription()$R{resourceTitle}- Returns value fromRestRequest.getServletTitle()$R{resourceDescription}- Returns value fromRestRequest.getServletDescription()$R{trimmedRequestURI}- Returns value fromRestRequest.getTrimmedRequestURI()$E{var}- Environment variables.
-
Added methods
RestServlet.getDescription(RestRequest)andRestServlet.getLabel(RestRequest). -
BasicRestServletandRestServletJenaDefaultnow provide default HTML titles and descriptions:@Property(name=HTMLDOC_title, value="$R{resourceTitle}"),
@Property(name=HTMLDOC_description, value="$R{resourceDescription}") -
Options pages on
BasicRestServletandRestServletJenaDefaultnow provide default descriptions and back links:@Property(name=HTMLDOC_navlinks, value="{back:'$R{servletURI}"),
@Property(name=HTMLDOC_description, value="Resource options") -
New
BasicRestServletGroupclass. -
Removed
RestServletProperties.REST_trimTrailingUriSlashesandRestServletProperties.REST_pathInfoBlankForNull. -
New annotations for providing labels and descriptions. Useful if you don't plan on having to support other languages, so you don't want to provide labels in resource bundles.
RestResource.label()@RestResource(description)RestMethod.description() @RestMethod(description)RestMethod.responses()Attr.description()Content.description()HasParam.description()HasQParam.description()Header.description()Param.description()QParam.description()
-
Support for sorting resources by name in
ChildResourceDescriptions.
Samples
- Added
/tempDir/uploadshowing how to useServletFileUploadwith multipart form posts.
Release 5.1.0.16
Date: June 28, 2015
Juno 5.1.0.16 is a moderate update.
Core
-
New methods on ClassMeta that eliminates language-specific code in the general class metadata.
ClassMeta.getXmlMeta()ClassMeta.getJsonMeta()ClassMeta.getHtmlMeta()ClassMeta.getUrlEncodingMeta()ClassMeta.getRdfMeta()
-
New JsonType.ANY enum.
-
New
@Html(asPlainText)annotation. -
New
HtmlDocSerializerContext.HTMLDOC_cssImportsproperty. -
Significant changes to RDF support.
- New
@Rdfand@RdfSchemaannotations. These replace the use of defining namespaced through the XML annotations, and allows XML and RDF to be serialized using different namespaces. - Support for serializing arrays/collections as RDF bags, RDF lists, and multi-valued properties.
- Fixed warning message about
"tab"setting when using the N3/Turtle serializers.
- New
-
New
SerializerContext.SERIALIZER_sortCollectionsandSerializerContext.SERIALIZER_sortMapsproperties. -
FindBug fixes.
Server
-
New
RestRequest.getServletParentURI()method. -
New
$R{servletParentURI}variable. -
Removed final modifier from
ChildResourceDescriptions.
Samples
- Added source code links to examples.
Release 5.1.0.15
Date: May 24, 2015
Juno 5.1.0.15 is a minor update.
Core
-
New properties in
SerializerContext:SerializerContext.SERIALIZER_relativeUriBaseSerializerContext.SERIALIZER_absolutePathUriBase
These replace the
SERIALIZER_uriAuthorityandSERIALIZER_uriContextproperties. -
Improvements in CsvSerializer.
Server
-
New properties in
RestServletProperties:REST_defaultCharsetREST_servletURIREST_relativeServletURI
-
Improvements involving path calculations when servlets deployed outside of a war file with a context root.
Client
- New methods in
RestCall:RestRequest.getHeader(String,Class)RestRequest.getHeader(String,Object,Class)RestRequest.getHeader(String,Type,Type...)RestRequest.getQueryParameter(String,Class)RestRequest.getQueryParameter(String,Object,Class)RestRequest.getQueryParameter(String,Type,Type...)RestRequest.getQueryParameter(String,Object,Type,Type...)RestRequest.getQueryParameters(String,Class)RestRequest.getQueryParameters(String,Type,Type...)RestRequest.getFormDataParameter(String,Class)RestRequest.getFormDataParameter(String,Object,Class)RestRequest.getFormDataParameters(String,Class)RestRequest.getFormDataParameter(String,Type,Type...)RestRequest.getFormDataParameters(String,Type,Type...)RestRequest.getPathParameter(String,Class)RestRequest.getPathParameter(String,Type,Type...)RestRequest.getBody(Class)RestRequest.getBody(Type,Type...)
Release 5.1.0.14
Date: May 10, 2015
Juno 5.1.0.14 is a moderate update.
The major addition is support for Remoteable Services, the ability to invoke server-side POJO methods through client-side proxy interfaces.
Core
-
Simplified
PojoIntrospectorclass. -
New
ClassUtils.getMethodSignature(Method)method.
Client
- New methods in RestClient for working with remoteable services:
RestClient.setRemoteableServletUri(String)RestClient.getRemoteableProxy(Class)
Server
-
Added a default OPTIONS page to
BasicRestServletandRestServletJenaDefault. -
RestServletProperties.REST_allowMethodParamhas been enhanced to allow you to explicitly specify which HTTP methods can be used in the&methodparameter. -
New methods added to RestRequest:
RestRequest.getParser()RestRequest.getReaderParser()
Release 5.1.0.13
Date: Apr 24, 2015
Juno 5.1.0.13 is a minor update.
Core
-
ClassMeta.newInstance() method can now create new instances of arrays.
-
Arguments passed to
Linkare now serialized using UrlEncodingSerializer, so arbitrary POJOs can now be passed as arguments. -
New date filters:
org.apache.juneau.swaps.Datefilter.ISO8601DTZPandorg.apache.juneau.swaps.Datefilter.SimpleP. -
New
HtmlDocSerializerContext.HTMLDOC_nowrapsetting for HtmlDocSerializer class. Adds"* {white-space:nowrap}"to the style header to prevent word wrapping. -
Fixed bug in UonParser where passing in a blank value on an array or collection type in a form post would cause a
ClassCastException. New behavior creates an empty array orCollection. -
Improved implementation of
UrlEncodingSerializer.serializeUrlPart(Object)method.
Server
-
RestConverterAPI fixed to handle the existence of POJO filters.Introspectable/Queryable/Traversableclasses can now work with filtered POJOs. -
@RestResource(messages)annotation can now be defined on super and subclasses so that NLS messages can be defined in multiple resource bundles. -
Performance improvements in
RestServletNlsclass. -
Fixed bug where two REST java methods mapped to the same path pattern wasn't triggering an exception when it was supposed to.
Client
-
New
RestCall.setRedirectMaxAttempts(int)method to prevent endless redirection loops. -
New
RestCall.setRetryable(int,long,RetryOn)method to automatically retry on failed connection attempts. -
New
RestCallInterceptor.onRetry(RestCall,int,HttpRequest,HttpResponse)method for listening in on retry attempts.
Release 5.1.0.12
Date: Mar 28, 2015
Juno 5.1.0.12 is a minor update.
Core
-
Fixed
ConfigFile.isEmpty()method. -
Changed behavior on UonParser to not treat
'~'characters as escapes unless followed by one of the following characters:( ) , $ = ~.
Client
-
New class
RestCallInterceptor. Allows responses to be inspected and modified before being processed. ReplacesRestClientListenerclass. -
Minor connection cleanup fixes.
Release 5.1.0.11
Date: Feb 14, 2015
Juno 5.1.0.11 is a moderate update.
Core
-
Additions to @Html bean annotation.
- New @Html(noTables) annotation that prevents arrays/Collections from being serialized as tables.
- New @Html(noTableHeaders) annotation that prevents HTML tables from having header rows.
-
Several improvements to URL-Encoding support.
- Improved whitespace handling in UonParser.
- New
UonParserContext.UON_whitespaceAwareproperty for controlling whether whitespace is ignored. - New
UrlEncodingContext.URLENC_expandedParamsproperty for controlling whether arrays/Collections should be serialized/parsed as multi-part parameters. - New @UrlEncoding(expandedParams) annotation that specifies that bean properties of type array/Collection be serialized as multi-part parameters (e.g.
&key=val1&key=val2).
-
New
JsonSerializerContext.JSON_escapeSolidusproperty for controlling whether slash characters should be escaped. -
New
TeeOutputStreamandTeeWriterclasses. -
New ClassMeta.isInstance(Object) method.
-
Performance improvements when using the BeanMap.add(String,Object) method. Array properties are stored in a temporary list cache until BeanMap.getBean() is called.
-
New
BeanPropertyMeta.add(BeanMap,Object)method for adding values to Collection and array properties. -
Config INI files now support keys with name
"*".
Server
-
REST method parameters can now be generic types (e.g.
@Param("foo") Map<String,Integer> foo). This applies to headers, attributes, and parameters. -
New
@Param(multipart)and@Query(multipart)annotations for handling multi-part GET and POST parameters. -
GET parameters are now CASE-SENSITIVE per W3C standards.
&Contentmust now be specified as&content.&Methodmust now be specified as&method.&debugmust now be specified as&debug=true.&plainTextmust now be specified as&plainText=true.¬racemust now be specified as&noTrace=true.
-
Performance improvements around query parameters.
-
New methods on RestRequest for handling multi-part parameters:
RestRequest.getParameters(String,Class)RestRequest.getQueryParameters(String,Class)
-
Fixed Jetty issue in RestResponse.setHeader(String,String) where setting the
Content-Typethrough this method was inconsistent with the behavior in WAS/Tomcat. -
&noTrace=truenow prevents any errors from being logged in log file. -
Workaround for Jetty issue where
ServletContext.getContextPath()always ends with"null". -
RestServletProperties.REST_allowMethodParamis nowtrueby default on all subclasses ofBasicRestServletandRestServletJenaDefault.
Client
-
New method
RestCall.allowRedirectsOnPosts(boolean). -
New method
RestCall.peekInputStream()allows you to read response bodies without interrupting execution flow. -
New method
RestCall.toString()now useful for debugging purposes. Shows all request/response headers and bodies. -
RestCallExceptionnow includesHttpResponseobject for easier debugging. -
New method
RestClient.addListener(RestClientListener)for registering request/response listeners. -
New
RestClient.setClassLoader(ClassLoader)method. -
TLS support in
JazzRestClient.
Other changes
samples.earandsamples.warprojects have been replaced with an OSGi bundle with activated servlets injuno.samples.
Release 5.1.0.10
Date: Dec 23, 2014
Juno 5.1.0.10 is a moderate update.
Core
-
Major changes to URL-Encoded serializer and parser.
- Logic for serializing and parsing URL-Encoded key-value pairs moved to UrlEncodingSerializer and UrlEncodingParser classes.
- Logic for serializing and parsing URL-Encoded values moved to new UonSerializer and UonParser classes.
-
Fix bug where
BeanRuntimeExceptionsweren't being thrown on subsequent calls to BeanContext.getClassMeta(Class). -
Moved logic for
BeanContext.getPrimitiveDefault(Class)to new ClassMeta.getPrimitiveDefault() method for performance reasons. -
Fixed bug in
BeanContext.addTransforms(Class[])that would cause filter order to get messed up. -
ClassMeta.newInstance() can now create array instances.
-
Fixed indentation bugs in HtmlSerializer.
-
Fixed issue in HtmlSerializer where newlines were not being converted into line breaks.
-
New WriterSerializer.toString(Object) method that's identical to the serialize method but throws
RuntimeExceptionsto make the serializer easier to use for debugging.
Server
-
Fixed major issue that prevented parsing URL-Encoded form posts into POJOs. Calling
HttpServlet.getParameter(String)was forcing the underlying servlet code to process the HTTP body itself, preventing theUrlEncodingSerializerclass from being able to parse the content. Updated code no longer inadvertantly calls this method. -
New
RestRequest.getQueryParameter(String),RestRequest.hasQueryParameter(String), andRestRequest.hasAnyQueryParameters(String[])methods that only look for parameters in the URL query string to prevent loading and parsing of URL-Encoded form posts. -
New
@QParamand@HasQParamannotations for accessing query parameters from the URL query string. -
&plainTextparameter can now specify a false value. -
Removed properties parameters from
RestServlet.onPreCall(RestRequest)andRestServlet.onPostCall(RestRequest,RestResponse)methods since the properties are already accessible throughRestRequest.getProperties(). -
Added UonSerializer and UonParser to serializer and parser lists on
BasicRestServletandRestServletJenaDefault.
Client
-
Moved to Apache HttpClient 4.3 to match Jazz 6.0.
-
Renamed
RestResponseEntitytoRestRequestEntity. -
Improved performance on URL-Encoded form posts by serializing directly to output stream instead of serialized to string first.
-
New methods on RestClient class that makes it easier to associate serializer and parser attributes with registered serializer and parser:
RestClient.setProperty(String,Object)RestClient.setProperties(ObjectMap)RestClient.addNotBeanClasses(Class[])RestClient.addTransforms(Class[])RestClient.addImplClass(Class,Class)
-
Renamed
RestClient.shutdown()to RestClient.close() to mirror change in Apache API.
Samples
-
New
CodeFormatterResourcefor quickly formatting Java and XML code samples in Javadocs. -
New
UrlEncodedFormResourcefor showing how to work with URL-Encoded form posts.
Release 5.1.0.09
Date: Dec 1, 2014
Juno 5.1.0.9 is a major update.
There weren't very many code changes but the source has been made a part of Jazz Foundation. This required some restructuring of the project. The project on Jazz Hub will eventually be discontinued. However, the libraries on IBM Community Source will continue to be updated regularly.
-
Project split up into 3 separate bundles:
org.apache.juneau- Core serializers and parsers.org.apache.juneau.rest- REST server component.org.apache.juneau.rest.client- REST client component.
-
Code changes to facilitate breaking up bundles:
org.apache.juneau.rest.labels.Linkclass moved toLink.- References to
org.apache.juneau.rest.RestExceptionin Encoder class changed toIOException.
-
Changed configuration names for consistency with Jazz Framework.
-
RestClient.execute(HttpUriRequest)method that allows subclasses to handle their own HTTP request execution. -
Changes in
JazzRestClientto handle introduction of SSO support in v6. -
&plainTextdebug feature was broken. -
Removed double-buffering in
RestRequest. -
Metadata cleanup, Find Bug fixes.
Release 5.1.0.08
Date: Oct 25, 2014
Juno 5.1.0.8 is a moderate update, focused primarily on performance improvements.
-
Improved performance on JSON and URL-Encoding parsers by approximately 50% on large data sets.
- Rewrote ParserReader class to handle it's own buffering. The change allowed several optimizations to be made when dealing with JSON and URL-Encoding text by avoiding char array copies.
- Added a
estimatedSizeparameter to the Parser parse methods to optimize buffering when the input size is known beforehand.
-
Revamped the BeanContext API to perform better in multi-threaded environments.
- Introduced a new
BeanPropertyStoreclass that handles creation of BeanContext objects. This allowsBeanContextobjects to be considered immutable, and therefore cacheable/reusable by the framework. While this was technically possible to cache these objects beforehand, it relied on a locking mechanism to prevent bean contexts from being modified after being created. The new mechanism is much more straightforward.
- Introduced a new
-
Modifications to the
clientAPIs to make it easier to work with custom Apache HTTP clients.- Added overridable
RestClient.createHttpClient()to allow customized subclasses to construct customized HTTP clients. - Removed the
DefaultRestClientclass since it's now fully redundant withRestClient. - Added
RestClient.shutdown()method for cleaning up the internal HTTP client when you're done using a REST client.
- Added overridable
Release 5.1.0.07
Date: Oct 5, 2014
Juno 5.1.0.7 is a moderate update.
-
Improved error handling.
-
New
ParserContext.PARSER_debugandSerializerContext.SERIALIZER_debugsettings for logging additional information for debugging problems. -
New
SERIALIZER_ignoreRecursionssetting for explicitly ignoring recursions when serializing models. Previously, theSERIALIZER_detectRecursionssetting did this but now it simply looks for recursions and throws exceptions when they occur. -
Improved handling of
StackOverflowErrors. WhenSERIALIZER_detectRecursionsis enabled, a useful error message is displayed showing the exact chain of objects that resulted in the stack overflow. -
Bug fixes in ResultSetList for Oracle and SQL Server.
-
Serializers and parsers can now access HTTP request attributes, parameters, and headers through
SerializerContext.getProperties()andParserContext.getProperties(). -
Removed media-type and encoding attributes from
SerializerContextandParserContextsince these are now available through context properties, and are typically not used. -
XmlParser now accepts
application/xml. -
Improved handling of bean property serialization when multiple matching pojo filters for the bean property class exist.
-
Improved concurrency on
BeanContextclass. -
Fixed bug in
Traversablethat was causing it to be executed even if the servlet extra path info was empty. -
Fixed bug in
Traversablewhere it was not picking up filters and properties defined on REST Java methods.
Release 5.1.0.06
Date: Sept 21, 2014
Juno 5.1.0.6 is a moderate update.
-
Simplified API for
PojoSwap. Since it's rarely used, thebeanContextparameter was replaced with aPojoSwap.getBeanContext()method on the class. -
New simplified way of defining POJO filters without needing to extend
PojoSwap. SeeSurrogateSwapfor details. -
New @Html annotation. Will allow the definition of standard XHTML DTOs in future releases. For now,
Imgis an example of defining an XHTML element using Juno DTOs. -
JsonParser now ignores trailing
';'characters in input so that it can parse strings of the form"var x = {'foo':'bar'};" -
New
TumblrParserResourcein the samples war file showing how to combine the REST client and server APIs into a single resource in order to download Tumblr blogs and convert the response into any supported response content type.
Release 5.1.0.05
Date: Sept 1, 2014
Juno 5.1.0.5 is a moderate update.
-
New
Redirectclass that simplifies performing redirections in REST methods. -
New pluggable
ResponseHandlerclass and@RestResource(responseHandlers)annotation for defining customer response handlers for special kinds of POJOs. -
New method
UrlEncodingSerializer.serializeUrlPart(Object)method. -
New method
RestRequest.getServletURIBuilder()for construcing servlet-based URLs more efficiently. -
New method RestResponse.getNegotiatedOutputStream() that uses encoders if a match is found, and RestResponse.getOutputStream() that just return the underlying output stream without any modifications.
-
Fixed bug where some properties were not being propagated correctly when using
CoreObject.setProperties(ObjectMap)on serializer and parser subclasses. -
Fixed bug in HtmlSerializer where URL keys in Maps were not being serialized as hyperlinks.
-
Fixed bug in JsonSerializer where
"_class"and"items"attributes were not quoted in strict mode when using SERIALIZER_addClassAttrs feature. -
Fixed bug where
Content-EncodingandCharacter-Encodingheaders were being set when calling RestResponse.getOutputStream(). These should not be set if interacting with the output streams at a low level. -
Eliminated various convenience
RestResponse.sendRedirect(...)methods due to the introduction of theRedirectclass.
Release 5.1.0.04
Date: Aug 25, 2014
Juno 5.1.0.4 is a minor update.
-
New
RestServlet.getPath()method. -
New
SerializerContext.getJavaMethod()andParserContext.getJavaMethod()to allow access to REST methods that invoked the serializers or parsers. For example, can be used to access additional annotations on REST methods to perform special handing during serialization or parsing. -
Better behavior on overriding of filters in
BeanContext.addTransforms(Class[]). Previously, adding multiple conflicting filters resulted in random behavior. Now filters are overridden when multiple matching filters are applied. -
Allow
HtmlDocSerializerContextproperties to be set viaSerializer.setProperty(String,Object). Previously, these could only be defined through override properties (e.g. through REST class and method annotations). -
Fixed memory leak in XML parser.
Release 5.1.0.03
Date: Jun 28, 2014
Juno 5.1.0.3 is a moderate update.
Core API updates
-
Ability to detect and use non-public bean classes, getters/setters, and fields using the following new properties:
BeanContext.BEAN_beanConstructorVisibility- Control which bean constructors are visible to Juno.BeanContext.BEAN_beanClassVisibility- Control which bean classes are interpreted as beans to Juno.BeanContext.BEAN_beanFieldVisibility- Control which fields are visible to Juno as bean properties.BeanContext.BEAN_beanMethodVisibility- Control which getters/setters are visible to Juno as bean properties.
Removed
BeanContext.INCLUDE_BEAN_FIELD_PROPERTIESandBeanContext.INCLUDE_BEAN_METHOD_PROPERTIESproperties, since ignoring fields and methods can be accomplished by setting the appropriate properties above to Visibility.NONE.Also, the
@BeanPropertyannotation can now be used on non-public fields/getters/setters to override the default behavior defined by theVISIBILITYproperties 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. -
New
BeanContext.BEAN_useJavaBeanIntrospectorproperty that lets Juno use the Java beanIntrospectorclass 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. -
New @BeanIgnore annotation. Replaces the previous
@BeanProperty(hidden=true)annotation for ignoring bean properties. Can also be used on classes that look like beans so that they're not treated as beans. -
Support for parsing into non-static member classes. This applies to all parsers.
-
New @Json(wrapperAttr) annotation that automatically wraps beans and objects in a wrapper attribute when serializing to or parsing from JSON.
-
Changed the default ordering of bean properties to be in parent-to-child class order.
-
New
BeanFilter.readProperty(Object,String,Object)andBeanFilter.writeProperty(Object,String,Object)methods added toBeanFilterclass to allow individualized serialization and parsing behavior on a class-by-class basis. -
Eliminated previous restriction where bean subtype attributes had to be listed first in JSON objects when using the
Bean.subTypeProperty()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. -
New fluent-style BeanMap.load() methods for initializing bean maps.
-
HtmlDocSerializer will now embed the data portion of the output in a
<div id='data'>element to make it easier to extract the data portion of the page in Javascript in browsers.
REST Server API updates
-
New
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 toRestGuard.guard(RestRequest,RestResponse). -
Fixed bug when using Jetty where you tried to read text input after a header was written.
-
Added new string variables
$A{...}(request attributes) and$P{...}(request parameters) toRestServlet.createRequestVarResolver(RestRequest).
Release 5.1.0.02
Date: Apr 27, 2014
Juno 5.1.0.2 is a minor update.
-
Fixed issue preventing
&Accept-Languagefrom being used as a GET parameter. -
Minor XSS vulnerability fix.
-
Empty results on HTML pages now shows
no resultsinstead of a blank page. -
Fixed issues preventing REST pages from rendering HTML in newer versions of Internet Explorer.
-
Changed
RestServletProperties.REST_allowMethodParamto be disabled by default.
Release 5.1.0.01
Date: Jan 25, 2014
Juno 5.1.0.1 is a minor update.
-
Addressed some behavioral differences between Tomcat and WAS.
- Query parameter lookup is now always case-insensitive (per WAS behavior).
- Consistent handling of redirect requests (Tomcat and WAS handle relative redirect paths differently).
-
Fixed bug involving incorrect resolution of overlapping URL match patterns.
-
Overall improvements in HTTP request parameter and header value resolution.
-
Made workspace changes so as not to be dependent on the WAS test environment being loaded.
-
Renamed
@Remainderannotation to@PathRemainder. -
Fixed bug involving incorrect calculation of
pathInfoon child resources.
Release 5.1.0.00
Date: Jan 18, 2014
Juno 5.1.0.0 is a major update.
Major changes
-
Brand new REST client API that uses Apache HttpClient for HTTP communication. The new client API is simply a thin layer on top of
HttpClientthat performs serialization and parsing using Juno parsers but leaves all the details of the HTTP connection to the Apache code. See theclientpackage for details. -
New
org.apache.juneau.rest.client.jazzpackage andorg.apache.juneau.rest.client.jazz.JazzRestClientclass for performing REST operations against Jazz servers. Includes improved support for FORM authentication, and better SSL certificate validation. -
Completely redesigned URL-Encoding support. See
urlencodingpackage for details. -
Changes to Parser API.
- Removal of
ExtendedReaderParserabstract class and moved methods into ReaderParser class. - Removal of
DataFormatclass from API since it was no longer necessary due to API change above. - Removal of
ParserStringReaderclass. This was a reader optimized to work withStringinput. However, it could interfere with garbage collection of the original string object. Instead, the existing ParserReader was enhanced to work well withStringinput, and tests show no significant performance differences. - New
org.apache.juneau.parser.Parser.parse(Object,int,ClassMeta)convenience method added.
- Removal of
Other changes
-
Various new methods added to
StringUtilsandClassUtils. -
Improved support on
BeanContext.getClassMetaFromString(String). Now supports resolving"long[]", and so forth. -
ResourceDescriptionname parameter is now automatically URL-encoded in links. -
RestRequest now correctly handles cases involving URL-encoded characters in the path info portion of URLs (e.g.
http://host/contextRoot/foo%2Fbar). -
Removed lazy-initialization that required locking in ClassMeta.
-
New
BeanContext.setDefaultParser(ReaderParser)method added for specifying a default parser to use in a bean context (used when converting beans toStringsusingBeanContext.convertToType(Object,Class)). Old behavior simply used the default JSON serializer in these cases. -
More consistent handling of exceptions across all parsers.
-
Minor changes to RestRequest class.
- Changed the order of parameters on
RestRequest.getParameter(String,Class). - Added
RestRequest.getMapParameter(String,Class,Class,Class)andRestRequest.getCollectionParameter(String,Class,Class)methods.
- Changed the order of parameters on
Release 5.0.0.36
Date: Dec 18, 2013
Juno 5.0.0.36 is a minor update.
- Implemented
org.apache.juneau.urlencoding.UrlEncodingParser.parseArgs(Reader,int,ClassMeta[]). nameparameter ofResourceDescription.ResourceDescription(String,String,String)is now automatically URL-encoded so that the name can contain special characters (e.g.foo/bar(baz)).- Support for URL-matching and path info containing encoded characters (e.g. '/') now supported.
- Removed some lazy-initialization of bean information in ClassMeta that allowed the removal of some synchronized blocks.
- Improved support of
BeanContext.getClassMetaFromString(String). Now supports primitive arrays such as "long[]" in addition to the previous support for the equivalent "[J". - Various new convenience methods added to
StringUtilsandClassUtils.s
Release 5.0.0.35
Date: Nov 26, 2013
Juno 5.0.0.35 is a minor update.
RestGuard.guard(RestRequest,RestResponse)now returns a boolean to allow redirects to login pages.- Fixed bug in
RestServletwhere occasional false positiveduplicate method with same name and patherrors were occurring.
Release 5.0.0.34
Date: Nov 10, 2013
Juno 5.0.0.34 is a moderate update.
-
New support for runtime-replaced variables in REST resource properties:
@RestResource(
messages="nls/Messages",
properties={
@Property(name="label",value="$L{servletTitle}"), // Localized variable in Messages.properties
@Property(name="javaVendor",value="$S{java.vendor}"), // System property
@Property(name="foo",value="bar"),
@Property(name="bar",value="baz"),
@Property(name="v1",value="$R{foo}"), // Request variable. value="bar"
@Property(name="v2",value="$R{$R{foo}}") // Nested request variable. value="baz"
}
)See
RestServlet.createRequestVarResolver(RestRequest)for more information. -
Eliminated
@Property.typeannotation which was the old way of specifying NLS variables that got resolved at runtime. -
New methods on RestRequest:
RestRequest.getVarResolver()RestRequest.getServletURI()RestRequest.getRequestParentURI()
-
New methods on RestResponse:
RestResponse.sendRedirect(CharSequence)
-
New methods on
RestServletthat allow easier customization by subclasses:RestServlet.createConfigFactory()RestServlet.createConverters()RestServlet.createDefaultRequestHeaders()RestServlet.createDefaultResponseHeaders()RestServlet.createEncoders()RestServlet.createFilters()RestServlet.createGuards()RestServlet.createMimetypesFileTypeMap()RestServlet.createParsers()RestServlet.createProperties()RestServlet.createRequestProperties(ObjectMap,RestRequest)RestServlet.createRequestVarResolver(RestRequest)RestServlet.createSerializers()RestServlet.createUrlEncodingParser()
-
Changed
RestServletNlsto useResourceDescription/MethodDescriptioninstead ofRestResource/RestMethod -
New property
RestServletProperties.REST_htDocsFolder. -
New support for serving up static documents from classpath through REST interface.
-
Exception APIs now use MessageFormat (e.g.
{0}) for message variables instead of%s. -
New @Bean.stopClass annotation for specifying stop classes for bean properties.
-
New
BeanFilter.setStopClass(Class)which is the program equivalent to the annotation above. -
New methods on ResultSetList:
ResultSetList.handleBlob(Blob)ResultSetList.handleClob(Clob)
Release 5.0.0.33
Date: Oct 20, 2013
Juno 5.0.0.33 is a moderate update.
-
Removed generic parameter from WriterSerializer class.
- Many of the examples in the documentation were written as follows, which resulted in "unchecked" compile warnings:
WriterSerializer s = new JsonSerializer();These compile warnings will now go away.
- Many of the examples in the documentation were written as follows, which resulted in "unchecked" compile warnings:
-
New settings in BeanContext. These can be applied to all serializers/parsers.
BEAN_ignoreInvocationExceptionsOnGettersBEAN_ignoreInvocationExceptionsOnSettersBEAN_notBeanPackages_addBEAN_notBeanPackages_remove
-
Eliminated
addNotBeanClassPatterns(String...)methods throughout API since these are now controlled byBEAN_notBeanPackages_add/BEAN_notBeanPackages_removeproperties. -
New settings in
RestServletProperties.RestServletProperties.REST_trimTrailingUriSlashesAlso removedRestRequest.getRequestURI(boolean trimTrailingSlashes)method which is now redundant with this property.RestServletProperties.REST_pathInfoBlankForNullAlso removedRestRequest.getPathInfo(boolean returnBlankForNull)method which is now redundant with this property.
-
New JSON-Schema JsonSchemaMap class for supporting linked schemas.
-
Serializers will no longer throw an exception when
maxDepthsetting is reached, and will instead simply ignore content below the specified depth. While the old behavior was as-designed, the new behavior is more in-line with expected behavior. -
Added support for HTTP header
X-Response-HeaderstoRestServlet. Allows you to specify one or more headers that should be returned on the response from the servlet. For example, to get a page to automatically refresh every 1 second, you can append the following to a URL:?x-response-headers={Refresh=1} -
Removed
HtmlDocSerializerContext.HTML_REFRESHsetting that added a Refresh meta tag to HTML documents, since this can now be controlled throughX-Response-Headers. -
Small improvements to samples.
PhotosResourcenow includes a default entry.
Release 5.0.0.32
Date: Oct 5, 2013
Juno 5.0.0.32 is a moderate update.
-
New support for generating and consuming fully-compliant JSON-Schema documents. See
jsonschemafor information. -
New methods added to Parser:
org.apache.juneau.parser.Parser.parseMap(Object,int,Class,Class,Class)org.apache.juneau.parser.Parser.parseCollection(Object,int,Class,Class)
-
@Bean annotation can now be defined on interfaces and inherited by subclasses.
-
Support for customizing serialized values for
Enumsthrough overridingtoString()andfromString()on the enum class. Previously usedEnum.valueOf()to convert strings back intoEnums. Used for JSON-Schema support to allow JsonType enum to be serialized to lowercase per the specification (e.g."string"instead of"STRING"). -
CognosDTOs now have fluent-style bean setters. -
Support for generic bean objects whose type was erased at compile time. Previous behavior gave you an error message that the type could not be determined. New behavior assumes a type of
Objectwhen the type is erased. -
Bug fixes:
- When duplicate fluent-style setters were defined with different parameter types (e.g.
setFoo(Foo f),setFoo(Bar b)), the BeanMap API would sometime choose the wrong setter as the bean property setter. Now validates that the setter being chosen is the one whose return type matches the property getter. - Passing in
AcceptGET parameters with'+'(e.g.&Accept=text/json+simple) wasn't working anymore. TheAcceptparameter is supposed to interpret spaces as'+'to allow you to not have to write&Accept=text/json%2Bsimple. - Parsers would not set bean properties of abstract type Number. Now it detects the numeric type based on input and sets the value accordingly.
- When duplicate fluent-style setters were defined with different parameter types (e.g.
Release 5.0.0.31
Date: Aug 9, 2013
Juno 5.0.0.31 is a moderate update.
-
Simplified the Serializer and Parser class hierarchies. This reverses a previous change that added a bunch of interfaces in these APIs (and subsequently required compiling with Java 7 to get around a compiler bug). The new class hierarchy is much simpler to understand.
-
Added
XMLGregorianCalendarSwapto convert these to ISO8601 strings during serialization, and vice versa during parsing. -
Added a strict mode to JsonParser.
-
Added default JsonParser.DEFAULT_STRICT parser.
Release 5.0.0.30
Date: Aug 8, 2013
Juno 5.0.0.30 is a minor update.
-
Fixed bug involving beans using
Bean.subTypes()annotation in addition tosubTypesproperty. -
Modified the JSON parser to handle non-existent JSON values to get around an issue where Cognos was generating invalid JSON.
Release 5.0.0.29
Date: Aug 2, 2013
Juno 5.0.0.29 is a moderate update.
-
Revamped the API for filter support:
- Updated
BeanFilterclass to mirror the @Bean annotation. - Introduced support for bean
Bean.subTypeProperty() subtypes. - Replaced
@Bean(filter=xxx)with new@Transformannotation.
- Updated
-
Revamped URL-Encoding support. The old URL-Encoding serializer and parser simply used the JSON serializer/parser with a thin URL-encoding top layer. The new URL-Encoding serialize and parser was written from scratch and is considerably more consistent in design and output.
-
Improved number parsing. The new number parser should handle any valid numeric syntax for decimals and floats that Java itself supports.
-
JsonSerializer LAX mode now quotes reserved word attributes.
-
New predefined DateFilters with millisecond precision:
org.apache.juneau.swaps.DateSwap.ISO8601DTPorg.apache.juneau.swaps.DateSwap.ISO8601DTZP
Release 5.0.0.28
Date: July 9, 2013
Juno 5.0.0.28 is a moderate update.
-
Fixes an
OutOfMemoryErrorand performance issue caused by incorrect caching of class metadata. -
Added
WriterSerializer.serialize(Object,Writer)convenience method for serializing directly to a writer. Applies to all serializers.
Release 5.0.0.27
Date: July 7, 2013
Juno 5.0.0.27 is a moderate update.
-
Fixed some HTML formatting issues in HtmlSerializer.
-
BasicRestServletnow includes PlainTextSerializer and PlainTextParser for plain-text support. -
Child resources now render on default
OPTIONSpages through new methodResourceOptions.getChildren(). -
Changes to UrlEncodingSerializer/UrlEncodingParser to reduce the need for quoted string values. More changes are likely in this area of the code to support multipart form posts.
-
FindBugs fixes.
Release 5.0.0.26
Date: Jun 5, 2013
Juno 5.0.0.26 is a minor update.
-
FindBug fixes.
-
Changed the way child REST resources are defined. Eliminated the
@RestChildannotation on getter methods and replaced it with@RestResource(children)defined on the resource class itself. Child resource paths are specified through@RestResource(path). -
New
ChildResourceDescriptionsbean for automatically generating the contents of router resource pages. -
Changed
@RestMethod.pattern()to@RestMethod(path)for naming consistency.
Release 5.0.0.25
Date: May 11, 2013
Juno 5.0.0.25 is a minor update.
Core API updates
-
New ResultSetList DTO for serializing SQL result sets to JSON/XML/HTML and so forth.
-
New
SqlQueryResourceclass in the sample war for demonstrating theResultSetListDTO.
Server API updates
-
Fixed issue with media type for CSS files being reported as
text/plaininstead oftext/css. -
Moved initialization of class properties to before the call to
Servlet.init()so thatgetProperties()can be called during servlet initialization. -
New
@Property.typeannotation with support for using system properties as resource properties.
Release 5.0.0.24
Date: May 9, 2013
Juno 5.0.0.24 is a major update.
Core API updates
-
New support for ATOM.
- New
AtomFeedResourceclass added to sample war.
- New
-
New
XmlFormat.CONTENTenum value. Allows bean properties to be persisted as XML element text. -
New
XmlContentHandlerclass and@Xml.contentHandlerannotation. Allows customized serialization and parsing of beans to XML element text. Added for support of ATOM text content that must support both plain text and embedded XHTML. -
New @XmlSchema and updated @XmlNs annotations to better mimic JAXB.
-
Removed
@Xml.valAttrannotation since it's now redundant with@Xml(format=CONTENT). -
Fixed timezone bug in
CalendarSwap. -
Simplified
Serializer.serialize(Object,Object,SerializerContext)method. -
Fixed bug where lists returned by
ObjectMap.getObjectList(String)were not updatable. -
Eliminated old RDF/XML serializer.
Documentation updates
- New JSON Support Overview document.
- New XML Support Overview document.
- New
RDF Languages Support Overviewdocument. - New ATOM Support Overview document.
Release 5.0.0.23
Date: Apr 14, 2013
Juno 5.0.0.23 is a minor update.
-
Simplified
Cognossupport. -
Fixed bug where @Xml annotation was not being inherited by inner classes.
-
Javadoc stylesheet improvements.
Release 5.0.0.22
Date: Apr 12, 2013
Juno 5.0.0.22 is a minor update.
Core API changes
- New
@Property.nls()annotation for specifying localized property values. For example, allows you to set theHTMLDOC_titleandHTMLDOC_descriptionproperties to localized values pulled from a resource bundle. See theAddressBookResourceclass for an example.
REST Servlet API changes
- Fix a bug where the
&Contentquery parameter was not always parsed correctly.
Release 5.0.0.21
Date: Apr 9, 2013
Juno 5.0.0.21 is a minor update.
Core API changes
-
New
HtmlDocSerializerContext.HTMLDOC_navlinksannotation for adding links to HTML page views. -
Renamed the properties in
HtmlDocSerializerContextfor clarity.
Servlet API changes
-
Added new
RestServlet.addDefaultProperties(ObjectMap,RestRequest)method for programmatically adding properties to the property map per request. -
Added the following new properties in the properties map to make them easily available to serializers and parsers (since they don't have access to the HTTP request object). Note that the
SerializerContext.SERIALIZER_uriAuthorityandSerializerContext.SERIALIZER_uriContextproperties were previously available.RestServletProperties.REST_servletPathRestServletProperties.REST_pathInfoRestServletProperties.REST_method
-
Path variables annotated with
@Attrare now automatically URL-decoded.
Release 5.0.0.20
Date: Apr 7, 2013
Juno 5.0.0.20 is a major update.
Core API changes
-
New Jena-based
RdfSerializerfor serializing POJOs to RDF/XML, RDF/XML-ABBREV, N-Triple, Turtle, and N3. Serializes ANY POJOs to RDF, even simple objects and primitives. -
New Jena-based
RdfParserfor parsing RDF/XML, RDF/XML-ABBREV, N3, Turtle, and N-Triple back into POJOs. -
XmlSerializerContext.XML_autoDetectNamespacesdefault changed totrue. The old default value would cause XML with unmapped namespaces if you didn't manually specify them via theXmlSerializerContext.XML_namespacesannotation. While setting the default totrueis somewhat slower (since the serializer must crawl the POJO tree to find namespaces), the benefits of having it work out-of-the-box outweighs the performance concerns. For developers concerned about performance, they can always change it back to false and specify the namespaces themselves.
REST server API changes
-
Allow inheritance of
@RestResourceannotation. Serializers, parsers, filters, properties , guards, and converters definitions are automatically inherited from parent classes and interfaces. -
Enhancements to
@RestMethodannotation:- New
RestMethod.filters()annotation for defining POJO filters at the method level. - New
RestMethod.serializersInherit()andRestMethod.parsersInherit()annotations for controlling how serializers and parsers (and associated filters and properties) are inherited from the class. This replaces the previousaddSerializersandaddParsersannotations.
- New
-
New
RestServletJenaDefaultservlet that includes serialization/parsing support for all Jena-based serializers and parsers. -
New
DefaultJenaProviderJAX-RS provider that includes serialization/parsing support for all Jena-based serializers and parsers. -
Eliminated
RestServletChildclass. It's redundant with the introduction of inheritable annotations. -
New methods on
RestServlet:RestServlet.createConfigFactory()RestServlet.createSerializers()RestServlet.createParsers()
These augment the existing
getBeanContext()/getSerializers()/getParsers()methods.
REST client API changes
- New
RestCall.setDateHeader(String,Object)method for setting ISO8601 datetime headers.
Release 5.0.0.19
Date: Apr 1, 2013
Juno 5.0.0.19 is a minor update.
-
New methods on
RestServlet:RestServlet.onPreCall(RestRequest)RestServlet.onPostCall(RestRequest,RestResponse)
-
TRIM_NULLSsetting changed toSerializerContext.SERIALIZER_trimNullProperties. New property default istrue . Only applies to bean properties, not map or collection entries.
Release 5.0.0.18
Date: Mar 27, 2013
Juno 5.0.0.18 is a moderate update.
The biggest change is the introduction of the RdfSerializer class that uses Jena to generate RDF/XML,
RDF/XML-ABBREV, N-Tuple, N3, and Turtle output.
This code should be considered prototype-quality, and subject to change in the future.
There are plans of adding an equivalent RdfParser class in the future, so the serializer logic may need to be
tweaked to allow POJOs to be reconstituted correctly in the parser.
The RdfXmlSerializer class should be considered deprecated for now.
However, I'm keeping it around, since it's considerably faster and uses far less memory than the Jena-based serializer
since it serializes directly from POJOs to RDF/XML.
It may or may not be removed in the future depending on demand.
Other changes
- New
JsoParserclass.
Release 5.0.0.17
Date: Mar 25, 2013
Juno 5.0.0.17 is a minor update.
- Charset now passed as a parameter to
IOutputStreamSerializer.serialize()andIInputStreamParser.parse().
Release 5.0.0.16
Date: Mar 25, 2013
Juno 5.0.0.16 is a minor update.
- New
@PropertiesREST method parameter annotation that can be used to get the runtime properties map through a parameter instead of through RestResponse.
Release 5.0.0.15
Date: Mar 24, 2013
Juno 5.0.0.15 is a moderate update.
-
Juno-Wink integration components that have been requested by many for a long time! Refer to
jaxrsfor information. -
New
@Producesannotation in place ofISerializer.getMediaTypes()for specifying what media types a serializer produces. Available when subclassing from Serializer. -
New
@Consumesannotation in place ofIParser.getMediaTypes()for specifying what media types a parser consumes. Available when subclassing from Parser.
Release 5.0.0.14
Date: Mar 23, 2013
Juno 5.0.0.14 is a major update.
The biggest change is that the RestSerializer, RestParser, RestSerializerGroup, and RestParserGroup classes have
been eliminated entirely.
Instead, the existing Serializer,
Parser, SerializerGroup, and ParserGroup classes of the
core API have been augmented to replace them.
Adoptions will be required if you have previously used these classes.
Core API changes
-
New
org.apache.juneau.serializerpackage.- Entirely reworked class hierarchy to make it easier to define new serializers.
- New WriterSerializer base class for defining character-based serializers.
- New OutputStreamSerializer base class for defining byte-based serializers.
- Updated
SerializerGroupclass with full support for RFC2616Accept-Contentheaders. - Improved cloning support on serializers and serializer groups.
-
New
org.apache.juneau.parserpackage.- Entirely reworked class hierarchy to make it easier to define new parsers.
- New ReaderParser base class for defining character-based parsers.
- New InputStreamParser base class for defining byte-based parsers.
- Improved cloning support on parsers and parser groups.
-
New
org.apache.juneau.swappackage.- Cleaner class structure.
- Improved
BeanFilterclass for defining property filters on beans. - Improved
PojoQueryclass for defining filters on objects (previously calledObjectFilter).
-
New
org.apache.juneau.encoderspackage.- Defines API for Encoders for enabling compression in REST servlets and clients.
- Previously, gzip compression was enabled by default. This new API allows you to plug in your own compression algorithms.
- New GzipEncoder class for enabling gzip compression.
- New
EncoderGroupclass for managing multiple encoders and finding them based on RFC2616Accept-Encodingheader values.
-
New
org.apache.juneau.plaintextpackage.- New PlainTextSerializer and PlainTextParser classes for serializing/parsing text/plain content.
-
New
org.apache.juneau.jsopackage.- New
JsoSerializerclass for serializingapplication/x-java-serialized-objectcontent.
- New
-
New
org.apache.juneau.soappackage.- New SoapXmlSerializer class for serializing
text/xml+soapcontent.
- New SoapXmlSerializer class for serializing
-
Improved cloning support on the BeanContext class.
- Better caching. Improved caching performance.
-
JsonMapandJsonListchanged toObjectMapandObjectListto better reflect that they're not limited to just JSON support. -
Renamed
PojoSwaptoPojoQueryto not confuse it with the new Filter API.
REST server API changes
- Eliminated
org.apache.juneau.rest.serializersandorg.apache.juneau.rest.parserspackages.- All existing REST serializers and parsers merged into the core API.
REST client API changes
-
Simplified RestClient API.
- You can now only specify a single serializer or parser per client. This significantly simplifies the code.
- Support for Encoders.
-
Eliminated
RestCmdLine(since it's essentially redundant with CURL).
Release 5.0.0.13
Date: Mar 14, 2013
Juno 5.0.0.13 is a minor update.
Core API changes
-
New support for relative URIs.
- URIs of the form
"foo/bar"are interpreted as relative to the context root of the web application. - URIs of the form
"/foo/bar"are interpreted as relative to the HTTP authority (e.g."http://myhost:9080").
- URIs of the form
-
New
SerializerContext.SERIALIZER_uriContextandSerializerContext.SERIALIZER_uriAuthorityserializer properties for specifying values for relative URIs. -
New
@URIannotation that allows you to specify classes and bean properties as URLs that aren'tjava.net.URIorjava.net.URL. -
New
HtmlSerializer.HTML_uriAnchorTextHTML serializer property for tailoring how anchor text is rendered. -
Renamed
BeanProperty#uriannotation toBeanProperty#beanUrito make it clear that this property represents the URI of the bean itself instead of an arbitrary property containing a URI. -
Removed
BeanProperty#idannotation.
REST server API changes
-
Improvements to
RestServletto automatically handle relative URIs in POJOs.SerializerContext.SERIALIZER_uriContextproperty set by default to web app context root.SerializerContext.SERIALIZER_uriAuthorityproperty set by default to the request scheme+hostname+port.
-
Fixed bug involving
Accept-Charsetheader in Chrome that prevented HTML output from rendering correctly in that browser.Accept-Charsethandling should now be fully W3C compliant.
Release 5.0.0.12
Date: Mar 10, 2013
Juno 5.0.0.12 is a minor update.
Core API changes
- Relaxed method naming conventions when using
@BeanPropertyannotation. Methods with zero parameters are interpreted as getters, and methods with one parameter are interpreted as setters. Eliminated theBeanProperty.methodannotation, since it's now unnecessary.
REST server API changes
-
Significantly improved response error messages. Older messages were rather cryptic. Error conditions should be much easier to debug now.
-
New
PlainTextRestSerializerclass for serializing"plain/text"requests. Useful for debugging purposes. -
ReadersandInputStreamscan now be passed in as@Contentparameters if you need direct access to the HTTP body content without involving the parsers. Equivalent to previously calling RestRequest.getInputStream().html) and RestRequest.getReader().html). -
Improved support for the
?debugparameter. Dumps better information to the log file, such as all header parameters.
Release 5.0.0.11
Date: Mar 8, 2013
Juno 5.0.0.11 is a moderate update.
REST server API changes
-
New
UrlEncodingRestSerializerandUrlEncodingRestParserclasses. Allows parsing form posts directly to POJOs. -
Support for
AcceptandContent-Type"application/x-www-form-urlencoded"added by default onBasicRestServlet. -
New
RestServlet.renderError(HttpServletRequest,HttpServletResponse,RestException)method to allow customized handling of response errors.
Release 5.0.0.10
Date: Mar 7, 2013
Juno 5.0.0.10 is a minor update.
Core API changes
-
New
ObjectMap.findKeyIgnoreCase(String)method. -
HtmlSerializer will now create 2-dimensional tables for collections of mixed beans/maps if all object have the same set of property names/keys.
REST server API changes
-
New
RestServletPropertiesclass that defines all the class-level properties that can be set on the servlet. -
Properties can be set through
@RestResource.propertiesannotation, or newRestServlet.setProperty(String,Object)method. -
New
"?noTrace"URL parameter to prevent stack traces from being logged (for JUnit testing of error conditions). -
New
RestServletProperties.REST_useStackTraceHashesproperty to prevent the same stack trace from being logged multiple times. -
New
RestServletProperties.REST_renderResponseStackTracesproperty for preventing stack traces in responses for security reasons. -
New overridable
RestServlet.onError(HttpServletRequest,HttpServletResponse,RestException,boolean)andRestServlet.onSuccess(RestRequest,RestResponse,long)methods for plugging in your own logging and peformance monitoring. -
Eliminated
RestServlet.getInitParams()method, since it's now redundant withRestServlet.getProperties(). -
Header parameters passed as URL parameters are now case-insensitive.
Release 5.0.0.09
Date: Feb 26, 2013
Juno 5.0.0.9 is a moderate update.
Core API changes
-
- A convenient API for reading, writing, and manipulating INI files.
- Ability to convert INI files to batch and shell environment variables.
- Command-line interface for updating INI files.
- Support for encoded INI file values.
-
Support for fluent-style bean setters (setters that return the bean itself).
-
Ability to use @Bean annotation to override bean identification settings.
-
New
ObjectMap.cast(Class)method to convertObjectMapsdirectly to beans.
REST server API changes
-
Build-in default
OPTIONSpages. -
New
@RestResource.defaultRequestHeadersand@RestResource.defaultResponseHeadersannotations. -
New
@RestMethod(serializers)and@RestMethod(parsers)annotations. -
New
@RestMethod(properties)annotation. -
New
@RestMethod(defaultRequestHeaders)annotation. -
New
@RestMethod(matchers)annotation andRestMatcherclass. -
ReadersandInputStreamscan be specified on@Contentannotated parameters. -
New
@HasParamannotation. -
Full RFC2616 support for matching
Acceptheaders to serializers.
Other notes
- Smaller library size (460kB).
Release 5.0.0.08
Date: Jan 30, 2013
Juno 5.0.0.8 is a minor update.
- New INI file support.
- Makes reading, updating, and manipulating INI configuration files a snap.
- Supports automatic conversion of data types in line with the functionality of the rest of the product.
- Comments and layout of INI files are persisted during saves.
Release 5.0.0.07
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.namespacesannotation. Namespaces can be defined at package, class, method, or field levels. - New
@Xml.nsUriannotation. Shortcut for specifying namespace URIs. - New
@Xml.valAttrannotation. 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
ClassTypeClassMeta 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:resourceattributes. - 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).
Release 5.0.0.06
Date: Oct 30, 2012
Juno 5.0.0.6 is a minor update that fixes a small bug in 5.0.0.5.
Release 5.0.0.05
Date: Oct 29, 2012
Juno 5.0.0.5 is a major update.
-
New
@RestChildannotation for identifying child resources. -
New
traversableandfilterableattributes added to@RestMethodannotation. Eliminates the need forPojoResourceandFilteredRestResourceclasses. -
Simplified client API. Easier to use when making multiple connections to the same server.
-
Support for pluggable authentication in the client API.
-
Support for authenticating against Jazz Team Servers.
-
Support for rendering package-level Javadocs in REST resources.
-
Support for parsing of header values into specific object types.
-
Changed default XML representation to not include JSON-type attributes. Produces cleaner XML.
-
New
resourceUriattributed added to @Bean annotation to associate beans with resource URIs.- Used for automatically creating hyperlinks in HtmlSerializer.
- Used for automatically creating
uriattributes in XmlSerializer. - Used for automatically creating
rdf:aboutattributes inRdfXmlSerializer.
Release 5.0.0.04
Date: Oct 7, 2012
Juno 5.0.0.4 is a minor update.
-
New
@RestMethodannotation onRestServletmethods. Allows the usage of URL pattern matching and automatic conversion of URL variables to arguments passed to method handlers. SeeRestServletfor more information. -
Enhancements to
BeanContext.convertToType(Object,Class)to be able to convertStringsto classes withfromString(String)/valueOf(String)static methods orT(String)constructors.
Release 5.0.0.03
Date: Oct 3, 2012
Juno 5.0.0.3 is a minor update.
-
Support for parsing into read-only beans (i.e. beans with only getters, property values set through constructor args). To support this, the
@BeanConstructorannotation has been added. -
Merged separate settings classes back into their base classes (simplifies the API).
-
SerializerGroupsandParserGroupsnow share BeanContexts to reduce memory consumption of class type metadata.
Release 5.0.0.02
Date: Sept 28, 2012
Juno 5.0.0.2 is a minor update.
-
Improvements to Javadocs. Most of the information in the Juno Starters Guide wiki has been moved into the overview and package-level javadocs. Since the information is now written in HTML, you can now copy and paste the code examples directly from the Javadocs. The code examples are also syntax-highlighted using CSS.
-
Support for defining default XML namespaces on packages and classes for the XML and RDF serializers.
-
Restructured the packages along content type support (e.g. all JSON support moved to
org.apache.juneau.json). -
Automatic support for parsing maps with
Enumkeys, and parsingEnumstrings. This was previously possible using filters but now it's built-in for all the parsers. -
Replaced the
ObjectList.toXArray()methods with a newelements(Class<T> type)method that's more efficient and avoids creating an unnecessary array. -
Support for parsing into beans with read-only properties. New
@BeanConstructorannotation allows you to specify bean property values to be passed in through a constructor. -
Separated the rest library into separate independent client and server libraries. Use one, use both, it's up to you.
Release 5.0.0.01
Date: Jun 14, 2012
Juno 5.0.0.1 is a moderate update.
-
New support for generating XML-Schema documents from POJO models.
-
New support for serializing to RDF/XML.
Release 5.0.0.00
Date: Jun 11, 2012
Version 5.0 marks a major release milestone for the Juno/JJSON library.
It is now available for download from iRAM under the name "Juno (previously JJSON)".
The Juno Starters Guide has been updated to reflect new functionality in this release.
- New name. Unfortunately, "JJSON" was already trademarked by another similar library. Therefore, it's been renamed "Juno" (after the Roman goddess and wife of Jupiter) which does not appear to have any similar trademark issues (crosses fingers). The name is also a play on the word "Uno", indicating that this is a single simple unifying interface of several kinds of technology.
- Serializer/Parser classes now directly subclass from BeanContext. In previous releases, if you wanted to change the way beans were handled by the serializers and parsers, you had to construct a separate bean map factory and pass it to the serializer or parser. Now, you can call the bean map factory methods directly on the serializer or parser class.
- This new API replaces the previous separate
CastandBeanFilterAPIs which were considerably more complicated and puts them under a common API. - Elimination of
_classattributes in parsable output. One of the complaints about the previous version of JJSON was that if you wanted to have the resulting JSON or XML be parsable back into beans, you had to enable the"addClassAttrs"property on the bean map factory class so that"_class"attributes could be added to the output. This requirement is virtually eliminated in v5. In many cases, the parsers are able to determine through reflection what the correct target type is based on the top-level class passed in on the parse method. - Performance improvements. Several significant performance improvements have been made in this release.
- New Reader-based JSON parser. Previously, the JSON parser required that the entire JSON text be loaded into memory as a String before being parsed. The new JSON parser is Reader-based which significantly reduces memory consumption.
- New StAX-based XML parser. The old XML parser was based on DOM. The new XML parser uses a StAX parser which significantly reduces memory consumption.
- Caching of reflection data in the
BeanMapAPI. The number of reflection calls have been significantly reduced in theBeanMapAPI code. Reflection is used to determine the class types of property values on beans. This information is now cached and persisted so that the reflection API calls to determine class types are only performed the first time a bean type is encountered. - Automatic support for GZIP compression/decompression in
RestServlets. This is completely transparent to the developer. The output writer is negotiated by the framework to automatically handle compression and charset requests without the developer needing to know anything about it.
- Cognos/XML support.
- JSON-schema support.
- New
PojoIntrospectorclass. - Significant REST servlet API improvements.
- Defining child resources is considerably simpler now. In addition to the standard doX() methods for handling the requests for the current resource, you can also define getX() methods for returning child resources which automatically become available under the child URL specified by the getter name.
- Initialization of the child resources occurs automatically when the parent resource initialization occurs.
- Other improvments have been made in the area of automatic negotiation of input and output type streams. For example, automatic support is provided for GZIP (
Accept-Encoding: gzip) and charsets (e.gAccept-Charset: SJIS) on both incoming and outgoing data. It's all transparent from a developers perspective. The developer simply working with POJOs, and all details about content types, encoding, charsets, and so forth are handled by the framework. - Support for generating complex
OPTIONSpages for resources.
- Automatic support for SOAP XML output on
"text/soap+xml"requests againstRestServlet. - Support for XML namespaces.
- Support for setting the XML root element name by either passing in a parameter on the serializer, or by specifying it via a @Bean annotation.
- Support for loading beans directly from Readers and Strings.
- Parsing support for POJOs of type
Enum. - Significant improved support for various flavors of parameterized types, such as subclasses of parameterized types (e.g.
MyBeanList extends LinkedList<MyBean>). - Improved ordering of bean properties (should now be ordered as they are defined in the class).
- Various default filters provided:
- byte[]<-->Base64 encoded strings
- Date/Calendar<-->ISO8601/RFC822/Long
- New HtmlParser and UrlEncodingParser classes.
- HtmlSerializer now produces XHTML.