Add ability to have settings sent to preprocessor

Submitted by Anonymous on Mon, 2010-04-05 21:49
::
Category: 
feature request 
Status: 
completed 
Priority: 
normal 
Assigned to: 
Description: 

Currently a plugin can get configuration settings from the init.properties through the sess-man/plugins-conf/[plugin id] node but this is only available to the process() method of the plugin. The preprocess / postprocess methods could benefit from custom settings as well.

As a first step being able to pass the settings along to those methods would be great. A further step would be to allow for some init call that would pass in the settings. One reason I see for this is that if you have a plugin interacting with both preprocess and process steps of a packet it is hard to know which one should initialize the plugin unless you have a custom state property on the plugin class to see when it was initialized (lazy loading). Would be nice to have that init happen when the class is first instantiated.

 

Progress?

Just curious if this is still something that will be implemented within the 5.1 release. Running into a similar problem with another plugin where it would be nice to have the init() or setSettings() method to initialize the plugin.

Artur Hefczyc's picture

It is already implemented

It is already implemented properly in 5.1 development branch. init(...) is called correctly.

Artur Hefczyc's picture

It is scheduled for 5.1.0

It is scheduled for 5.1.0 release. Regarding the init() method, there is an init method already, but it is supposed to be called with UserRepository only right now, and.... it is not called at all.

I will look at all such issues for the 5.1.0 release.