io.bdeploy.bhive.op.ManifestExistsOperation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
Public API including dependencies, ready to be used for integrations and plugins.
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