import com.fasterxml.jackson.databind.ObjectWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
import java.io.Serializable;
-public class OofRequest implements Serializable{
+public class OofRequest implements Serializable {
private static final long serialVersionUID = -1541132882892163132L;
private static final Logger logger = LoggerFactory.getLogger(OofRequest.class);
public RequestInfo getRequestInformation() {
return requestInformation;
}
+
public void setRequestInformation(RequestInfo requestInformation) {
this.requestInformation = requestInformation;
}
+
public ServiceInfo getServiceInformation() {
return serviceInformation;
}
+
public void setServiceInformation(ServiceInfo serviceInformation) {
this.serviceInformation = serviceInformation;
}
+
public PlacementInfo getPlacementInformation() {
return placementInformation;
}
+
public void setPlacementInformation(PlacementInfo placementInformation) {
this.placementInformation = placementInformation;
}
+
public String getLicenseInformation() {
return licenseInformation;
}
+
public void setLicenseInformation(String licenseInformation) {
this.licenseInformation = licenseInformation;
}
@JsonInclude(Include.NON_NULL)
- public String toJsonString(){
+ public String toJsonString() {
String json = "";
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(Include.NON_NULL);
ObjectWriter ow = mapper.writer().withDefaultPrettyPrinter();
- try{
+ try {
json = ow.writeValueAsString(this);
- }catch (Exception e){
+ } catch (Exception e) {
logger.error("Unable to convert oofRequest to string", e);
}
return json.replaceAll("\\\\", "");