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

aQute.p2.api.ArtifactProvider Maven / Gradle / Ivy

There is a newer version: 7.1.0
Show newest version
package aQute.p2.api;

import java.util.List;
import java.util.stream.Collectors;

/**
 * Provide P2 artifacts
 */
public interface ArtifactProvider {
	/**
	 * Answer bundles and features
	 */
	List getAllArtifacts() throws Exception;

	default List getBundles() throws Exception {
		return getAllArtifacts().stream()
			.filter(a -> a.classifier == Classifier.BUNDLE)
			.collect(Collectors.toList());
	}

	default List getFeatures() throws Exception {
		return getAllArtifacts().stream()
			.filter(a -> a.classifier == Classifier.FEATURE)
			.collect(Collectors.toList());
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy