Skip to main content

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)
  • @ThreadSafe annotation.

  • New ClassFilter class.

  • ConfigFile.getResolving(StringVarResolver,boolean) method.

  • ConfigFile.getStringVar() method.

  • New ParserContext.PARSER_trimStrings property.

  • New SerializerContext.SERIALIZER_trimStrings property.

  • Args.getStringVar() method.

  • New ManifestFile class

  • New MessageBundle class. Replaces SafeResourceBundle/SafeResourceMultiBundle/RestNls.

  • New StringMapVar class.

  • New StringVars class with reusable common StringVar instances.

  • New JuneauLogger class.

  • Default value for XmlParserContext.XML_trimWhitespace changed to true.

Server​

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.config API.

    • 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 a Writable interface 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:
      • ConfigFileListener
      • SectionListener
      • EntryListener
    • Encoder methods have access to field names to use them as salt values.
    • The name of the default section is now "default". Before it was just null.
    • XorEncoder XOR 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. logging Level class)
    • parseString(String)
    • forName(String) (e.g. Class and Charset classes)
  • 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 as Object instead of throwing an exception.

  • Support for serializing/parsing the following new types:

    • AtomicInteger
    • AtomicLong
    • BigInteger
    • BigDecimal
  • 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 Section class represents a section in a config file. It needs to know it's own name and have a link to the ConfigFile that it belongs to. With these new annotations, config files can be reconstructed using any of the parsers.

  • New classes and interfaces:

    • Streamable interface for identifying objects that can be serialized directly to an output stream.
    • Writable interface for identifying objects that can be serialized directly to a writer.
    • StringObject class that can be used for delayed object serialization.
    • ByteArrayCache
    • ByteArrayInOutStream
    • FileUtils
    • ThrowableUtils
    • StringVarMultipart
    • StringVarWithDefault
  • New fields on ObjectList:

    • ObjectList.EMPTY_LIST
  • New fields and methods on ObjectMap:

    • ObjectMap.EMPTY_MAP
    • ObjectMap.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.DEFAULT field.

  • Eliminated dependency on javax.mail.internet.MimeUtility by implementing our own StringUtils.base64Encode(byte[]) method.

  • CalendarSwap and DateSwap classes now handle blank input better. Returns null instead of throwing an exception.

  • HtmlDocSerializer specifies the default CSS location as /servletPath/style.css instead 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 HtmlSchemaSerializer to HtmlSchemaDocSerializer.

  • RDF serializers and parsers now support RdfProperties.RDF_looseCollection loose 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 null input.

  • SerializerGroup and ParserGroup ignores serializers and parsers if they throw NoClassDefFoundErrors.

  • 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_EXPANDED serializer.

  • Changes to Args:

    • getMainArg(int) changed to Args.getArg(int). Non-existent arguments are returned as null instead 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.CharsetUtils class.

  • Removed org.apache.juneau.utils.ConcurrentIdentityList class.

  • Fixed bug in MultiIterable class.

  • PojoIntrospector must now be instantiated with a ReaderParser. Simplifies the API on the class.

  • PojoRest must now be instantiated with a ReaderParser. Simplifies the API on the class.

  • MessageBundle and SafeResourceMultiBundle moved from server component.

  • Several bug fixes and performance improvements in StringVarResolver.

  • Various enhancements to TeeWriter and TeeOutputStream.

  • Renamed CharSet to AsciiSet.

  • SerializerGroup and ParserGroup now ignores NoClassDefFoundErrors so that resources that include Jena support can continue to operate even if the Jena libraries are not present.

  • New FileUtils.createTempFile(String) method.

  • New PojoQuery modified to handle bean getters that throw exceptions.

