Pool decorators

A CUE pool decorator is a Java class that:

  • Extends neo.xredsys.presentation.PresentationPoolDecorator

  • Contains a get method for each property it is to modify

CUE supports two different types of pool decorators:

Standard pool decorator

A standard pool decorator is created when the pool is loaded from the database. It is cached and lives until the pool is removed from the pool presentation cache.

Request pool decorator

A request pool decorator is created the first time someone uses a given instance of a pool in an HTTP request. The decorator is cached in the request and flushed when the request is completed. You should only use a request pool decorator if you need the decorator to behaves differently in different requests. For example, a time-controlled decorator that enables/disables groups based on the time of the day should be implemented using a request pool decorator.

A standard pool decorator must extend neo.xredsys.presentation.PresentationPoolDecorator. A request pool decorator can also extend this class, but if it needs access to javax.servlet.ServletRequest then it should extend neo.xredsys.presentation.RequestPresentationPoolDecorator instead.

Before a decorator can be used it must be:

  • Compiled

  • Added to the web application's classpath

To compile a decorator you need the CUE JAR file engine-presentation-7.0.2-2.jar in your classpath.

Once you have a created a pool decorator class, you have to:

  • Create a set of .properties files that declare the decorator and registers it in the system.

  • Declare the decorator in the layout-group publication resource

  • Package the decorator in a JAR file

  • Deploy the JAR file in your publication