locomotive.org


Locomotive Example Modules

The Locomotive comes with a set of sample modules, to demonstrate the capabilities of the Locomotive and to provide out of the box usability. Many of these modules require extra tables to be installed in the database, and some require others to be installed before they'll work. For information on how to install database tables, look at the Installation Guide. For more information on each module, you can take a look at their javadocs. Here's a list of the sample modules and what they do:

 

DisplayPageHandler / DisplayPageServlet
This basic module simply displays a template denoted by the url tokens passed to it. It decides which page to display by converting the tokens into a path, where all the tokens but the last are directories that live inside the template root, and the last is a filename plus '.tmpl'. So, for instance, the url tokens disp?docs+modules+display would look for the page 'docs/modules/display.tmpl' in the templates directory. An extensive description of this module can be found in the Developer's Guide.

View this module's Javadocs.

Requirements Nothing else is required for this handler

 

GraffitiWall  
Another basic module that allows users to post a comment to a list of comments. For each request it simply displays the previous posts and provides a form for you to add a post of your own. the Developer's Guide goes into detail about just how this works.

View this module's Javadocs.

Requirements You'll have to install the graffiti wall database tables for this handler to work. You'll find database specific installation files in the LOCOROOT/db/demos directory; the files for each particular database are called loco_graffiti_tags_*.sql, where the * is the database name.

 

PermHandler / PermServlet  
The Locomotive Permissions System is an extensible means of adding access control to various elements of your application. This module initializes the resources the Permissions system requires for operation. It also provides a allows a user to view their permissions. If you want to add permissions to the system, or to particular users, you can use the User Management module described next. The Permissions system is described in the Developer's Guide.

View this module's Javadocs.

Requirements You'll have to install the Permissions Tables to use the Permissions System. The four SQL scripts you'll need to run can be found in the db/perm directory. Currently only ORACLE databases are supported for this handler. There is MySQL support for ACLs and Permissions objects only; enough to use the UserPref module.

 

User Preferences Module  
A module to allow users to create and edit their preferences, and allow administrators to create modify user permissions. You can use this module to create new permissions and assign them to users. It can be modified to handle nearly any kind of user preferences that are required.

View this module's Javadocs.

Requirements The database tables found in LOCOROOT/db/demos/loco_user_prefs.sql must be installed. Also, the permissions system must be installed in order for this to work properly. Only Oracle databases are supported at this time for this handler.

 

BugTracker  
This is a sample Bug Tracking application- it can record and list bugs by project, as well as search by project and status. We are currently using this to track bugs for the The Locomotive Project.

View this module's Javadocs.

Requirements You must install the tables found in the SQL scripts in LOCOROOT/db/demos/loco_btrack.sql. Only Oracle and MySQL database are supported for this module at this time.

 

DiscussionHandler  
This is a three-tier unthreaded online conferencing system. Posts are associated with topics, which in turn are placed under discussions. Users may create new topics as well as posts, and posts may be sorted in a variety of ways. The discussions system comes with an administration system that uses the Permissions System to control access to discussions and topics, and allows administrators to create and delete new discussions, posts, and topics.

View this module's Javadocs.

Requirements To use this, you must install the scripts in LOCOROOT/db/demos/loco_discuss_*.sql. Informix and Oracle databases are supported- install the script for your database.

 

PublisherHandler  
This handler allows users to create and publish web pages to your site. It provides a number of different layout and content options, and uses the Permissions system to help administer the published pages.

View this module's Javadocs.

Requirements You must install the tables found in LOCO ROOT/db/demos/loco_publisher.sql. Currently only an Oracle implementation is provided. To get this to work, you'll need to alter the config/publisher.properties file to provide the correct paths for for the images the publisher requires.