Client​

  • Upgraded to use Apache HttpClient 4.5.

  • New classes:

    • AllowAllRedirects
    • HttpMethod
    • ResponsePattern
    • SimpleX509TrustManager
    • SSLOpts
  • 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 from execute().
    • 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)
  • JazzRestClient now supports OIDC authentication.

  • These classes are now deprecated and will be removed in a future release:

    • org.apache.juneau.rest.client.jazz.CertificateStore
    • org.apache.juneau.rest.client.jazz.ICertificateValidator
    • org.apache.juneau.rest.client.jazz.ITrustStoreProvider
    • org.apache.juneau.rest.client.jazz.LenientCertificateValidator
    • org.apache.juneau.rest.client.jazz.SharedTrustStoreProvider
    • org.apache.juneau.rest.client.jazz.ValidatingX509TrustManager

Server​

  • New ReaderResource class. Represents the contents of a text file with convenience methods for resolving StringVar variables and adding HTTP response headers. REST Java methods can return instances of these to serialize Readers containing text with StringVarResolver variables in them.

  • New StreamResource class. REST Java methods can return instances of these to serialize OutputStreams.

  • Fixed a bug in the stack trace hash algorithm in RestException.

  • New methods in RestRequest:

    • RestRequest.getReaderResource(String) - Replaces getVarResource(String).
    • RestRequest.getReaderResource(String,boolean)
    • RestRequest.getReaderResource(String,boolean,String)
  • Changes in RestResponse:

    • Don't set Content-Encoding: identity when no encoding is used. Some clients don't interpret it correctly.
  • 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 JsoParser from BasicRestServlet and RestServletJenaDefault. 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.JsonProvider class. Some JAX-RS implementations use code scanning to find providers, so if you were using DefaultJenaProvider, it would pick up JsonProvider as well. It's easy enough to create your own implementation if needed.

  • OPTIONS pages now specify consumes and produces fields instead of accept and contentType which was confusing.

  • Eliminated properties from OPTIONS pages.

  • New ResourceLink.ResourceLink(String,RestRequest,String,Object[]) constructor.

  • New response handlers:

    • StreamableHandler - Allows REST Java methods to return instances of Streamable.
    • WritableHandler - Allows REST Java methods to return instances of Writable.
  • New DevOps stylesheet.

  • Servlet initialization and HTTP requests are now logged at FINE level.

  • Added abstract modifier on various RestServlet subclasses 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 RestMicroservice class 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.Main class. This is replaced by the microservice classes defined above.

  • Resource and ResourceGroup classes 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 BasicRestServletJena class if you want your REST interface to support RDF.

  • Eliminated the following classes:

    • org.apache.juneau.microservice.RootResource
    • org.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.config API.

    • ConfigFile is now thread safe and can be shared across multiple threads.
    • New ConfigMgr class 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 ProcBuilder class 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_addLinks configuration 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.
  • BasicRestServlet now 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:

  • New RestMethod.encoders() @RestMethod(encoders) and RestMethod.inheritEncoders() annotations. Allows encoders to be fine-tuned at the method level.

  • New @RestResource(config) annotation for associating external ConfigFile config files with servlets.

  • ResourceLink.

  • New org.apache.juneau.rest.matcher package for commonly-used RestMatchers:

    • MultipartFormDataMatcher
    • UrlEncodedFormMatcher

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[]) and ObjectMap.exclude(String[]) methods.

  • @Html annotations can now be applied to bean properties.

  • New IOPipe utility class.

  • Behavior change on StringVarResolver. null input now results in blank strings instead of null.

Client​

  • New RestClient.doCallback(String) method.

Server​

  • New RestRequest.getHeaders() method.

  • New RestResponse.getUnbufferedWriter() method.

  • Fixed bug that was preventing x-response-headers parameter from working correctly.

  • Added @Bean.properties annotations to the various classes in org.apache.juneau.rest.labels so 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() and RestMethod.responses() annotations. These replace the various description annotations 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) and RestServlet.replaceChild(RestServlet) classes that allows customized resolution of servlet instances (e.g. if services are defined in OSGi).
  • Reverted the MethodDescription back 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.
  • StringVarResolver now has support for chained resolvers.

  • StringVarResolver now 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 ZipFileList class for providing efficiently zipped directories through the REST interface.

  • New RdfProperties.RDF_useXmlNamespaces property.

  • New XmlParserContext.XML_preserveRootElement property.

  • Worked around bug in Sun VM on OS/X where XML parser was throwing an exception when trying to set a reporter.

Server​

  • New ZipFileListResponseHandler class.

  • 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. Returns null instead of blank for no path info.
    • RestRequest.getPathRemainder() now automatically decodes the path remainder. Use RestRequest.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 "/*".
  • New string replacement variables:

    • $R{contextPath} - Returns value from RestRequest.getContextPath()
    • $R{methodDescription} - Returns value from RestRequest.getMethodDescription()
    • $R{resourceTitle} - Returns value from RestRequest.getServletTitle()
    • $R{resourceDescription} - Returns value from RestRequest.getServletDescription()
    • $R{trimmedRequestURI} - Returns value from RestRequest.getTrimmedRequestURI()
    • $E{var} - Environment variables.
  • Added methods RestServlet.getDescription(RestRequest) and RestServlet.getLabel(RestRequest).

  • BasicRestServlet and RestServletJenaDefault now provide default HTML titles and descriptions:

    @Property(name=HTMLDOC_title, value="$R{resourceTitle}"),
    @Property(name=HTMLDOC_description, value="$R{resourceDescription}")
  • Options pages on BasicRestServlet and RestServletJenaDefault now provide default descriptions and back links:

    @Property(name=HTMLDOC_navlinks, value="{back:'$R{servletURI}"),
    @Property(name=HTMLDOC_description, value="Resource options")
  • New BasicRestServletGroup class.

  • Removed RestServletProperties.REST_trimTrailingUriSlashes and RestServletProperties.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/upload showing how to use ServletFileUpload with 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_cssImports property.

  • Significant changes to RDF support.

    • New @Rdf and @RdfSchema annotations. 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 SerializerContext.SERIALIZER_sortCollections and SerializerContext.SERIALIZER_sortMaps properties.

  • 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:

    1. SerializerContext.SERIALIZER_relativeUriBase
    2. SerializerContext.SERIALIZER_absolutePathUriBase

    These replace the SERIALIZER_uriAuthority and SERIALIZER_uriContext properties.

  • Improvements in CsvSerializer.

Server​

  • New properties in RestServletProperties:

    1. REST_defaultCharset
    2. REST_servletURI
    3. REST_relativeServletURI
  • Improvements involving path calculations when servlets deployed outside of a war file with a context root.

Client​

  • New methods in RestCall:
    1. RestRequest.getHeader(String,Class)
    2. RestRequest.getHeader(String,Object,Class)
    3. RestRequest.getHeader(String,Type,Type...)
    4. RestRequest.getQueryParameter(String,Class)
    5. RestRequest.getQueryParameter(String,Object,Class)
    6. RestRequest.getQueryParameter(String,Type,Type...)
    7. RestRequest.getQueryParameter(String,Object,Type,Type...)
    8. RestRequest.getQueryParameters(String,Class)
    9. RestRequest.getQueryParameters(String,Type,Type...)
    10. RestRequest.getFormDataParameter(String,Class)
    11. RestRequest.getFormDataParameter(String,Object,Class)
    12. RestRequest.getFormDataParameters(String,Class)
    13. RestRequest.getFormDataParameter(String,Type,Type...)
    14. RestRequest.getFormDataParameters(String,Type,Type...)
    15. RestRequest.getPathParameter(String,Class)
    16. RestRequest.getPathParameter(String,Type,Type...)
    17. RestRequest.getBody(Class)
    18. 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 PojoIntrospector class.

  • 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 BasicRestServlet and RestServletJenaDefault.

  • RestServletProperties.REST_allowMethodParam has been enhanced to allow you to explicitly specify which HTTP methods can be used in the &method parameter.

  • 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 Link are now serialized using UrlEncodingSerializer, so arbitrary POJOs can now be passed as arguments.

  • New date filters: org.apache.juneau.swaps.Datefilter.ISO8601DTZP and org.apache.juneau.swaps.Datefilter.SimpleP.

  • New HtmlDocSerializerContext.HTMLDOC_nowrap setting 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 or Collection.

  • Improved implementation of UrlEncodingSerializer.serializeUrlPart(Object) method.

