Skip to content
Sven Oppermann edited this page Jul 15, 2015 · 4 revisions

To specify configuration entries in a file you have more than one option. The default way is to specify a placeholder and PACIFy will replace it. But sometimes you need some more flexibility. For this the file element in the PACIFy marker file has an attribute FilterClass where you can define the class which will be used for filtering.

PACIFy ships with two build-in filters:

You can write your own filter. You only have to implement an interface, add it to the classpath and you a ready to go.

com.geewhiz.pacify.filter.PacifyTokenFilter

This filter is the default filter and the main purpose is to replace a token within a file.

com.geewhiz.pacify.filter.PacifyVelocityFilter

This filter uses the velocity template engine as filter engine and is really powerful. With this filter you can use if/else/foreach/... statements in your configuration files. Have a look at the example project.