Making A Transaction Filter

For general background information on making transaction filters, see the Escenic Content Engine Advanced Developer Guide.

To make a CUE Live transaction filter, create a Java class that extends the abstract class com.escenic.livecenter.TransactionFilterService. This is a convenience class containing empty "do nothing" implementations of the methods defined in the com.escenic.livecenter.TransactionFilter interface:

beforeCreate( pLiveEntry )

Called immediately before a new entry is saved.

beforeUpdate( pLiveEntry )

Called immediately before changes to an existing entry are saved.

beforeDelete( pLiveEntry )

Called immediately before an existing entry is deleted.

afterCreate( pLiveEntry )

Called immediately after a new entry is saved.

afterUpdate( pLiveEntry )

Called immediately before changes to an existing entry are saved.

afterDelete( pLiveEntry )

Called immediately before an existing entry is deleted.

isEnabled

Called by the Content Engine to determine whether or not the filter is currently enabled.

All you need to do in your class is re-implement the method(s) that you are interested in. In the before methods you can query the entry and modify it. In the case of beforeCreate and beforeUpdate, any changes you make are reflected in the saved object.

Before a transaction filter can be used it must be:

  • Compiled

  • Added to the Content Engine's classpath