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

io.bdeploy.bhive.op.ManifestExistsOperation Maven / Gradle / Ivy

Go to download

Public API including dependencies, ready to be used for integrations and plugins.

There is a newer version: 7.3.6
Show newest version
package io.bdeploy.bhive.op;

import static io.bdeploy.common.util.RuntimeAssert.assertNotNull;

import io.bdeploy.bhive.BHive;
import io.bdeploy.bhive.ReadOnlyOperation;
import io.bdeploy.bhive.model.Manifest;

/**
 * Checks whether the given manifest exists in the underlying {@link BHive}
 */
@ReadOnlyOperation
public class ManifestExistsOperation extends BHive.Operation {

    private Manifest.Key manifest;

    @Override
    public Boolean call() throws Exception {
        assertNotNull(manifest, "Manifest to check not set");
        return getManifestDatabase().hasManifest(manifest);
    }

    /**
     * The {@link Manifest} to check.
     */
    public ManifestExistsOperation setManifest(Manifest.Key key) {
        this.manifest = key;
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy