io.sphere.sdk.commands.CommandImpl Maven / Gradle / Ivy
package io.sphere.sdk.commands;
import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.client.SphereRequestBase;
import io.sphere.sdk.http.HttpResponse;
/**
* Base class to implement commands using the Jackson JSON mapper.
*
* @param the type of the result of the command, most likely the updated entity without expanded references
*
*/
public abstract class CommandImpl extends SphereRequestBase implements Command {
@Override
public T deserialize(final HttpResponse httpResponse) {
return deserialize(httpResponse, typeReference());
}
protected abstract TypeReference typeReference();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy