ShortenedUrlService for Sakai

The Sakai 2 Technical Coordination Committee has discussed and voted, and the results are in. The ShortenedUrlService for Sakai is now in trunk and will appear in Sakai 2.8.

What is this, you ask? It’s a URL shortening service for Sakai!

Is this link too long for you?
http://sakai.edu.au/portal/site/~a8ad22cb-837b-44b8-bad1-f92c68d1f204/page/3bd7ba1b-50a6-4f02-bd86-350c3c06bcbe?toolstate-4a350307-2777-4deb-afe8-61fefe8fd440=%3Fwicket%3AbookmarkablePage%3D%3Aorg.sakaiproject.profile2.tool.pages.ViewProfile%26id%3Dbeeb7465-78bd-48ba-9316-60b7c5f3b2e5

How about this instead:
http://sakai.edu.au/x/LxjkTt

Mmm tiny.

But it’s more than just a URL shortening service: As an institution that uses Sakai, you can choose how the URLs are shortened via a setting in sakai.properties. So then when tools give you short URLs, they are the way you want them!

And it comes with both the URL shortening scheme you see above (RandomisedUrlService) and an implementation that uses bit.ly!

It’s also super easy to create a new URL shortening implementation: Just write a class that contains one simple method String shorten(String fullUrl), wire it up via Spring and set the name of your new implementation in sakai.properties.

And there’s more! There is also an entity provider that allows you to shorten URLs by making a GET request, so you can also use the URL shortener via Javascript:

/direct/url/shorten?path=URL

You can read more about the configuration, how to write your own implementation and how to leverage it in your app by checking out Confluence:
http://confluence.sakaiproject.org/display/SHRTURL/Home

Advertisements