7.1.0 (Mar 08, 2018)

Version 7.1.0 is a major update with major implementation refactoring across all aspects of the product.

##### juneau-marshall

- Significant improvements made to the internals of the Serializer and Parser classes.
  - Caching improvements on serializers and parsers have reduced execution time of the core JUnits by approximately 1/3.
    The 17000+ JUnit tests now execute in less than 10 seconds and have a cache-reuse hit rate of 98% (164104 serializers/parsers/bean-contexts retrieved, but only 1801 created from scratch).
  - All the various separate `Context` classes (e.g. `JsonSerializerContext`) have been folded into their respective serializer or parser classes (e.g. `JsonSerializer`).
    Additionally, these classes are their own bean contexts.
    For example, the class hierarchy of `JsonSerializer` is now:
    - {@link oaj.Context}
      - {@link oaj.BeanContext}
        - {@link oaj.serializer.Serializer}
          - {@link oaj.serializer.WriterSerializer}
            - {@link oaj.json.JsonSerializer}
    All `Context` objects are thread-safe and read-only.
  - Session objects also now have a consistent class hierarchy.
    For example, the class hierarchy of `JsonSerializerSession` is now:
    - {@link oaj.Session}
      - {@link oaj.BeanSession}
        - {@link oaj.serializer.SerializerSession}
          - {@link oaj.serializer.WriterSerializerSession}
            - {@link oaj.json.JsonSerializerSession}
    Session objects are transient objects that live for the duration of a single parse.
  - Builder objects also now have a consistent class hierarchy.
    For example, the class hierarchy of `JsonSerializerBuilder` is now:
    - {@link oaj.ContextBuilder}
      - {@link oaj.BeanContextBuilder}
        - {@link oaj.serializer.SerializerBuilder}
          - {@link oaj.json.JsonSerializerBuilder}
    Builder objects are used for building up and creating `Context` objects.
  - The {@link oaj.PropertyStore} class has been completely rewritten. It is now a read-only configuration store build using the {@link oaj.PropertyStoreBuilder} class.
    The previous `PropertyStore` class was overly-complicated with many read/write locks to ensure thread-safety.
    The new design shifts to a builder-based model with read-only `PropertyStore` objects that can be used as hash keys.
- Improvements to the HTTP-Part APIs.
  The existing `PartSerializer`/`PartParser` classes have been replaced with the following all located in the new `org.apache.juneau.httppart` package:
  - {@link oaj.httppart}
    - {@link oaj.httppart.HttpPartType}
    - {@link oaj.httppart.HttpPartSerializer}
      - `UonPartSerializer`
      - `SimpleUonPartSerializer`
      - {@link oaj.httppart.SimplePartSerializer}
    - {@link oaj.httppart.HttpPartParser}
      - `UonPartParser`
      - `SimplePartParser`
  Code for marshalling of parts have been removed from the URL-Encoding serializers and parsers.
