org.sonatype.aether.impl.internal
Class EnhancedLocalRepositoryManager

java.lang.Object
  extended by org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager
      extended by org.sonatype.aether.impl.internal.EnhancedLocalRepositoryManager
All Implemented Interfaces:
LocalRepositoryManager

public class EnhancedLocalRepositoryManager
extends SimpleLocalRepositoryManager

A local repository manager that builds upon the classical Maven 2.0 local repository structure but additionally keeps track of from what repositories a cached artifact was resolved. Resolution of locally cached artifacts will be rejected in case the current resolution request does not match the known source repositories of an artifact, thereby emulating physically separated artifact caches per remote repository.

Author:
Benjamin Bentmann

Constructor Summary
EnhancedLocalRepositoryManager(File basedir)
           
 
Method Summary
 void add(RepositorySystemSession session, LocalArtifactRegistration request)
          Registers an installed or resolved artifact with the local repository.
 LocalArtifactResult find(RepositorySystemSession session, LocalArtifactRequest request)
          Queries for the existence of an artifact in the local repository.
 EnhancedLocalRepositoryManager setLogger(Logger logger)
           
 
Methods inherited from class org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager
add, find, getPathForLocalArtifact, getPathForLocalMetadata, getPathForRemoteArtifact, getPathForRemoteMetadata, getRepository, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnhancedLocalRepositoryManager

public EnhancedLocalRepositoryManager(File basedir)
Method Detail

setLogger

public EnhancedLocalRepositoryManager setLogger(Logger logger)
Overrides:
setLogger in class SimpleLocalRepositoryManager

find

public LocalArtifactResult find(RepositorySystemSession session,
                                LocalArtifactRequest request)
Description copied from interface: LocalRepositoryManager
Queries for the existence of an artifact in the local repository. The request could be satisfied by a locally installed artifact or a previously downloaded artifact.

Specified by:
find in interface LocalRepositoryManager
Overrides:
find in class SimpleLocalRepositoryManager
Parameters:
session - The repository system session during which the request is made, must not be null.
request - The artifact request, must not be null.
Returns:
The result of the request, never null.

add

public void add(RepositorySystemSession session,
                LocalArtifactRegistration request)
Description copied from interface: LocalRepositoryManager
Registers an installed or resolved artifact with the local repository. Note that artifact registration is merely concerned about updating the local repository's internal state, not about actually installing the artifact or its accompanying metadata.

Specified by:
add in interface LocalRepositoryManager
Overrides:
add in class SimpleLocalRepositoryManager
Parameters:
session - The repository system session during which the registration is made, must not be null.
request - The registration request, must not be null.


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.