Server​

  • RestConverter API fixed to handle the existence of POJO filters. Introspectable/ Queryable/ Traversable classes 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 RestServletNls class.

  • 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. Replaces RestClientListener class.

  • 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_whitespaceAware property for controlling whether whitespace is ignored.
    • New UrlEncodingContext.URLENC_expandedParams property 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_escapeSolidus property for controlling whether slash characters should be escaped.

  • New TeeOutputStream and TeeWriter classes.

  • 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.

    • &Content must now be specified as &content.
    • &Method must now be specified as &method.
    • &debug must now be specified as &debug=true.
    • &plainText must now be specified as &plainText=true.
    • &notrace must 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-Type through this method was inconsistent with the behavior in WAS/Tomcat.

  • &noTrace=true now prevents any errors from being logged in log file.

  • Workaround for Jetty issue where ServletContext.getContextPath() always ends with "null".

  • RestServletProperties.REST_allowMethodParam is now true by default on all subclasses of BasicRestServlet and RestServletJenaDefault.

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.

  • RestCallException now includes HttpResponse object 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.ear and samples.war projects have been replaced with an OSGi bundle with activated servlets in juno.samples.

Release 5.1.0.10​

Date: Dec 23, 2014

Juno 5.1.0.10 is a moderate update.

Core​

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 the UrlEncodingSerializer class from being able to parse the content. Updated code no longer inadvertantly calls this method.

  • New RestRequest.getQueryParameter(String), RestRequest.hasQueryParameter(String), and RestRequest.hasAnyQueryParameters(String[]) methods that only look for parameters in the URL query string to prevent loading and parsing of URL-Encoded form posts.

  • New @QParam and @HasQParam annotations for accessing query parameters from the URL query string.

  • &plainText parameter can now specify a false value.

  • Removed properties parameters from RestServlet.onPreCall(RestRequest) and RestServlet.onPostCall(RestRequest,RestResponse) methods since the properties are already accessible through RestRequest.getProperties().

  • Added UonSerializer and UonParser to serializer and parser lists on BasicRestServlet and RestServletJenaDefault.

Client​

  • Moved to Apache HttpClient 4.3 to match Jazz 6.0.

  • Renamed RestResponseEntity to RestRequestEntity.

  • 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 CodeFormatterResource for quickly formatting Java and XML code samples in Javadocs.

  • New UrlEncodedFormResource for 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.Link class moved to Link.
    • References to org.apache.juneau.rest.RestException in Encoder class changed to IOException.
  • Changed configuration names for consistency with Jazz Framework.

  • RestClient.execute(HttpUriRequest) method that allows subclasses to handle their own HTTP request execution.

  • Changes in JazzRestClient to handle introduction of SSO support in v6.

  • &plainText debug 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 estimatedSize parameter 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 BeanPropertyStore class that handles creation of BeanContext objects. This allows BeanContext objects 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.
  • Modifications to the client APIs 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 DefaultRestClient class since it's now fully redundant with RestClient.
    • Added RestClient.shutdown() method for cleaning up the internal HTTP client when you're done using a REST client.

Release 5.1.0.07​

Date: Oct 5, 2014

