org.testifyproject.github.dockerjava.jaxrs.RemoveImageCmdExec Maven / Gradle / Ivy
package org.testifyproject.testifyproject.github.dockerjava.jaxrs;
import javax.ws.rs.client.WebTarget;
import org.testifyproject.slf4j.Logger;
import org.testifyproject.slf4j.LoggerFactory;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.RemoveImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.core.DockerClientConfig;
public class RemoveImageCmdExec extends AbstrSyncDockerCmdExec implements RemoveImageCmd.Exec {
private static final Logger LOGGER = LoggerFactory.getLogger(RemoveImageCmdExec.class);
public RemoveImageCmdExec(WebTarget baseResource, DockerClientConfig dockerClientConfig) {
super(baseResource, dockerClientConfig);
}
@Override
protected Void execute(RemoveImageCmd org.testifyproject.testifyprojectmand) {
WebTarget webTarget = getBaseResource().path("/images/" + org.testifyproject.testifyprojectmand.getImageId());
webTarget = booleanQueryParam(webTarget, "force", org.testifyproject.testifyprojectmand.hasForceEnabled());
webTarget = booleanQueryParam(webTarget, "noprune", org.testifyproject.testifyprojectmand.hasNoPruneEnabled());
LOGGER.trace("DELETE: {}", webTarget);
webTarget.request().org.testifyproject.testifyprojectlete().close();
return null;
}
}