Daily Archives: April 8, 2013

Reusing Parts of Sakai’s LTI Java Implementation

I have been recently talking to several folks about LTI implementations in Java environments and whether there is reusable code in the Sakai course tree.

The answer is ‘yes’ – and I have structured the Sakai source tree to make this as easy as possible by isolating the generic code form the Sakai code. The “generic” code in the Sakai course tree is based on the IMS code and is copyright IMS (and others) under the Apache License. The Sakai-specific code is copyright by the Sakai (Apereo) Foundation under the ECL 2.0 license. The Sakai-specific code is useful as an example but not particularly useful as direct reuse.

The reusable (non-Sakai) code is here:

https://source.sakaiproject.org/svn/basiclti/trunk/basiclti-util/

The Sakai code that makes use of these utilities is scattered throughout, but here are the high points:

Code that calls all the Sakai APIS and fills up the data structures and exercises the above utility code.
https://source.sakaiproject.org/svn/basiclti/trunk/basiclti-common/src/java/org/sakaiproject/basiclti/util/SakaiBLTIUtil.java

The servlet that contains the web services to handle this incoming web services – this of course is Sakai specific, but the outline is useful and it makes good use of the utility code above:
https://source.sakaiproject.org/svn/basiclti/trunk/basiclti-blis/src/java/org/sakaiproject/blti/ServiceServlet.java

A php test harness that pretends to be a simple tool to launch and does some very simple exercising of the XML web service APIs:
https://source.sakaiproject.org/svn/basiclti/trunk/basiclti-docs/resources/docs/sakai-api-test