Juno 5.1.0.7 is a moderate update.

  • Improved error handling.

  • New ParserContext.PARSER_debug and SerializerContext.SERIALIZER_debug settings for logging additional information for debugging problems.

  • New SERIALIZER_ignoreRecursions setting for explicitly ignoring recursions when serializing models. Previously, the SERIALIZER_detectRecursions setting did this but now it simply looks for recursions and throws exceptions when they occur.

  • Improved handling of StackOverflowErrors. When SERIALIZER_detectRecursions is 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() and ParserContext.getProperties().

  • Removed media-type and encoding attributes from SerializerContext and ParserContext since 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 BeanContext class.

  • Fixed bug in Traversable that was causing it to be executed even if the servlet extra path info was empty.

  • Fixed bug in Traversable where 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, the beanContext parameter was replaced with a PojoSwap.getBeanContext() method on the class.

  • New simplified way of defining POJO filters without needing to extend PojoSwap. See SurrogateSwap for details.

  • New @Html annotation. Will allow the definition of standard XHTML DTOs in future releases. For now, Img is 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 TumblrParserResource in 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 Redirect class that simplifies performing redirections in REST methods.

  • New pluggable ResponseHandler class 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-Encoding and Character-Encoding headers 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 the Redirect class.

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() and ParserContext.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 HtmlDocSerializerContext properties to be set via Serializer.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_PROPERTIES and BeanContext.INCLUDE_BEAN_METHOD_PROPERTIES properties, since ignoring fields and methods can be accomplished by setting the appropriate properties above to Visibility.NONE.

    Also, the @BeanProperty annotation can now be used on non-public fields/getters/setters to override the default behavior defined by the VISIBILITY properties identified above. This is a convenient way of identifying protected or private fields or methods as bean properties. Previously, you could only identify public fields/getters/setters using this annotation.

  • New BeanContext.BEAN_useJavaBeanIntrospector property that lets Juno use the Java bean Introspector class to determine bean properties. In the previous release, the method for determining bean properties was a mixture of Juno-based and Introspector-based. Now it's either pure Juno-based or pure Introspector-based. The result is considerably cleaner code and consistent behavior.

  • 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) and BeanFilter.writeProperty(Object,String,Object) methods added to BeanFilter class 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 to RestGuard.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) to RestServlet.createRequestVarResolver(RestRequest).

Release 5.1.0.02​

Date: Apr 27, 2014

Juno 5.1.0.2 is a minor update.

  • Fixed issue preventing &Accept-Language from being used as a GET parameter.

  • Minor XSS vulnerability fix.

  • Empty results on HTML pages now shows no results instead of a blank page.

  • Fixed issues preventing REST pages from rendering HTML in newer versions of Internet Explorer.

  • Changed RestServletProperties.REST_allowMethodParam to 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 @Remainder annotation to @PathRemainder.

  • Fixed bug involving incorrect calculation of pathInfo on 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 HttpClient that performs serialization and parsing using Juno parsers but leaves all the details of the HTTP connection to the Apache code. See the client package for details.

  • New org.apache.juneau.rest.client.jazz package and org.apache.juneau.rest.client.jazz.JazzRestClient class for performing REST operations against Jazz servers. Includes improved support for FORM authentication, and better SSL certificate validation.

  • Completely redesigned URL-Encoding support. See urlencoding package for details.

  • Changes to Parser API.

    • Removal of ExtendedReaderParser abstract class and moved methods into ReaderParser class.
    • Removal of DataFormat class from API since it was no longer necessary due to API change above.
    • Removal of ParserStringReader class. This was a reader optimized to work with String input. However, it could interfere with garbage collection of the original string object. Instead, the existing ParserReader was enhanced to work well with String input, and tests show no significant performance differences.
    • New org.apache.juneau.parser.Parser.parse(Object,int,ClassMeta) convenience method added.

Other changes​

  • Various new methods added to StringUtils and ClassUtils.

  • Improved support on BeanContext.getClassMetaFromString(String). Now supports resolving "long[]", and so forth.

  • ResourceDescription name 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 to Strings using BeanContext.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) and RestRequest.getCollectionParameter(String,Class,Class) methods.

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[]).
  • name parameter of ResourceDescription.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 StringUtils and ClassUtils.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 RestServlet where occasional false positive duplicate method with same name and path errors 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.type annotation 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 RestServlet that 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 RestServletNls to use ResourceDescription/MethodDescription instead of RestResource/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.
  • New settings in BeanContext. These can be applied to all serializers/parsers.

    • BEAN_ignoreInvocationExceptionsOnGetters
    • BEAN_ignoreInvocationExceptionsOnSetters
    • BEAN_notBeanPackages_add
    • BEAN_notBeanPackages_remove
  • Eliminated addNotBeanClassPatterns(String...) methods throughout API since these are now controlled by BEAN_notBeanPackages_add / BEAN_notBeanPackages_remove properties.

  • New settings in RestServletProperties.

    • RestServletProperties.REST_trimTrailingUriSlashes Also removed RestRequest.getRequestURI(boolean trimTrailingSlashes) method which is now redundant with this property.
    • RestServletProperties.REST_pathInfoBlankForNull Also removed RestRequest.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 maxDepth setting 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-Headers to RestServlet. 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_REFRESH setting that added a Refresh meta tag to HTML documents, since this can now be controlled through X-Response-Headers.

  • Small improvements to samples.

    • PhotosResource now 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 jsonschema for 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 Enums through overriding toString() and fromString() on the enum class. Previously used Enum.valueOf() to convert strings back into Enums. Used for JSON-Schema support to allow JsonType enum to be serialized to lowercase per the specification (e.g. "string" instead of "STRING").

  • Cognos DTOs 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 Object when 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 Accept GET parameters with '+' (e.g. &Accept=text/json+simple) wasn't working anymore. The Accept parameter 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.

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 XMLGregorianCalendarSwap to 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 to subTypes property.

  • 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 BeanFilter class to mirror the @Bean annotation.
    • Introduced support for bean Bean.subTypeProperty() subtypes.
    • Replaced @Bean(filter=xxx) with new @Transform annotation.
  • 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.ISO8601DTP
    • org.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 OutOfMemoryError and 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.

  • BasicRestServlet now includes PlainTextSerializer and PlainTextParser for plain-text support.

  • Child resources now render on default OPTIONS pages through new method ResourceOptions.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 @RestChild annotation on getter methods and replaced it with @RestResource(children) defined on the resource class itself. Child resource paths are specified through @RestResource(path).

  • New ChildResourceDescriptions bean 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 SqlQueryResource class in the sample war for demonstrating the ResultSetList DTO.

Server API updates​

  • Fixed issue with media type for CSS files being reported as text/plain instead of text/css.

  • Moved initialization of class properties to before the call to Servlet.init() so that getProperties() can be called during servlet initialization.

  • New @Property.type annotation 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 AtomFeedResource class added to sample war.
  • New XmlFormat.CONTENT enum value. Allows bean properties to be persisted as XML element text.

  • New XmlContentHandler class and @Xml.contentHandler annotation. 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.valAttr annotation 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​

Release 5.0.0.23​

Date: Apr 14, 2013

Juno 5.0.0.23 is a minor update.

  • Simplified Cognos support.

  • 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 the HTMLDOC_title and HTMLDOC_description properties to localized values pulled from a resource bundle. See the AddressBookResource class for an example.

REST Servlet API changes​

  • Fix a bug where the &Content query 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_navlinks annotation for adding links to HTML page views.

  • Renamed the properties in HtmlDocSerializerContext for 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_uriAuthority and SerializerContext.SERIALIZER_uriContext properties were previously available.

    • RestServletProperties.REST_servletPath
    • RestServletProperties.REST_pathInfo
    • RestServletProperties.REST_method
  • Path variables annotated with @Attr are 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 RdfSerializer for 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 RdfParser for parsing RDF/XML, RDF/XML-ABBREV, N3, Turtle, and N-Triple back into POJOs.

  • XmlSerializerContext.XML_autoDetectNamespaces default changed to true. The old default value would cause XML with unmapped namespaces if you didn't manually specify them via the XmlSerializerContext.XML_namespaces annotation. While setting the default to true is 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 @RestResource annotation. Serializers, parsers, filters, properties , guards, and converters definitions are automatically inherited from parent classes and interfaces.

  • Enhancements to @RestMethod annotation:

    • New RestMethod.filters() annotation for defining POJO filters at the method level.
    • New RestMethod.serializersInherit() and RestMethod.parsersInherit() annotations for controlling how serializers and parsers (and associated filters and properties) are inherited from the class. This replaces the previous addSerializers and addParsers annotations.
  • New RestServletJenaDefault servlet that includes serialization/parsing support for all Jena-based serializers and parsers.

  • New DefaultJenaProvider JAX-RS provider that includes serialization/parsing support for all Jena-based serializers and parsers.

  • Eliminated RestServletChild class. 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_NULLS setting changed to SerializerContext.SERIALIZER_trimNullProperties. New property default is true. 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 JsoParser class.

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() and IInputStreamParser.parse().

Release 5.0.0.16​

Date: Mar 25, 2013

Juno 5.0.0.16 is a minor update.

  • New @Properties REST 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 jaxrs for information.

  • New @Produces annotation in place of ISerializer.getMediaTypes() for specifying what media types a serializer produces. Available when subclassing from Serializer.

  • New @Consumes annotation in place of IParser.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.serializer package.

    • 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 SerializerGroup class with full support for RFC2616 Accept-Content headers.
    • Improved cloning support on serializers and serializer groups.
  • New org.apache.juneau.parser package.

    • 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.swap package.

    • Cleaner class structure.
    • Improved BeanFilter class for defining property filters on beans.
    • Improved PojoQuery class for defining filters on objects (previously called ObjectFilter).
  • New org.apache.juneau.encoders package.

    • 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 EncoderGroup class for managing multiple encoders and finding them based on RFC2616 Accept-Encoding header values.
  • New org.apache.juneau.plaintext package.

  • New org.apache.juneau.jso package.

    • New JsoSerializer class for serializing application/x-java-serialized-object content.
  • New org.apache.juneau.soap package.

  • Improved cloning support on the BeanContext class.

    • Better caching. Improved caching performance.
  • JsonMap and JsonList changed to ObjectMap and ObjectList to better reflect that they're not limited to just JSON support.

  • Renamed PojoSwap to PojoQuery to not confuse it with the new Filter API.

REST server API changes​

  • Eliminated org.apache.juneau.rest.serializers and org.apache.juneau.rest.parsers packages.
    • 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").
  • New SerializerContext.SERIALIZER_uriContext and SerializerContext.SERIALIZER_uriAuthority serializer properties for specifying values for relative URIs.

  • New @URI annotation that allows you to specify classes and bean properties as URLs that aren't java.net.URI or java.net.URL.

  • New HtmlSerializer.HTML_uriAnchorText HTML serializer property for tailoring how anchor text is rendered.

  • Renamed BeanProperty#uri annotation to BeanProperty#beanUri to make it clear that this property represents the URI of the bean itself instead of an arbitrary property containing a URI.

  • Removed BeanProperty#id annotation.

REST server API changes​

  • Improvements to RestServlet to automatically handle relative URIs in POJOs.

    • SerializerContext.SERIALIZER_uriContext property set by default to web app context root.
    • SerializerContext.SERIALIZER_uriAuthority property set by default to the request scheme+hostname+port.
  • Fixed bug involving Accept-Charset header in Chrome that prevented HTML output from rendering correctly in that browser. Accept-Charset handling 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 @BeanProperty annotation. Methods with zero parameters are interpreted as getters, and methods with one parameter are interpreted as setters. Eliminated the BeanProperty.method annotation, 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 PlainTextRestSerializer class for serializing "plain/text" requests. Useful for debugging purposes.

  • Readers and InputStreams can now be passed in as @Content parameters 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 ?debug parameter. 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 UrlEncodingRestSerializer and UrlEncodingRestParser classes. Allows parsing form posts directly to POJOs.

  • Support for Accept and Content-Type "application/x-www-form-urlencoded" added by default on BasicRestServlet.

  • 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 RestServletProperties class that defines all the class-level properties that can be set on the servlet.

  • Properties can be set through @RestResource.properties annotation, or new RestServlet.setProperty(String,Object) method.

  • New "?noTrace" URL parameter to prevent stack traces from being logged (for JUnit testing of error conditions).

  • New RestServletProperties.REST_useStackTraceHashes property to prevent the same stack trace from being logged multiple times.

  • New RestServletProperties.REST_renderResponseStackTraces property for preventing stack traces in responses for security reasons.

  • New overridable RestServlet.onError(HttpServletRequest,HttpServletResponse,RestException,boolean) and RestServlet.onSuccess(RestRequest,RestResponse,long) methods for plugging in your own logging and peformance monitoring.

  • Eliminated RestServlet.getInitParams() method, since it's now redundant with RestServlet.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​

  • INI config file support:

    • 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 convert ObjectMaps directly to beans.

REST server API changes​

  • Build-in default OPTIONS pages.

  • New @RestResource.defaultRequestHeaders and @RestResource.defaultResponseHeaders annotations.

  • New @RestMethod(serializers) and @RestMethod(parsers) annotations.

  • New @RestMethod(properties) annotation.

  • New @RestMethod(defaultRequestHeaders) annotation.

  • New @RestMethod(matchers) annotation and RestMatcher class.

  • Readers and InputStreams can be specified on @Content annotated parameters.

  • New @HasParam annotation.

  • Full RFC2616 support for matching Accept headers 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.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:

  • 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.filter and @BeanProperty.filter annotations. Used for defining filters on bean classes and bean properties instead of just globally through BeanContext.addTransforms(Class[]).
    • New PropertyNamer API / @Bean.propertyNamer annotation. Used for customizing bean property names.
    • New @BeanProperty.beanUri and @BeanProperty.id annotations. 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 construct rdf:resource attributes.
    • New BeanProperty.properties() annotation. Used for limiting properties on child elements.
  • 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 PojoQuery support.

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 a String.
    • @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 @RestChild annotation for identifying child resources.

  • New traversable and filterable attributes added to @RestMethod annotation. Eliminates the need for PojoResource and FilteredRestResource classes.

  • 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 resourceUri attributed added to @Bean annotation to associate beans with resource URIs.

    • Used for automatically creating hyperlinks in HtmlSerializer.
    • Used for automatically creating uri attributes in XmlSerializer.
    • Used for automatically creating rdf:about attributes in RdfXmlSerializer.

Release 5.0.0.04​

Date: Oct 7, 2012

Juno 5.0.0.4 is a minor update.

  • New @RestMethod annotation on RestServlet methods. Allows the usage of URL pattern matching and automatic conversion of URL variables to arguments passed to method handlers. See RestServlet for more information.

  • Enhancements to BeanContext.convertToType(Object,Class) to be able to convert Strings to classes with fromString(String)/valueOf(String) static methods or T(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 @BeanConstructor annotation has been added.

  • Merged separate settings classes back into their base classes (simplifies the API).

  • SerializerGroups and ParserGroups now 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 Enum keys, and parsing Enum strings. This was previously possible using filters but now it's built-in for all the parsers.

  • Replaced the ObjectList.toXArray() methods with a new elements(Class<T> type) method that's more efficient and avoids creating an unnecessary array.

  • Support for parsing into beans with read-only properties. New @BeanConstructor annotation 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 Cast and BeanFilter APIs which were considerably more complicated and puts them under a common API.
  • Elimination of _class attributes 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 BeanMap API. The number of reflection calls have been significantly reduced in the BeanMap API 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 PojoIntrospector class.
  • 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.g Accept-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 OPTIONS pages for resources.
  • Automatic support for SOAP XML output on "text/soap+xml" requests against RestServlet.
  • 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.