Patch to Pebble 2.0-RC2 submitted

I have submitted a patch to Simon Brown (author of Pebble) to make it possible to handle additional filetypes using the core Pebble 2.0 framework. I have done it by modifying the net.sourceforge.pebble.domain.FileMetaData and moving the information about the possible filetypes to an enum (net.sourceforge.pebble.domain.TypeEnum). This enum may be subclassed in my application which is built upon Pebble to provide support for additional filetypes. I have used the enum from Jakarta Commons Lang because Java 5 enums doesn’t support subclassing.

The filetypes usable by the Pebble instance is configured using a factory (net.sourceforge.pebble.domain.TypeEnumFactory) which is instantiated and set in the net.sourceforge.pebble.Configuration object using the applicationContext-pebble.xml file. The actual bean set is configured from the included pebble_import_factories.xml file since I need to replace the factory easily from my build.xml. I also need to replace the FileDAOFactory so that bean definition has been moved to the xml-file as well.

The applicationContext-acegi-security.xml has been modified as well to import a bean instance from pebble_import_acegi.xml since I also need to be able to easily add something here from my build.

I have also added the possibility of specifying whether the individual filetypes may be managed and whether new directories may be added to the containing filetype directory by the user.

I have put the patch file itself on my blog for downloading. The patch should be applied to the Pebble 2.0-RC2 source tree.