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

io.bdeploy.bhive.op.ManifestListOperation 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 java.util.Set;

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 Set 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