5.2.0.0 (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.
org.apache.juneau.config API.
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 {@link oaj.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 ConfigMgr:
ConfigMgr.create(), ConfigMgr.create(Reader), ConfigMgr.create(File)
ConfigMgr.deleteAll()
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.
org.apache.juneau.config.ConfigFileListener
org.apache.juneau.config.SectionListener
org.apache.juneau.config.EntryListener
org.apache.juneau.config.Encoder methods have access to field names to use them as salt values.
org.apache.juneau.config.XorEncoder XOR key can be overridden through the fromString(String)
valueOf(String) (e.g. enums)
parse(String) (e.g. logging Level class)
parseString(String)
forName(String) (e.g. Class and Charset classes)
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.
AtomicInteger
AtomicLong
BigInteger
BigDecimal
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.
StringObject class that can be used for delayed object serialization.
StringVarMultipart
StringVarWithDefault
IOUtils.pipe(Reader,Writer)
PojoRest.get(Class,String,Object)
StringUtils.parseISO8601Date(String)
StringVar.doResolve(String) method.
StringVarResolver.DEFAULT field.
javax.mail.internet.MimeUtility by implementing our own {@link oaj.internal.StringUtils#base64Encode(byte[])} method.
/servletPath/style.css instead of /servletPath/htdocs/juneau.css.
This coincides with enhancements made in the server code for specifying styles.
<div class='outerdata'><div class='data' id='data'>...</div></div>).
Needed for supporting the new devops look-and-feel.
RdfProperties.RDF_looseCollection loose collections.
NoClassDefFoundErrors.
UrlEncodingSerializer.DEFAULT_SIMPLE_EXPANDED serializer.
getMainArg(int) changed to {@link oaj.utils.Args#getArg(int)}.
Non-existent arguments are returned as org.apache.juneau.utils.CharsetUtils class.
org.apache.juneau.utils.ConcurrentIdentityList class.
ReaderParser.
Simplifies the API on the class.
ReaderParser.
Simplifies the API on the class.
SafeResourceMultiBundle moved from server component.
StringVarResolver.
NoClassDefFoundErrors
so that resources that include Jena support can continue to operate even if the Jena libraries are not present.
SSLOpts
org.apache.juneau.rest.client.LaxRedirectStrategy. Use HTTP Client equivalent.
RestCall#addInterceptor(RestCallInterceptor)
RestCall#addResponsePattern(ResponsePattern)
execute().
RestClient.setBasicAuth(String,int,String,String)
RestClient.logTo(Level,Logger)
RestClient.setRootUrl(String)
RestClient.enableSSL(SSLOpts)
RestClient.enableLaxSSL()
RestClient.createHttpClientBuilder()
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)
RestClient.setUserAgent(String userAgent)
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.
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
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.
StreamResource class.
REST Java methods can return instances of these to serialize OutputStreams.
RestRequest.getReaderResource(String) - Replaces getVarResource(String).
RestRequest.getReaderResource(String,boolean)
RestRequest.getReaderResource(String,boolean,String)
Content-Encoding: identity when no encoding is used. Some clients don't interpret it correctly.
RestServlet.getChildClasses() - Programmatic equivalent to {@link oajr.annotation.RestResource#children() @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()
RestServletJenaDefault.
These may represent a security risk if not handled correctly, so removed
them as a precaution.
RestServletProperties.REST_htDocsFolder. Replaced with {@link oajr.annotation.RestResource#staticFiles() @RestResource(staticFiles)}.
RestResource.stylesheet()
RestResource.favicon()
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.
consumes and produces fields instead of accept and contentType which was confusing.
properties from OPTIONS pages.
ResourceLink.ResourceLink(String,RestRequest,String,Object[]) constructor.
StreamableHandler - Allows REST Java methods to return instances of {@link oaj.Streamable}.
WritableHandler - Allows REST Java methods to return instances of {@link oaj.Writable}.
RestUtils.trimPathInfo(StringBuffer,String,String) method.
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:
org.apache.juneau.microservice.RootResource
org.apache.juneau.microservice.SampleResource
StringVarResolver - New documentation.
Overview / Samples - New section.