io.bdeploy.bhive.op.ManifestListOperation 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.
The newest version!
package io.bdeploy.bhive.op;
import java.util.SortedSet;
import io.bdeploy.bhive.BHive;
import io.bdeploy.bhive.ReadOnlyOperation;
import io.bdeploy.bhive.model.Manifest;
/**
* Lists all {@link Manifest}s available in the {@link BHive}.
*/
@ReadOnlyOperation
public class ManifestListOperation extends BHive.Operation> {
private String key;
@Override
public SortedSet call() throws Exception {
if (key == null) {
return getManifestDatabase().getAllManifests();
} else {
return getManifestDatabase().getAllForName(key);
}
}
/**
* @param name the name of the manifest to calculate a new version for. Note that this can be any number of full segments of
* the name. Segments are separated with '/'.
* @return the operation for chaining.
*/
public ManifestListOperation setManifestName(String name) {
this.key = name;
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy