diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository/src/org/eclipse')
4 files changed, 37 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java index 8bf33c346..e2fe061ce 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java @@ -10,7 +10,7 @@ * Cloudsmith Inc - additional implementation * Sonatype Inc - additional implementation *******************************************************************************/ -package org.eclipse.equinox.internal.p2.metadata.repository; +package org.eclipse.equinox.internal.p2.repository; import java.io.*; import java.net.URI; @@ -19,8 +19,6 @@ import java.util.HashSet; import org.eclipse.core.runtime.*; import org.eclipse.ecf.filetransfer.UserCancelledException; import org.eclipse.equinox.internal.p2.core.helpers.LogHelper; -import org.eclipse.equinox.internal.p2.repository.*; -import org.eclipse.equinox.internal.p2.repository.Activator; import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus; import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener; import org.eclipse.equinox.internal.provisional.p2.repository.IStateful; diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java new file mode 100644 index 000000000..26d5851b5 --- /dev/null +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java @@ -0,0 +1,27 @@ +/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.repository;
+
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+public class CacheManagerComponent implements IAgentServiceFactory {
+
+ public Object createService(IProvisioningAgent agent) {
+ final IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+ CacheManager cache = new CacheManager((IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME));
+ cache.setEventBus(eventBus);
+ return cache;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java index 2ed09a9d3..daf6642ee 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java @@ -8,6 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Cloudsmith Inc - additional messages + * Sonatype Inc - ongoing development *******************************************************************************/ package org.eclipse.equinox.internal.p2.repository; @@ -16,6 +17,10 @@ import org.eclipse.osgi.util.NLS; public class Messages extends NLS { private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.repository.messages"; //$NON-NLS-1$ + public static String CacheManager_AuthenticationFaileFor_0; + public static String CacheManager_FailedCommunicationWithRepo_0; + public static String CacheManager_Neither_0_nor_1_found; + public static String artifact_not_found; public static String io_failedRead; public static String ecf_configuration_error; diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties index 15728fe56..510885ba0 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties @@ -8,6 +8,7 @@ # Contributors: # IBM Corporation - initial API and implementation # Cloudsmith Inc - additional messages +# Sonatype Inc - ongoing implementation ############################################################################### artifact_not_found=Artifact not found: {0}. @@ -18,9 +19,9 @@ ecf_configuration_error=Transport initialization error. repoMan_internalError=Internal error. repo_loading = Loading the repository {0} - - - +CacheManager_Neither_0_nor_1_found=Neither {0} nor {1} found. +CacheManager_AuthenticationFaileFor_0=Authentication failed for {0}. +CacheManager_FailedCommunicationWithRepo_0=Communication with repository at {0} failed. exception_malformedRepoURI = The repository location ({0}) must be a URI. |