@Test public void createEntityCreationAlertWithTranslation() { HttpHeaders headers = HeaderUtil.createEntityCreationAlert("myApp", true, "User", "2"); assertThat(headers.getFirst("X-myApp-alert")).isEqualTo("myApp.User.created"); assertThat(headers.getFirst("X-myApp-params")).isEqualTo("2"); }
public static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".created" : "A new " + entityName + " is created with identifier " + param; return createAlert(applicationName, message, param); }
HeaderUtil { public static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".created" : "A new " + entityName + " is created with identifier " + param; return createAlert(applicationName, message, param); } }
HeaderUtil { public static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".created" : "A new " + entityName + " is created with identifier " + param; return createAlert(applicationName, message, param); } private  HeaderUtil(); }
HeaderUtil { public static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".created" : "A new " + entityName + " is created with identifier " + param; return createAlert(applicationName, message, param); } private  HeaderUtil(); static HttpHeaders createAlert(String applicationName, String message, String param); static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createEntityUpdateAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createFailureAlert(String applicationName, boolean enableTranslation, String entityName, String errorKey, String defaultMessage); }
HeaderUtil { public static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param) { String message = enableTranslation ? applicationName + "." + entityName + ".created" : "A new " + entityName + " is created with identifier " + param; return createAlert(applicationName, message, param); } private  HeaderUtil(); static HttpHeaders createAlert(String applicationName, String message, String param); static HttpHeaders createEntityCreationAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createEntityUpdateAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createEntityDeletionAlert(String applicationName, boolean enableTranslation, String entityName, String param); static HttpHeaders createFailureAlert(String applicationName, boolean enableTranslation, String entityName, String errorKey, String defaultMessage);  }