- `ContextBuilder.property(String,Object)` renamed to {@link oaj.ContextBuilder#set(String,Object)}.
- `ResourceFinder` class has been replaced with the following:
  - {@link oaj.utils.ClasspathResourceFinder}
  - {@link oaj.utils.ClasspathResourceFinderSimple}
  - {@link oaj.utils.ClasspathResourceFinderBasic}
  - {@link oaj.utils.ClasspathResourceFinderRecursive}
  - {@link oaj.utils.ClasspathResourceManager}
- New methods on {@link oaj.serializer.SerializerSession}:
  - {@link oaj.serializer.SerializerSession#getListener() getListener()}
  - {@link oaj.serializer.SerializerSession#getListener(Class) getListener(Class)}
- New methods on {@link oaj.parser.ParserSession}:
  - {@link oaj.parser.ParserSession#getListener() getListener()}
  - {@link oaj.parser.ParserSession#getListener(Class) getListener(Class)}
- New {@link oaj.parser.Parser#PARSER_unbuffered} setting allows you to disable internal buffering on the JSON and UON parsers so that they can be used to read continous streams of objects.
- New {@link oaj.json.JsonParser#JSON_validateEnd} and {@link oaj.uon.UonParser#UON_validateEnd} settings allow you to control whether we validate that there is no garbage at the end of the parsed input.
- New {@link oaj.parser.Parser#PARSER_autoCloseStreams} setting allows input streams and readers passed into parsers to be automatically closed after parsing.
- Syntax changed on unswap method on {@link oaj.transform.Surrogate} classes.
  It's now a regular method instead of a static method.
- {@link oaj.annotation.Swap @Swap} annotation can now be used with {@link oaj.transform.Surrogate} classes.
- New support for {@doc juneau-marshall.Transforms.PojoBuilders POJO Builders}.

##### juneau-svl

- New variables:
  - {@link oaj.svl.vars.CoalesceVar}
  - {@link oaj.svl.vars.PatternMatchVar}
  - {@link oaj.svl.vars.NotEmptyVar}
  - {@link oaj.svl.vars.UpperCaseVar}
  - {@link oaj.svl.vars.LowerCaseVar}
- Variables moved from juneau-microservice:
  - {@link oaj.svl.vars.ArgsVar}
  - {@link oaj.svl.vars.ManifestFileVar}

##### juneau-config

- The Config API has been completely revamped.
  New features include:
  - Support for pluggable storage.
  - File-system watcher integration support.
    Changes made to file system files now automatically reflected in configurations and interface proxies.
  - New builder-based design.

##### juneau-dto

- Enhancements to Swagger DTO:
  - New methods for setting and retrieving properties via name:
    - {@link oaj.dto.swagger.SwaggerElement#get(String,Class)}
    - {@link oaj.dto.swagger.SwaggerElement#set(String,Object)}
  - Support for setting non-standard fields such as "$ref" via getter and setter above.
  - Setter methods that take in beans and collections of beans can now take in JSON strings.

##### juneau-rest-server

- `RestServletDefault` renamed to {@link oajr.BasicRestServlet}.
- `RestServletGroupDefault` renamed to {@link oajr.BasicRestServletGroup}.
- The "$R{...}" variable has been split into the following:
  - "$RA{key1[,key2...]}" - {@link oajr.vars.RequestAttributeVar}, first non-null value returned by `HttpServletRequest.getAttribute(String)`.
  - "$RF{key1[,key2...]}" - {@link oajr.vars.RequestFormDataVar}, first non-null value returned by {@link oajr.RestRequest#getFormData(String)}.
  - "$RH{key1[,key2...]}" - {@link oajr.vars.RequestHeaderVar}, first non-null value returned by {@link oajr.RestRequest#getHeader(String)}.
  - "$RI{key1[,key2...]}" - {@link oajr.vars.RestInfoVar}, first non-null value returned by {@link oajr.RestRequest#getInfoProvider()}.
    The possible values are:
    - "contact" - Value returned by {@link oaj.dto.swagger.Info#getContact()}
    - "description" - Value returned by {@link oajr.RestInfoProvider#getDescription(RestRequest)}
    - "externalDocs" - Value returned by {@link oaj.dto.swagger.Swagger#getExternalDocs()}
    - "license" - Value returned by {@link oaj.dto.swagger.Info#getLicense()}
    - "methodDescription" - Value returned by {@link oajr.RestInfoProvider#getMethodDescription(Method,RestRequest)}
    - "methodSummary" - Value returned by {@link oajr.RestInfoProvider#getMethodSummary(Method,RestRequest)}
    - "siteName" - Value returned by {@link oajr.RestInfoProvider#getSiteName(RestRequest)}
    - "tags" - Value returned by {@link oaj.dto.swagger.Swagger#getTags()}
    - "termsOfService" - Value returned by {@link oaj.dto.swagger.Info#getTermsOfService()}
    - "title" - See {@link oajr.RestInfoProvider#getTitle(RestRequest)}
    - "version" - See {@link oaj.dto.swagger.Info#getVersion()}
  - "$RP{key1[,key2...]}" - {@link oajr.vars.RequestPathVar}, first non-null value returned by {@link oajr.RestRequest#getPath(String)}.
  - "$RQ{key1[,key2...]}" - {@link oajr.vars.RequestQueryVar}, first non-null value returned by {@link oajr.RestRequest#getQuery(String)}
  - "$R{key1[,key2...]}" - {@link oajr.vars.RequestVar}, first non-null other request variable.
    The possible values are:
    - "contextPath" - Value returned by {@link oajr.RestRequest#getContextPath()}
    - "method" - Value returned by {@link oajr.RestRequest#getMethod()}
    - "methodDescription" - Value returned by {@link oajr.RestRequest#getMethodDescription()}
    - "methodSummary" - Value returned by {@link oajr.RestRequest#getMethodSummary()}
    - "pathInfo" - Value returned by {@link oajr.RestRequest#getPathInfo()}
    - "requestParentURI" - Value returned by {@link oaj.UriContext#getRootRelativePathInfoParent()}
    - "requestURI" - Value returned by {@link oajr.RestRequest#getRequestURI()}
    - "resourceDescription" - Value returned by {@link oajr.RestRequest#getResourceDescription()}
    - "resourceTitle" - See {@link oajr.RestRequest#getResourceTitle()}
    - "servletParentURI" - Value returned by {@link oaj.UriContext#getRootRelativeServletPathParent()}
    - "servletPath" - See {@link oajr.RestRequest#getServletPath()}
    - "servletURI" - See {@link oaj.UriContext#getRootRelativeServletPath()}
    - "siteName" - See {@link oajr.RestRequest#getSiteName()}
- Refactored the `RestConfig` class into {@link oajr.RestContextBuilder}.
  Settings on {@link oajr.RestContext} objects can now be set declaratively through the following new properties:
  - {@link oajr.RestContext#REST_allowHeaderParams REST_allowHeaderParams}
  - {@link oajr.RestContext#REST_allowBodyParam REST_allowBodyParam}
  - {@link oajr.RestContext#REST_allowedMethodParams REST_allowedMethodParams}
  - {@link oajr.RestContext#REST_renderResponseStackTraces REST_renderResponseStackTraces}
  - {@link oajr.RestContext#REST_useStackTraceHashes REST_useStackTraceHashes}
  - {@link oajr.RestContext#REST_defaultCharset REST_defaultCharset}
  - {@link oajr.RestContext#REST_maxInput REST_maxInput}
  - {@link oajr.RestContext#REST_paramResolvers REST_paramResolvers}
  - {@link oajr.RestContext#REST_converters REST_converters}
  - {@link oajr.RestContext#REST_guards REST_guards}
  - {@link oajr.RestContext#REST_responseHandlers REST_responseHandlers}
  - {@link oajr.RestContext#REST_defaultRequestHeaders REST_defaultRequestHeaders}
  - {@link oajr.RestContext#REST_defaultResponseHeaders REST_defaultResponseHeaders}
  - {@link oajr.RestContext#REST_produces REST_produces}
  - {@link oajr.RestContext#REST_consumes REST_consumes}
  - {@link oajr.RestContext#REST_clientVersionHeader REST_clientVersionHeader}
  - {@link oajr.RestContext#REST_resourceResolver REST_resourceResolver}
  - {@link oajr.RestContext#REST_logger REST_logger}
  - {@link oajr.RestContext#REST_callHandler REST_callHandler}
  - {@link oajr.RestContext#REST_infoProvider REST_infoProvider}
  - {@link oajr.RestContext#REST_path REST_path}
  - `REST_contextPath`
  - {@link oajr.RestContext#REST_staticFiles REST_staticFiles}
  - {@link oajr.RestContext#REST_staticFileResponseHeaders REST_staticFileResponseHeaders}
  - {@link oajr.RestContext#REST_classpathResourceFinder REST_classpathResourceFinder}
  - {@link oajr.RestContext#REST_useClasspathResourceCaching REST_useClasspathResourceCaching}
  - {@link oajr.RestContext#REST_widgets REST_widgets}
  - {@link oajr.RestContext#REST_mimeTypes REST_mimeTypes}
- Support for static files has been simplified and improved.
  - Syntax on {@link oajr.annotation.RestResource#staticFiles() @RestResource(staticFiles)} has been simplified, and now allows you to specify response headers in the strings.
  - Response headers for static files can also be configured through {@link oajr.RestContext#REST_staticFileResponseHeaders REST_staticFileResponseHeaders}.
  - Static file in-memory caching now configurable through {@link oajr.RestContext#REST_useClasspathResourceCaching REST_useClasspathResourceCaching}.
  - Static file retrieval can be customized through {@link oajr.RestContext#REST_classpathResourceFinder REST_classpathResourceFinder}
- Eliminated the `RestMatcherReflecting` class.
  You can now simply create a {@link oajr.RestMatcher} that has a public constructor that takes in the server and method arguments.
- `@RestResource.allowMethodParam` renamed to {@link oajr.annotation.RestResource#allowedMethodParams}.
- `@RestMethod.serializersInherit` and `@RestMethod.parsersInherit` replaced with simplified `@RestMethod(inherit)`.
- Changes to {@link oajr.RequestFormData}:
  - {@link oajr.RequestFormData#addDefault(Map) addDefault(Map)} takes in a `Map<String,Object>` instead of `Map<String,String>`.
- Changes to {@link oajr.RequestHeaders}:
  - {@link oajr.RequestHeaders#addDefault(Map) addDefault(Map)} takes in a `Map<String,Object>` instead of `Map<String,String>`.
- Changes to {@link oajr.RequestQuery}:
  - {@link oajr.RequestQuery#addDefault(Map) addDefault(Map)} takes in a `Map<String,Object>` instead of `Map<String,String>`.
- Changes to {@link oajr.RestContext}:
  - `getResource(String,Locale)` renamed to {@link oajr.RestContext#getClasspathResource(String,Locale) getClasspathResource(String,Locale)}
  - `getResourceAsString(String,Locale)` renamed to {@link oajr.RestContext#getClasspathResourceAsString(String,Locale) getClasspathResourceAsString(String,Locale)}
  - `getResource(Class,MediaType,String,Locale)` renamed to {@link oajr.RestContext#getClasspathResource(Class,MediaType,String,Locale) getClasspathResourceAsString(Class,MediaType,String,Locale)}
  - New method {@link oajr.RestContext#getClasspathResource(Class,String,Locale) getClasspathResource(Class,String,Locale)}.
  - New method {@link oajr.RestContext#getClasspathResourceAsString(Class,String,Locale) getClasspathResourceAsString(Class,String,Locale)}.
  - New method {@link oajr.RestContext#getClasspathResource(Class,Class,MediaType,String,Locale) getClasspathResource(Class,Class,MediaType,String,Locale)}.
  - {@link oajr.RestContext#getDefaultRequestHeaders() getDefaultRequestHeaders} returns a `Map<String,Object>` instead of `Map<String,String>`.
  - {@link oajr.RestContext#getDefaultResponseHeaders() getDefaultRequestHeaders} returns a `Map<String,Object>` instead of `Map<String,String>`.
- Changes to {@link oajr.RestRequest}:
  - `getSupportedMediaTypes()` replaced with {@link oajr.RestRequest#getConsumes() getConsumes()} and {@link oajr.RestRequest#getProduces() getProduces()}.
  - `getReaderResource(String,boolean,MediaType)` renamed to {@link oajr.RestRequest#getClasspathReaderResource(String,boolean,MediaType) getClasspathReaderResource(String,boolean,MediaType)}
  - `getReaderResource(String,boolean)` renamed to {@link oajr.RestRequest#getClasspathReaderResource(String,boolean) getClasspathReaderResource(String,boolean)}
  - `getReaderResource(String)` renamed to {@link oajr.RestRequest#getClasspathReaderResource(String) getClasspathReaderResource(String)}
- Changes to {@link oajr.annotation.RestResource @RestResource}:
  - New {@link oajr.annotation.RestResource#mimeTypes() mimeTypes()} annotation.
- Changes to {@link oajr.annotation.RestMethod @RestMethod}:
  - New {@link oajr.annotation.RestMethod#consumes() consumes()} and {@link oajr.annotation.RestMethod#produces() produces()} for overriding the supported media types inferred from the serializers and parsers.
- `RestCallHandler` split up into {@link oajr.RestCallHandler} and {@link oajr.BasicRestCallHandler}
- `RestInfoProvider` split up into {@link oajr.RestInfoProvider} and {@link oajr.BasicRestInfoProvider}
- `RestLogger` split up into {@link oajr.RestLogger}, {@link oajr.BasicRestLogger} and {@link oajr.NoOpRestLogger}
- `RestResourceResolverSimple` renamed to {@link oajr.BasicRestResourceResolver}
- Introduced the following classes that helps make the code more understandable:
  - {@link oajr.RestContextProperties}
  - {@link oajr.RestMethodProperties}
  - {@link oajr.RequestProperties}
- Eliminated the `@Messages` and `@Properties` REST java method parameter annotations.
  These aren't needed anymore since you can just pass in `MessageBundle` and `RestRequestProperties` as unannotated parameters.
- Revamped the {@link oajr.RestInfoProvider} class.
- New builder classes:
  - `ReaderResourceBuilder`
  - `StreamResourceBuilder`
- {@link oajr.RestResponse#getNegotiatedOutputStream()} now returns a `FinishableServletOutputStream` and {@link oajr.RestResponse#getNegotiatedWriter()} now returns a `FinishablePrintWriter` that allows you to finish the output without closing the stream.
  The {@link oajr.reshandlers.DefaultHandler} class now calls `finish()` instead of `close()` on the stream.
- Added the following annotations to the {@link oajr.BasicRestServlet} class (which were previously defined on the `Resource` class):

  @RestResource( htmldoc=@HtmlDoc( navlinks={ "up: request:/..", "options: servlet:/?method=OPTIONS" }, stylesheet="$C{REST/stylesheet,servlet:/styles/devops.css}" ), // Optional external configuration file. config="$S{juneau.configFile}" )

##### juneau-rest-client

- New configuration property {@link oajrc.RestClient#RESTCLIENT_query} and builder method {@link oajrc.RestClientBuilder#query(String,Object)}.
- API changes to replace `PartSerializer` with {@link oaj.httppart.HttpPartSerializer}.
  The default value is now `SimpleUonPartSerializer` which will serialize strings as plain-text and collections/arrays as comma-delimited lists.
  We decided to change the default behavior in favor of practicality over purity.
- New methods on {@link oajrc.RestCall} class:
  - {@link oajrc.RestCall#getResponseHeader(String) getResponseHeader(String)}
  - {@link oajrc.RestCall#getResponseCode() getResponseCode()}
- {@link oajrc.RestCall} and {@link oajrc.RestClient} now implement the `Closeable` interface.

##### juneau-microservice

- `Resource` and `ResourceGroup` classes removed.
  {@link oajr.BasicRestServlet} and {@link oajr.BasicRestServletGroup} can be used instead.
- `ResourceJena` and `ResourceJenaGroup` classes renamed to {@link oaj.microservice.BasicRestServletJena} and {@link oaj.microservice.BasicRestServletJenaGroup}.