Joomla Java API

Joomla JavaSource Code: https://github.com/castronu/joomlajavaapi

The open source project Joomla Javi API was created to manage Joomla based web site from a Java application. I started it like an hack project (mapping the Joomla MySql DB with Hibernate and playing with some DAOs to create articles), but then I decided to share the code to everybody.

With Joomla Java Api it is possible manage a Joomla CMS web site from a Java application.

Joomla Java API Basic Architecture

Maybe a better name for this project should be Joomla DB API, cause all the job is done manipulating an existent Joomla Mysql DB.

Categories, Menu, and Content tables are modeled with Hibernate and 3 DAO are used to change the state of the DB.

When a change is done, the method finalizeJob should be call. The behavior is similar to the “rebuild” button in the category and menu pages of the administrator panel of Joomla: cause Joomla use a nasted set model, The consistency of the database should not be violated.

References:

Usage

  • With Maven

    Build the project:

    All tests should pass.

    Maven Dependency:

    After building the project, add in your pom.xml:

  • Without Maven

    Download the jar from the downloads section of this project and add it to your classpath.

Usage:

In your classpath you need a file named joomlajavaapi.properties containing the configuration of the Joomla DB:

Then simply use static method of the class JoomlaJavaApiStandalone.

JoomlaJavaApi use Spring 3.1. To integrate it in an existing Spring application: