Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IInstallableUnitQueryable interface to allow easier adaption #348

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*******************************************************************************
* Copyright (c) 2023 Christoph Läubrich and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christoph Läubrich - initial API and implementation
*******************************************************************************/
package org.eclipse.equinox.p2.metadata;

import org.eclipse.equinox.p2.query.IQueryable;

/**
* A {@link IQueryable} for {@link IInstallableUnit}s, this interface is manly
* to allow adaption in a context where the generic {@link IQueryable} would not
* be applicable as the type information can not be preserved otherwise.
*
* @since 2.8
*
*/
public interface IInstallableUnitQueryable extends IQueryable<IInstallableUnit> {

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.p2.core.IPool;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.IInstallableUnitQueryable;
import org.eclipse.equinox.p2.repository.*;
import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;

Expand All @@ -31,7 +32,7 @@
* @noimplement This interface is not intended to be implemented by clients. Instead subclass {@link AbstractMetadataRepository}
* @since 2.0
*/
public interface IMetadataRepository extends IRepository<IInstallableUnit> {
public interface IMetadataRepository extends IRepository<IInstallableUnit>, IInstallableUnitQueryable {

/**
* Add the given installable units to this repository.
Expand Down
Loading