Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2009-02-18 23:13:49 +0000
committerAndrew Niefer2009-02-18 23:13:49 +0000
commitfb8c6a27e20f1b07e2a90243b75c24c6145c9078 (patch)
treee7cf46835053fb9210907b26fbc0c806fcfa5851 /bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository
parent6601987d56fce56a7d2adde59b25c04e02a561a1 (diff)
downloadrt.equinox.p2-fb8c6a27e20f1b07e2a90243b75c24c6145c9078.tar.gz
rt.equinox.p2-fb8c6a27e20f1b07e2a90243b75c24c6145c9078.tar.xz
rt.equinox.p2-fb8c6a27e20f1b07e2a90243b75c24c6145c9078.zip
bug 248951 - repository load hints
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java
index 75512147d..9d9a8be4a 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java
@@ -86,6 +86,7 @@ public interface IArtifactRepositoryManager extends IRepositoryManager {
* load attempts.
* </p>
*
+ * @deprecated see {@link #loadRepository(URI, int, IProgressMonitor)}
* @param location the location in which to look for a repository description
* @param monitor a progress monitor, or <code>null</code> if progress
* reporting is not desired
@@ -99,6 +100,37 @@ public interface IArtifactRepositoryManager extends IRepositoryManager {
public IArtifactRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
/**
+ * Loads the repository at the given location. The location is expected to contain
+ * data that describes a valid artifact repository of a known type. If this manager
+ * already knows a repository at the given location then that repository is returned.
+ * <p>
+ * The resulting repository is added to the list of repositories tracked by
+ * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
+ * if they do not want the repository manager to remember the repository for subsequent
+ * load attempts.
+ * </p>
+ *
+ * <p>
+ * The flags passed in should be taken as a hint for the type of repository to load. If
+ * the manager will not load a repository that satisfies these hints, it can fail
+ * fast.<br>
+ * See {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE}
+ * </p>
+ * @param location the location in which to look for a repository description
+ * @param flags - flags to consider when loading
+ * @param monitor a progress monitor, or <code>null</code> if progress
+ * reporting is not desired
+ * @return a repository object for the given location
+ * @throws ProvisionException if the repository could not be created. Reasons include:
+ * <ul>
+ * <li>There is no existing repository at that location.</li>
+ * <li>The repository at that location could not be read.</li>
+ * </ul>
+ * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
+ */
+ public IArtifactRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
+
+ /**
* Refreshes the repository corresponding to the given URL. This method discards
* any cached state held by the repository manager and reloads the repository
* contents. The provided repository location must already be known to the repository

Back to the top