package com.worldofbooks.autoconfigure.spring.web;

import java.util.ArrayList;
import java.util.List;

public class CommonResponse {

    private String exceptionMessage;
    private List<String> eventMessages = new ArrayList<>();
    private List<String> errorMessages = new ArrayList<>();

    public String getExceptionMessage() {
        return exceptionMessage;
    }

    public void setExceptionMessage(String exceptionMessage) {
        this.exceptionMessage = exceptionMessage;
    }

    public void addEventMessage(String message) {
        eventMessages.add(message);
    }

    public void addErrorMessage(String errorMessage) {
        errorMessages.add(errorMessage);
    }

    public List<String> getEventMessages() {
        return eventMessages;
    }

    public void setEventMessages(List<String> eventMessages) {
        this.eventMessages = eventMessages;
    }

    public List<String> getErrorMessages() {
        return errorMessages;
    }

    public void setErrorMessages(List<String> errorMessages) {
        this.errorMessages = errorMessages;
    }
}

@@ -375,28 +375,38 @@
 %0A    public 
-void
+CommonResponse
  setExceptio
@@ -495,34 +495,65 @@
 ge;%0A    
-%7D%0A%0A    public void
+    return this;%0A    %7D%0A%0A    public CommonResponse
  addEven
@@ -607,32 +607,53 @@
 s.add(message);%0A
+        return this;%0A
     %7D%0A%0A    publi
@@ -654,20 +654,30 @@
  public 
-void
+CommonResponse
  addErro
@@ -745,24 +745,45 @@
 orMessage);%0A
+        return this;%0A
     %7D%0A%0A    p

Update CommonResponse to have a fluid API.