abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject RouteManager
Date Tue, 29 Jan 2008 16:56:55 GMT
FYI.. within the i18n and server modules, you will find two new classes: 
Route and RouteManager.  A "Route" is loosely based on the Ruby on Rails 
route concept for URI templating, e.g. ":collection/:entry". 
RouteManager is a Target Resolver and Target Builder implementation that 
uses simple routes.

For instance,

   RouteManager rm = new RouteManager()
     .addRoute("feed", ":collection", TargetType.TYPE_COLLECTION)
     .addRoute("entry", ":collection/:entry:", TargetType.TYPE_SERVICE);

A Provider can then use RouteManager as the Target Resolver and Target 

Then mechanism is highly experimental and definitely needs more fleshing 
out but the foundation is there.

Comments/Feedback/Suggestions are requested.

- James

View raw message