Adding Custom Utilization

You can customize the Utilization calculation by adding a bean that implements the IUtilizationCalculator interface. Here’s how to do this:

1. Create the Spring Bean

The IUtilizationCalculator contains two methods that need to be overridden:

public interface IUtilizationCalculator {

     * @param copperContext
     *  Creates the utilization measure in the Limits cube using copper
    void createUtilizationMeasure(ICopperContext copperContext);

     * @param incidentDTO
     * @return the utilization value as per the evaluation
    double computeUtilization(IncidentDTO incidentDTO);

The createUtilizationMeasure method is used to create the utilization measure in the Limits cube. The computeUtilization method is used to compute the utilization once a limit has been evaluated, and is visible in the Limits Status screen. The class DefaultUtilizationMeasureCalculator handles the default calculation.

If you want to implement your own utilization calculation, for instance $ \dfrac{exposure}{limitValue} $, the custom Spring Bean will look as follows:

public class MyUtilizationMeasureCalculator implements IUtilizationCalculator {

    public void createUtilizationMeasure(ICopperContext copperContext) {
                .per(Copper.level(DIM_TECHNICAL, HIER_INCIDENT_KEY, HIER_INCIDENT_KEY))

    public double computeUtilization(IncidentDTO incidentDTO) {
        return incidentDTO.getMeasureValue() / incidentDTO.getLimitValue()[0];


Note the inclusion of the @Primary annotation, which tells Spring to use MyUtilizationMeasureCalculator instead of DefaultUtilizationMeasureCalculator.

2. Import the Spring Bean

Once the bean is created, you need to import it to the project. Once done, Spring will use the custom bean for calculating the utilization.