net.leanix.dropkit.responses.Response Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leanix-dropkit Show documentation
Show all versions of leanix-dropkit Show documentation
Base functionality for leanIX dropwizard-based services
package net.leanix.dropkit.responses;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
/**
* A generic entity container for api responses.
*
*
*
* @param
* @deprecated
*/
@JsonInclude(Include.NON_NULL)
public abstract class Response extends BasicResponse {
protected T data;
public Response() {
super();
}
/**
* Constructor for a result containing a single entity.
*
* @param entity
*/
public Response(T entity) {
status = ResponseStatus.OK;
data = entity;
type = entity.getClass().getSimpleName();
}
@JsonInclude
public abstract T getData();
public void setData(T data) {
this.data = data;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy