ad63b55edb
* Initial Commit for Spark Java Article BAEL-498 * reverting main pom.xml and rollbacking accidental changes. * Changes as per review: 1. Added UserService 2. Renamed UserStore to UserServiceMapImpl 3. Removed Empty spaces in User.java 4. Removed AppTest 5. Changes in SparkRestExample for using UserServiceMapImp instead of UserStore static functions. * Suggested changes in print messages. * Changes as per comments on github... for PR: https://github.com/eugenp/tutorials/pull/912 * Changes in editUser function as per guidance by Kevin. * Clean up * added 1.8 config for pom.xml * Clean up. * Removed junit dep. * Added Application/json in response type.
48 lines
1005 B
Java
48 lines
1005 B
Java
package com.baeldung.sparkjava;
|
|
|
|
import com.google.gson.JsonElement;
|
|
|
|
public class StandardResponse {
|
|
private StatusResponse status;
|
|
private String message;
|
|
private JsonElement data;
|
|
|
|
public StandardResponse(StatusResponse status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public StandardResponse(StatusResponse status, String message) {
|
|
this.status = status;
|
|
this.message = message;
|
|
}
|
|
|
|
public StandardResponse(StatusResponse status, JsonElement data) {
|
|
this.status = status;
|
|
this.data = data;
|
|
}
|
|
|
|
public StatusResponse getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public void setStatus(StatusResponse status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public String getMessage() {
|
|
return message;
|
|
}
|
|
|
|
public void setMessage(String message) {
|
|
this.message = message;
|
|
}
|
|
|
|
public JsonElement getData() {
|
|
return data;
|
|
}
|
|
|
|
public void setData(JsonElement data) {
|
|
this.data = data;
|
|
}
|
|
}
|