org.sonatype.tycho.p2.impl.resolver
Class TychoP2RepositoryCacheManager

java.lang.Object
  extended by org.eclipse.equinox.internal.p2.repository.CacheManager
      extended by copied.org.eclipse.equinox.internal.p2.repository.CacheManager
          extended by org.sonatype.tycho.p2.impl.resolver.TychoP2RepositoryCacheManager

public class TychoP2RepositoryCacheManager
extends CacheManager

Author:
igor

Field Summary
static String CACHE_RELPATH
           
 
Fields inherited from class copied.org.eclipse.equinox.internal.p2.repository.CacheManager
SERVICE_NAME
 
Constructor Summary
TychoP2RepositoryCacheManager()
           
 
Method Summary
 File createCache(URI repositoryLocation, String prefix, org.eclipse.core.runtime.IProgressMonitor monitor)
          Returns a local cache file with the contents of the given remote location, or null if a local cache could not be created.
protected  File getCacheDirectory()
          Returns the file corresponding to the data area to be used by the cache manager.
 void setLocalRepositoryLocation(File localRepositoryLocation)
           
 void setOffline(boolean offline)
           
 
Methods inherited from class copied.org.eclipse.equinox.internal.p2.repository.CacheManager
getCache, setEventBus, unsetEventBus, updateCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_RELPATH

public static final String CACHE_RELPATH
See Also:
Constant Field Values
Constructor Detail

TychoP2RepositoryCacheManager

public TychoP2RepositoryCacheManager()
Method Detail

createCache

public File createCache(URI repositoryLocation,
                        String prefix,
                        org.eclipse.core.runtime.IProgressMonitor monitor)
                 throws IOException,
                        org.eclipse.equinox.p2.core.ProvisionException
Description copied from class: CacheManager
Returns a local cache file with the contents of the given remote location, or null if a local cache could not be created.

Overrides:
createCache in class CacheManager
Parameters:
repositoryLocation - The remote location to be cached
prefix - The prefix to use when creating the cache file
monitor - a progress monitor
Returns:
A File object pointing to the cache file or null if the location is not a repository.
Throws:
FileNotFoundException - if neither jar nor xml index file exists at given location
org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException - if jar not available and xml causes authentication fail
IOException - on general IO errors
org.eclipse.equinox.p2.core.ProvisionException - on any error (e.g. user cancellation, unknown host, malformed address, connection refused, etc.)

getCacheDirectory

protected File getCacheDirectory()
Description copied from class: CacheManager
Returns the file corresponding to the data area to be used by the cache manager.

Overrides:
getCacheDirectory in class CacheManager

setOffline

public void setOffline(boolean offline)

setLocalRepositoryLocation

public void setLocalRepositoryLocation(File localRepositoryLocation)


Copyright © 2008-2011. All Rights Reserved.