Using a Post-Transaction Filter
For detailed information about configuration files, configuration layers and an explanation of the engine-config placeholder used in the file paths in this section, see the Escenic Content Engine Server Administration Guide.
The post-transaction filters executed by the Content Engine are defined
in a configuration file called
engine-config/io/api/ObjectUpdater.properties
.
To enable a filter called MyPostTransFilter
filter,
therefore, you must add a declaration to this file in one or more of
your configuration layers. For example:
postFilter.myFilter=/com/mycompany/MyPostTransFilter
You must also create a properties file for the filter called
MyPostTransFilter.properties
, and save it in the
location you have specified in the same configuration layer(s) -
engine-config/com/mycompany/MyPostTransFilter.properties
in this case. The file must at least contain a $class
entry specifying the class that implements the filter:
$class=com.mycompany.MyPostTransFilter
You can also set class properties in this file. For example:
$class=com.mycompany.WordCount myFilterParameter=99
Once you have added these configuration filesthe
filter will be called every time a create/delete/update operation is
performed. The PostTransactionFilterAdapter
class has
an enabled
property that can be used to
enable/disable filters. You can therefore disable any filter by
adding
enabled=false
to the properties file.
If no other transaction or post-transaction filters have been
defined, then there may be no
engine-config/io/api/ObjectUpdater.properties
file. In this case you must create one.