Roadmap-free Sprint #1

Version 1.2 by Vincent Massol on 2015/04/20

Apr 20 2015

Warning
This blog post is not published yet.

From the 30th of March till the 12th of April the developers who were part of the Product team of the XWiki SAS company were given 2 weeks to work on whatever they wanted (actually it was closer to 1 week counting the fact that they still had to do community support, internal support, BFD, and more). Normally they follow the XWiki SAS proposed roadmap (see slide 12 of this presentation) but we decided to try this 2 week sprint to see what would come out. The developers were: Thomas, Marius, Guillaume D, Edy, Caty, Victor, Gabriela and myself.

Here's what was achieved:

URL Improvements

Vincent worked on improving URL handling in XWiki and especially the ability to register new URL types (he refactored the WebJar module to use this feature and it's now using the new format http://<server>/<context path>/webjars/<path/to/resource>[?version=<version>&evaluate=true|false]).

For example to add support for a new webjars URL type you'd write (see the documentation for more):

@Component
@Named("webjars")
@Singleton
public class WebJarsResourceReferenceHandler extends AbstractResourceReferenceHandler<ResourceType>
{
   /**
     * The WebJars Type.
     */

   public static final ResourceType TYPE = new ResourceType("webjars");

   @Override
   public List<ResourceType> getSupportedResourceReferences()
   {
       return Arrays.asList(TYPE);
   }

   @Override
   public void handle(ResourceReference resourceReference, ResourceReferenceHandlerChain chain)
       throws ResourceReferenceHandlerException
   {
       [...]
   }
}

Note that this support is dynamic so you can package these Resource Handlers in your extension and once installed through the Extension Manager the new URLs will be active!

Get Connected