loading table of contents...

Studio Developer Manual / Version 2310

Table Of Contents Configuring Write Interceptors

A write interceptor is enabled by simply defining a bean in the Spring application context of the Studio web application. The interception framework automatically collects all interceptor beans and applies them in order whenever an update is requested. Interceptors with numerically lower priorities are executed first.

For a write interceptor implemented using the class ContentWriteInterceptorBase, the priority is configured through the priority property. Such interceptors also provide the property type, indicating that an interceptor should only run for instances of specific content types. While the setter setType() receives a ContentType parameter, it is possible to simply provide the content type name as a string in the Spring bean definition file. The type name will be automatically converted to a ContentType object.

Furthermore, you need to configure whether the interceptor also applies to instances of subtypes of the given type through the property isInterceptingSubtypes. Like for validators, this property defaults to false, meaning that interception applies only to content items of the exact type.

Each write interceptor may also introduce additional configuration options of its own.

A typical definition might look like this:

MyInterceptor myInterceptor() {
  MyInterceptor myInterceptor = new MyInterceptor();
  return myInterceptor;

Example 9.97. Configuring a Write Interceptor

Search Results

Table Of Contents

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.