SMS Delivery 1: Database design and API
2008-12-09

 

The projects sms_hibernate and sms_smpp must be checked out. ( sms_smpp is required to view the API’s). The projects will be merge into a single Sakai tool project early next year.  This was part of the original planning.

Notes:

  • Remember to set up the Hibernate database connections, see the REAME.txt
  • All projects can be build using: mvn clean install
  • Javadocs can be found in [project]/doc/index.html.
  • The current commits do not contain references to the JIRA logged for the deliverable.  This will be implemented immediately by the development team.

 

Java API

This can be found in the org.sakaiproject.sms.api package in the sms_smpp project, these are:

  • SmsSmpp.java
  • SmsCore.java
  • SmsScheduler.java
  • SmsBilling.java

 

Database Schema

Notes:

  • The database schema can be build by following the README steps in the sms_hibernate project.
  • The Hibernate POJO’s can be found in the org.sakaiproject.sms.hibernate.model package.
  • Corresponding hibernate mappings are in hibernate-mappings.hbm.xml
  • Hibernate version 3.2.5 was used.
  • SMS_CONFIG table will change during Delivery 4.

 

A note about SMS_TASK and SMS_MESSAGE

A task consists of a series of rules and must be executed on the scheduled date-time. For example: Send message x to group y at time z. When the task is executed (real-time or scheduled), the corresponding messages will be inserted into SMS_MESSAGE with status PENDING. As delivery reports come in, the message statuses will be updated.

 

Database Unit Tests

A number of test are available in the org.sakaiproject.sms.hibernate.test package to test the database logic. These are:

  • SmsAccountTest.java
  • SmsConfigTest.java
  • SmsMessageTest.java
  • SmsTaskTest.java
  • SmsTransactionTest
  • SmsDatabaseStressTest.java

 

To execute all of the above: mvn -Dtest=*  test

 

 

Louis Botha, 2008-12-08