All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.commands.CommandImpl Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
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