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

org.testifyproject.github.dockerjava.jaxrs.RemoveImageCmdExec Maven / Gradle / Ivy

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy