=========== Changes log =========== - 2.0 Milestone 7 (2010-01-29) - API changes - Added more specific Validator#validatePresence and validateFormat methods. - Added Protocol#SIP and SIPS constants. - Added Response#abort() and Request#abort() methods. - Added Response#commit() and Request#commit(Response) methods to support provisional responses and asynchronous replies. - Added Response#autoCommitting and committed boolean properties for asynchronous processing of responses. - Added Status#isGlobalError() methods for 6xx range (SIP protocol). - Removed "onContinue" property on Message introduced in 2.0 M6 until real use cases are identified. - Added Protocol#technicalName property to indicate the actual name used on the wire, such as "HTTP" for Protocol#HTTPS. - Added Request#maxForwards property mapping to the HTTP header "Max-Forwards". - Renamed Context#verifier and enroler to defaultVerifier and defaultEnroler. - Added lifecycle support to Realm and Component#realms. - Refactored Component with an extensible "services" property and added a new ServiceList class for factorization purpose. - Moved Response#onReceived to Request#onResponse. - Added protocol helpers that registers protocols's methods. - Added MediaType.APPLICATION_XMI_XML constant and "xmi" extension into MetadataService. - Client preferences were not taken into account with annotated methods returning beans with multiple variants available. - Added new Server(Protocol) constructor. - Renamed Application#findRole(String) into getRole(String). - Renamed Component#findRealm(String) into getRealm(String). - Renamed Extractor#extract*() into extractFrom*(). - Component#main() now expects a full URI reference instead of a local file path for more flexibility (CLAP and HTTP URIs). - Removed the Simple, Jetty, Netty extensions from the Java EE edition of Restlet. - Renamed ServletAdapter#target property into "next". - Enhancements - Added a new Jackson extension, with transparent conversion between JSON representations and objects. Suggested by Tal Liron. - Adjusted scoring in DefaultConverter for Form objects and in XstreamConverter for objects with unspecified target media type. - ServerResource now rejects unconvertible parameters with a 415 status. - ServerResource now supports empty POST and PUT requests. - Added converter of FreeMarker Template objects in the FreeMarker extension. - Added converter of Velocity Template objects in the Velocity extension. - Added converter of Graph objects in the RDF extension. - Added converter of Syndfeed objects in the ROME extension. - Added converter for the JiBX extension. - Added converter for Message objects to representations in the JavaMail extension. - Added converter for WebRowSet, JdbcResult, ResultSet objects to representations in the JDBC extension. - Added support of the Data Services extension in Android. - Added Restlet object serialization for the GWT edition, leveraging GWT's deferred binding mechanism and GWT-RPC serialization format. - Added a context's attribute to requests coming from the Servlet extension: "org.restlet.ext.servlet.offsetPath". Proposed by Carsten Lohmann. - Added support for additional marshalling properties to the JAXB extension. - Added support of Chrome browser when tunneling with user agent. Suggested by Jonathan Hall. - Added support connection timeout for Apache HTTP client. Contributed by Sanjay Acharya. - Replaced the default HTTP connectors (StreamClientHelper and StreamServerHelper) with a new implementation supporting persistent connections, provisional responses (1xx status), asynchronous request and response handling (via the Response#commit(), Request#onReceived() and Message#on*() callback methods). Significant feed-back from NetDev and especially John Logdson. - Improved routing log by also displaying the next Restlet of the selected route in addition to the URI template. Suggested by John Logdson. - Implemented Request#toString() and Response#toString() to display something similar to HTTP request and status lines. Suggested by John Logdson. - In the default access logs, the identifier of the user attempting to authenticate is now logged. Suggested by John Logdson. - VirtualHost#serverPort is now matched against the request's protocol default port if the ServerInfo#port value is unspecified (-1). - Dynamic client proxies created from ClientResource#wrap(Class) or create(Class) or getChild(Class) or getParent(Class) methods now automatically implement the ClientProxy interface and can therefore retrieve the underlying ClientResource instance if needed. Based on feed-back from John Logdson. - Added support of requests pipelining. - Added Service#context property. - Added Component(String) constructor for XML configuration. - Completed XML configuration XSD scheme to match more of Restlet API. - Added LogService#logPropertiesRef to easily read log properties from a URI at start time. - Added setDefaultAttachment() method to SpringHost and SpringRouter. - Updated component configuration parsing logic. - Bugs fixed - Fixed issue in DomRepresentation with createTransformer() method. Fix contributed by Remi Dewitte. - Validator#validate() method was protected instead of public. Reported by Ben R. Vesco. - Fixed issue in Validator causing an error when a non required attribute is not found. Reported by Laurent Rustuel. - Fixed NPE when parsing "Date" header in the GWT edition. - Fixed issue with automatic setting of 204 when no entity was available and the status was 200. The logic has been moved from the HTTP server connectors to the ServerResource. Reported by Bruno Harbulot. - Relaxed tunneling of user agent string. Reported by Erick Fleming and Fabian Mandelbaum. - Fixed potential infinite loop when getting the Engine instance. - Fixed RepresentationContext#getCharacterEncoding method in the fileupload which did not return the character set. Reported by Carsten Lohmann. - Fixed potential NPE in engine's LogFilter class. Reported by Jeff Ramsdale. - Fixed potential BufferOverflowException in NbChannelOutputStream. Reported by David Fogel and Iestyn Evans. - Fixed internal client connector which didn't refresh entity properties from headers values. Reported by Taylor Cowan. - Allowed to set the DATE header. - Fixed support of chunked response in the Netty connector. Reported by Laurent Rustuel. - Removed ServletLogger adapter for the GAE edition due to the fact that the Logger class cannot be inherited. Reported by Cedric Hurst. - Misc - Updated Simple framework library to version 4.1.17. - Deprecated Message#getEntityAs* methods. - Updated GWT library to version 2.0. - Updated WADL extension according to new WADL specification. - Improved thread safety of MapVerifier. Reported by Tim Peierls. - Updated Apache HTTP Client to version 4.0.1. - 2.0 Milestone 6 (2009-11-20) - API changes - Renamed ChallengeScheme#HTTP_MS_SHAREDKEY into HTTP_AZURE_SHAREDKEY and HTTP_MS_SHAREDKEY_LITE into HTTP_AZURE_SHAREDKEY_LITE. - DataServices.Session#getMetadata() now returns on Object to prevent link to internal class. - Upgraded the "org.restlet.ext.httpclient" extension to leverage Apache HTTP Client 4.0. WARNING: some parameters were renamed due to API changes. - Refactored for simplification the security API introduced in previous Restlet 2.0 milestones. - The Organization class was removed and its "rootGroups" and "users" properties were moved to MemoryRealm. - The Permission class was removed as it isn't necessarily the best way to enforce fine grained authorization. - The RealmService class was removed and the "realms" property moved to Component. - The ClientInfo#subject property was replaced by "user : User", "roles : List" and "principals" to remove the JAAS dependency. - A new JAAS extension was added, where the JaasVerifier, DefaultCallbackHandler, UserPrincipal and RolePrincipal classes where moved. - Verifier now uses ClientInfo as parameter instead of Subject. - Added a "name" property to Realm and a findRealm(name) to Component. - Added JaasUtils class with a createSubject(ClientInfo) static method. Suggested by Rickard Oberg. - Enroler and Verifier are now interfaces. Suggested by Rickard Oberg. - Added new Digest#ALGORITHM_HTTP_DIGEST constant for A1 field as specified in RFC 2617. - Renamed HttpDigestAuthenticator into a more generic DigestAuthenticator. - Made the HTTP DIGEST work again on the server-side, via DigestAuthenticator. Issue reported by Carsten Lohmann. - Refactored engine's AuthenticatorHelper to facilitate the support of alternative server-side schemes such as S3. - Renamed RestletSolrQueryRequest to SolrRestletQueryRequest. - Renamed RestletSolrParams to SolrRestletParams. - Renamed Application#getRole() into findRole(). - Added "next" property to Server and deprecated "target" for more naming consistency with filters. - Added conveniency constructors to Server. - ResourceException is now a RuntimeException to facilitate its usage with dynamic proxies created by ClientResource#create() static methods and wrap() methods. - UniformResource#doCatch() now logs throwable with different levels depending on the type of errors. - Added additional methods like post(Object, MediaType) that return a Representation to ClientResource. - The Router class now has those default values: - "defaultMatchingMode" : MODE_EQUALS instead of STARTS_WITH - "defaultMatchQuery" : false - "routingMode" : FIRST instead of BEST Note that for easier configuration, the router detects the attachment of Directory instances and automatically uses a MODE_START_WITH mode in this case. - Added "org.restlet.ext.crypto" extension including many digest related features such as Amazon S3 and Azure client HTTP authentication. This removes the dependency from the Restlet core to javax.crypto. - Improved the Resolver class to expose call attributes as objects instead of string for easier integration with template engines such as FreeMarker. - Moved the OAuth extension to the incubator as it needs to go through a complete redesign with proper documentation. - Renamed routing mode constants of Router to follow the MODE_*_MATCH pattern such as MODE_BEST_MATCH instead of BEST. Deprecated older values. Suggested by Arjohn Kampman. - Added asynchronous support in the Restlet API for all editions. New "onContinue" and "onSent" callback properties added to the Message class. New "onReceived" callback property added to the Response class. Exposed those properties in the ClientResource and ServerResource classes. Added asynchronous methods to the Client class like the GWT edition already had. - Refactored the GWT edition to be more inline with the other editions. Especially, we ported the ClientResource class. - Added ClientInfo#from property corresponding to the "From" HTTP header. - Added Response#age and #retryAfter properties corresponding to the "Age" and "Retry-After" HTTP headers. - Added Message#date property corresponding to the "Date" HTTP header. Suggested by Carlos Alexandre Moscoso. - Added org.restlet.data.Warning class and Message#warnings property corresponding to the "Warning" HTTP header. - Added HTTP warning status codes to the Status class. - Added org.restlet.data.CacheDirective class and Message#cacheDirectives property corresponding to the "Cache-Control" HTTP header. - Added support of CacheControl header. - Properly exposed HTTP Digest properties in the ChallengeRequest and ChallengeResponse classes. Added a parent ChallengeMessage class. - Added org.restlet.data.AuthenticationInfo class to support preemptive HTTP DIGEST authentication. Initially contributed by Kelly McLaughlin. - Added support of the If-Range header. - Translated the packages of the gwt edition from org.restlet.* to org.restlet.gwt.*. - Bugs fixed - Fixed bug when the deprecated method "createRoot" is implemented instead of the "createInboundRoot". Reported by Fabian Mandelbaum. - ServerResource#getVariants() now returns an empty list instead of null when no annotation is present. Reported by Tal Liron. - Annotated methods returning a String, a StringRepresentation or a Reader were only exposing a "text/plain" variant even though most other media types are acceptable like JSON, XML. - Fixed bug in ServerResource when content negotiation was disabled, all non standard methods where invoking the OPTIONS method. - Fixed ClientResource to throw ResourceException upon error as specified in Javadocs. Reported by Patrick Logan. - ClientResource was not checking the "followRedirects" property. - Fixed bug when sending entities with the GWT edition. - Fixed bug when normalizing References with the GWT edition. Reported by Guido Schmidt. - Fixed OSGi dependency issue with the JAX-RS extension. Reported by Stefan Maassen. - The rootRef attribute of a request was not set when handled by the Component's internal router. Reported by Emily Toop. - Fixed bug with conditional methods in ServerResource when no variant is available. - ServerServlet life cycle is now correctly propagated to the embedded Restlet component and applications. Reported by Rickard Oberg. - Fixed issue with OSGi bootstrap that failed to register the converters. Reported by Adam Harrison. - Fixed NPE in ChallengeCallbackHandler when challenge response is null. Reported by Georges-Etienne Legendre. - Fixed NPE in the dataservices extension due to bad parsing of referential constraints. - Fixed potential exceptions raised when an XML document is parsed using the default characterset instead of the parsed document's one. - Fixed bug that prevents the SimpleWeb server connector to retrieve the values of identical headers in the request. Reported by Arjohn Kampman. - Fixed update of entities in the dataservices extension, due to the generation of a wrong entity. Reported by Simon Guest. - Fixed issues with SSL test cases. Contributed by Bruno Harbulot. - Fixed bug with the setIdent method of class DomRepresentation. - Fixed manifest files varying by editions. Reported by Thierry Templier. - Fixed bug in OSGi activator causing default converters not to be registered. Reported by Bryan Hunt. - Fixed SpringBeanRouter and SpringBeanFinder to ensure that the context is available in the target resources. Reported by Dustin Jenkins. - Fixed ClassCastException in the Series#getValuesArray(String, boolean) method. Reported by Arjohn Kampman. - Updated SpringFinder Javadocs to mention the need to use create() as a lookup-method instead of createResource(). Reported by Kevin Pauli. - Enhancements - Improved JAXB converter. Contributed by Sanjay Acharya. - Added library jcip-annotations 1.0. - ServerSevlet now automatically supports the declaration of several adapters in the same web.xml. Reworked the Javadocs to encourage usage of Servlet init parameters instead of context parameters. - Refactored connector extensions to move implementation classes in "internal" packages hidden from the Javadocs. - The default status page and directory listings are now using a sans-serif font. - Add support for annotations values separated by a ":" and "|" characters. Suggested by Bob Resendes. - Added Netty extension containing an HTTP server connector based on this NIO client/server framework developed at JBoss. Contributed by Gabriel Ciuloaica. - Added support for result set paging in JDBC client connector. Contributed by Warren Janssens. - Restlet#name property now uses toString() as a default value and Filter uses this property in its log traces. - Improved Context#getLogger() to cover cases where the class's canonical name is empty like for anonymous classes. - The FreeMarker TemplateFilter is now more flexible with a createDataModel(Request, Response) method that can be overridden and a "dataModel" property with getter and setter. - Life cycle events are now propagated in all the Restlet routing system (filters, routers, virtual hosts, etc.). Suggested by David Fogel - Added a LoggerFacade class and a related property on the Engine to allow the replacement of the default JULI logging mechanism. - Added an SLF4J extension with a LoggerFacade for the Restlet Engine providing an optimal bridge to SLF4J. - Added HTTP/HTTPS proxy configuration support to the Apache HTTP Client 4.0 extension. Contributed by Bruno Harbulot. - Added the Net client extension to the Android edition (without the FTP connector though). - Response with a 200 (success, ok) status and no content now log a fine trace instead of a warning and automatically change the status to 204 (success, no content). - Added support of the Warning header. - Added support of the ranges in the GWT edition. - Added support of the Authentication-Info header. - Added support of "inline" disposition type in the Content-Disposition header. This is based on the value of the "downloadable" attribute of the Representation class. Proposed by Paul Austin. - Added support of automatic redirections by instances of ClientResource for unsafe methods. - Misc - Added Velocity template in the org.restlet.example project. Reported by Ben Vesco. - Updated Apache Commons Logging to version 1.1.1. - Updated Simple framework library to version 4.1.15. - Updated GWT to version 1.7.1. - Updated Jetty to version 7.0.0. - 2.0 Milestone 5 (2009-09-28) - API changes - Moved Message, Request and Response classes from the org.restlet.data to the org.restlet package as they are core artifacts of the API used in Uniform interface. - Deprecated Redirector.MODE_DISPATCHER to introduce support for MODE_CLIENT_DISPATCHER and MODE_SERVER_DISPATCHER. - ServerResource#getPreferredVariant() is now protected. - Moved Template and Variable classes from "org.restlet.util" to "org.restlet.routing" package. - Moved Restlet#handle(Request) method to Client class. - Added "inboundRoot" and "outboundRoot" properties to Application and deprecated the "root" property and the createRoot() method. The outbound root, is the hook for client-side routing and points by default to the context's client dispatcher, but can be changed by the user to do custom routing/filtering. New createInboundRoot() and createOutboundRoot() methods can be overriden. - The ServerResource#getVariants() method now returns a modifiable list of variants instead of a map. - Refactored the ServerResource class so that annotated methods are invoked through the regular get(), get(Variant), post(), post(Variant) methods instead of using a separate call path. - ServerResource now has protected getConverterService() and getMetadataService() methods. - Bugs fixed - Added Simple extension to the JEE edition. Reported by Dustin Jenkins. - Fixed bug detected in the CharacterSet class when running in the MacOS context. Reported by John Logsdon. - Removed the TaskService from the GAE edition as we are not allowed to create threads. Reported by Olivier Bruchez. - Fixed POM dependencies groupId. Reported by Remi Dewitte. - Fixed potential bug with RangeInputStream causing 100% CPU utilization with java NIO. Reported and contributed by Tal Liron. - Router#attachDefault() method now relies on the protected createRoute() method. Reported by Rob Heittman. - Fixed potential synchronization issues. - Fixed concurrency issue with annotated methods that could result in wrong methods invoked. Reported by John Logsdon. Isolation of issue by Filip Hanik from the Tomcat team. - Improved robustness of internal HTTPS client with trust stores. Suggested by Bruno Harbulot. - Fixed bug that would prevent the GWT callback from being called if some exception occured. - Fixed integration issue with Tomcat due to the GC releasing Restlet representations, indirectly closing the underlying Tomcat buffer which could have been reused for another request, causing unexpected socket reading issues. Initially reported by Denys Hryvastov. - Fixed issues preventing SpringFinder and SpringBeanFinder from working correctly with ServerResource subclasses. Reported by Evgeny Shepelyuk with contributions to the solution by Rhett Sutphin. - Fixed bug in CopyOnWriteArrayList emulation class causing the Client helper to not being created in compiled mode. Reported by Guido Schmidt. - Added NPE check in ServerResource in getAvailableVariants(). Reported by Bob Resendes. - Added NPE check in MapVerifier.getSecret(). Reported by Carsten Lohmann. - Added test to prevent class cast exception in Variant#equals. Reported by Patrick Logan. - Fixed GAE compilation issue in ByteUtils.getStream() method. Contribution by Marcelo Ochoa. - Fixed issue with redirections in first resource example. Reported by Philippe Mougin. - Fixed issues with response.getEntity().getText() in the GWT edition. Reported by Guido Schmidt. - Enhancements - Added support of the "xml:base" attibute when parsing Atom Publishing documents. - Updated Grizzly to version 1.9.18b. - Updated FileUpload to version 1.2.1. - Updated JavaMail to version 1.4.2. - Updated JAXB RI to version 2.1.12. - Updated JSON library to version from 2009/08/16. - Updated Lucene to version 2.4.1. - Updated Tika to version 0.4. - Updated OAuth library to version from 2009/06/17. - Updated Velocity to version 1.6.2. - Updated JiBX to version 1.2.1. - Updated db4o to version 7.10.96. - Updated Jetty to version 7.0 RC6. Upgraded the Jetty extension: replaced "headerBufferSize" parameter by "requestHeaderSize" and "responseHeaderSize" parameters. Removed "lowThreads" parameter no longer available. - Updated the Javadocs of the API to indicate the mapping between properties/classes and HTTP headers. - Updated the "Server" HTTP header returned by default to "Restlet-Framework/xxx" - The thread pool of Jetty servers can now be configured with Spring. Reported by Evgeny Shepelyuk. - Added support for the "xsl" extension in MetadataService. Fixed potential NPE. Contributed by Fabian Mandelbaum. - Added JAXB converter helper. Contributed by Sanjay Acharya. - The ConverterService now passes a preferred variant to the selected converter helper when no one is provided by the client. Reported by John Logsdon. - Added extension "dataservices" which is a client extension of the ADO.NET Data Services technology provided by Microsoft. - 2.0 Milestone 4 (2009-08-06) - Bugs fixed - Improved support for the RFC 3339 date format which was limited due to SimpleDateFormat. Added InternetDateFormat. Based on a contribution from Frank Hellwig. - Fixed bug in date format generated by Atom feeds. - The internal HTTP server now shuts down gracefully. - Added a "gracefulShutdown" parameter on the Jetty connector. Suggested by Arjohn Kampman. - Registration of HTTP and JavaMail clients was missing in the GAE edition. Reported by MyloC. - XStreamRepresentation didn't register JettisonMappedXmlDriver correctly. Necessary for proper deserialization. Reported by Gabriel Ciuloaica. - Fixed and completed SecretDigestVerifier class. Reported by Thomas Cozien. - Returned error status when a client sends a request although no client connector supporting this request's protocol is registered. Reported by Avi Flax. - Fixed bug in Template class when the pattern is updated. - Fixed regression with Directory causing a 405 status to be returned for conditional GETs. Reported by Serge Ilyn. - Fixed issue with parsing of AWS authentication HTTP headers. Reported by Stuart MacKay. - Fixed infinite loop when instantiating a Form with a query in the GWT extension. Reported by Olivier Monaco. - Fixed issue with annotated method returning a representation and whose metadata where ignored (always returning the "octet/stream" media type for example). Reported by Fabian Mandelbaum, David Fogel. - Added implementation of the "exhaust" method in DigesterRepresentation class. - Added default DomRepresentation constructor. - Form now accepts extra "&" characters in query strings. Reported by Andrew Moore. - Fixed encoding and decoding of LocalReference#normalizePath() and localizePath() methods. Contributed by Bruno Harbulot. - Fixed potential NPE in ServerResource and AnnotationUtils. Reported by Schley Andrew Kutz. - Fixed OSGi imports for org.restlet.ext.xml. Reported by Nicolas Janicaud. - Fixed potential NPE in ComponentHelper#checkVirtualHost. Reported by Matt J. Watson. - Fixed bug in XstreamRepresentation failing to use the DOM XML driver. Reported by Florian Georg. - Fixed bug in converter helper selection algorithms. Reported by John Logsdon. - Fixed bug causing subsequent requests to annotated ServerResource subclasses to be forbidden. Reported by John Logsdon. - Fixed issue with Macintosh character set. Java returns it as MACROMAN, while IANA only accepts MAC or MACINTOSH. Added translation logic to CharacterSet class. Reported by Bruce Cooper. - Fixed bug in ClientResource#options() method not issuing an OPTIONS HTTP request. Reported by Bob Resendes. - Fixed issues in Xstream converter with primitive types. - HTTP response where returning duplicate media type parameters. Reported by Evgeny Shepelyuk. - Added Status#isRecoverableError() method. - Added "retryOnError", "retryDelay" and "retryAttempts" properties on ClientResource to try to recover from some communication errors. - ServerResource now rejects unknown entities with a 415 status. Suggested by Sylvain Pajaud. - Fixed bug with annotated methods returning a representation. Metadata were always overridden. Reported by Joe Nellis. - The "Location" header must contain an absolute URI. Reported by Simon Reinhardt. - Enhancements - Upgraded Jetty library to version 6.1.18. - SpringServerServlet nows gets its component fully configured, with a default WAR client and parameters copied. Reported by Dustin N. Jenkins. - Added Variable.URI_QUERY_PARAM type to match query parameter names or values. Suggested by John Wismar. - ServerServlet nows copies the ServletContext into a special "org.restlet.ext.servlet.ServletContext" attribute of both the Component's context and the Application's context. - Added logging capabilities to the Router classes via a new protected log(Route) method. - Directory listings now correctly display a trailing slash for directories. Suggested by Aron Roberts. - Load only once the accept.properties file used by the TunnelFilter instance. - Load only once the agent.properties file used to populate ClientInfo instances. - SpringFinder and SpringBeanFinder now support the creation of resources based on ServerResource. - SpringRouter and SpringBeanRouter now support the creation of resources based on ServerResource. - Refactored content negotiation to take into account all dimensions (language, media type, character set and encoding). - Improved metadata handling for local entities (files, zip, clap, etc.). - Added Variant#includes() method. - Significantly improved converter service implementation. Now converter helpers support affinity scoring. - HTTPS connectors now reuses the keystore password as the key password if no specific one is defined. Supports keystore default behavior. - Added FTP client connector based on JDK's URLConnection in our existing "org.restlet.ext.net" extension. This connector supports login/password setting via ChallengeResponse and the new ChallengeScheme.FTP_PLAIN. This connector is only capable to handling GET methods. - Added RdfClientResource that can easily navigate the Web of data. Can follow linked resources and linked literals. - Added support of inline content for link tags. - Added getStatus(Throwable, UniformResource) method to StatusService. Suggested by John Logdson. - Added doCatch(Throwable) method to UniformResource. Suggested by Schley Andrew Kutz. - Added CharacterSet#WINDOWS_1252, MACINTOSH and many ISO_8859_* constants. - Added new extensions to MetadataService: - "ascii" for CharacterSet#US_ASCII) - "latin1" for CharacterSet#ISO_8858_1 - "mac" for CharacterSet#MACINTOSH - "utf8" for CharacterSet#UTF_8 - "utf16" for CharacterSet#UTF_16 - "win" for CharacterSet#WINDOWS_1252 - Added converter selection traces. Suggested by John Logdson. - Communication error from HTTP clients are now logged at the FINE level instead of WARNING. - The JAX-RS extension now works on Google App Engine. Fixes contributed by Martin Krasser. - Added doHandle(Restlet next, Request, Response) method on the Router class that can be overriden to do some processing that is common to any route selected. Suggested by John Logdson. - Fixed behaviour of ServerResource. When non existing a 404 status should be returned for safe method. Reported by Robert Hyerle. - The internal HTTP server now looks up system properties for SSL configuration as a fall-back. - The engine now catches all exceptions and even throwables (suggested by Marcelo Paternostro) that occur when trying to register helpers. - UniformResource#doCatch now logs at INFO level all exceptions and errors caught. - The JAX-RS extension now leverages the new ConverterService. For example you can now leverage the converter of the XStream extension for better serialization to JSON than the existing JSON provider based on the more limited JSON.org library. Reported by Juergen Zimmermann. - Added extension based on ROME library to support several versions of syndication feed formats RSS and Atom. Contributed by Tal Liron. - Fully automated the port of Restlet to each edition (GAE, GWT, Android, JSE and JEE). Using a custom Restlet Forge mechanism. Conditional compilation mechanism suggested by Philippe Mougin. - Breaking changes - The default language, defined in MetadataService is now based on the JVM's default locale, instead of English/US. - API changes - Added client and server RIAP connectors. Suggested by John Logsdon and Nirav Shah. - Added ClientInfo#getPreferredLanguage(), getPreferredMediaType(), etc. methods. Suggested by Jonathan Hall. - Uniform has been trimmed to a single handle(Request, Response) method and converted to an interface. The other methods have been moved to the Client class. The handle(Request) method has been moved to the Restlet class. - Context#clientDispatcher and serverDispatcher properties are now instances of Client instead of Uniform. - Removed the UniformGuard and ChallengeGuard classes. We now recommend to directly use Authenticator and Authorizer. - Added simpler TemplateRoute, Extractor and Validator filters as an alternative to the single Route class. - Deprecated Route in favor of parent and lighter TemplateRoute class. In Restlet 2.1, we will reintroduce Route as an abstract parent of TemplateRoute. - Renamed SecretDigestVerifier into DigestVerifier. - Restricted the role of Metadata class to metadata about representations for conneg. - Added protected authenticated() and unauthenticated() methods on Authenticator. - Added protected authorized() and unauthorized() methods on Authorizer. - Added Authorizer#AUTHENTICATED constant to authorize only authenticated requests. - Deprecated Request#setChallengeRequest(). Use getChallengeRequests() instead. - Added Metadata#getParent() method. - Added Metadata#isCompatible() method. - Added Metadata#includes() method. - Added better Variant#toString() implementation. - Added MetadataService#defaultCharacterSet property. - Added Conneg class in the engine to support content negotiation in a more maintenable way, and to support all dimensions (character sets, encodings, languages and media types). Suggested by Alexander Horn, Maxence Bernard and David Fogel. - Implemented Variant#equals() method and improved the implementation of isCompatible() method. - Moved static methods of LinkReference to Link. Removed the LinkReference class. - Added ClientResource#getParent() to return the parent resource based on the URI hierarchy. - Added org.restlet.util.Couple and Triple generic classes to store two or three related objects. Inspired by Tim Peierls's Relation interface idea. - Made Application#getService(Class) public. Suggested by Remi Dewitte. - Marked Restlet class as abstract. - Moved "name", "description", "owner" and "author" properties from Application to Restlet. - Misc - Exceptions thrown in the internal HTTP client are not logged with a FINE level instead of a WARNING level. - Upgraded Simple to version 4.1.13 which now supports programmatic shutdown. Contributed by Niall Gallagher. - Updated GWT to version 1.7.0. - 2.0 Milestone 3 (2009-05-27) - Breaking changes - Deprecated ServletConverter and added an equivalent ServletAdapter class to prevent confusion with the ConverterService reintroduced in Restlet 1.2. - Moved all XML, DOM, SAX and XSLT related classes from the core Restlet API to a new "org.restlet.ext.xml" package. This was need to keep a uniform API with the new Android port. - Bugs fixed - Fixed bug with a ServerResource when an annotated method does not return a value. - Fixed dependency issue in the org.restlet.example.pom. Reported by Marcelo Ochoa. - ServerServlet ignores client connectors that are now available. - Fixed issue with annotation inheritance. Contributed by Tal Liron. - Fixed bug causing Engine to be instantiated several time. Reported by David Fogel. - Fixed potential issue in Engine classloading logic which used Class.class instead of Engine.class to get the class's classloader. Reported by David Fogel. - Fixed conversion issues with edge cases. - MediaType#isCompatible() now requires the other mediatype to be non null. - Fixed issues with conditional method in ServerResource. Reported by Tal Liron and David Fogel. - Fixed issues with ServerResource used in OSGi environments. Reported by David Fogel and fixed by Tim Peierls. - Fixed NPE with SpringFinder. Reported by Eric Hough. - Fixed potential NPE. Contribution from Remi Dewitte. - Fixed issue with the Authenticator class. Reported by Remi Dewitte. - SpringServerServlet now don't directly instantiate a ServletContextAdapter. Reported by Mikhail Spirydonau. - Fixed Maven build issue with resource files. Contributed by Remi Dewitte. - Fixed potential bug when a serverResource handle several representations with methods that return String objects. - Fixed potential bug with WriterRepresentation when character set is not defined. - Fixed bug in Finder with ServerResource causing some NPE in some cases. Reported by Michael Berman. - Fixed some Maven artifact IDs (Atom, XML and FileUpload extensions). Reported by Jean-Yves Cronier and Remi Dewitte. - Fixed potential NPE in XmlRepresentation with namespaces. - Fixed Atom extension for better AtomPub 1.0 compliance. Reported by Thom Nelson. - Fixed MediaType for proper parsing of parameters. Reported by David Bordoley. - Enhancements - Servlet's UserPrincipal is now transferred into Restlet's ClientInfo#subject property. Suggested by Paul Davis. - Updated Media type RDF N3 from "text/rdf+n3" to "text/n3". Suggested by Simon Reinhardt. - Added support of the parsing and writing of RDF documents expressed in N-Triples notation. - Added support of the parsing and writing of RDF documents expressed in Turtle notation. - Added an initial port of Restlet to the new Google App Engine. Suggested by Didier Girard. - Added a ContextTemplateLoader to FreeMarker extension to load template based on the client dispatcher and a base URI. - Added new extension based on XStream library to automatically convert Java objects to/from XML and JSON. - Added converter helper to the "org.restlet.ext.json" extension. Useful for the ConverterService. - Added ObjectRepresentation classes to both the Restlet/GWT edition and to the server-side GWT extension. This class can (de-)serialize POJOs using the JSON-based encoding used by GWT-RPC. - Added content-length header (with 0 value), in case the entity is not available when posting or putting since MS Azure requires this header for any request. Reported by Ronny Kwon. - Improved implementation of converter plugins (default/internal, Atom extension and GWT server-side extension). - Added MediaType#APPLICATION_JAVA_OBJECT_XML constant. - Added support for automatic conversion between serializable JavaBeans and Representations using either binary Java Object Serialization or JavaBeans XML encoding. - Added conversion support for forms. - Interfaces implemented by server resource classes are now introspected for annotations. - Added ClientResource#create(...) and wrap() methods to create dynamic proxies implementing a given interface. - Added Series#getValuesArray() with a flag to ignore case. Suggested by Arjohn Kampman. - Added a port of Restlet core to Android 1.5 (mobile OS) and to Google AppEngine 1.2. - The Net HTTP client connector now supports SSLContextFactories Contributed by Bruno Harbulot. - Added check for JAXP parsers not supporting XInclude feature. Reported by Mikis. - Optimized MetadataService#addCommonExtensions() to prevent multiple array copies. Reported by David Fogel. - XmlRepresentation#getNamespaces() is now protected. Suggested by Remi Dewitte. - Refactored the class loading code in the engine. Suggested by David Fogel. - Tag#weak internal field is now final. Suggested by Arjohn Kampman - Added provider for JAX-RS based on the new ConverterService. This allow pluggable support for converters such as JSON or XStream. - API changes - RepresentationInfo is now concrete and has more constructors. Suggested by Lars Heuer. - UniformResource#init() now throws ResourceException and catches it to update the response. Suggested by Lars Heuer. - Renamed UniformResource#init() into doInit(). - Renamed UniformResource#destroy() into release(). - Added an UniformResource#doRelease() method. - ClientResource now overrides finalize() to call the release() method. - Connector#isAvailable() method added to test the presence of the underlying connector helper. - Removed Context#setRealm() to prevent potential threading issues. Reported by Tim Peierls. - Added new constructors to Representation based on the parent RepresentationInfo class. Suggested by Remi Dewitte. - Added FileRepresentation#autoDelete property. Contributed by Remi Dewitte. - Added intercepter methods to ServerServlet needed for the XDB extension. Contributed by Marcelo Ochoa. - Added a "form" extension mapping in MetadataService for the media type "application/www-form-urlencoded". Suggested by Tal Liron. - The class EmptyRepresentation is now public and the static method Representation#createEmpty() has been deprecated. - Moved several implementation classes of the Servlet extension into an "org.restlet.ext.servlet.internal" package to hide them from the public Javadocs as they should rarely be used directly by end users. - Renamed ServerResource#exists property to "existing". Suggested by Lars Heuer. - Filter#setNext() now accepts ServerResource subclasses. Suggested by Lars Heuer. - Added Method#safe and idempotent properties. - Added ClientResource#followRedirects property and the related implementation code. - Deprecated the abstract DigestRepresentation class, replaced by Digester. Added a getDigester method on the Representation class. - Deprecated Representation#checkDigest and Representation#computeDigest methods. - XML component configuration now supports new ServerResource subclasses. - Deprecated the Resource and Guard classes. - Added toObject() and toRepresentation() methods on ClientResource. - Refactored the services API. Added a "services" property on Application to allow users to register new ones. Also, add a createInboundFilter() and createOutboundFilter() methods to automatically register them when starting the application. - Added MetadataService#getAllMediaTypes(), getLanguage() and getMediaType() and similar methods. Reported by David Fogel and suggested by Remi Dewitte and Tim Peierls. - Added AppendableRepresentation for dynamic generation of StringRepresentation instances. - Miscellaneous - Component XML configuration has been moved into an Engine ComponentXmlParser class. - Added unit test case for the Alphanum algorithm. Contributed by Davide Angelocola. - ServerResource now rethrows exceptions from annotated methods. Reported by Tal Liron. - Removed the Script extension and Scripturian libraries that will now be managed outside the Restlet project by Tal Liron. - Updated GWT library to version 1.6.4. - Updated OAuth library to latest version. Suggested by Sean Sullivan. - 1.2 Milestone 2 (2009-04-01) - Breaking changes - Finder#createTarget() methods are now all protected. The findTarget() method is now public. Suggested by Leigh Klotz. - All core representation classes have been moved from the "org.restlet.resource" package into a new "org.restlet.representation" package. Make sure to adjust your import instructions. - The ConnectorService#afterSend() and beforeSend() are now always called, even if no entity is written. They are now related to the sending of the message itself. Suggested by Paul Davis. - The Router.createFinder() method is now public. - The Callback abstract class in the GWT module is now an interface. This should have no impact in most cases. Just remove any associated @Override annotations. Suggested by Scooter Willis. - Bugs fixed - Fixed typo in the declaration of the o.r.e.Engine#DESCRIPTOR_AUTHENTICATOR. Reported by Remi Dewitte. - Removed all string instantiations of secrets. Contributed by Remi Dewitte. - Fixed various OSGi issues. Reported by David Fogel. - Fixed missing entries in ChallengeScheme#valueOf. Reported by Sean Sullivan. - Fixed JAXB pom issue. Reported by Fabio Mancinelli. - Added workaround to make sure that the JAX-RS extension is registered as an implementation of the JAX-RS API. Suggested by David Fogel. - Fixed encoding issue with percent characters at the end of URI references with the required two digits following. Now the percentage sign is encoded and a fine trace is logged. Reported by Nels Nelson. - Enhancements - Added a getItemIterator() on RestletFileUpload to facilitate access to parts in streaming mode. Suggested by Paul Austin. - The default SAX handler has been implemented to log validation information. Contributed by Raif S. Naffah. - DirectoryResource class in engine now has a protected getDirectoryContent() method. Suggested by Gordon Mohr. - Implemented Text#toString() in the Atom extension. - Completed list of registered media types. Suggested by Remi Dewitte. - JAX-RS extension now leverages the new security API. Contributed by Bruno Dumon. - Added setters for helpers in Engine. Suggested by Kevin Conaway. - Added the ability to tunnel methods via a specific header. Contributed by Fabrice Boileau. - Added conversion methods to engine's ByteUtils between byte arrays and character arrays. Contributed by Remi Dewitte. - Added protected DirectoryResource#getRepresentation() and getClientDispatcher() method to facilitate extension and support of special cases. Original issue reported by Dave Fogel. - Added a client connector supporting ZIP and JAR URIs that are based on local archive files. Contributed by Remi Dewitte. - Enhanced JsonRepresentation based on Tal Liron's contributions. Now supports indentation configuration and more manipulation and conversion methods. - Added RDF extension that aims to support the parsing and writing of RDF representations. - Added support of parsing and writing of RDF/XML and RDF/N3 representations. - API changes - Added Role class and "roles" property to Application. - Fully refactored the security package introduce in 1.2 M1 based on community feed-back. - Added Realm, MemoryRealm classes and "realms" property to Component. - Added "verifier" and "enroler" properties to Context. - Reverted represent*() auto-matching support for further discussions. Suggested by Tim Peierls. - Added constructors with feed URI in the Feed class of the Atom extension. - Added "indent" property to DomRepresentation. Suggested by Cliff Binstock. - Added support of Shared Key and Shared Key Lite authentication schemes developed by Microsoft. Suggested by Steve Sfartz. - WadlApplication now invokes the findTarget() method on Finder instances instead of the createTarget() one. Suggested by Leigh Klotz. - Added Delete, Get, Options, Post and Put annotations to the org.restlet.resource package. Based on community feed-back and suggestions by Tim Peierls. - Added org.restlet.resource.UniformResource and ClientResource classes as part of our new Resource API. - Added createClientInfo() method on Variant. - Added a Message#getEntityAsText() method caching the text content to allow several reads along a chain of filters. - Added a Server#setTarget() method taking a Resource class as a parameter. This is useful for minimalistic examples. - TunnelService now accepts query parameter values such as "application/xml" and now just registered extension names such as "xml". Suggested by Paul Austin. - Renamed LinkSet to Graph and added support for N3 formulae. Graph can be source or target in Link instances. - Removed Link.identifier and Graph.identifier properties. - Series#getFirstValue() now returns the default value if the parameter exists but has a null value. Suggested by Jonathan Hall. - Added Context#setClientDispatcher() and Context#setServerDispatcher() methods. - Added support for proxy authentication in the Restlet API. Added "proxyChallengeResponse" property to Request, added "proxyChallengeRequests" to Response. Added support in the HTTP parsing and formatting layers. - Added a WadlApplication#createFinder() method to facilitate customization of behavior with Spring. Suggested by Rhett Sutphin. - Added Protocol#ZIP constant. - Representation#finalize() method now has a default implementation that calls the release() method. Suggested by Remi Dewitte. - Updated accept.properties file, removing Firefox customization as version 3.0 has proper 'Accept' header. - Added a JaxbRepresentation#setValidationEventHandler method. - Added Variant#isCompatible() method. - Added an org.restlet.representation.RepresentationInfo class that contains the "lastModified" and "tags" properties from Representation which is now a subclass. Variant is the super class. Useful to check conditions without pulling a full representation. Suggested by Lars Heuer. - Added Method.ALL constant. Useful to declare variants common to all methods in the new ServerResource class. - Added new org.restlet.routing package and moved Filter, Router, Redirector and subclasses to it. - Moved Directory, Finder and Handler to org.restlet.resource package. - Renamed org.restlet.security.Guard to UniformGuard in order to move org.restlet.Guard to this security package. - Misc - Upgraded Simple server to version 4.1.9. Contributed by Niall Gallagher. - Fixed Javadocs typos in Router and Resource. Contributed by Raif S. Naffah. - Fixed issue with parent contexts in ServerServlets. Contributed by Marcelo Ochoa. - Updated OAuth library to latest version. Suggested by Sean Sullivan. - Added HttpRequest#getHeaders() and HttpResponse#getHeaders() methods. Added HttpRequest#addHeader() and HttpResponse#addHeader() static methods. Suggested by Kevin Conaway. - Updated licensing information to mention addition of the EPL 1.0 licensing option (Eclipse Public License 1.0). - Added Maven support to build Restlet modules. Suggested by many. Contributions by Jean-Yves Cronier. - 1.2 Milestone 1 (2009-01-23) - Breaking changes - The engine has been moved from "com.noelios.restlet" to the "org.restlet.engine" package, simplifying the packaging. - All engine extensions have been moved to "org.restlet.ext" packages. - The com.noelios.restlet.ext.spring extension has been merged with org.restlet.ext.spring. - Moved org.restlet.util.DateUtils, ByteUtils and Engine classes to org.restlet.engine.* packages. - Enhancements - Internal HTTP connector now supports HTTPS connections. Contributed by Kevin Conaway. - Added a Lucene extension including a Solr client connector contributed by Remi Dewitte. Also contains a useful TikaRepresentation to extract metadata from a representation using Lucene Tika parsing and analysis library. Suggested by Ben Johnson. - The Atom Service class now supports getting documents from other protocols than HTTP. - Updated org.restlet.Component to support validating parsing. Contributed by Raif S. Naffah. - XmlRepresentation now has "entityResolver", "errorHandler", "schema", "xIncludeAware" and "validating" properties. Contributed by Raif S. Naffah. - API changes - A response with a 200 (Ok) status should have an entity. Now, we make sure that a warning is logged. Reported by Rob Heittman. - Removed all code deprecated in the Restlet 1.1 release. - Added org.restlet.data.Literal to represent RDF literals with an optional datatype. - Added org.restlet.data.Link to represent RDF links (aka triples, statements or relationships). - Moved o.r.u.Helper class, used privately by API classes to the o.r.engine package. - Added MediaType constants APPLICATION_RDF_TRIG, APPLICATION_RDF_TRIX, APPLICATION_RDF_TURTLE, APPLICATION_SPARQL_RESULTS_XML and APPLICATION_SPARQL_RESULTS_JSON for RDF and SPARQL. - Added LinkReference and LinkSet classes to support RDF reference manipulation (blank nodes for example) and RDF graphs or models. - Added CharacterSet#DEFAULT constant, new constructor for Charset instances and a toCharset() method. Suggested by Charles Gay. - Added Reference#toUri(), toUrl() and constructors from java.net.URI and URL instances. Suggested by Cliff Binstock. - Added APPLICATION_ATOM media type constant and deprecated APPLICATION_ATOM_XML. - Added APPLICATION_ATOM_SERVICE_XML media type constant and deprecated APPLICATION_ATOMPUB_SERVICE. - Added APPLICATION_ATOMPUB_CATEGORY media type constant. - Added APPLICATION_KML and APPLICATION_KMZ media type constants. Suggested by Frank Hellwig. - Added APPLICATION_MATHML_XML media type constant and deprecated APPLICATION_MATHML. - Added APPLICATION_RSS_XML media type constant and deprecated APPLICATION_RSS. - Added APPLICATION_W3C_SCHEMA_XML media type constant and deprecated APPLICATION_W3C_SCHEMA. - Added APPLICATION_WADL_XML media type constant and deprecated APPLICATION_WADL. - Added APPLICATION_XHTML_XML media type constant and deprecated APPLICATION_XHTML. - MediaType constructor now normalizes the main and sub parts. If invalid characters are detected, an IllegalArgumentExcept is thrown. Spaces are also trimmed and empty parts are converted to '*'. Contributed by Nicolas Rinaudo. - Method#setUri() has been deprecated as Method instances shouldn't be modifiable. - Language.getSubTags() now returns an unmodifiable list. - MediaType.parameters property is now unmodifiable. Initial issue reported by Nicolas Rinaudo. - Added static Series#unmodifiableSeries() method. - Added DateUtils.format(Date) method which uses HTTP default format. - Added a new "org.restlet.security" package with a full replacement for current Guard mechanism. This is an alpha level package not intended for Restlet users yet. - Made the SpringBeanRouter implement ApplicationContextAware to enable AOP on target resources. Suggested by Daniel Woo. - Resource subclasses can now declared variants and match them more easily using an automatic detection mechanism based on represent*() methods where '*' is a series of extensions. Also added a "detectVariants" property to turn off this behavior if necessary. - Added a getAllMetadata(String extension) method on the MetadataService class. - Deprecated the ClientInfo#addresses property and replaced it by a more explicit "forwardedAddresses" property. Also, added a new getUpstreamAddress() method. Adjusted the Resolver class to add a new "ciua" variable. Change suggested by John D. Mitchell. Initial patch provided by Remi Dewitte. - Added ClientInfo#subject property returning a JAAS Subject. Can contain several principals and credentials. Deprecated the ChallengeResponse#getPrincipal() method. - Added new Conditions.getStatus() method signature for usage by the JAX-RS extension. Suggested by Stephan Koops. - Misc - JAX-RS extension: - added class ExendedUriBuilder with "file" extensions for content negotiation and an ExtendedUriInfo to get it. - Supports per-request-providers now. - JaxRsApplication will not clear the MetadataService (as before; was required to not use other extensions as given in the JAX-RS ApplicationConfig class). - The Directory class doesn't override the findTarget() method but uses the default Finder mechanism based on the "targetClass" property. Therefore, it is easier to specify a subclass of org.restlet.engine.local.DirectoryResource in order to customize the default behavior. Suggested by Cliff Binstock. - Upgraded db4o to version 7.7.67. - Refactored engine support for the StatusService. Removed ApplicationStatusFilter and ComponentStatusFilter. - Extracted all internal classes of ByteUtils into the new org.restlet.engine.io package for easier reuse and maintenance. - Clarified Javadocs in Reference#getPath() methods. - Fixed potential NPE in Reference#decode() method. - Clarified Javadocs in FileRepresentation and methods Representation#getDownloadName(), setDownloadName() in order to explain that setDownloadable(true) must be called first. Issue reported by Kevin Conaway. - The internal HTTP client doesn't send absolute request URIs anymore. It now sends them as relative URIs according to the HTTP 1.1 specification. Reported by Jonas Maturana Larsen. - Upgraded Apache Commons IO to version 1.4. - The ServerServlet now sets the HTTP headers after the status to prevent issues with Tomcat 5.0 and "Content-Length: 0" headers sending the response immediately. Reported by Eirik Bjorsnos. - The internal HTTP client no longer forces the user agent name if one has already been specified by the user. Contributed by Kevin Conaway.